小秦哥 发表于 2024-3-14 00:31:28

vulnhub-Deathnote

Deathnote

0x01 信息收集

渗透的第一件事那就是信息收集,虚拟机启动起来,nmap扫一手,
https://img2023.cnblogs.com/blog/3179656/202312/3179656-20231211134737718-749382081.png
 192.168.56.101存在,并且开启了80和22端口,那么就访问页面。
但是页面返回的结果是没找到http://deathnote.vuln这个网址
https://img2023.cnblogs.com/blog/3179656/202312/3179656-20231211134935099-925474964.png
 那么根据我做题的经验,这应该是需要绑定域名的,意思就是192.168.56.101跟deathnote.vuln这个域名是绑定在一起的,访问192.168.56.101就会跳转到deathnote.vuln。
在windows上配置dns
C:\WINDOWS\system32\drivers\etc 的hosts文件加入如下字段(linux上是/etc/hosts)
192.168.56.101 deathnote.vuln访问后就会是这个页面了
https://img2023.cnblogs.com/blog/3179656/202312/3179656-20231211135223752-431450102.png
扫一下目录
200 -   68B- /robots.txt
200 -    2KB - /wordpress/wp-login.php
200 -    6KB - /wordpress/扫到一些比较有用的东西,先看看robots.txt
fuck it my dad
added hint on /important.jpg

ryuk please delete it有一个important.jpg文件,这边下载到本地看看。
图像是显示不出来的,用010 editor打开看看
i am Soichiro Yagami, light's father
i have a doubt if L is true about the assumption that light is kira

i can only help you by giving something important

login username : user.txt
i don't know the password.
find it by yourself
but i think it is in the hint section of site这里的user.txt应该是指wordpress上的一些用户,这个网站的作者是kira,一会可以用这个尝试登陆后台。
那么问题来了,密码是什么呢?
于是在寻找中不不经意看到了一串话
https://img2023.cnblogs.com/blog/3179656/202312/3179656-20231211140316842-377287812.png
 这个 iamjustic3 猜测估计是密码没错了。于是访问 http://deathnote.vuln/wordpress/wp-login.php 尝试登录。
username: kira
password: iamjustic3 
0x02 登录后台

登录成功!登录到后台发现了一个 notes.txt(在前面的hint里有说有一个notes.txt文件)
https://img2023.cnblogs.com/blog/3179656/202312/3179656-20231211140514169-1276904215.png
 打开后发现是一个密码本
death4
death4life
death4u
death4ever
death4all
death420
death45
death4love
death49
death48
death456
death4014
1death4u
yaydeath44
thedeath4u2
thedeath4u
stickdeath420
reddeath44
megadeath44
megadeath4
killdeath405
hot2death4sho
death4south
death4now
death4l0ve
death4free
death4elmo
death4blood
death499Eyes301
death498
death4859
death47
death4545
death445
death444
death4387n
death4332387
death42521439
death42
death4138
death411
death405
death4me先保存为了 passwd.txt ,应该是一会爆破ssh要用到的。
接下来找了半天发现没什么东西可以利用了(其实这个后台可以在页面写入后门,但是这里因为可以直接用ssh登录就没去尝试)
 
0x03 SSH登录

上面收集到了密码本,但是还差账户呀,账户不知道是什么。
通过上面的收集,猜测账户应该是 kira 和 l 之间的某一个,于是制作 user.txt
kira
Kira
L
l注意:我就是栽在这里,因为当时试的是大写的,试了半天没想到是小写的,哭死。
利用 hydra 爆破
hydra -L user.txt -P passwd.txt ssh://192.168.56.101

-L 账户本
-P 密码本https://img2023.cnblogs.com/blog/3179656/202312/3179656-20231211141915182-551461070.png
这里也是成功的跑出来了,那么利用 ssh 登录l账户。
https://img2023.cnblogs.com/blog/3179656/202312/3179656-20231211142333409-1156464417.png
登录成功!
 
0x04 切换用户

在 /home/l 目录下发现了 user.txt,打开是一串brainfuck的加密字符串
https://img2023.cnblogs.com/blog/3179656/202312/3179656-20231211142552088-1246878284.png
 解密得到如下字符
i think u got the shell , but you wont be able to kill me -kira他似乎在挑衅我呀。
查看 /home,发现另一个账户 kira
https://img2023.cnblogs.com/blog/3179656/202312/3179656-20231211142712279-1448807306.png
 有一个 kira.txt,但是没有权限无法访问。于是继续信息收集,在漫长的收集终于在 opt 下找到了一个 L 的目录。
https://img2023.cnblogs.com/blog/3179656/202312/3179656-20231211142906540-1929632823.png
先看看 kira-case 文件,里面有一个 case-file.txt 。 内容如下:
the FBI agent died on December 27, 2006

1 week after the investigation of the task-force member/head.
aka.....
Soichiro Yagami's family .


hmmmmmmmmm......
and according to watari ,
he died as other died after Kira targeted them .


and we also found something in
fake-notebook-rule folder .有用的东西在 fake-notebook-rule 目录下,于是访问 fake-notebook-rule 目录。
https://img2023.cnblogs.com/blog/3179656/202312/3179656-20231211143032699-1392260263.png
 有俩文件,hint 的内容是 “use cyberchef”。
然后查看了 case.wav 文件发现了如下字符串
63 47 46 7a 63 33 64 6b 49 44 6f 67 61 32 6c 79 59 57 6c 7a 5a 58 5a 70 62 43 41 3d这不就是16进制吗?自己写一个脚本
a =
b = []
for i in a:
    b.append(chr(i))
import base64
print(base64.b64decode("".join(b)))结果是:passwd : kiraisevil,猜测是kira账户的密码。
尝试登录。
https://img2023.cnblogs.com/blog/3179656/202312/3179656-20231211143412149-1281572265.png
 成功登录!
 
0x05 提升权限

kira 目录下有个 kira.txt 文件,内容如下:
cGxlYXNlIHByb3RlY3Qgb25lIG9mIHRoZSBmb2xsb3dpbmcgCjEuIEwgKC9vcHQpCjIuIE1pc2EgKC92YXIpbase64解得:
please protect one of the following
1. L (/opt)
2. Misa (/var)应该是说L在opt目录下,Misa在/var下,但是当我去看Misa的时候他文件说的是这样的:
https://img2023.cnblogs.com/blog/3179656/202312/3179656-20231211143716813-659597795.png
 他说晚了。。。
既然登录 kira 了,尝试提个权吧。命令 sudo -l 查看一下 kira 的账户情况
https://img2023.cnblogs.com/blog/3179656/202312/3179656-20231211143905706-2113056839.png
 (ALL : ALL)ALL,这种情况那就好办了,直接 sudo -i 输入密码就是 root 权限了。
https://img2023.cnblogs.com/blog/3179656/202312/3179656-20231211143830249-2096030153.png
 完结撒花!!
 
0x06 总结

这道渗透其实是简单的,适合初学者,还是挺有意思的。
 

免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!
页: [1]
查看完整版本: vulnhub-Deathnote