Uploaded December 2024 | Updated November 2026, 3 hours ago
I'm given seeds to a pseudo random number generation algorithm, and asked to find the 2000th number for each, and then asked to look for patterns in the differences.
2024 AOC repo: gitlab.com/0xdf/aoc2024
2024 AOC Intro video: youtube.com/watch?v=4XKZZrhhiQE
VSCode Debug video: youtube.com/watch?v=cNhtk2Ob4B8
☕ Buy Me A Coffee: buymeacoffee.com/0xdf
[00:00] Part1 introduction
[02:19] Input review
[03:02] Function to generate next number
[04:16] Checking next_num function
[05:40] Looping over inputs
[06:25] Solving part 1
[06:46] Part 2 challenge
[08:26] Capturing prices
[09:44] Calculating differences
[10:44] Fingerprinting prices
[14:45] Getting max result
[16:00] Conclusion
#adventofcode #python
I'm given seeds to a pseudo random number generation algorithm, and asked to find the 2000th number for each, and then asked to look for patterns in the differences.
2024 AOC repo: gitlab.com/0xdf/aoc2024
2024 AOC Intro video: youtube.com/watch?v=4XKZZrhhiQE
VSCode Debug video: youtube.com/watch?v=cNhtk2Ob4B8
☕ Buy Me A Coffee: buymeacoffee.com/0xdf
[00:00] Part1 introduction
[02:19] Input review
[03:02] Function to generate next number
[04:16] Checking next_num function
[05:40] Looping over inputs
[06:25] Solving part 1
[06:46] Part 2 challenge
[08:26] Capturing prices
[09:44] Calculating differences
[10:44] Fingerprinting prices
[14:45] Getting max result
[16:00] Conclusion
#adventofcode #python
![Unsafe Escape with Express JS / mysqljs
Theres a really interesting bug in mysqljs where it doesnt return safe code even when the developer goes out of their way to use escape functions when querying MySQL. This came up recently in the Vessel box from HackTheBox, and I wanted to dive into it a bit more deeply here. Well look at a 2014 GitHub issue, the docs for the package, explore the vulenrability, and fix the vulnerable code.
Vulnerability Blog Post: https://flattsecurity.medium.com/finding-an-unseen-sql-injection-by-bypassing-escape-functions-in-mysqljs-mysql-90b27f6542b4
Issue on mysqljs: https://github.com/mysqljs/mysql/issues/731
mysqljs docs: https://github.com/mysqljs/mysql#escaping-query-values
My Vessel Solution: https://0xdf.gitlab.io/2023/03/25/htb-vessel.html#bypass-login
Vessel on HackTheBox: https://www.hackthebox.com/machines/vessel
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[00:58] Blog post review
[02:48] Review code from Vessel
[03:10] Review issue raised in 2014
[03:52] mysqljs docs on escape functions
[04:22] Pseudocode of vulnerability
[05:34] Example on Vessel
[07:26] Understanding the payload in more detail
[08:46] Fixing the vulnerability
[11:38] Conclusion Unsafe Escape with Express JS / mysqljs](https://i.ytimg.com/vi/h5itUtkr0_M/mqdefault.jpg)
![Malicious Lnk and JavaScript Analysis
Malware Bazaar diving video. Ill look at a lnk file and associated JavaScript file. Interesting stage two JS that uses colorcpl to move bitsadmin into the color directory, and then uses it to download many files and execute the bot. The tags on Malare Bazaar flag this as loading the Guildma botnet (I offer no insight to the validity of that). A fun piece of malware with some interesting rabbit holes looking at bitsadmin and colorcpl.
Sample lnk: https://bazaar.abuse.ch/sample/3e5c835ea46a0cea935d1408fc8db29a0e49a0189997759e7d23e0b751b8a963/
Sample js: https://bazaar.abuse.ch/sample/ea6215ab4d1c983ec4777778155ce206218f0c6449a8fc00ed875387cbe85613/
FireEye / Mandiant red_team_tool_countermeasures: https://github.com/mandiant/red_team_tool_countermeasures/blob/master/rules/G2JS/production/hxioc/SUSPICIOUS%20EXECUTION%20OF%20COLORCPL.EXE%20(METHODOLOGY).ioc
eral4m colorcpl tweet: https://twitter.com/eral4m/status/1480468728324231172
LnkParse3: https://github.com/Matmaus/LnkParse3
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[00:40] Looking at Malware Bazaar
[01:36] Quick look at lnk in Windows
[02:27] lnkparse
[03:44] %comspec%
[04:17] Analysis of lnk target
[06:13] Decoded JS
[07:58] Failing to download stage 2 JS
[08:21] Overview of stage 2 JS
[10:46] First function, fromCharCode
[11:07] Second function, download_to_file
[15:01] Understanding bitsadmin.exe /transfer
[16:12] Third function, inc counter
[16:43] Forth function, main
[19:25] colorcpl.exe exploration
[23:27] File downloads and execution in main
[24:29] Next stage exploration
[25:11] Conclusion Malicious Lnk and JavaScript Analysis](https://i.ytimg.com/vi/i-jeW6Ah8qI/mqdefault.jpg)
![Day 24 - Air Duct Spelunking [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 24 challenge, Air Duct Spelunking, involves walking a maze to collect targets. Ill use a BFS to try all paths to find the shortest. In part two, I just have to do the same, but also get back to start.
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:16] Challenge part 1
[00:50] genday / input analysis
[01:26] Strategy
[02:34] Initial Maze class stub
[03:22] Test for part 1
[04:45] Maze init to parse input
[07:38] Adding parsing tests
[09:45] Creating State class
[12:45] Doing BFS to solve
[17:00] Passing test, and solving
[18:36] Challenge part 2
[18:52] Updating tests for part 2
[19:51] Refactoring to get two answers from one BFS
[20:10] Updating BFS with part 2
[21:00] Passing tests, solving
[21:43] Animating maze walk
[22:48] Animation code review
#ctf #adventofcode #revivalofcode #python Day 24 - Air Duct Spelunking [Revival of Code 2023 - Advent of Code 2016]](https://i.ytimg.com/vi/iD2X9imA-OU/mqdefault.jpg)
![Garden Groups [Day 12 - Advent of Code 2024 - Python]
Im given a grid with each point representing a type of crops. Ill need to find each contiguous region of the same crop, and then calculate the the cost to fence in that region. In part one, thats the size of the region times the perimeter. In part two, its the size times the number of sizes on the region. Ill count sides by counting corners.
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:57] Strategy
[02:02] Setup / data overview
[02:43] Parsing regions
[09:36] Fixing seen issues
[11:52] Perimeter function
[15:06] Calculating part 1 solution
[15:30] Fixing seen issues again
[18:16] Solving part 1
[18:41] Part 2 challenge
[19:53] Strategy
[21:28] Sides function
[25:09] Calculating part 2 soltuions
[25:21] Solving part 2
[25:32] Conclusion
#adventofcode #python Garden Groups [Day 12 - Advent of Code 2024 - Python]](https://i.ytimg.com/vi/iKCgjy7-2nY/mqdefault.jpg)
![Debofuscate JavaScript with webcrack [Meme Maker 3000 - Flare-On 2024]
Webcrack is a really awesome tool for deobfuscating JavaScript. Ill show how it applies to a challenge from the 2024 Flare-On reverse-engineering challenge, first by manually deobfuscating the challenge, and then by feeding it to webcrack. Of course Ill solve the challenge as well.
Flare-On 2024 Solutions: https://0xdf.gitlab.io/flare-on-2024/
webcrack GitHub: https://github.com/j4k0xb/webcrack
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[00:54] HTML structure
[02:48] Strategy
[03:07] Isolating JS in file
[04:27] Manual deobfuscation
[05:31] Reviewing cleaned up code
[05:55] Showing HTML page
[06:21] Manually deobfuscating strings
[08:40] Showing eventual manual deobfuscation
[09:12] Installing / running webcrack
[09:49] Webcrack deobfuscated code
[10:45] Solving challenge
[13:34] Conclusion
#javascript #ctf #obfuscation #webcrack Debofuscate JavaScript with webcrack [Meme Maker 3000 - Flare-On 2024]](https://i.ytimg.com/vi/imiuHXlq37g/mqdefault.jpg)
![Day 3 - Squares With Three Sides [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 3 challenge, Squares with Three Sides, involves parsing numbers three at a time, looking to see if they could be the lengths of sides of a triangle. In part two, it just changes how I grab the three numbers, and I get to use a python trick I explained in a video last December during the 2022 Advent of Code.
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/
Taking Groups of n video: https://www.youtube.com/watch?v=FYwNGpubEhA
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[00:46] Challenge Part 1
[01:30] genday.sh script
[01:50] Input analysis
[02:02] Part 1 tests
[03:08] parse function
[04:40] Testing parse function
[05:33] Solving part 1 with filter
[07:45] Solving part 1 with loop
[09:30] Debugging failing on puzzle input
[10:46] Updating tests with whitespace issue
[11:02] Fixing whitespace issue, solving part 1
[12:56] Challenge part 2
[13:42] Taking groups of n
[17:49] Adding test for part 2
[19:22] Debugging fix
[20:11] Solving part 2
#ctf #adventofcode #revivalofcode #python Day 3 - Squares With Three Sides [Revival of Code 2023 - Advent of Code 2016]](https://i.ytimg.com/vi/j242OsOux7o/mqdefault.jpg)
![awk Injection via JWT Forgery [HackTheBox - Awkward]
In Awkward from HackTheBox, Ive got access to an API endpoint where a users username is pulled from a JWT cookie and used in an awk command, and Ive got the signing secret for the JWT. Ill 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: https://0xdf.gitlab.io/2023/02/25/htb-awkward.html
☕ Buy Me A Coffee: https://www.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 awk Injection via JWT Forgery [HackTheBox - Awkward]](https://i.ytimg.com/vi/j6G214-J6TE/mqdefault.jpg)
![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)