Hey everybody welcomes the next video we're gonna be going over how to create a persistent backdoor
that make sure we always have our connection and we're gonna do this in a little bit of an obscure way.
So the first thing we need to do is make sure that we have a system level or root level show.
So in this case we'll do get d d because C this is the current exploit me slash user.
So we're going to get system get D perfect.
So now we're anti system authority.
It's exactly what we want.
Now there's a module that we've sort of used before called it run per system.
We've used this before.
And what I want to do is take this step further and show you some of the configuration options that
we can do.
So for Dash a what that's gonna do is that's gonna tell letterpress her and Metis blade to create a
handler based on those settings that we provide the persistence module and that'll go ahead and set
it up automatically for us so we don't have to build it ourselves next dash L is where is the location
we want the material to sponsor what current working directory that we want it to be.
So we're going to do the route of the C drive followed by that is capital X. What interval do you want
your shell to come back to you or have it back the reverse shell connect back.
So in this case we'll do 30 seconds.
And following this is the port.
What port do you want to use.
So we'll do 4 4 4 5.
And the last step in here is Dash are for the remote host.
We're going to connect back to six eight one twenty four.
So when we run this we're gonna go ahead and generate persistence on the machine and it's going to automatically
try to start up a new shell.
So we're gonna go ahead and background this process Sessions dash l.
So we've got one session currently.
So we'll just give it a second to connect back and there we go.
So I had to fix some issue there was because I ran that so many times it started to cause issues on
the system so I bounced it and we just rerun the same exact thing in the same scenario.
So if we go ahead and background this process we do sessions dash l we can see we have a session.
So this is the one that we just created so 4 4 4 6.
So if we do sessions Dash I and we go to 8 we go ahead and kill this and list the sessions again you'll
see we just have one.
But if we give it just a few seconds there it is we've gone ahead and grabbed our new session and if
we go ahead and take a look at it at 9 show and you see here we go.
We are good to go get you.
It is currently running as the same user which is exactly what we'd expect.
So this means our shell will keep persistently coming back to us every time it dies.
So if we kill it one more time we'll give it just just a minute or two and then we should see session
90 10 come in just right there not even not even 30 seconds.
So as you can see this is a good way to keep everything consistent and running and also a little bit
more inconspicuous to the user.