vulnhub-deadnote Writeup

vulnhub-deathnote1 Writeup

描述

Level - easy

Description : don't waste too much time thinking outside the box . It is a Straight forward box .

This works better with VirtualBox rather than VMware

等级 - 简单

描述:不要浪费太多时间进行发散性思考。这是一个直接明了的盒子。

这在VirtualBox上比在VMware上运行得更好

环境搭建

  • About Release

    • Name: Deathnote: 1
    • Date release: 4 Sep 2021
    • Author: HWKDS
    • Series: Deathnote

    Download

    Please remember that VulnHub is a free community resource so we are unable to check the machines that are provided to us. Before you download, please read our FAQs sections dealing with the dangers of running unknown VMs and our suggestions for “protecting yourself and your network. If you understand the risks, please download!

下载虚拟机文件后导入VirtualBox启动即可

注意:靶机和攻击机要在一个网段,我这里kali使用的是NAT网络,所以这里靶机用的也是NAT网络

信息收集

使用nmap对内网存活的机器扫描

找到靶机的ip,使用nmap扫描端口

nmap -T4 -sV -p- -A 192.168.11.5

开启了22(ssh)和80(http)端口

访问80端口看看

域名解析

访问后自动跳转到一个域名http://deathnote.vuln/wordpress,无法成功访问

ai说是域名解析问题

编辑/etc/hosts文件,添加一条

192.168.11.5	deathnote.vuln

再访问即可正常进入

点击提示

提示说要找到在服务器上查找notes.txt文件 或 查看L评论

使用dirsearch扫描一下目录

发现一个爬虫协议的文件

访问一下,也是一个提示

这个图片直接访问看不了

发个包看看

得到提示是登录的usernameuser.txt

接着扫下一级目录

发现了wp的上传目录,浏览器访问

/wordpress/wp-content/uploads/2021/07下发现note.txt文件

打开查看

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

下面还有一个user.txt,也打开看看

结合提示登录的用户名在user.txt中,那note.txt应该就是密码

扫目录时发现了wp的后台登录地址/wordpress/wp-login.php

爆破ssh用户密码

将两个内容保存下来,接下来使用hydrassh进行账户名和密码爆破

注:这里要多尝试几次才能爆破成功

得到ssh的用户名和密码

login: l   password: death4me

使用ssh连接上去

ssh l@192.168.11.5

发现目录下有一个文件,查看内容

明显的brainfuck加密

复制出来解密

得到

i think u got the shell , but you wont be able to kill me -kira

继续查看有没有什么有用的信息

kira用户的文件夹下有一个kira.txt的文件,但是不给查看

接着在opt文件夹下找到一个L的文件夹

里面有两个内容fake-notebook-rule kira-case两个文件夹

分别查看内容

说我们会在fake-notebook-rule有发现

22

提示使用cyberchef

解码后得到passwd : kiraisevil

使用密码切换到kira用户,读取kira.txt

同样使用cyberchef解密

说要保护/opt/L/var/Misa

/opt/L的内容我们已经得到了,现在去看一下/var/Misa有什么内容

服了,没什么用

但是发现kirasudo权限,也就是说可以切换到root用户

root根目录下发现一个root.txt文件

读取成功拿到flag