Uploaded August 2023 | Updated November 2026, 3 hours ago
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 23 challenge, Safe Cracking, involves picking up with the computer from day 12, but adding a toggle instruction, which changes the instructions at a given offset. In part 2, it enters a long loop that can be effectively reduces to a += b * c, but does it rather by one inc at a time. I'll short-circuit that to make it run in reasonable time.
Advent of Code 2016 Day 12 video: youtube.com/watch?v=Z-qDyL-vyNA
Repo for Advent of Code 2016 Solutions: gitlab.com/0xdf/aoc2016
Intro video for this event: youtube.com/watch?v=qEPpsS0StQI
Configuring VSCode to debug PyTest: youtube.com/watch?v=zL2YTdIj3R8
Real Python post with templates: realpython.com/python-advent-of-code
☕ Buy Me A Coffee: buymeacoffee.com/0xdf
[00:00] Introduction
[00:16] Challenge part 1
[01:41] Bringing in the day 12 code
[03:10] Test for part 1
[04:11] Adding toggle instruction
[08:49] Fixing tests, solving part 1
[09:40] Challenge part 2
[10:12] Showing part2 has long runtime without change
[11:00] Using VSCode debug to find what's slow
[12:55] Assembunny code analysis
[14:07] Function to handle multiply/add
[16:03] Regex development
[17:26] Continuing with multiple/add
[20:32] Summary of function
[20:52] Debugging issue with findall
[21:34] Solving and conclusion
#ctf #adventofcode #revivalofcode #python
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 23 challenge, Safe Cracking, involves picking up with the computer from day 12, but adding a toggle instruction, which changes the instructions at a given offset. In part 2, it enters a long loop that can be effectively reduces to a += b * c, but does it rather by one inc at a time. I'll short-circuit that to make it run in reasonable time.
Advent of Code 2016 Day 12 video: youtube.com/watch?v=Z-qDyL-vyNA
Repo for Advent of Code 2016 Solutions: gitlab.com/0xdf/aoc2016
Intro video for this event: youtube.com/watch?v=qEPpsS0StQI
Configuring VSCode to debug PyTest: youtube.com/watch?v=zL2YTdIj3R8
Real Python post with templates: realpython.com/python-advent-of-code
☕ Buy Me A Coffee: buymeacoffee.com/0xdf
[00:00] Introduction
[00:16] Challenge part 1
[01:41] Bringing in the day 12 code
[03:10] Test for part 1
[04:11] Adding toggle instruction
[08:49] Fixing tests, solving part 1
[09:40] Challenge part 2
[10:12] Showing part2 has long runtime without change
[11:00] Using VSCode debug to find what's slow
[12:55] Assembunny code analysis
[14:07] Function to handle multiply/add
[16:03] Regex development
[17:26] Continuing with multiple/add
[20:32] Summary of function
[20:52] Debugging issue with findall
[21:34] Solving and conclusion
#ctf #adventofcode #revivalofcode #python
![Oddly Even [HackTheBox - Coding Challenge]
Oddly even is a very easy challenge. I just read a number from standard in and print odd or even. Ill walk through the HTB coding interface, and show three ways to solve it.
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[01:12] Coding interface
[02:10] input function
[02:59] string to int
[03:37] Solving
[04:06] Alternative solve
[04:45] One-liner solve
[05:16] Conclusion
#python Oddly Even [HackTheBox - Coding Challenge]](https://i.ytimg.com/vi/OC5J9yvkUBQ/mqdefault.jpg)
![Free AI HTB Tutor
Generative AI has many applications. An amazing one is to give it a writeup to a challenge youre trying to solve but stuck on and getting it to coach you though it without spoiling it. Ill show two ways to do that in this video, using a manual prompt and a Claude skill.
HTB-Mentor Repo: https://gitlab.com/0xdf/htb-ai-mentor
Its Ok To Use Writeups: https://www.hackthebox.com/blog/It-is-Okay-to-Use-Writeups
Claude: https://claude.ai/
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[01:31] Repo overview
[02:11] Using free prompt on HTB Sightless
[06:58] Claude skill overview
[07:42] Install skill
[08:22] Using skill on HTB Sightless
[09:31] Conclusion
#HackTheBox #claude #ai Free AI HTB Tutor](https://i.ytimg.com/vi/Oy1HrVm5vxo/mqdefault.jpg)
![Day 20: Pulse Propagation [AOC2023 Python]
For Advent of Code 2023 Day 20, I get a list of modules that propagate pulses either as high or low and change state based on what they receive. Ill use a queue (deque) to handle the propagations and in part one just count pulses. In part two, I have to do some input analysis to understand what Im looking for, and then find cycles on four modules. Knowing their cycle lengths, I can calculate the LCM to get the time they all line up to give the desired output.
Code 2023 AOC: https://gitlab.com/0xdf/aoc2023
Challenge Link: https://adventofcode.com/2023/day/20
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Part 1 description
[02:53] Input analysis
[03:54] Module class init
[07:01] System class init
[09:43] Validating System
[12:28] System.push
[19:52] Debugging example
[20:44] Adding loops to push
[21:03] Solve part 1
[22:51] Part 2 description
[23:41] Getting info about rx
[27:40] Tracking pulses to previous module
[31:17] Cheat solve part 2
[32:22] Code solve part 2
[37:12] Allowing part2 to run until cycle
[39:08] Summary
#adventofcode #python Day 20: Pulse Propagation [AOC2023 Python]](https://i.ytimg.com/vi/P8DyRHYFfsE/mqdefault.jpg)
![Malicious LNK File Analysis
I noticed a LNK file uploaded to Malware Bazaar and wanted to take a look. It turns out to be an onion of obfuscated PowerShell that eventually leads to an executable (tagged as Colbalt Strike, though we wont go into the EXE in this video).
Sample on MalwareBazaar: https://bazaar.abuse.ch/sample/0135c4f45de3e2187708033da3135210b03c9db4275dfa794dbcbff21b4f4df9/
LnkParse3: https://pypi.org/project/LnkParse3/
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[01:04] Overview of file in Malware Bazaar
[02:00] Looking at lnk in a Windows VM
[03:11] lnkparse on file
[04:04] Downloading and unobfuscating layer 1
[05:20] Analysis of layer 1, unobfuscating layer 2
[07:55] Analysis of layer 2
[08:50] Accidentally download directory listing
[10:45] Looking at decoy PDF
[12:03] Comparing binaries from two tmp zip files
[12:54] Not going to RE binary here
[13:23] Looking up hashes in Malware Bazaar and VirusTotal
[14:56] Wrap up Malicious LNK File Analysis](https://i.ytimg.com/vi/PJ0axuYlBxs/mqdefault.jpg)
![0o337 [0xff: One Last Address]
The HTB Content team made me a goodbye CTF consisting of four challenges. In this video, Ill solve 0o337, a forensics challenge digging through a PCAP file to solver layers of puzzle.
pdf-parser.py: https://github.com/DidierStevens/DidierStevensSuite/blob/master/pdf-parser.py
uv CheatSheet: https://0xdf.gitlab.io/cheatsheets/uv
CyberChef: https://gchq.github.io/CyberChef/
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[00:50] Challenge introduction
[01:18] PCAP statistics
[04:00] Message1 - reverse shell
[05:30] Making smaller PCAP
[06:45] Message2 - TLS decrypt (RSA)
[07:54] Message3 - PGP email
[10:15] Message4 - PDF in encrypted zip
[11:30] Message5 - Hidden ELF in PDF
[17:16] Flag - PasteBin xor
[18:42] Conclusion
#ctf #pcap #ghidra #forensics 0o337 [0xff: One Last Address]](https://i.ytimg.com/vi/PNv9LEQ5GjI/mqdefault.jpg)
![HackTheBox Napper: Read Elastic, Generate Key, Decrypt Blob in Golang
In Napper from HackTheBox, Ill need to pull values from an Elastic database that rotated every 5 minutes. The values are a seed and an encrypted blob. Ill use the seed with the random function in Go to generate a key, and use it to AES decrypt the blob. So today were working in Go!
HackTheBox Napper Blog post: https://0xdf.gitlab.io/2024/05/04/htb-napper.html
HackTheBox Napper: https://www.hackthebox.com/machines/napper
Elastic Go Example: https://github.com/elastic/go-elasticsearch/blob/main/_examples/encoding/gjson.go
Go gjson: https://github.com/tidwall/gjson
Elastic Client docs: https://pkg.go.dev/github.com/elastic/go-elasticsearch/v7#section-readme
Go getting started: https://go.dev/doc/tutorial/getting-started
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[01:17] Show data with curl
[03:23] Creating Go project
[04:25] Elastic example code
[06:28] Updating code to connect to Napper
[10:33] Removing unneeded example code
[11:23] Getting seed
[14:56] Getting blob
[19:11] Converting main to function
[21:38] Generating key from seed
[24:26] Decrypt blob
[29:12] Conclusion
#pentest #ctf #bugbounty #golang #go #elastic HackTheBox Napper: Read Elastic, Generate Key, Decrypt Blob in Golang](https://i.ytimg.com/vi/PRbcj-7AScs/mqdefault.jpg)
![Exploring a Simple Ruby Web Application [HackTheBox Precious Beyond Root]
In Precious from HackTheBox, Ill exploit a Ruby webserver. In this video, with a root shell, Ill go back and explore the server, to understand how it ties into nginx, how it runs the application, what the application does, and fix a bug in the application that blocks loading the local webserver.
#pentest #ctf
Full Precious Post: https://0xdf.gitlab.io/2023/05/20/htb-precious.html
Precious on HTB: https://hackthebox.grsm.io/box?box=precious
Phusion Docs: https://www.phusionpassenger.com/library/deploy/nginx/deploy/ruby/
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[00:45] Scenario / Webpage overview
[02:18] Looking at HTTP responses
[02:57] nginx service
[04:05] nginx config / phusion
[06:02] Ruby app analysis
[09:17] Loading localhost
[11:45] Conclusion Exploring a Simple Ruby Web Application [HackTheBox Precious Beyond Root]](https://i.ytimg.com/vi/Pmdx0e6aRxU/mqdefault.jpg)
![OnlyHacks [HackTheBox Web Challenge]
In this Valentines challenge from HackTheBox, Ill send an XSS payload to exfil a cookie from another chatty user on a dating site. RequestBin is a useful tool for catching HTTP requests.
RequestBin: https://requestbin.whapi.cloud/
OnlyHacks: https://app.hackthebox.com/challenges/OnlyHacks
404 pages: https://0xdf.gitlab.io/cheatsheets/404
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[00:28] Challenge description
[01:18] FoxyProxy config
[03:28] Initial page enumeration
[06:17] Registration and enumeration
[08:40] Chat interaction
[09:50] Introducing RequestBin
[11:34] Phishing
[13:20] XSS
[17:06] Conclusion
#HackTheBox #ctf #xss OnlyHacks [HackTheBox Web Challenge]](https://i.ytimg.com/vi/PsjCU9VnIxc/mqdefault.jpg)
![Reactor [AOC2025 Day 11]
Advent of Code 2025 Day 11 provides a list of nodes and the nodes that come after each one. Ill use recusrion to build a function that can count the number of paths between two nodes. In part 1, that solves. In part 2, I can use that, multiplying a few together to get an answer. Claude solves it very easily.
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:50] Pulling / examining input
[01:29] Parsing input
[02:35] Function to count paths between nodes
[03:57] Solving part 1
[04:22] Part 2 introduction
[05:08] Debugging on new example
[06:45] Looking at paths between fft and dac
[07:44] Multiplying paths
[08:39] Running, but too slow
[08:52] Adding caching to count_paths function
[09:20] Solving part 2
[09:35] Solving with Claude
[10:49] Analysis of Claudes solution
[12:15] Conclusion
#AdventOfCode #claude Reactor [AOC2025 Day 11]](https://i.ytimg.com/vi/QYdO0pXACOI/mqdefault.jpg)
![Insane Bolt [HackTheBox - Coding Challenge]
Insane Bolt is a medium difficulty coding challenge. Ill connect to a socket and read unicode dungeon maps. Ill have to navigate the robot through the maze collecting bolts and a gem, taking the shortest path. And Ill have to do that 500 times! Ill use BFS to make quick work of this.
Final code: https://gitlab.com/0xdf/ctfscripts/-/blob/master/htb-insane_bolt/solve.py
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[01:04] nc interaction
[01:49] Dependencies with uv
[03:39] Handle args
[04:18] Connect and general structure
[06:23] Unicode to ASCII
[11:13] Getting start, end, and path spaces
[13:56] BFS background
[15:20] BFS
[19:14] Working out bugs
[20:57] Parse / print status messages
[24:00] Handling EOFError
[25:36] Conclusion
#python #uv Insane Bolt [HackTheBox - Coding Challenge]](https://i.ytimg.com/vi/QzZ1viedbeE/mqdefault.jpg)
![NovaEnergy - HackTheSystem CTF
HackTheBox is running a Bug Bounty themed CTF, HackTheSystem June 27-29 2025. These challenges are all based on real bug bounty reports. There are two teaser challenges that are out now! Ill showcase one of them, NovaEnergy. Well find a Swagger API docs that allows us to leak an email verification token and bypass owning the email we registered with.
HackTheSystem - Bug Bounty CTF: https://ctf.hackthebox.com/event/details/hack-the-system-bug-bounty-ctf-2508
HackTheSystem Teaser Playground: https://ctf.hackthebox.com/event/details/hack-the-system-bug-bounty-ctf-playground-2509
HackerOne report: https://hackerone.com/reports/2712583
Mozilla Verification Bypass blog post: https://0d-amr.medium.com/bypass-email-verification-in-mozilla-2ab45ac36c42
CriticalOps Challenge w/ IppSec: https://youtu.be/j7uj1f6VkSs
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[01:02] Challenge introduction
[01:50] Exploring site
[03:24] Registering an account
[04:05] Looking at requests in Burp
[05:36] Directory brute force w/ feroxbuster
[07:30] Enumerating API
[08:30] Brute force again in /api/
[09:40] Swagger docs
[11:10] /email-verify endpoint
[12:18] /userDetails endpoint
[12:48] Solving challenge
[13:22] Bug bounty report / blog
[15:10] Conclusion
#bugbounty #ctf #hackthebox NovaEnergy - HackTheSystem CTF](https://i.ytimg.com/vi/Ru5toDyKNjg/mqdefault.jpg)