Hello everybody and welcome back.
And before we continue with our functions as you're fun to show you one thing that we need to code in
order for you to be able to execute it.
So I already ran my shell the same shell from previous video on my target bases so right now all I have
to do is run my server.
So here I run the server listening for incoming connections and soon enough.
I hope that the shell will open.
So here it is.
Who am I.
Everything works good.
And what I want to show you right here if you for example open your command prompt and type here start
notepad for example.
It will start a notepad and it will prompt you for the for the.
Basically for the next command to be input while the notepad is running.
But if we tried to do the same on our shell or a server or basically reverse shell start notepad it
will open notepad but it will hang on the connection as soon as the notepad isn't closed.
So we will not be able to execute any other commands until the notepad is closed.
So we want to actually be able to fix that.
And how do we fix that.
Well first of all you can see that we received the connection back as soon as someone clicks X on the
notepad and then we can type am I.
Which means we can run our shell.
So what we want to do right now is basically try to call the part of our L if statement where we will
use the SAP process library in order to start the notepad or basically in order to start any program
that you specify after this start comment.
So let us close this.
Kill it in the right here so it doesn't run.
Once we run it once again and what we want to do right now is nano our reverse show.
But let me just delete this from the previous video.
So we have a clear start since tech reverse shall not be why and what we want to do right now is add
the statement.
What happens when we specify a start as a beginning so we can open for example start explorer start
notepad start calculator or start any other program.
So else if command and I believe first file letters yes first five equal groups not three equals equal
to start.
We will try to run that program so try and accept
once we tried to run it we need to use a process not be open command from the six letters so we calculate
the empty space as well.
And then shall we construct.
This will open up our command and in order for us to for example know if we successfully started it.
Let's send to our target or basically to our server.
Let's send a reliable send ups send class started and accept.
If it doesn't.
If it fails to send it we will just send a reliable send
to quote exclamation marks fail to start.
So this should be everything we need to do I believe so.
Let us just say this.
And also we will need to code the part of the show.
Of pardon me part of the server as well as financial server.
Or maybe we will not need to code anything that me just check out right here.
So we sent started to open the program and we receive.
Yeah we actually don't need to type here anything we can just proceed with the same code right here.
Since we sent it since.
If we send the commands start something it will send the command and it will go right here and it will
wait for the result.
The result will be a string whether we successfully started or didn't start the program.
So let us say this right now.
Let us also delete the halo that the city and let us compile the program.
So here we have the compilation.
Same as before.
1 file no console click enter right here while this click Central.
Let me just delete the reversal from the previous video.
So delete this test.
The extreme and also the delete this desk directory.
So this should successfully compile since we didn't report any input into any new libraries that will
maybe cause some trouble.
And right now what we want to do is as usual plug in our USP drive in order to transfer the file.
Once you plug in the beta I want to go to this directory more reverse shell to the media en route another
Carrie Lee live drive after that we go on directly back and start our server listening for incoming
connections.
Then we unplug the USP drive and right now what we want to do is open it and start our reverse shell.
Now I started it from the calendar as we drive but it doesn't really matter or we'll just be in the
different directory once we receive the shell prompted.
So we just wait now for it to get back to us.
It should take a few seconds and here it is target connected.
So if I just type in there you can see we are no longer on the desktop.
We are in the US we trade directory since I started the reversal there but it doesn't matter.
What matters is if I now start read it to prompt a started and it will also open notepad.
It will not hang anymore.
So right now I can run other commands as well such as I have config for example and I can start another
node but if I wanted to and it will open to node pages you can see right here.
You can also start calculator start explorer if you wanted to explorer start notepad once again so you
can start a bunch of files on the target.
P.S. without them doing anything so you can just start a bunch of other applications and also execute
the commands while they are being opened.
So before we actually coded that we thought the target had to actually cause the calculator in order
for us to continue to execute commands right now that is not necessary.
We can execute commands while the programs are opened so that would be about it.
For this video I just want to show you that and we will continue in the next video by.