hackmyvm Qweasd靶机复盘
难度-Medium
网段扫描
1
2
3
4
5
6
7
8
9
10
11
root@LingMj:/home/lingmj# arp-scan -l
Interface: eth0, type: EN10MB, MAC: 00:0c:29:df:e2:a7, IPv4: 192.168.56.110
WARNING: Cannot open MAC/Vendor file ieee-oui.txt: Permission denied
WARNING: Cannot open MAC/Vendor file mac-vendor.txt: Permission denied
Starting arp-scan 1.10.0 with 256 hosts (https://github.com/royhills/arp-scan)
192.168.56.1 0a:00:27:00:00:12 (Unknown: locally administered)
192.168.56.100 08:00:27:d9:dc:78 (Unknown)
192.168.56.160 08:00:27:23:4e:2d (Unknown)
3 packets received by filter, 0 packets dropped by kernel
Ending arp-scan 1.10.0: 256 hosts scanned in 1.864 seconds (137.34 hosts/sec). 3 responded
端口扫描
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
root@LingMj:/home/lingmj# nmap -p- -sC -sV 192.168.56.160
Starting Nmap 7.95 ( https://nmap.org ) at 2025-02-22 01:54 EST
mass_dns: warning: Unable to determine any DNS servers. Reverse DNS is disabled. Try using --system-dns or specify valid servers with --dns-servers
Nmap scan report for 192.168.56.160
Host is up (0.00062s latency).
Not shown: 65533 closed tcp ports (reset)
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 8.9p1 Ubuntu 3ubuntu0.6 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey:
| 256 fa:b1:dc:5b:9e:54:8c:bd:24:4c:43:0c:25:fd:4d:d8 (ECDSA)
|_ 256 29:71:69:ca:bc:74:48:26:45:34:77:69:29:a5:d2:fc (ED25519)
8080/tcp open http Jetty 10.0.18
|_http-title: Dashboard [Jenkins]
| http-robots.txt: 1 disallowed entry
|_/
| http-open-proxy: Potentially OPEN proxy.
|_Methods supported:CONNECTION
|_http-server-header: Jetty(10.0.18)
MAC Address: 08:00:27:23:4E:2D (PCS Systemtechnik/Oracle VirtualBox virtual NIC)
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 60.95 seconds
获取webshell
先爆破密码进行一下测试
这个靶机很卡不知道为啥,打得非常费劲
看看cve吧,受不了直接爆破是不行的
第一个就是
现在需要找到对应的东西
这是bug么怎么直接通过了
docker是干啥的我开始有点懵了
上面是bug了直接成功了,这里我直接退出来走一下常规的路线,原因我们有LFI需要去找到对应Jenkins配置文件
问题是我不知道路径在那我现在进行,kali用户找一下这个配置文件路径
hashpasswd:#jbcrypt:$2a$10$3Ms0ektq3Nt8FBV8WeISb.Y.Xh81/VsOhZAhn5xhXzTZEFlsmGm76
爆破一下这个passwd
密码不对,应该不是这个密码
试有一伙了是这个东西奥,拿webshell还是我的一个记忆点,简单操作一手
提权
感觉像pwn能直接干掉,我反编译一下
是溢出么?
跑一下工具,不然直接pwn的话又得进行socat转发,这是我唯一想到的方案了
这个是另一个方案奥
还有一个是pwn了,不过呢我打算一伙再做,先挺在这里先
我有一个专门打pwn的环境,所以我就不在kali上操作,操作的原理什么都是一样,所以我直接本地整成功就行
本地环境运行状况是这样的
这里可以发现程序已经完成炸了第一步
偏移量71
可以看到我们已经控制住了这个地方接下来就是找system和执行命令的位置就好了,对了声明一个地方是他的函数库是libc.so.6,我从靶机扒拉的保障环境没有任何问题
我利用的是pop rdi 的ret2libc的方案
ok目前到这里我就已经不会了,先搁置了等那个靶机有类似再研究
userflag:flag{Whynotjoinsomehackercommunicationgroups_}
rootflag:flag{Hackercommunicationgroup660930334iswaitingforyoutojoin_}