Hello everybody and welcome back.
And right now let's see how we can actually make our file or our reverse shell to be an image or not
to be an image to be to actually to actually open an image.
Once a target double clicks it.
So we want to make a reverse shell that actually can open an image as soon as it is clicked on.
So let's see what we can do that.
Now on my use be drive I have right here the this image right here that J Peck and we will try to make
our target execute the reverse shell and also open this image at the same time.
So let us see how we can do that.
We can simply do that by going into our reverse shell that P Y.
But let me just remove all of these screenshots from the previous video.
Also this minus.
And also build minus r so we should only have these two files and let us go into the reverse shall not
be white.
Now we need to import something called cis.
Now since we already did import it.
This is where we are going to use it right now.
So let me just say we need to go all the way down right here.
And what we want to do is right after we actually call the registry function we want to create basically
a file which will store the image that we will actually plug in to our reverse shell.
Now how do we do that.
Well basically what we want to type right here so perhaps we want to type your name which will be the
name of our file and we will use a regular path to the CIS underscore slips me I pass which basically
creates a temporary folder which will store this image and we can call it.
We actually need to call it the same as the year as the name of the image.
So let me just plug in my youth B drive since I will need my image in order to compile it with the program.
So open files we find the image itself and what we want to do is I want to move this image to the folder
where I have my server and reverse shelf.
So I will just copy the dragon to be root python programs and then reverse.
And then I can exit this since I have it right there but actually I just need to also let me just I
need to also copy the file of that image so I can reverse less and just copy the file the name of the
image that you want to use copied like this.
Now I can close it and then you paste it right here and then you add the additional double quotes.
So you need to add this right here this will use a temporary pi installer folder with the name of the
image itself.
So it will store it right there and as soon as target opens it it will open this path right here.
So what we want to do is actually open that path.
So the target opens the image.
So we would do that with the support process not be open and we want to open the name which is the path
this path with this image right here.
And we want to type your regulatory shell equally strong.
Then we close this
except and here you can basically just type tyrannical if you want.
For example I know no equals three.
Now this is just some part of the code which doesn't really matter.
So this will do if the code before doesn't work.
And let's say addition equals no close number one.
Now this is basically you can just type here anything you want.
I just typed here this.
This can also also help in preventing some anti viruses since they can basically notice there are some
regular functions in there.
Now this is just not really that good of a function but I just coded anything for the accept rule.
So if the opening of the image doesn't work it will just perform this and it will continue with the
regular connection.
So right now basically all we need to do is compile the program so it can actually contain the image
itself and when it prints the image into this directory right here it will then open the image with
this command.
So this is all we need to specify right now let us control all this and let us try and see how we can
actually compile this with this image right here.
So let us use wine route dot wine drive seed python scripts by installer that the see and what we want
to do right now is add the data.
Now this we can do with this command right here.
So there's that ad dash data and under the double quotes we need to specify the path to the image that
we want to add in my case it is the root python programs reverse and then the dragon dot J.
Back then it close the quotes.
Now before you close the quotes there are some syntax for pine so you need to add before the second
code closed you need to add the comma and not just find it.
Where is it.
Here it is.
So this come on dot and you also need to add the DOT after it.
So you need to have this at the end.
Let me zoom in 10 so you can see it doing better.
So this is something that you need to have before ending the comment right now.
Me ask is this is too big we want to add the regular things such as one file and no console.
And right now if I compile this program it should have.
Let me just see my installer too few arguments.
Not really sure what it means by too few arguments.
Let me just check it out right here at the data root both programs.
OK.
One file no console.
Not really sure.
White says too few arguments.
Let's try to actually delete this.
Maybe this is something that we need to specify right after we plug in the icon for known.
Let us just use this invalid data binary value
let's try with this.
I'm not really sure if I remember the syntax correctly.
OK so let me just try to play this down one rule to drive see everything is good.
Pyne's told that the AKC data than the path
than the thought right here.
I believe that is the syntax if it is not I'll have to check it out.
One filed and then no Consul.
OK so this doesn't seem to work.
Now we will try to make it work with the icon as well so I will just add the icon to the file.
Now in order for you to create the icon
in order for you to make the icon of our program just go to your Firefox.
Maybe that is something that we need to specify.
I was going to do that in the next video but we can do it right now as well so go to the for website
called HDP S slash slash convert loops convert IDE code dot com slash JPEG
to IKO.
So it will lead you to this Web site where you can upload an image and what this will do is it will
create the icon file or basically the icon for your image so we can click right here to upload it.
Let's click right here.
Let's go to the root then go to the python programs where my images reverse and upload this image
and then we can OK.
So it's finished.
So you just click here on the right side.
It will be the icon which is created from your image.
You just click this arrow right here.
So download this icon and it will download the icon for us.
We want to save it then we want to check out in which directory it is so we can use it in our command
we can see that it is in the downloads directory.
So we will specify that path.
Once we specify the icon option in our pie installer comment.
So we know that it is in the Dallas directories.
We go back to here.
So we use the same command as before they did it for us.
So just specify that data and then this with the DOT and the comma and then dot after it.
Then one file then no console.
And after that you want to specify dash dash icon and then the path to the icon which is Route downloads
and then the name of the icon itself.
Now I just notice that the reason why this didn't work is because we didn't even specify to the file
that we want to actually compile it didn't have anything to do with the icon so you didn't have to do
this part.
All you had to do after the no console party just type your reverse shall not be white.
But since we already did this let's continue with it.
We have the icon saved in the downloads folder which is the icon for our file.
And right now after it we want to just specify the name of the file that we want to compile.
So we have everything specified.
And if I just click your enter
it will start compiling our program while adding the image and also adding the icon for our program.
So you will see that we will have a program that will have the icon of the image and it will also open
the image itself.
Once we actually click or double click it on our P.C. but since we do not want it to open the image
every time.
So for example once we create the persistence we do not want to match to make image open.
That's why we coded this part right here.
So why.
That's why we called coded it to open the image in the lower part.
If this goes or its location doesn't exist which means that this is running the first time which means
it should open the image now any other time that this is running at a startup after the reboot it should
not open the image and it will not open the image since this part of the code is only are under these
circumstances right here.
So every time we go after the first time this image will not be opened anymore by the target which is
good.
So right now what we want to do first of all in order to see if the image opens correctly we want to
first delete the first file from our IP data and then go to roaming.
And then if I just type here let me just show you there and delete the backdoor that you.
I will exit this program since I need to also delete this in the registry.
So just type you run the risk at it OK.
It will ask for administrator password and what they wanted to do is just delete these backdoor so delete
it deleting will.
Are you sure you want to permanently delete this value.
Yes.
Now make sure to not let anything else since deleting the wrong things can actually make your computer
crash and your windows not work anymore.
So be careful while using the registry added so.
Right.
All we have to do right now is run our program first of all.
We will run the server listening for incoming connections then what we want to do is actually copy from
another terminal in the executable to the media.
Ruth.
Once we copied there we want to exit this terminal.
We want to unplug the device and large this.