Hey there.
It's nice to see you back.
In this module, we will discuss how to create persistence using Meterpreter.
This module is all about creating ways to access your
victim computer at any time you want.
Imagine you exploit a vulnerability in the server and you've got admin access.
Then,
what you want to do now is to create ways to enter in
the system at any time you want.
For example,
if two days from now you need to log into the server for some more tests,
you can use your persistent techniques for that.
The easiest way of doing that will be creating an extra admin account,
so then you can log into the system at any time you want.
In this way,
even if the system administrator patches the vulnerability you exploited,
you still have access to the machine.
However,
nowadays system administrators check if there are any new users in the
system because they know that's a really common backdoor.
So in this module,
we will discuss some other more advanced strategies for creating persistence.
In here,
we will be continuing the Globomantics pen test scenario
that we discussed in the previous modules.
Now do we have admin access,
it is time to create persistence on the target
machine and by creating persistence,
I mean creating backdoors on the server so we can access it anytime we want,
even if the team patches the vulnerability that we originally exploited.
Also really important here, if you're working on a real‑world pen test project,
make sure you have formal approvals to create persistence and deploy backdoors.
From my personal experience, I can tell you,
a lot of clients don't like the idea of a pen tester
creating backdoors in their systems.
So when you're starting a new pen test project,
ask the client if persistence is in the scope or not,
and make sure you have everything in writing.
So let's take a quick look on what we'll be learning this module.
First, we will discuss what are the main techniques for creating persistence.
Then, in our first demo,
you will learn how to create backdoor services and backdoor scheduled tasks,
so then your victim computer will always connect back to you.
And in this module, we also discuss some other additional backdoor methods,
such as infecting existing software to create persistence.
The first step for us is understanding the techniques to create persistence,
and the realities as cybersecurity is a really dynamic field.
Every year there are several new techniques for creating persistence,
and what works today might not work tomorrow.
However, in this course,
I picked the four most common ways of creating persistence in the server.
Those four techniques are the most reliable ones,
since they don't depend on which software to install,
and they also don't depend on any vulnerability.
The first main technique is creating backdoor services.
For example,
you can create a Windows service that executes your Meterpreter
shell every time the server is powered down,
and as we can configure the servers to run as an administrator,
our Meterpreter shell will already have an admin‑level privilege.
The second main technique is creating scheduled tasks.
For example,
you can create a scheduled task in Windows that runs every
hour and connects to our Meterpreter server.
In this case, you always have a callback from the infected machine.
The third main technique is by creating hidden local users.
In here,
the idea is training an admin user in the machine that we
can use any time to log into the server,
and although this is a really known technique,
we can use some tricks to make the console look less suspicious.
For example, that account name could be something related to Microsoft SQL,
so then people will think that is a service account.
The fourth main technique is infecting legitimate software.
For example,
we could infect the Notepad application with your own Meterpreter shell code.
So then, every time the person opens the Notepad,
you get a callback in your server.
Pretty cool, right?
In my opinion this is scary to think the ways that
people can put backdoors in your system.
And again, one personal recommendation.
If you're working a pen test project for a client,
make sure you get a formal approval from the client to
perform any persistent technique.
Some companies don't like the idea of having backdoors in their servers,
so it is important to talk to the client and decide if
persistence in the scope or not.