Uploaded December 2023 | Updated November 2026, 3 hours ago
For Advent of Code 2023 Day 15, I'm first asked to implement a custom (and bad) hashing algorithm that reduces any string to a single byte. I'll apply it to a series of strings in my puzzle input. In part 2, I'm actually handling those strings as instructions, either adding or removing a lens from one of 256 boxes. I'll hash the lens name to get what box it goes in, and track the order lenses are inserted into each box.
Code 2023 AOC: gitlab.com/0xdf/aoc2023
Challenge Link: adventofcode.com/2023/day/15
☕ Buy Me A Coffee: buymeacoffee.com/0xdf
[00:00] Part 1 description
[01:06] Input analysis
[01:38] Hash function
[02:30] Testing badhash
[02:52] Apply hash to input
[03:36] Solve part 1
[03:54] Part 2 description
[07:08] Sorting lenses
[12:43] Check sort result
[13:14] Scoring result
[14:31] Solve part 2
[14:45] Summary
#adventofcode #python
For Advent of Code 2023 Day 15, I'm first asked to implement a custom (and bad) hashing algorithm that reduces any string to a single byte. I'll apply it to a series of strings in my puzzle input. In part 2, I'm actually handling those strings as instructions, either adding or removing a lens from one of 256 boxes. I'll hash the lens name to get what box it goes in, and track the order lenses are inserted into each box.
Code 2023 AOC: gitlab.com/0xdf/aoc2023
Challenge Link: adventofcode.com/2023/day/15
☕ Buy Me A Coffee: buymeacoffee.com/0xdf
[00:00] Part 1 description
[01:06] Input analysis
[01:38] Hash function
[02:30] Testing badhash
[02:52] Apply hash to input
[03:36] Solve part 1
[03:54] Part 2 description
[07:08] Sorting lenses
[12:43] Check sort result
[13:14] Scoring result
[14:31] Solve part 2
[14:45] Summary
#adventofcode #python
![Day 7: Camel Cards [AOC2023 Python]
For Advent of Code 2023 Day7, Im given a series of poker hands that I need to rank. The rules are a simplified version of poker. Ill use a Hand class, along with some neat static methods. In part 2, there are wildcards to handle, which Ill brute force every possible hand to get the best hand.
Code 2023 AOC: https://gitlab.com/0xdf/aoc2023
Challenge Link: https://adventofcode.com/2023/day/7
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
#adventofcode #python
[00:00] Part 1 description
[01:52] Input analysis
[02:25] Create Hand class
[03:44] Getting hand type
[08:01] Testing hand type
[10:34] Adding eq and gt
[14:46] Testing comparison
[15:07] Scoring hands
[16:10] Fixing bug in hand_type
[17:02] Part 2 description
[17:19] Strategies
[17:49] Updating card_map
[18:53] Reorganizing get_hand_type
[20:40] replace_wilds
[23:16] Testing replace_wilds
[24:02] Getting best hand_type
[25:08] Scoring part 2
[26:05] Solve part 2
[12:53] Brute force solution Day 7: Camel Cards [AOC2023 Python]](https://i.ytimg.com/vi/qPrz0vXYAQ0/mqdefault.jpg)
![Bypassing Python Filters [Code - HackTheBox]
In Code from HackTheBox, Ive got a website that has a Python editor can execute what I run. Theres a block-list in place to prevent my getting RCE, but Im going to bypass it to do just that!
Full Code solution: https://0xdf.gitlab.io/2025/08/02/htb-code.html
Bash reverse shell explainer: https://www.youtube.com/watch?v=OjkVep2EIlw
Shell upgrade explainer: https://www.youtube.com/watch?v=DqE6DxqJg8Q
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[00:30] Application overview
[01:04] Getting blocked
[02:51] Inspiration from SSTI payloads
[04:25] Globals
[06:20] Getting os
[07:51] Getting popen
[09:05] Executing command
[10:28] Getting shell
[11:27] Review code
[12:34] Conclusion
#HackTheBox #ctf #python #debug Bypassing Python Filters [Code - HackTheBox]](https://i.ytimg.com/vi/qgOb2BDnkHI/mqdefault.jpg)
![Reversing APT29 Duke Malware
Im looking at three binary files. The first is a legit Microsoft signed exe. The second is a stub DLL that does nothing. The third is APT 29 malware that is DLL side-loaded by the legit executable. Ill show how the DLL opens the decoy document, loads wininet.dll using LdrLoadDll, and then connects to a the Zulip chat service for C2 (including the username and password). This malware comes from HackTheBoxs Einladen Sherlock.
APT 29 malware post: https://0xdf.gitlab.io/2024/05/08/htb-sherlock-einladen-malware-re.html
HackTheBox Einladen Blog post: https://0xdf.gitlab.io/2024/05/02/htb-sherlock-einladen.html
HackTheBox Einladen: https://app.hackthebox.com/sherlocks/Einladen
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[01:26] Situation overview
[01:55] msoev.exe (legit)
[04:30] AppVIsvSubsystems64.dll
[07:01] mso.dll start
[07:49] Exports, imports, and strings
[09:56] ShellExecuteA to show decoy
[11:03] String decryption functions
[13:14] Decrypting string to show decoy
[15:05] Loading wininet.dll
[19:05] Getting wininet functions
[22:48] C2 activity
[27:54] Back to entry point
[29:25] Conclusion
#pentest #ctf #malware #ghidra #apt29 Reversing APT29 Duke Malware](https://i.ytimg.com/vi/qp3W8Zt4GTQ/mqdefault.jpg)
![Day 9: Mirage Maintenance [AOC2023 Python]
For Advent of Code 2023 Day 9, I get a bunch of lines, each with a pattern of numbers. For each line, I need to find the next number in the pattern. Ill use a recurrsive function to find the next item. In part two, I need to do the same but in reverse, so Ill just reverse the input.
Code 2023 AOC: https://gitlab.com/0xdf/aoc2023
Challenge Link: https://adventofcode.com/2023/day/9
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Part 1 description
[01:43] Input analysis
[02:30] Recurrsive get_next
[04:58] Calculating answer
[05:37] Running on examples and solving
[06:05] Part 2 description
[06:22] Solve part 2
[06:55] Summary
#adventofcode #python Day 9: Mirage Maintenance [AOC2023 Python]](https://i.ytimg.com/vi/rkrwrByDLKg/mqdefault.jpg)
![Paper Shreds Easter Egg [Sans Holiday Hack 2024]
Theres a challenge in the 2024 SANS Holiday Hack where I get a zip archive with 1000 images that are 1 pixel wide and 1000 tall. The challenge is to assemble them back into an image. The most common solution uses a neat Python script to line up images based on edge similarity. However, if you go into the exifdata for the images, its possible to find not only the correct order but also a bit more story for whats happening in the challenge! Ill write a Python script to decode the data, print the story, and generate the image.
2024 HHC Blog post: [Coming soon]
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[01:40] Looking at images
[03:00] Starting script
[04:21] Loop over images
[05:12] Decoding User Comment
[07:07] Finding index numbers
[09:59] Building text
[12:01] Assembling the image
[16:38] Conclusion
#python #ctf #requests #python Paper Shreds Easter Egg [Sans Holiday Hack 2024]](https://i.ytimg.com/vi/ruksORwPZoM/mqdefault.jpg)
![Brute Forcing AES-ECB with Emoji [Hackvent 2022 - Day 20]
The Hackvent day 20 challenge involves sending a message to a server and getting back that message and the flag, encrypted with AES electronic codebook (ECB) mode. Because of how the message and flag are padded seperately, its not immediately obvious how I could change the position of the flag within a block. Some analysis will show that using multi-byte characters (like emoji) will abuse this, and allow me to set up blocks that contain the amount of the flag I want. Ill start with 1 character, and send in a frame of my own that should match, and see it does. This is a really fun Python programming exercise. Ill use this abuse to brute force the flag, and then show how to make it way faster by putting all possible next characters into the same request.
Hackvent 2022 writeup: Hackvent 2022 writeup: https://0xdf.gitlab.io/hackvent2022/hard
AES-ECB: https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Electronic_codebook_(ECB)
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
#hackvent
[00:00] Introduction
[00:35] Looking at Python source
[01:25] Strategy
[03:45] Starting script with pwntools remote
[05:36] probe function
[07:28] printing results as block
[09:07] Playing with flag block spacing
[11:18] Finding flag length
[13:47] Manually showing last non-pad byte in flag is }
[15:08] Writing a loop to brute force each character
[20:11] Running, realizing some prints are required
[20:44] Running with status prints, breaks after two
[21:15] Need to update check to find correct block
[23:04] Running with correct checks
[23:30] Improving with much faster algorithm
[23:50] New function with multiple character check
[27:35] Running to figure out how to get characters from block match
[29:52] Adding prints to show progress and flag
[30:27] Wrap-up Brute Forcing AES-ECB with Emoji [Hackvent 2022 - Day 20]](https://i.ytimg.com/vi/sSZOP9pKc3Q/mqdefault.jpg)
![PHPs Unsafe parse_url Function [Encoding - HackTheBox]
In Encoding from HackTheBox, IppSec and I got different results trying to do the same thing, and we went to explore why. It turns out that passing a URL without a scheme and // will cause parse_url to return an empty string, which causes issues when its used as a filter.
Encoding blog post: https://0xdf.gitlab.io/2023/04/15/htb-encoding.html
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[00:28] Showing discrepency
[02:04] Looking at page source
[03:32] Adding echo to site
[04:34] Showing in php shell
[05:28] Looking at docs
[06:10] Hardening check PHPs Unsafe parse_url Function [Encoding - HackTheBox]](https://i.ytimg.com/vi/sXMqrgsf0b8/mqdefault.jpg)
![ffuf Auto Calibration Demystified
ffuf has a nice option to auto-calibrate filters with the -ac flag, but what does it really do? In this video Ill answer that, and then show the source code for how it happens.
Ippsec inspiration: https://youtu.be/2vEMGhOKlq0?si=DG5zEWqskCuCv9Cu&t=1020
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[0:00] Intro
[1:31] Documentation
[4:04] Source Code
[13:37] Conclusion
#ffuf #autocalibrate ffuf Auto Calibration Demystified](https://i.ytimg.com/vi/scHcQIDHcsc/mqdefault.jpg)
![Writing a Webshell Joomla Plugin [HackTheBox - DevVortex]
I found myself with Super Admin access to a Joomla site. I thought (incorrectly) that I couldnt edit the templates, so I set out to write a malicious plugin to provide a webshell, which Ill show in this video.
HackTheBox DevVortex Blog post: https://0xdf.gitlab.io/2024/04/27/htb-devvortex.html
HackTheBox DevVortex: https://www.hackthebox.com/machines/devvortex
Joomla Plugin Docs: https://docs.joomla.org/J4.x:Creating_a_Plugin_for_Joomla
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[00:53] Joomla Documentation
[01:06] Installation file
[03:10] Plugin PHP
[04:45] Deploy
[05:14] Execution via Webshell
[05:48] Conclusion
#pentest #ctf #bugbounty #joomla #plugin Writing a Webshell Joomla Plugin [HackTheBox - DevVortex]](https://i.ytimg.com/vi/sdF8YSPHql4/mqdefault.jpg)
![Laboratories [AOC2025 Day 7]
Advent of Code 2025 Day 7 visualizes a bean as it moves down the space hitting splitters. In part 1, I need to count the number of splits that happen. In part 2, I need to count the total number of paths possible through the space, assuming a partical could go either way at each splitter it reaches. Claude solves it almost the exact same way, other than that it uses a seperate loop for each part, whereas I did it in one loop.
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
[01:22] Pulling / examining input
[01:58] Finding S
[05:19] Debugging
[05:40] Solving part 1
[05:53] Part 2 introduction
[06:40] Strategy
[07:20] Refactoring beams into dictionary
[08:37] Refactoring to get to unstripped lines
[09:16] Keeping count of beams
[10:35] Counting beams
[10:50] Solving part 2
[11:02] Recapping solution
[12:56] Solving with Claude
[14:52] Analysis of Claudes solution
[16:20] Conclusion
#AdventOfCode #claude Laboratories [AOC2025 Day 7]](https://i.ytimg.com/vi/sq2OdJY3D_4/mqdefault.jpg)
![NeoVault - HackTheSystem CTF
HackTheBox ran a Bug Bounty themed CTF, HackTheSystem June 27-29 2025. These challenges are all based on real bug bounty reports. NeoVault is a chance to find a insecure direct object reference (IDOR) vulnerability in a banking website. From there, Ill get show two ways to find a Mongo object id. First, Ill send money to the user and look at the requests to get their ID. Second, Ill show how to take another user id and get other ids that could have been generated around the same time on the same system.
Mongo blog post: https://techkranti.com/idor-through-mongodb-object-ids-prediction/
HackerOne report: https://hackerone.com/reports/1464168
mongo-objectid-predict (original): https://github.com/andresriancho/mongo-objectid-predict
mongo-objectid-predict (python3): https://github.com/ArmanHZ/mongo-objectid-predict
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[00:44] Challenge introduction
[01:02] BugBounty reports
[02:30] Website enumeration
[04:25] Request analysis
[06:50] API routes
[07:52] Finding IDOR
[09:40] Finding user ID by sending money
[11:00] Mongo ID brute force
[14:14] Conclusion
#bugbounty #ctf #hackthebox #idor #mongo NeoVault - HackTheSystem CTF](https://i.ytimg.com/vi/tbbL4hshrus/mqdefault.jpg)