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 20 challenge, Firewall Rules, involves processing overlapping ranges to find gaps across a range of 4 billion numbers.
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
[00:59] genday.sh / input
[01:22] Plot analysis
[05:22] Creating fixture / parse test
[07:28] Parsing input into list of int pairs
[08:32] Part 1 test
[09:06] Part 1 code
[10:55] Pass tests / solve part 1
[11:13] Challenge part 2
[11:20] Starting part 2 script
[11:46] Part 2 test
[12:28] Part 2 code
[13:44] Debugging bad test value
[14:17] Passing tests / solve part 2
[14:50] Combining part 1 and part 2 to run
#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 20 challenge, Firewall Rules, involves processing overlapping ranges to find gaps across a range of 4 billion numbers.
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
[00:59] genday.sh / input
[01:22] Plot analysis
[05:22] Creating fixture / parse test
[07:28] Parsing input into list of int pairs
[08:32] Part 1 test
[09:06] Part 1 code
[10:55] Pass tests / solve part 1
[11:13] Challenge part 2
[11:20] Starting part 2 script
[11:46] Part 2 test
[12:28] Part 2 code
[13:44] Debugging bad test value
[14:17] Passing tests / solve part 2
[14:50] Combining part 1 and part 2 to run
#ctf #adventofcode #revivalofcode #python
![Day 5 - How About a Nice Game of Chess? [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 5 challenge, How About a Nice Game of Chess?, involves taking MD5 hashes with a seed and a counter to find hashes that start with five 0s.
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/
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[00:17] Challenge Part 1
[01:15] genday.sh script
[01:34] Part 1 tests
[02:38] Solving part 1
[05:14] Challenge part 2
[05:40] Refactoring to solve both parts in one function
[07:05] Part 2 tests
[08:00] Coding part 2
[09:50] Debugging small errors
[11:49] Fixing pretty print and solving
#ctf #adventofcode #revivalofcode #python Day 5 - How About a Nice Game of Chess? [Revival of Code 2023 - Advent of Code 2016]](https://i.ytimg.com/vi/6fzTu0T7HbM/mqdefault.jpg)
![Hacking the HackTheBox Code Editor
In the final video in this series, Ill look at the requests sent by the HackTheBox web IDE and recreate a Python script to submit my code and get the flag without it.
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[00:38] Running IDE through Burp
[01:55] Creating script to submit solutions
[04:12] Posting solution
[07:26] Fixing bugs
[08:20] Troubleshooting in Burp Repeater
[11:45] Conclusion
#python Hacking the HackTheBox Code Editor](https://i.ytimg.com/vi/7TihembjZ6A/mqdefault.jpg)
![Relic Maps [Forensics - Cyber Apocalypse 23 CTF]
The Relic Maps challenge is one that I created for the HTB Cyber Apocalypse 2023 CTF. It mimics really OneNote phishing malware, and Ill have to follow a chain of OneNote - hta - bat - powershell - .NET exe to find the flag.
#pentest #ctf #forensics #CyberApocalypse23
onedump.py: https://github.com/DidierStevens/Beta/blob/master/onedump.py
Based on: https://isc.sans.edu/diary/rss/29470
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[01:28] Challenge description
[02:07] Looking at the OneNote file in Windows
[03:57] hta special character file name
[04:41] Getting hta file from Linux
[06:50] hta analysis
[09:56] windows.bat analysis
[12:12] PowerShell analysis
[15:18] Decrypting exe
[17:14] DotNet exe analysis
[18:07] Conclusion Relic Maps [Forensics - Cyber Apocalypse 23 CTF]](https://i.ytimg.com/vi/84sqhIvE2bQ/mqdefault.jpg)
![Guard Gallivant [Day 6 - Advent of Code 2024 - Python]
A grid challenge where I have to walk a guard until they hit an obstruction, then turn them to the right. In part 1, I count spaces visited. In part 2, I have to find all the places I could add a single obstruction to get the guard caught in a loop. Brute force works relatively quickly here.
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
[01:05] Setup / data overview
[01:49] Strategy
[02:28] Data processing, finding start
[04:08] Walking grid
[06:57] Turns
[08:18] Solving part 1
[08:43] Part 2 challenge
[09:26] Strategy
[10:45] Function to check for loop
[12:41] Trying all possible obstructions
[14:20] Updating grid to be mutable
[15:19] Solving part 2
[16:05] Conclusion
#adventofcode #python Guard Gallivant [Day 6 - Advent of Code 2024 - Python]](https://i.ytimg.com/vi/98M4F1agidQ/mqdefault.jpg)
![RAM Run [Day 18 - Advent of Code 2024 - Python]
Im giving a list of RAM blocks that will fill up a plane. I need to find a path through the maze with a given number of blocked in place. In part two, Ill use binary search to find the point in less than a second.
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
[01:24] Setup / data overview
[01:54] Parsing input
[05:12] BFS
[08:22] Removing loops
[09:04] Solving part 1
[09:16] Part 2 challenge
[09:57] Part 2 strategy
[11:18] Refactor part 1 into function
[12:15] Binary search
[16:00] Solving part 2
#adventofcode #python RAM Run [Day 18 - Advent of Code 2024 - Python]](https://i.ytimg.com/vi/99Zqj06qnMg/mqdefault.jpg)
![Reindeer Maze [Day 16 - Advent of Code 2024 - Python]
Im given a maze with a start and end with many ways to get between them. Theres a cost to step forward and a much larger cost to turn. Im asked for part 1 to find the least cost to get from start to end. In part 2, I need to find a count of the spaces included in any of the paths that have the lowest cost. Ill use Dijkstras algorithm to solve both, adding additional state for the second part.
Dikstras algorithm: https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm
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
[01:20] Setup / data overview
[02:08] Parsing input, finding start
[03:02] Setting up Dijkstras
[04:45] Looping over states, checking for end
[05:42] Stepping forward
[06:53] Turning
[08:08] Solving part 1
[08:47] Testing speed improvement
[10:44] Part 2 challenge
[11:28] Updating break condition
[13:52] Tracking path in state
[15:43] Solving part 2
[16:22] Review code
[18:11] Checking tuple instead of list for path
#adventofcode #python Reindeer Maze [Day 16 - Advent of Code 2024 - Python]](https://i.ytimg.com/vi/9G0Hfjg5sXs/mqdefault.jpg)
![Malicious JavaScript Vjw0rm / STRRAT Analysis
Ill grab a JavaScript file from Malware Bazaar and take a look. There are several layers of obfuscated JavaScript, during which it drops and runs a Java Jar file (potentially STRRAT) and eventually well find vjw0rm and look at the different commands it can get from the C2 server. Ill make use of VSCode, CyberChef, VirusTotal, and Google along the way.
Sample: https://bazaar.abuse.ch/sample/0a19ba2af0a2c3b6bdb5c7265439185093c1f6e8128338b7d566e3a15cc8b193/
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[01:12] Initial sample analysis
[02:10] Deobfuscating initial layer
[05:43] Decoding next layer
[06:45] Analysis of layer1.js
[10:10] Decoding next JavaScript layer
[10:53] Analysis of layer2a.js
[11:55] Decoding next JavaScript layer
[12:50] Analysis of layer3.js / vjw0rm
[18:36] Decoding Jar file
[20:30] Analysis of Jar, its files
[21:24] Search VT
[22:58] Searching Google for carLambo
[23:41] Conclusion Malicious JavaScript Vjw0rm / STRRAT Analysis](https://i.ytimg.com/vi/9HeA1s1jC7o/mqdefault.jpg)
![Cafeteria [AOC2025 Day 5]
Advent of Code 2025 Day 5 plays with overlapping ranges. I get a long list of ranges for ids of fresh ingredients. In part 1, I work through another list of ingredients and figure out how many are fresh (within a fresh range). For part 2, I have to find the total number of possible fresh ingredients by combining the overlapping ranges.
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:53] Pulling / examining input
[01:44] Procesing ranges into list
[04:12] Checking each ingredient
[06:00] Solving part 1
[06:12] Part 2 introduction
[06:53] Talking through solution
[08:33] Implementing solution
[10:00] Working to get edges correct
[15:53] Solving part 2
[16:20] Solving with Claude
[17:45] Analysis of Claudes solution
#AdventOfCode #claude Cafeteria [AOC2025 Day 5]](https://i.ytimg.com/vi/9JEYbIpzuM8/mqdefault.jpg)
![Malicious XLS Analysis // CVE-2017-11882 Still Lives!
I remember when a vulnerability in the Microsoft Equation editor led to a flood of phishing documents in 2017. This vulnerability is still going strong, with many daily submissions to Malware Bazaar. Ill pull one, an Excel document and look at how its associated with this vulnerability, find the shellcode, enumate the shellcode with scdbg, download the next two executables (an exe and a dll) and get a quick idea of whats going on.
Sample: https://bazaar.abuse.ch/sample/2a549fd9f71eb115734317dfcc13ad38ca208c06c5c95310a5c96c94c8910382/
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[01:23] Looking at Malware Bazaar and CVE trends
[02:37] Looking at OLE streams, oledump.py
[03:15] Yara rule that flagged this as CVE-2017-11882
[04:42] Finding Equation Editors CLSID in file
[05:20] oledump.py to pull shellcode (fail)
[06:48] Getting correct shellcode and debugging
[07:30] Analysis of shellcode
[08:12] Download and decompile next stage with dnspy
[10:11] Downloading and reversing DLL
[11:52] dnspy on DLL
[13:46] Upload to VirusTotal
[15:03] Conclusion Malicious XLS Analysis // CVE-2017-11882 Still Lives!](https://i.ytimg.com/vi/A2jpx9dPG_U/mqdefault.jpg)
![Day 24: Never Tell Me The Odds [AOC2023 Python]
For Advent of Code 2023 Day 24, I get initial x, y, z positions and velocities for 300 hailstones. In part 1, I need to find how many of them cross in the X-Y plane. In part 2, I need to find a starting position and velocity for a rock I can throw that will hit all of the stones. Ill use sympy to make that happen.
Code 2023 AOC: https://gitlab.com/0xdf/aoc2023
Challenge Link: https://adventofcode.com/2023/day/24
https://en.wikipedia.org/wiki/Line%E2%80%93line_intersection
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Part 1 description
[01:59] Stone class
[04:59] Math background
[07:59] Solving for intersection
[10:43] Finding stones that intersect
[12:28] Accounting for parallel lines
[13:28] Solve part 1
[14:04] Part 2 description
[14:40] Setting up sympy
[15:23] Math background
[17:46] Creating equations
[20:50] Solve part 2
[20:40] Reducing solve time
[23:44] Summary
#adventofcode #python Day 24: Never Tell Me The Odds [AOC2023 Python]](https://i.ytimg.com/vi/AP2RsClbIhA/mqdefault.jpg)
![Dirty Frag Explained
A week after Copy Fail, another Linux page-cache LPE: Dirty Frag. Two bugs (xfrm-ESP and RxRPC) each provide a write primitive into cached memory, with each vulnerability targeting different default configurations for full distro coverage. In this video I cover the messy disclosure, walk through the authors POC, and run both exploit paths on the HTB Snapped machine. I also show how to clean it up.
Writeup: https://github.com/V4bel/dirtyfrag/blob/master/assets/write-up.md
POC: https://github.com/V4bel/dirtyfrag
oss-security disclosure: https://www.openwall.com/lists/oss-security/2026/05/07/8
SiCks response: https://www.openwall.com/lists/oss-security/2026/05/07/12
HTB Snapped post: https://0xdf.gitlab.io/2026/04/01/htb-snapped.html
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[0:00] Intro
[1:07] Disclosure
[3:51] Exploit overview
[5:44] POC Code
[8:22] RxRPC Demo
[11:48] Cleanup
[13:05] Demo ESP
[14:11] Conclusion
#dirtyfrag #CVE-2026-43284 #CVE-2026-43500 Dirty Frag Explained](https://i.ytimg.com/vi/B5eUI_e7iwE/mqdefault.jpg)