Uploaded February 2023 | Updated November 2026, 3 hours ago
In Awkward from HackTheBox, I've got access to an API endpoint where a user's username is pulled from a JWT cookie and used in an awk command, and I've got the signing secret for the JWT. I'll show the various parts of this attack, and then write a script to take a filename and return it via this method.
#pentest #ctf #bugbounty
Awkward blog post: 0xdf.gitlab.io/2023/02/25/htb-awkward.html
☕ Buy Me A Coffee: buymeacoffee.com/0xdf
[00:00] Introduction
[00:52] Background on website and cookie
[01:24] JWT.io
[02:45] JWT validation with Python
[03:35] API vulnerability
[05:15] Showing awk injection locally
[07:14] Crafting JWT to exploit on Awkward
[08:58] Writing script to read files
[11:14] Running, debugging crash
[12:20] Updating to download binary files
[14:04] Demo of working script to read and download
[14:54] Conclusion
In Awkward from HackTheBox, I've got access to an API endpoint where a user's username is pulled from a JWT cookie and used in an awk command, and I've got the signing secret for the JWT. I'll show the various parts of this attack, and then write a script to take a filename and return it via this method.
#pentest #ctf #bugbounty
Awkward blog post: 0xdf.gitlab.io/2023/02/25/htb-awkward.html
☕ Buy Me A Coffee: buymeacoffee.com/0xdf
[00:00] Introduction
[00:52] Background on website and cookie
[01:24] JWT.io
[02:45] JWT validation with Python
[03:35] API vulnerability
[05:15] Showing awk injection locally
[07:14] Crafting JWT to exploit on Awkward
[08:58] Writing script to read files
[11:14] Running, debugging crash
[12:20] Updating to download binary files
[14:04] Demo of working script to read and download
[14:54] Conclusion
![SpeedNet - HackTheSystem CTF
HackTheBox ran a Bug Bounty themed CTF, HackTheSystem June 27-29 2025. These challenges are all based on real bug bounty reports. SpeedNet is all about GraphQL. Ill enumerate a website using GraphQL and find its endpoints. Theres an insecure direct object reference (IDOR) vulnerability in the user endpoint that allows leaking the admin email address. Ill abuse a dev GraphQL endpoint to reset their password and get the token thats emailed to them. Then Ill abuse GraphQL batched queries to brute-force their OTP code.
HackerOne report: https://hackerone.com/reports/2166697
Introspection blog post: https://infosecwriteups.com/1000-bug-using-simple-graphql-introspection-query-b68da8260877
Batching blog post: https://inigo.io/blog/defeating_controls_with_alias-based_query_batching
BB GraphQL post: https://www.yeswehack.com/learn-bug-bounty/hacking-graphql-endpoints
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[00:48] Challenge introduction
[01:26] BugBounty reports
[03:13] Email system
[03:45] Website enumeration
[07:00] Request analysis
[08:57] IDOR in userProfile
[09:11] Identifying tech stack (Jinja)
[09:40] Manual GraphQL introspection
[10:15] InQL Burp plugin
[11:20] Reset admin password
[13:10] Identifying rate limit
[17:00] Manual batch query
[19:45] Start brute force script
[23:44] Building batch query
[26:00] Adding success check to script
[27:09] make_request function
[29:45] Brief screwup overwriting my file
[31:34] Running script
[32:48] Using JWT to auth as admin
[33:52] Conclusion
#bugbounty #ctf #hackthebox #graphql SpeedNet - HackTheSystem CTF](https://i.ytimg.com/vi/jXldzxNLQxA/mqdefault.jpg)
![sudo chroot Tech Details [CVE-2025-32463]
CVE-2025-32463, or sudo chroot, is a privilege escalation bug in sudo thats been in the wild since mid 2023. In this video, well understand the issue and how it works, and exploit the vulnerability to get root.
NIST page: https://nvd.nist.gov/vuln/detail/CVE-2025-32463
nsswitch.conf man page: https://man7.org/linux/man-pages/man5/nsswitch.conf.5.html
grep.app: https://grep.app/search?q=libnss_%22
dlopen man page: https://man7.org/linux/man-pages/man3/dlopen.3.html
POC: https://github.com/pr0v3rbs/CVE-2025-32463_chwoot
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[00:42] NIST CVE page
[01:41] nsswitch.conf man page
[03:55] grep.app finding similar code
[05:06] dlopen man page
[05:38] Pieces summary
[06:01] POC analysis
[09:19] Docker analysis
[10:04] Exploiting in Docker container sudo chroot Tech Details [CVE-2025-32463]](https://i.ytimg.com/vi/jsiP6TiGg-I/mqdefault.jpg)
![Threat Index [HackTheBox - Coding Challenge]
Threat Index is a challenge where I need to take an input string, and look for a series of workds, adding their score to a total score for each instance. Very simple challenge, quick solve in Python using both a for loop and a one-liner list comprehension.
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[01:02] Running to see input
[01:42] Making a dict of keywords
[02:44] For loop over keywords
[03:43] Converting solution to list comprehension
[05:33] Conclusion
#python Threat Index [HackTheBox - Coding Challenge]](https://i.ytimg.com/vi/k3DysAo4mxQ/mqdefault.jpg)
![Day 23: Long Walk [AOC2023 Python]
For Advent of Code 2023 Day 23, I get a grid with paths through a forest. Im asked to find the longest path possible. Ill reduce the problem by getting a list of junction points where I have multiple options, and then use that to brute force all paths.
Code 2023 AOC: https://gitlab.com/0xdf/aoc2023
Challenge Link: https://adventofcode.com/2023/day/23
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Part 1 description
[01:15] Input analayis
[02:41] Getting start and end
[03:40] Find junctions
[06:14] Map distances between junctions
[11:11] Fix bug in junctions
[12:08] Brute force all paths
[15:35] Solve part 1
[17:53] Part 2 description
[18:02] Solve part 2 by modifying part 1
[19:15] Refactoring solve into function to solve both
[22:17] Final solve with time / Summary
#adventofcode #python Day 23: Long Walk [AOC2023 Python]](https://i.ytimg.com/vi/kG2AkQbegAw/mqdefault.jpg)
![Day 8 - Two-Factor Authentication [Revival of Code 2023 - Advent of Code 2016]
Python Discord is doing an event called Revival of Code, where we work through the 2016 Advent of Code, one challenge every two days. The day 8 challenge, Two-Factor Authentication, processing a set of instructions that manipulate pixels on a 50x6 screen. Ill need to rotate both rows and columns, as well as turn on blocks. At the end, Ill show a fancy automation of the full application.
Repo for Advent of Code 2016 Solutions: https://gitlab.com/0xdf/aoc2016
Intro video for this event: https://www.youtube.com/watch?v=qEPpsS0StQI
Real Python post with templates: https://realpython.com/python-advent-of-code/
Python regex: https://pypi.org/project/regex/
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[00:34] Challenge Part 1
[01:46] genday.sh / input
[02:10] Setting up test fixture
[02:56] test_parse
[05:01] Screen class and init
[09:00] Tests for screen tracking
[10:03] Creating screen with deques
[13:25] Tests for Part 1
[14:37] Reorganizing main
[15:15] pixels_on function
[16:41] run function
[18:01] Processing Rect instruction
[22:12] rotate functions
[24:10] Solving Part 1
[24:29] Challenge Part 2
[24:44] to_string function
[25:21] to_string tests (oops!)
[27:15] Finishing to_string
[28:14] Solving Part 2
[29:02] Fancy Animation!
#ctf #adventofcode #revivalofcode #python Day 8 - Two-Factor Authentication [Revival of Code 2023 - Advent of Code 2016]](https://i.ytimg.com/vi/kaMpNgYIWeQ/mqdefault.jpg)
![Reversing and Brute-Forcing TOPT Browser Plugin Export [HackTheBox Coder]
In the Coder box from HackTheBox, I manage to acquire a TOPT backup from the Authenticator browser plugin. Ill go through the source-code for the plugin to understand how the password is used to decrypt the seed, and then write a JavaScript brute force script to recover the password for the backup.
HackTheBox Coder: https://www.hackthebox.com/machines/coder
Coder Blog Post: https://0xdf.gitlab.io/2023/12/16/htb-coder.html
Authenticator Source: https://github.com/Authenticator-Extension/Authenticator
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[00:57] Background
[02:05] Source Code Review
[05:29] Getting data to test
[06:50] Starting script to loop over lines
[09:28] Trying decrypt with each password
[10:42] Getting script to run
[12:00] Converting result from hex
[12:34] Updating to only print on success and exit
[13:23] Tweaking to run on real data
[15:44] Conclusion
#pentest #ctf #bugbounty #javascript Reversing and Brute-Forcing TOPT Browser Plugin Export [HackTheBox Coder]](https://i.ytimg.com/vi/kuuOqZf8Bdw/mqdefault.jpg)
![Web Assembly Reversing Challenge [CodeLocked - Hacky Easter 2023]
CodeLocked involves a door lock on a webpage. Putting in the correct 8 digit code will provide the flag, but the function to check it is handled in web assembly. Well use a plugin to Ghidra to get the code decompiled very nicely, figure out the pin, and show how that pin is used to calculate the flag. Well also buteforce the pin in the JavaScript console in the Chrome dev tools.
Ghidra Wasm Plugin: https://github.com/nneonneo/ghidra-wasm-plugin
Hacky Easter: https://23.hackyeaster.com/
Challenge: http://ch.hackyeaster.com:2311/ (should be up through late June 2023)
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[00:55] Challenge introduction
[01:34] Site in Chrome dev tools
[06:10] Downloading web assembly
[06:33] Preparing Ghidra
[08:48] Analysis of check function to get pin
[11:26] Decrypting flag buffer with pin
[17:43] Brute-forcing pin
[20:18] Conclusion
#ctf #HackyEaster Web Assembly Reversing Challenge [CodeLocked - Hacky Easter 2023]](https://i.ytimg.com/vi/lAOfyThNCPg/mqdefault.jpg)
![Ceres Search [Day 4 - Advent of Code 2024 - Python]
I am given a large block of text containing a bunch of X, M, A, and S. In part 1, I have to find every instance of the word XMAS and return the count. In part 2, I need to search for places where two instances of the word MAS are crossed at the A, like:
M S
A
M S
Ill start by creating sets for each of the letters with all the points they are located at, which is a nice mapping to work with. In part 2, Ill use some lambda functions as helpers to make the checks more intuitive.
2024 AOC repo: https://gitlab.com/0xdf/aoc2024/
2024 AOC Intro vide: https://www.youtube.com/watch?v=4XKZZrhhiQE
VSCode Debug video: https://www.youtube.com/watch?v=cNhtk2Ob4B8
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Part1 introduction
[00:46] Setup / data overview
[01:27] Making char_map
[02:37] Counting XMAS
[05:54] Solving part 1
[06:25] Slight part 1 improvement
[06:52] Part 2 challenge
[07:29] Start counting X-MAS
[08:01] Creating helper functions
[09:38] Counting X-MAS
[11:42] Solving part 2
[11:53] Conclusion
#adventofcode #python Ceres Search [Day 4 - Advent of Code 2024 - Python]](https://i.ytimg.com/vi/lFi5cMYJAlM/mqdefault.jpg)
![JinjaCare - HackTheSystem CTF
HackTheBox ran a Bug Bounty themed CTF, HackTheSystem June 27-29 2025. These challenges are all based on real bug bounty reports. In this challenge, Ill look at reports claimed against Uber and Glovo involving Flask Jinja server side template injections, and exploit a similar vulnerability on the challenge.
HackerOne report #1: https://hackerone.com/reports/125980
HackerOne report #2: https://hackerone.com/reports/1104349
Flask Tutorial: https://pythonbasics.org/flask-tutorial-templates/
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[00:30] Challenge introduction
[00:58] HackerOne reports
[02:10] Flask background
[05:05] Manual website enum
[07:12] Strategy
[08:00] Identifying SSTI
[09:11] Identifying tech stack (Jinja)
[11:33] Getting RCE and flag
[13:46] Conclusion
#bugbounty #ctf #hackthebox #python #flask #ssti #jinja JinjaCare - HackTheSystem CTF](https://i.ytimg.com/vi/lWpyKTEeBgE/mqdefault.jpg)
![Gameover(lay) Exploit Explained
The Gameover(lay) (CVE-2023-2640 / CVE-2023-32629) vulnerability was a big deal in late July 2023. The POC is super short, and yet complex. Well walk through the lines one by one, and understand what its doing and how it provides a low privilege user root access by abusing the OverlayFS and how it manages file attributes (like capabilities) when syncing between upper and lower.
Exploit: unshare -rm sh -c mkdir l u w m && cp /u*/b*/p*3 l/; setcap cap_setuid+eip l/python3;mount -t overlay overlay -o rw,lowerdir=l,upperdir=u,workdir=w m && touch m/*; && u/python3 -c import os;os.setuid(0);os.system(rm -rf l m u w; id)
HackTheBox Analytics Blog post: https://0xdf.gitlab.io/2024/03/23/htb-analytics.html
HackTheBox Analytics: https://www.hackthebox.com/machines/analytics
OverlayFS explained post from Julia Evans: https://jvns.ca/blog/2019/11/18/how-containers-work overlayfs/
Exploit Tweet from @liadeliyahu: https://twitter.com/liadeliyahu/status/1684841527959273472
CVE-2023-2640: https://www.cvedetails.com/cve/CVE-2023-2640/
CVE-2023-32629: https://www.cvedetails.com/cve/CVE-2023-32629/
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[00:47] Show exploit
[01:23] unshare / namespaces
[02:54] Setup files within namespace
[04:39] mount OverlayFS
[05:56] Using touch to get files into upper
[06:20] Exit namespace and escalate
[07:36] Revisiting exploit
[08:41] Conclusion
#pentest #ctf #bugbounty #gameoverlay #linux #privesc Gameover(lay) Exploit Explained](https://i.ytimg.com/vi/nlYNuUKiGr0/mqdefault.jpg)
![Gift Shop [AOC2025 Day 2]
Advent of Code 2025 Day 2 offers input with a bunch of number ranges. Ill parse those, and then loop through each, check for any invalid numbers and summing them up for a result. In part 1, a range is invalid if the entire number is made up of the same number twice. For part 2, I need to check if the number is made up of a number repeated two or more times. So for part 1, 123123 is invalid. For part 2, 123123 is still invalid (123 twice), but so is 123123123 (123 three times). Ill show two ways in part 1, using just a string check and with regex, and then adapt the regex function to solve part 2 very quickly. Then Claude solves and implements the non-regex solution.
Solutions Repo: https://gitlab.com/0xdf/aoc2025
VSCode Debug Setup: https://www.youtube.com/watch?v=cNhtk2Ob4B8
Claude: https://claude.ai/
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[01:22] Pulling / examining input
[01:57] Parsing ranges
[03:16] Checking validity
[04:33] Solving part 1
[05:28] Rechecking validity with regex
[07:27] Part 2 introduction
[07:55] New is_invalid function for part2
[08:55] Solving part 2
[09:26] Talking through non-regex solution
[09:59] Solving with Claude
[11:30] Comparing solutions
[12:05] Conclusion
#AdventOfCode #claude Gift Shop [AOC2025 Day 2]](https://i.ytimg.com/vi/p89Nsj9BB7Q/mqdefault.jpg)