Postexploitation
◾
237
We should note down the PID of the process that we would like to migrate to, for example,
svchost.exe, which happens to be 856. We will execute the following command from Meterpreter:
meterpreter> Migrate 856
If the process
has successfully migrated, the output would be something like the following:
Escalating Privileges
Now that we have moved to a secure process and we are pretty much sure that our session won’t
close during our privilege escalation process, we should attempt to escalate the privileges. The fast-
est way of escalating privileges with meterpreter is by using the “
getsystem
” command, which
consists of many techniques. If one technique fails it will try another
one and will report what
technique succeeded in escalating the privileges.
We can type the command
getsystem –h
to see what type of techniques meterpreter uses
to escalate the privileges.
238
◾
Ethical Hacking and Penetration Testing Guide
You can use a specific technique by using the –t parameter followed by the technique number,
but I would recommend that you pass the command without parameter so it can try all the tech-
niques to save time.
Dostları ilə paylaş: