Uploaded December 2023 | Updated November 2026, 3 hours ago
For Advent of Code 2023 Day 25, I get a bunch of nodes and wires connecting them. I'll read them into a Graph with the Python networkx library, and then use the Stoer-Wagner algorithm implemented in networkx to get the answer very easily.
Code 2023 AOC: gitlab.com/0xdf/aoc2023
Challenge Link: adventofcode.com/2023/day/25
Stoer-Wagner: en.wikipedia.org/wiki/Stoer%E2%80%93Wagner_algorithm
networkx: networkx.org
networkx stoer_wagner: networkx.org/documentation/stable/_modules/networkx/algorithms/connectivity/stoerwagner.html#stoer_wagner
☕ Buy Me A Coffee: buymeacoffee.com/0xdf
[00:00] Part 1 description
[01:33] Input analysis
[02:16] Install networkx in venv
[03:12] Prase lines into graph
[03:59] Stoer-Wagner
[05:50] Solve part 1
[06:28] Summary
#adventofcode #python
For Advent of Code 2023 Day 25, I get a bunch of nodes and wires connecting them. I'll read them into a Graph with the Python networkx library, and then use the Stoer-Wagner algorithm implemented in networkx to get the answer very easily.
Code 2023 AOC: gitlab.com/0xdf/aoc2023
Challenge Link: adventofcode.com/2023/day/25
Stoer-Wagner: en.wikipedia.org/wiki/Stoer%E2%80%93Wagner_algorithm
networkx: networkx.org
networkx stoer_wagner: networkx.org/documentation/stable/_modules/networkx/algorithms/connectivity/stoerwagner.html#stoer_wagner
☕ Buy Me A Coffee: buymeacoffee.com/0xdf
[00:00] Part 1 description
[01:33] Input analysis
[02:16] Install networkx in venv
[03:12] Prase lines into graph
[03:59] Stoer-Wagner
[05:50] Solve part 1
[06:28] Summary
#adventofcode #python
![Day 5: If You Give A Seed A Fertilizer [AOC2023 Python]
For Advent of Code 2023 Day5, I get a few seed values and many maps from one medium to the next. In part one, I take each seed and use the maps to figure out a location value, and return the lowerst. In part two, I have to map huge ranges through these maps, meaning I have to work with ranges rather than numbers.
Code 2023 AOC: https://gitlab.com/0xdf/aoc2023
Challenge Link: https://adventofcode.com/2023/day/5
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
#adventofcode #python
[00:00] Part 1 description
[02:30] Part 1
[16:05] Part 2 description
[17:03] Input analysis
[17:40] Part 2
[28:24] Summary Day 5: If You Give A Seed A Fertilizer [AOC2023 Python]](https://i.ytimg.com/vi/W6gZrw9-QpY/mqdefault.jpg)
![Finding and Fixing a Bug in Netexec NFS
Netexec has some awesome NFS capabilities. While playing Slonik from VulnLab / HackTheBox, I found an issue I couldnt understand. Ill walk through how Netexec works with NFS, show the issues, and dive into the code to see the issue and the fix!
Blog: https://0xdf.gitlab.io
uv Cheatsheet: https://0xdf.gitlab.io/cheatsheets/uv
Netexec: https://www.netexec.wiki/
Netexec NFS documentation: https://www.netexec.wiki/nfs-protocol/enumeration
Netexec NFS source: https://github.com/Pennyw0rth/NetExec/blob/main/nxc/protocols/nfs.py
Netexec PR: https://github.com/Pennyw0rth/NetExec/pull/1103
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[01:19] Showing NFS configuration
[01:54] Netexec NSF capabilities
[02:55] Analysis of exports config file
[04:26] Three interesting cases: shadow, root.txt, .bash_history
[05:25] Explaining whats confusing
[06:08] Netexec NFS get_file function
[07:34] Debugging file handle data
[09:10] Continuing with get_file
[11:06] PR for bug fix
[11:45] Talking through reading exports
[12:28] Talking through reading shadow
[13:11] Talking through reading root.txt
[13:26] Talking through reading .bash_history
[14:30] Wrap-up
#netexec #nfs #programming #debug #python Finding and Fixing a Bug in Netexec NFS](https://i.ytimg.com/vi/WVWPgOjIpoI/mqdefault.jpg)
![Reflective XSS via Link Click / SSRF [Hackvent 2022 - Day 14]
The day 14 challenge in Hackvent 2022 is to get the bank employee to transfer money into your account. I can get them to click a link, and Ill need to build a page that automatically submits a form to exploit a reflective XSS in the bank site, loading my JavaScript, which can then perform the requests necessary to make the transaction.
Hackvent 2022 writeup: https://0xdf.gitlab.io/hackvent2022/medium
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
#hackvent
[00:00] Introduction
[00:11] Overview of websiet
[01:07] Sending links to support
[02:32] Looking at transfer
[03:15] Finding reflective XSS in transfer
[04:24] Checking back on link click data - sending again
[05:04] Writing direct page
[09:45] Analysis of contract source
[10:12] Testing direct page - fails due to CORs
[11:04] Proving XSS over link click
[16:55] Validating XSS page in my browser
[17:32] Sending link to support
[17:58] Quick fix hopefully before link click
[18:06] Summary of whats happening / going to happen
[18:43] Seeing money / getting flag / summary Reflective XSS via Link Click / SSRF [Hackvent 2022 - Day 14]](https://i.ytimg.com/vi/XHOvZDLnJ2Y/mqdefault.jpg)
![Troubleshooting proxychains
Trying to run `certipy` over `proxychains` was failing for me. In this video, Ill show how I troubleshot, and what the issues was. Well cover proxychains, LD_PRELOAD, and capabilities along the way.
Chisel Cheatsheet: https://0xdf.gitlab.io/cheatsheets/chisel
uv Cheatsheet: https://0xdf.gitlab.io/cheatsheets/uv
uv video: https://www.youtube.com/watch?v=G36QXtBXKBQ
Mist blogpost: https://0xdf.gitlab.io/2024/10/26/htb-mist.html
man ld.so: https://man7.org/linux/man-pages/man8/ld.so.8.html
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[00:35] Scenario setup
[02:30] Showing commands and failure
[02:58] Exploring /proc
[04:28] sudo fixes it
[05:56] Same with nc
[07:12] Capabilities
[09:38] How proxychains works
[11:38] LD_PRELOAD secure-execution
[12:45] secure-execution triggers
[13:38] faketime
[14:38] Conclusion
#proxychains #ld_preload Troubleshooting proxychains](https://i.ytimg.com/vi/XKyTOGN2GB4/mqdefault.jpg)
![Elf Connect - JavaScript Game Hacking [Sans Holiday Hack 2024]
The first real terminal in the 2024 Sans Holdiay Hack Challenge is Elf Connect, a rift on the New York Times Connections game. In this video, Ill show how to find the source code in browesr dev tools, autoate solving the game to different degrees, and finally just cheat the score variable.
2024 HHC Blog post: [Coming soon]
Terminal Link: https://hhc24-elfconnect.holidayhackchallenge.com/
TamperMonkey Script: https://gitlab.com/0xdf/ctfscripts/-/blob/master/holidayhack/termlink.js
NYT Connections: https://www.nytimes.com/games/connections
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[00:28] Game Overview
[01:18] Dev tools overview / Scope
[04:36] Opening in new window
[05:28] Initial source analysis
[06:25] Print answers JavaScript
[08:00] Solve analysis
[10:20] Solve JavaScript
[13:27] Hacking the score
[15:48] Conclusion
#javascript #ctf #devtools Elf Connect - JavaScript Game Hacking [Sans Holiday Hack 2024]](https://i.ytimg.com/vi/XsEqZvrTyoU/mqdefault.jpg)
![Day 22: Sand Slabs [AOC2023 Python]
For Advent of Code 2023 Day 22, I get a bunch of blocks, each represented by two x, y, z coordinates. I start by letting the blocks all fall down until they rest on the ground or another block. Then I look at the block and which other blocks will fall further if that block were to disappear. In part one, I have to count the blocks that can be removed and no other blocks will fall. In part two, I look at each block, and how many blocks would fall if it were removed.
Code 2023 AOC: https://gitlab.com/0xdf/aoc2023
Challenge Link: https://adventofcode.com/2023/day/22
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Part 1 description
[02:22] Input fetch / analysis
[03:06] Brick class
[06:20] Loading all bricks, validating
[08:20] Fall bricks into place
[10:45] overlap function
[13:46] Mapping supports / supported_by
[15:22] Finding / fixing bug
[18:06] Counting safe blocks
[19:35] Solve part 1
[19:47] Part 2 description
[20:15] Looping over bricks removing them
[22:25] Debugging
[23:07] Solve part 2
[23:15] Summary
#adventofcode #python Day 22: Sand Slabs [AOC2023 Python]](https://i.ytimg.com/vi/XzbxDiQO8ZY/mqdefault.jpg)
![Resonant Collinearity [Day 8 - Advent of Code 2024 - Python]
A grid challenge where I get a map of antenna each with a frequency. Ill group them by freqency, and find antinodes as defined in each part. In part 1, each pair of antenna generate two antinodes one on each side of the pair. In part 2, I extend this to look along the line between each pair as long as Im on the given initial grid.
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:50] Setup / data overview
[02:23] Parsing grid
[04:52] Looping over antenna pairs
[08:56] Filtering for in range
[09:37] Solving part 1
[10:09] Part 2 challenge
[10:40] Calculating part 2
[12:53] Solving part 2
[13:44] Conclusion
[13:52] Fixing len/sum issue
#adventofcode #python Resonant Collinearity [Day 8 - Advent of Code 2024 - Python]](https://i.ytimg.com/vi/YXAYSjpRIog/mqdefault.jpg)
![Antipattern [0xff: One Last Address]
The HTB Content team made me a goodbye CTF consisting of four challenges. In this video, Ill solve Antipattern, a fullpwn machine that replicates my website as well as a bunch of things that led to box submissions being rejected from HTB.
bash reverse shell:
shell upgrade:
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[00:59] Challenge introduction
[01:32] nmap
[05:30] Website enumeration / Easter eggs
[11:09] /search
[13:00] SQLI POC
[14:12] Manual union injection
[14:39] sqlmap
[16:35] File read enumeration
[21:42] Manual file read / write
[24:00] Webshell
[29:25] System enumeration
[31:05] Run moreclicks
[32:20] Loading moreclicks into Ghidra
[34:10] RE moreclicks
[38:50] Command injection
[41:10] Beyond Root: PHP SQLI
[43:20] Beyond Root: MariaDB
[47:08] Conclusion
#ctf #nmap #sqli #ghidra #setuid Antipattern [0xff: One Last Address]](https://i.ytimg.com/vi/YaZkxlvl6oM/mqdefault.jpg)
![Day 12 - Leonardos Monorail [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 12 challenge, Leonardos Monorail, is so much easier than day 12! Ill create a simple computer with four instructions and four integer registers.
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:13] Challenge Part 1
[01:17] genday.sh / input
[01:45] Initial Computer test
[04:10] Creating Computer class
[05:39] run function for Computer
[09:42] Tests for run and get_value
[11:13] Fixing typos
[11:48] get_value function for Computer
[12:36] Fixing typos
[12:55] Tests passing, updating to solve part 1
[14:04] Part 2 challenge
[14:14] Updating to solve part 2
[14:49] Looking at input manually while part 2 runs
[15:58] Solving part 2
#ctf #adventofcode #revivalofcode #python Day 12 - Leonardos Monorail [Revival of Code 2023 - Advent of Code 2016]](https://i.ytimg.com/vi/Z-qDyL-vyNA/mqdefault.jpg)
![Hacking Luggage Lock [Sans Holiday Hack 2023]
In the Luggage Lock challenge, Im asked to open a combination luggage lock using real world techniques. In this video, Ill hack the interface for the challenge to show two ways to solve it. First Ill figure out the combo from the websocket messages from the server. Then Ill show how to brute force the combo from the dev tools console sending all 10,000 possibilities in less than a minute.
Holiday Hack 2023 Solution: https://0xdf.gitlab.io/holidayhack2023/
Holiday Hack 2023 Game: https://2023.holidayhackchallenge.com/
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[00:48] Identifying websockets
[01:37] Finding what triggers message
[02:14] Get combo from setup message
[04:59] Quick JS analysis
[05:33] Sending websocket messages
[06:14] Asking ChatGPT for JavaScript
[07:10] Brute forcing pin from debug console
[08:38] Summary
#adventofcode #python Hacking Luggage Lock [Sans Holiday Hack 2023]](https://i.ytimg.com/vi/ZLSUMIYkzJI/mqdefault.jpg)
![Code Chronicle [Day 25 - Advent of Code 2024 - Python]
Im given visual blocks showing both locks and keys. Ill need to process all of them and then test each to see how many pairs of lock / key exist where the key fits into the lock.
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:57] Input review
[02:36] Processing input to blocks
[08:10] Brute-forcing locks and keys
[09:24] Solving part 1 example
[09:47] Fixing read in bug
[10:40] Solving part 1
[11:06] Conclusion
#adventofcode #python Code Chronicle [Day 25 - Advent of Code 2024 - Python]](https://i.ytimg.com/vi/ZP7uCyBG32c/mqdefault.jpg)