HackTheBox - Cereal

IppSec · Beginner ·🔧 Backend Engineering ·5y ago

Key Takeaways

Uses nmap, Git-Dumper, and Git history analysis to identify and exploit a deserialization vulnerability and obtain a hardcoded JWT token on the Cereal box

Original Description

01:17 - Start of nmap, showing having valid hostnames will give more information 03:54 - Error message on source.cereal.htb leaks a path 06:30 - Showing .git doesn't exist in DirectyList but does in Raft 08:02 - Using Git-Dumper to download the .git directory and view the source 09:30 - Looking at Git History shows where deserialization happens and a hard coded JWT 12:08 - Using the hard coded JWT To build our own token in dotnet. 21:00 - Trying to use our JWT to access authenticated pages 25:42 - Going through the React JavaScript to see the token is stored in our browsers local storage 29:40 - Our browser keeps clearing the storage lets just intercept a request in BurpSuite and do what we need 32:15 - Start of the Desrialization, BadWords Filter to prevent ySoSerial, but we can manually create our own deserialization payload 33:20 - Finding the name of our JSON Library then finding a blackhat talk on abusing it, to build our payload 40:11 - More examining javascript to find routes that leaks pages of the pplication 42:15 - Using npm audit to find an XSS Vulnerability on /admin due to an out of date plugin react-marked-markdown 46:10 - Testing the XSS Vulnerability with a simple payload 49:00 - Putting it all togather, writing notes on how we are going to build the exploit 51:15 - Start of exploit script making python requests not care about SSL, then building our JWT with pyJwt 57:00 - Testing out bad character evasion with Base64 by using a benign XSS Payload first 1:06:20 - Adding stage 1 to our script to send the deserialization payload 1:08:22 - Changing our payload to use XMLHttpRequest to force the browser to make a request to perform the deserialization which bypasses the RestrictIP Policy 1:13:08 - Our script did not work, troubleshooting it 1:17:57 - Script worked, lets now host a ASPX File for it to download 1:19:20 - Using our webshell to download the SQLite Database 1:22:45 - Our Powershell One-Liner to convert the database to b64 just fails. Lets co
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from IppSec · IppSec · 0 of 60

← Previous Next →
1 HHC2016 - Analytics
HHC2016 - Analytics
IppSec
2 HackTheBox - October
HackTheBox - October
IppSec
3 HackTheBox - Arctic
HackTheBox - Arctic
IppSec
4 HackTheBox - Brainfuck
HackTheBox - Brainfuck
IppSec
5 HackTheBox - Bank
HackTheBox - Bank
IppSec
6 HackTheBox - Joker
HackTheBox - Joker
IppSec
7 HackTheBox - Lazy
HackTheBox - Lazy
IppSec
8 Camp CTF 2015 - Bitterman
Camp CTF 2015 - Bitterman
IppSec
9 HackTheBox - Devel
HackTheBox - Devel
IppSec
10 Reversing Malicious Office Document (Macro) Emotet(?)
Reversing Malicious Office Document (Macro) Emotet(?)
IppSec
11 HackTheBox - Granny and Grandpa
HackTheBox - Granny and Grandpa
IppSec
12 HackTheBox - Pivoting Update: Granny and Grandpa
HackTheBox - Pivoting Update: Granny and Grandpa
IppSec
13 HackTheBox - Optimum
HackTheBox - Optimum
IppSec
14 HackTheBox - Charon
HackTheBox - Charon
IppSec
15 HackTheBox - Sneaky
HackTheBox - Sneaky
IppSec
16 HackTheBox - Holiday
HackTheBox - Holiday
IppSec
17 HackTheBox - Europa
HackTheBox - Europa
IppSec
18 Introduction to tmux
Introduction to tmux
IppSec
19 HackTheBox - Blocky
HackTheBox - Blocky
IppSec
20 HackTheBox - Nineveh
HackTheBox - Nineveh
IppSec
21 HackTheBox - Jail
HackTheBox - Jail
IppSec
22 HackTheBox - Blue
HackTheBox - Blue
IppSec
23 HackTheBox - Calamity
HackTheBox - Calamity
IppSec
24 HackTheBox - Shrek
HackTheBox - Shrek
IppSec
25 HackTheBox - Mirai
HackTheBox - Mirai
IppSec
26 HackTheBox - Shocker
HackTheBox - Shocker
IppSec
27 HackTheBox - Mantis
HackTheBox - Mantis
IppSec
28 HackTheBox - Node
HackTheBox - Node
IppSec
29 HackTheBox - Kotarak
HackTheBox - Kotarak
IppSec
30 HackTheBox - Enterprise
HackTheBox - Enterprise
IppSec
31 HackTheBox - Sense
HackTheBox - Sense
IppSec
32 HackTheBox - Minion
HackTheBox - Minion
IppSec
33 VulnHub - Sokar
VulnHub - Sokar
IppSec
34 VulnHub - Pinkys Palace v2
VulnHub - Pinkys Palace v2
IppSec
35 HackTheBox - Inception
HackTheBox - Inception
IppSec
36 Vulnhub - Trollcave 1.2
Vulnhub - Trollcave 1.2
IppSec
37 HackTheBox - Ariekei
HackTheBox - Ariekei
IppSec
38 HackTheBox - Flux Capacitor
HackTheBox - Flux Capacitor
IppSec
39 HackTheBox - Jeeves
HackTheBox - Jeeves
IppSec
40 HackTheBox - Tally
HackTheBox - Tally
IppSec
41 HackTheBox - CrimeStoppers
HackTheBox - CrimeStoppers
IppSec
42 HackTheBox - Fulcrum
HackTheBox - Fulcrum
IppSec
43 HackTheBox - Chatterbox
HackTheBox - Chatterbox
IppSec
44 HackTheBox - Falafel
HackTheBox - Falafel
IppSec
45 How To Create Empire Modules
How To Create Empire Modules
IppSec
46 HackTheBox - Nightmare
HackTheBox - Nightmare
IppSec
47 HackTheBox - Nightmarev2  - Speed Run/Unintended Solutions
HackTheBox - Nightmarev2 - Speed Run/Unintended Solutions
IppSec
48 HackTheBox - Bart
HackTheBox - Bart
IppSec
49 HackTheBox -  Aragog
HackTheBox - Aragog
IppSec
50 HackTheBox - Valentine
HackTheBox - Valentine
IppSec
51 HackTheBox - Silo
HackTheBox - Silo
IppSec
52 HackTheBox - Rabbit
HackTheBox - Rabbit
IppSec
53 HackTheBox - Celestial
HackTheBox - Celestial
IppSec
54 HackTheBox - Stratosphere
HackTheBox - Stratosphere
IppSec
55 HackTheBox - Poison
HackTheBox - Poison
IppSec
56 HackTheBox - Canape
HackTheBox - Canape
IppSec
57 HackTheBox - Olympus
HackTheBox - Olympus
IppSec
58 HackTheBox - Sunday
HackTheBox - Sunday
IppSec
59 HackTheBox - Fighter
HackTheBox - Fighter
IppSec
60 HackTheBox - Bounty
HackTheBox - Bounty
IppSec

Related Reads

Chapters (23)

1:17 Start of nmap, showing having valid hostnames will give more information
3:54 Error message on source.cereal.htb leaks a path
6:30 Showing .git doesn't exist in DirectyList but does in Raft
8:02 Using Git-Dumper to download the .git directory and view the source
9:30 Looking at Git History shows where deserialization happens and a hard coded JW
12:08 Using the hard coded JWT To build our own token in dotnet.
21:00 Trying to use our JWT to access authenticated pages
25:42 Going through the React JavaScript to see the token is stored in our browsers
29:40 Our browser keeps clearing the storage lets just intercept a request in BurpSu
32:15 Start of the Desrialization, BadWords Filter to prevent ySoSerial, but we can
33:20 Finding the name of our JSON Library then finding a blackhat talk on abusing i
40:11 More examining javascript to find routes that leaks pages of the pplication
42:15 Using npm audit to find an XSS Vulnerability on /admin due to an out of date p
46:10 Testing the XSS Vulnerability with a simple payload
49:00 Putting it all togather, writing notes on how we are going to build the exploi
51:15 Start of exploit script making python requests not care about SSL, then buildi
57:00 Testing out bad character evasion with Base64 by using a benign XSS Payload fi
1:06:20 Adding stage 1 to our script to send the deserialization payload
1:08:22 Changing our payload to use XMLHttpRequest to force the browser to make a requ
1:13:08 Our script did not work, troubleshooting it
1:17:57 Script worked, lets now host a ASPX File for it to download
1:19:20 Using our webshell to download the SQLite Database
1:22:45 Our Powershell One-Liner to convert the database to b64 just fails. Lets co
Up next
Indian Express Editorial Analysis by Chandan Sharma - 1 JULY 2026 | UPSC Current Affairs 2026
StudyIQ IAS
Watch →