Uploaded July 2023 | Updated November 2026, 3 hours ago
Quick overview of a new HackTheBox feature, Guided Mode. Play retired easy machines with questions to help guide you along the exploitation path.
Get Started on HTB: affiliate.hackthebox.com/guided-mode-yt
☕ Buy Me A Coffee: buymeacoffee.com/0xdf
Quick overview of a new HackTheBox feature, Guided Mode. Play retired easy machines with questions to help guide you along the exploitation path.
Get Started on HTB: affiliate.hackthebox.com/guided-mode-yt
☕ Buy Me A Coffee: buymeacoffee.com/0xdf
![Python Script to Read Files on Encoding [HackTheBox]
In Encoding from HackTheBox, Ive got a web endpoint that will return to me encoded copies of the files on the host. Ill write a Flask proxy so that I can easily enumerate the host, and even run a tool like git-dumper to download a Git repository.
Encoding blog post: https://0xdf.gitlab.io/2023/04/15/htb-encoding.html
git-dumper: https://github.com/arthaud/git-dumper
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[00:52] Scenario overview
[03:20] Vulnerability overview
[04:03] Strategy for proxy vs script vs in console
[04:58] Starting Flask server with path as variable
[07:17] Updating server to read /etc/passwd from Encoding
[08:58] Updating to take different file names
[09:36] Fixing response content-type to work with git-dumper Python Script to Read Files on Encoding [HackTheBox]](https://i.ytimg.com/vi/f0m-3P7_bsU/mqdefault.jpg)
![Brute Forcing a Web Pin - Frosty Keypad [Sans Holiday Hack 2024]
For the Frosty Keypad objective in the SANS Holiday Hack 2024, Ive got a keypad that takes five digit pins, and I know the pin is made up of some combination of 2, 6, 7, and 8. Ill look at how the requests are submitted, and write a Python script to brute force pins until I have the correct one. There is a rate limiting, but the message suggests its based on User Agent string, which I bypass by generating a random string for each request.
2024 HHC Blog post: [Coming soon]
Terminal Link: https://hhc24-frostykeypad.holidayhackchallenge.com/?&challenge=termFrostyKeypad
TamperMonkey Script: https://gitlab.com/0xdf/ctfscripts/-/blob/master/holidayhack/termlink.js
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[00:35] Challenge introduction
[01:01] Observing request
[02:03] Initial script
[04:58] Identifying rate limiting
[05:17] While true, sleep, retry
[06:31] Running script, too slow
[06:53] Error message analysis
[07:17] Random UA string
[08:32] Running to solve
[08:52] Conclusion
#python #ctf #requests #brute-force #rate-limit Brute Forcing a Web Pin - Frosty Keypad [Sans Holiday Hack 2024]](https://i.ytimg.com/vi/f1r8CPMrWS4/mqdefault.jpg)
![Printing Department [AOC2025 Day 4]
Advent of Code 2025 Day 4 is the first grid challenge of the year. Im given spaces in a warehouse that have pallets of paper on them. A forklift can only access a pallet to move it if there are less than three pallets in the eight spaces around the pallet. In part 1, I need to find how many are accessible. In part 2, I can iterate, removing all accessible, and then re-examining and removing ones that are newly accessible, until there are not left that can be moved. Claude nailed this one in less than a minute with a pretty clean 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
[00:59] Pulling / examining input
[01:27] Procesing grid into defaultdict
[03:26] count_neighbors function
[04:50] Counting accessible spaces
[05:22] Fixing error with looping over changing dict
[06:13] Fixing error with counting
[08:25] Solving part 1
[08:43] Part 2 introduction
[09:22] Generating next grid iteration
[10:21] Function to count grid
[11:06] Calculating change
[11:43] Fixing forgot to update grid
[12:00] Fixing missing check for paper
[14:00] Solving part 2
[14:25] Solving with Claude
[15:36] Analysis of Claudes solution
[17:03] Conclusion
#AdventOfCode #claude Printing Department [AOC2025 Day 4]](https://i.ytimg.com/vi/fDv0soav8Mw/mqdefault.jpg)
![PowerShell Challenge [Sans Holiday Hack 2024]
The PowerShell terminal in the 2024 Holiday Hack Challenge is all about using PowerShell to interact with a webserver. Ill play with credentials, cookies / websessions, and a lot of long pipelines to automate parsing of results into new requests. Ill show both the silver and gold solves.
2024 HHC Blog post: [Coming Jan 2025]
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[00:30] Q1
[01:00] Tmux operations
[01:19] Q2
[01:48] Q3
[02:37] Q4
[03:10] Q5
[06:38] Q6
[09:30] Q7
[12:20] Q8
[12:50] Q9
[14:57] Q10
[20:53] Q11
[21:50] Update for gold
[22:32] Gold solve
[35:56] Conclusion
#powershell #ctf PowerShell Challenge [Sans Holiday Hack 2024]](https://i.ytimg.com/vi/fx1O7BIiNuo/mqdefault.jpg)
![Scanning UDP with nmap
Scanning UDP with nmap can be slow, flaky, and/or unreliable. In this video, well cover the techniques I use to get a quick view of open UDP ports, and explore some potentially unexpected results so that were comfortable with the conclusions.
#pentest #ctf #bugbounty
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[00:48] Initial scan of top 10 ports
[01:51] Top 100 ports
[02:30] Top 1000 with min-rate to speed it up
[04:06] Looking at extra closed/filtered ports
[05:20] Looking at non-sped-up in Wireshark
[06:23] Theory as to whats going on
[06:51] General strategy / takeaway
[07:41] Comparing filtered vs closed Scanning UDP with nmap](https://i.ytimg.com/vi/fzl9g0ZgON8/mqdefault.jpg)
![Reading (Almost) A Million QRCodes [Hackvent 2022 - Day 16]
In this hackvent challenge, Im giving an image which Ill break into almost a million pieces and try to read each piece as a QRcode to find the flag in one of them. Ill use the PIL and pyzbar libraries in Python.
Hackvent 2022 writeup: https://0xdf.gitlab.io/hackvent2022/hard
PIL Max Pixel Limit: https://stackoverflow.com/questions/51152059/pillow-in-python-wont-let-me-open-image-exceeds-limit
Git Issue about pyzbar error messages: https://github.com/NaturalHistoryMuseum/pyzbar/issues/29
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
#hackvent
[00:00] Introduction
[00:28] Looking at QR Image
[00:56] Loading image with Python and PIL
[01:45] Cropping image to remove boarder
[03:11] Reading QRCode
[04:10] Compression Bomb error
[05:10] Scan code error
[06:51] Dividing image into 25x25 smaller images
[11:17] Further dividing in half 5 times
[13:40] Running to solve
[14:00] Improvements to save flag, exit
[14:35] Counting squares and codes
[17:42] Justifying the image count number Reading (Almost) A Million QRCodes [Hackvent 2022 - Day 16]](https://i.ytimg.com/vi/geTs9N9Ew6Q/mqdefault.jpg)
![Day 1: Trebuchet?! [AOC2023 Python]
For Advent of Code 2023 Day1, I need to find numbers in lines of text. It gets tricky in part two where I need to find digits and spelled out digits (like one).
Code 2023 AOC: https://gitlab.com/0xdf/aoc2023
Challenge Link: https://adventofcode.com/2023/day/1
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
#adventofcode #python
[00:00] Introduction
[00:22] Part 1 description
[01:04] genday overview
[01:59] Input review
[02:25] Part1 framework
[03:20] Three ways to remove non-digits
[05:05] Solving part1
[05:22] Part2 description
[05:57] Basic framework for part2
[07:20] Checking assumptions
[08:30] Part2 attempt
[09:10] Debugging silly errors
[11:02] Identify issue with overlapping words
[12:19] Solution for overlapping words
[15:02] Solving Part2 Day 1: Trebuchet?! [AOC2023 Python]](https://i.ytimg.com/vi/ggwPSoX364s/mqdefault.jpg)
![Monkey Market [Day 22 - Advent of Code 2024 - Python]
Im 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: 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: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 Monkey Market [Day 22 - Advent of Code 2024 - Python]](https://i.ytimg.com/vi/gn-eoGHDoMM/mqdefault.jpg)
![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)