Uploaded December 2023 | Updated November 2026, 2 hours ago
For Advent of Code 2023 Day 17, I get a grid of values showing the heat gained moving through each space. I'll have to traverse from the top left to the bottom right gaining as little heat as possible. In part one, I can only go straight 3 times before I have to turn. In part two, I have to go straight at least 4 times, but not more than 10. I'll use some Dijkstra-like logic with a heapq to move through the grid in order of lowest heat total.
Code 2023 AOC: gitlab.com/0xdf/aoc2023
Challenge Link: adventofcode.com/2023/day/10
heapq: docs.python.org/3/library/heapq.html
Dijkstra's Algorithm: en.wikipedia.org/wiki/Dijkstra%27s_algorithm
☕ Buy Me A Coffee: buymeacoffee.com/0xdf
[00:00] Part 1 description
[01:15] Strategy preview
[01:31] Input fetch and analysis
[02:13] heapq
[04:24] Initialize grid
[05:57] Process queue
[11:36] Solve part 1
[11:52] Part 2 description
[12:12] Refactoring part 1 to part 2
[13:42] Debugging starting dr/dc error
[15:07] Solving part 2 ex.txt
[15:30] Other example fail
[15:56] Solve part 2
[16:08] Summary
#adventofcode #python
For Advent of Code 2023 Day 17, I get a grid of values showing the heat gained moving through each space. I'll have to traverse from the top left to the bottom right gaining as little heat as possible. In part one, I can only go straight 3 times before I have to turn. In part two, I have to go straight at least 4 times, but not more than 10. I'll use some Dijkstra-like logic with a heapq to move through the grid in order of lowest heat total.
Code 2023 AOC: gitlab.com/0xdf/aoc2023
Challenge Link: adventofcode.com/2023/day/10
heapq: docs.python.org/3/library/heapq.html
Dijkstra's Algorithm: en.wikipedia.org/wiki/Dijkstra%27s_algorithm
☕ Buy Me A Coffee: buymeacoffee.com/0xdf
[00:00] Part 1 description
[01:15] Strategy preview
[01:31] Input fetch and analysis
[02:13] heapq
[04:24] Initialize grid
[05:57] Process queue
[11:36] Solve part 1
[11:52] Part 2 description
[12:12] Refactoring part 1 to part 2
[13:42] Debugging starting dr/dc error
[15:07] Solving part 2 ex.txt
[15:30] Other example fail
[15:56] Solve part 2
[16:08] Summary
#adventofcode #python
![Creating a SSH Honeypot with Python
I recently needed to be able to capture the credentials of someone trying to log into an SSH server I controlled. There are tons of nice honeypot products out there that will do this, but I wanted to understand how to do this in python. This video is a walkthrough of that understanding, starting with a listening socket (and how that works) and building up to a threaded server that logs usernames / passwords.
paramiko: https://www.paramiko.org/
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
My blog: https://0xdf.gitlab.io
[00:00] Introduction
[00:59] Creating listening socket
[03:28] Interacting with listening socket
[05:03] accept and log connection, write to and read from socket
[06:11] Demonstrating basic socket with read / write
[06:51] Using paramiko to setup dummy SSH server
[08:50] Interacting with dummy SSH server
[09:46] Demonstrating issue with server key
[11:15] Giving server a static key
[12:26] Accepting in a while True loop
[13:11] Upgrading accept into a thread
[16:02] Adding SSH component that will handle password login
[17:27] Demoing password logging
[17:42] Wrap up, next steps Creating a SSH Honeypot with Python](https://i.ytimg.com/vi/HO1h57CiF98/mqdefault.jpg)
![Linen Layout [Day 19 - Advent of Code 2024 - Python]
Im given a list of patterns, and then a bigger list of much bigger patterns. For each bigger pattern, I first need to figure out if I can make it from some combination of the smaller patterns. Then I need to figure out how many ways I can make it from the smaller patterns. Ill use recursion and caching to solve this relatively quickly.
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:26] Setup / data overview
[02:10] Parsing input
[03:00] Recursive function to check pattern
[04:48] Counting valid patterns
[05:18] Solving part 1
[05:41] Part 2 challenge
[06:08] Refactor to get count
[08:08] Fixing silly typo
[09:00] Adding cache
[09:45] Solving part 2
#adventofcode #python Linen Layout [Day 19 - Advent of Code 2024 - Python]](https://i.ytimg.com/vi/I8wXvENY9RY/mqdefault.jpg)
![Race Condition [Day 20 - Advent of Code 2024 - Python]
Im given a maze to work through, which is very easy. But, then Im told Im allowed a single shortcut of length two, effectively once walking through a wall, and I need to find the number of shortcuts that improve my time by at least 100 steps. Ill create a map of each position that can be visited and compare each pair of points to see if a shortcut is possible. In part 2, Im allow to go through much thicker walls, up to 19 spaces. The same logic applies.
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:40] Strategy
[02:48] Setup / data overview
[03:25] Parsing input
[03:58] Getting start
[04:58] Calculating distance to each spot with bfs
[08:16] Debugging infinite loop
[09:38] Adding second seen check
[10:24] Finding shortcuts
[14:10] Checking examples
[14:47] Counting shortcuts
[15:06] Solving part 1
[15:25] Part 2 challenge
[16:30] Modifying loop to search more widely
[22:09] Collecting solution
[23:57] Solving part 2
[24:13] Conclusion
#adventofcode #python Race Condition [Day 20 - Advent of Code 2024 - Python]](https://i.ytimg.com/vi/IYB81SH7_7E/mqdefault.jpg)
![Brute-Forcing File Read with MD5s [HackTheBox Intentions]
In Intentions from HackTheBox, Ill get a binary with the capabilities to read any file on the file system. This file will get an MD5 sum on the first N bytes of a file, where I control the filename and N. In this video, Ill show how to write a simple Python script that allows for reading any file on the file system by brute forcing it byte by byte.
Intentions Blog Post: https://0xdf.gitlab.io/2023/10/14/htb-intentions.html
HTB Intentions: https://www.hackthebox.com/machines/intentions
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[01:13] Overview of scanner
[02:17] Outline of main Python script
[05:38] Forgot we didnt finish!
[06:11] Using subprocess to get hash from scanner
[07:33] Using PDB to figure out syntax for stdout
[08:36] Brute forcing next byte
[09:52] Fixing output print
[10:22] Catching error from scanner
[11:45] Weirdness of scanner
[12:02] Showing success
#pentest #ctf #bugbounty Brute-Forcing File Read with MD5s [HackTheBox Intentions]](https://i.ytimg.com/vi/IkUmlFklWEs/mqdefault.jpg)
![Digging into OFBiz Exploitation
There was a diary on the Sans Internet Storm Center page about increased exploitation attempts at their honeypots for CVE-2024-32113, which gives RCE against Apache OFBiz instances. Ill show how the exploit works on the HackTheBox Bizness machine, and then look at the patches to fix CVE-2024-32113, and then where the exploit is actually fixed in the patches for CVE-2024-36104.
Sans ISC Article: https://isc.sans.edu/diary/Increased+Activity+Against+Apache+OFBiz+CVE202432113/31132/
OFBiz Security Page: https://ofbiz.apache.org/security.html
TIO.run: https://tio.run/
HTB Bizness Blog Post: https://0xdf.gitlab.io/2024/05/25/htb-bizness.html
HTB Bizness: https://hacktheboxltd.sjv.io/g1jVD9?u=https%3A%2F%2Fapp.hackthebox.com%2Fmachines%2Fbizness
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[01:15] Article Review
[02:28] Exploiting CVE-2024-32113 on HTB
[05:45] Looking at fix on GitHub
[07:00] Trying fix on TIO
[08:10] Looking at next CVE, CVE-2024-36104
[09:30] Conclusion
#ofbiz #sansics #cve-2024-32113 #cve-2024-36104 Digging into OFBiz Exploitation](https://i.ytimg.com/vi/J_IxCBjd4Pw/mqdefault.jpg)

![Day 8: Haunted Wasteland [AOC2023 Python]
For Advent of Code 2023 Day 8, I get a series of left/right instructions, and a series of nodes and what comes to the left and right of them. In part 1, I just need to walk the path from AAA to ZZZ counting steps. In part 2, Ill need to track six ghosts at once, each from different starting places to end points. Ill calcuate their cycle length, and use the LCM to get the answer.
Code 2023 AOC: https://gitlab.com/0xdf/aoc2023
Challenge Link: https://adventofcode.com/2023/day/8
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
#adventofcode #python
[00:00] Part 1 description
[01:19] Input analysis
[01:51] Parsing input
[05:57] Walking the path
[07:33] Running on examples and solving
[08:05] Part 2 description
[09:15] How many ghosts
[09:55] Looking at cycles in AAA
[11:48] Fixing play script
[12:33] Looking at cycle length
[15:26] Cycle time for each ghost
[19:11] Getting LCM of cycles
[19:50] Summary Day 8: Haunted Wasteland [AOC2023 Python]](https://i.ytimg.com/vi/JvGbIGMvVtA/mqdefault.jpg)
![Historian Hysteria [Day 1 - Advent of Code 2024 - Python]
In this video Ill look at sorting and combining two lists parsed from columns of data.
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] Challenge introduction
[00:45] Data overview
[01:18] Parsing input into two lists
[04:30] Solving part 1
[05:59] Part 2 challenge
[06:29] Solving part 2
[07:35] Running on example and puzzle input
#adventofcode #python Historian Hysteria [Day 1 - Advent of Code 2024 - Python]](https://i.ytimg.com/vi/Jw2yvzZ38OI/mqdefault.jpg)
![Plutonian Pebbles [Day 11 - Advent of Code 2024 - Python]
Im given a list of numbers. At each iteration (blink), a stone either splits in two or has its value change. This leads to expoential growth in the length of the list. In part 1, I just follow the rules and track the list. In part two, Ill use a recursive cached function to let the calculation happen in reasonable time.
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:30] Strategy
[02:19] Setup / data overview
[02:48] Parsing input
[03:20] Inefficient solution
[06:14] Solving part 1
[06:31] Part 2 challenge
[06:40] Showing inefficient solution too slow
[08:00] functools cache
[10:09] Recursive count func
[12:29] Summing all stones
[12:50] Fixing str/int bug
[14:03] Solving part 2
[14:24] Conclusion
#adventofcode #python Plutonian Pebbles [Day 11 - Advent of Code 2024 - Python]](https://i.ytimg.com/vi/JxIAqiUJraE/mqdefault.jpg)
![State of 0xdf (2026)
Lets chat about the state of 0xdf content. Well go into the blog posts from 2025, Google Analytics, and YouTube analytics.
Blog: https://0xdf.gitlab.io
Cheatsheets: https://0xdf.gitlab.io/cheatsheets/
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[01:06] Blog post stats
[04:07] Google Analytics from website
[09:18] YouTube Analytics
[17:58] Personal Update State of 0xdf (2026)](https://i.ytimg.com/vi/KCo69_D8d2E/mqdefault.jpg)
![Day 19: Aplenty [AOC2023 Python]
For Advent of Code 2023 Day 19, I get a series of rules that apply to parts based on various features of the part. The rules show what stage to pass the part to next, before each part is eventually accepted or rejected. In part 1, I process a list of a few hundred parts. In part 2, they say that each of a parts four attributes can have values 1 - 4000. The question is how many possible parts can be accepted. Ill need to send ranges through a workflow function to get the result. Ill make heavy use of recursion in both parts.
Code 2023 AOC: https://gitlab.com/0xdf/aoc2023
Challenge Link: https://adventofcode.com/2023/day/19
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Oops
[00:52] Part 1 description
[02:33] Input analysis
[04:10] Getting workflows and parts
[04:54] Parsing workflows
[09:20] Testing workflow parsing
[10:23] Looping over parts
[12:30] apply_workflows
[16:09] Solve part 1
[16:28] Part 2 description
[17:13] New setup working over ranges
[18:42] apply_workflow_ranges
[28:29] Solve part 2
[28:56] Summary
#adventofcode #python Day 19: Aplenty [AOC2023 Python]](https://i.ytimg.com/vi/KF7jtMocf40/mqdefault.jpg)