Uploaded December 2023 | Updated November 2026, 3 hours ago
In support of my Advent of Code 2023 series, this video will show how to create a profile so that I can run a Python script with an argument relative to the location of the script.
Code 2023 AOC: gitlab.com/0xdf/aoc2023
☕ Buy Me A Coffee: buymeacoffee.com/0xdf
#adventofcode #python
In support of my Advent of Code 2023 series, this video will show how to create a profile so that I can run a Python script with an argument relative to the location of the script.
Code 2023 AOC: gitlab.com/0xdf/aoc2023
☕ Buy Me A Coffee: buymeacoffee.com/0xdf
#adventofcode #python
![Day 7 - Internet Protocol Version 7 [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 7 challenge, Internet Protocol Version 7, involves looking over columns of strings and doing some fancy Regex parsing, including capture groups, negative look-aheads, and overlapping matches with the regex module.
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/
Python regex: https://pypi.org/project/regex/
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[00:16] Challenge Part 1
[01:28] genday.sh / input
[02:10] Part 1 tests
[03:29] parse function
[05:51] Dumb testing of parse
[06:37] has_abba function
[08:38] Part 1 function
[10:51] Challenge Part 2
[11:35] Part 2 tests
[12:29] Solving part 2
[16:15] Debugging issues
[17:38] Solving
#ctf #adventofcode #revivalofcode #python Day 7 - Internet Protocol Version 7 [Revival of Code 2023 - Advent of Code 2016]](https://i.ytimg.com/vi/cVqQ2I3vd8o/mqdefault.jpg)
![MinMax [HackTheBox - Coding Challenge]
In another very easy coding challenge from HackTheBox, Ill read in a list of numbers, convert them to floats, and print the min and max values using Python. Ill show list comprehensions and map, as well as the long way with a for loop.
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[00:38] New HTB coding UI
[01:09] Converting input to list
[02:22] Converting list to ints using list comprehension
[03:06] Printing min and max
[03:30] Using map instead of list comprehension
[03:50] Exhausted generators
[04:46] Converting to list
[05:11] Solving with for loop
#python MinMax [HackTheBox - Coding Challenge]](https://i.ytimg.com/vi/cZNcRIlj42o/mqdefault.jpg)
![Python Script to Read Files on RainyDay [HackTheBox]
In RainyDay from HackTheBox, Ill get access through a tunnel to a dev API that allows me to apply a regex to a file. Ill use this to brute force the entire contents of the file, writing a program in Python to do it.
RainyDay blog post: https://0xdf.gitlab.io/2023/02/18/htb-rainyday.html
Final Script: https://gitlab.com/0xdf/ctfscripts/-/blob/master/htb-rainyday/file_read.py
Chisel: https://github.com/jpillora/chisel
FoxyProxy: https://addons.mozilla.org/en-US/firefox/addon/foxyproxy-standard/
My FoxyProxy Configuration: https://www.youtube.com/watch?v=iTm33Miymdg
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[00:59] Scenario overview
[02:02] FoxyProxy Configuration
[03:54] /api/healthcheck overview
[04:37] Writing Python script to login via proxy
[06:45] Verifying it works
[07:18] Checking regex against file
[10:04] Checking regex against /etc/hostname
[10:38] Adding check for arguments
[11:44] Brute forcing capability to read file
[14:57] Reading /etc/hostname
[15:26] Identifying / fixing crash on special characters
[18:00] Identifying / fixing only read one line
[20:00] Running final script to read /etc/lsb-release
[20:54] Conclusion Python Script to Read Files on RainyDay [HackTheBox]](https://i.ytimg.com/vi/cu_wOqZbCqw/mqdefault.jpg)
![Recent Updates in Feroxbuster 2.9.1
feroxbuster is my go-to for brute forcing directory paths on webservers and API endpoints. It updates all the time, but I wanted to call our three recent updates from versions 2.8.0-2.9.1 (all released over the last 3 weeks):
- self update capability
- advanced smart filtering
- bug fix for API brute force (see Mentor post below).
#pentest #ctf #bugbounty
feroxbuster: https://github.com/epi052/feroxbuster
configuration thread: https://twitter.com/epi052/status/1553383554247262208?t=UX4OBc6Gq2r2g4occR-m-g&s=19
Mentor post: https://0xdf.gitlab.io/2023/03/11/htb-mentor.html
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[00:48] Background on feroxbuster
[01:41] Looking up version in Kali repo
[02:10] Looking at release frequency
[02:33] Autoupdate feature
[03:30] Versions used in this demo
[04:27] Walking through feroxbuster defaults
[07:52] New filtering feature (as of 2.8.0)
[08:53] Example from Mentor where auto-filter helps
[10:21] Fix for recursion bug
[12:31] Conclusion Recent Updates in Feroxbuster 2.9.1](https://i.ytimg.com/vi/d4tYWJzZ8QE/mqdefault.jpg)
![Day 16 - Dragon Checksum [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 16 challenge, Dragon Checksum, involves taking a string and expanding it via a given algorithm to a given size, and then calculating a checksum on it.
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
Taking groups of n Video: https://www.youtube.com/watch?v=FYwNGpubEhA
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:16] Challenge part 1
[04:40] genday.sh / input
[05:10] expand test
[06:55] Debugging test typo
[07:51] expand function
[09:10] checksum test
[10:10] num_twos function
[11:30] num_twos test
[13:20] checksum function
[16:45] part1 test
[17:51] part1 function
[19:21] Solving part 1
[19:42] Challenge part 2
[19:55] Setup part2, refactor
[20:30] Running (via debugger) too slow
[20:49] Debugging to find whats slow
[21:30] Accidentally solving
[22:13] Back to explain what happened
[22:33] Debugger is slow
[23:29] Improving checksum algo speed
[31:46] Found issue, fixing, and solving
#ctf #adventofcode #revivalofcode #python Day 16 - Dragon Checksum [Revival of Code 2023 - Advent of Code 2016]](https://i.ytimg.com/vi/d6s4e0s_8JU/mqdefault.jpg)
![Day 10 - Balance Bots [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 10 challenge, Balance Bots, gives a set of instructions, where each line either describes what chip a bot starts with, or how it passes its chips to another bot. Ill parse the instructions, and then generate the flow to answer some questions about what chips end up where.
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:55] genday.sh / input
[02:06] Part 1 tests
[02:35] Bot class skeleton
[06:00] Parsing tests
[08:21] parse function
[13:10] Debugging parse
[14:32] More tests on example data parsing
[15:32] Using tests to input data parsing
[21:03] Part 1 tests
[23:27] Part 1
[27:24] Pasing part 1 first test, adding more
[28:24] Solving part 1
[28:30] Part 2 challenge
[29:09] Modifying part 1 code to solve part 2
[32:27] Conclusion
#ctf #adventofcode #revivalofcode #python Day 10 - Balance Bots [Revival of Code 2023 - Advent of Code 2016]](https://i.ytimg.com/vi/e0DLpEDlhsY/mqdefault.jpg)
![cURLing - An Introduction to curl [Sans Holiday Hack 2024]
The cURLing terminal in the 2024 SANS Holiday Hack is all about the curl command. Ill show how to get a site on a non-standard port, bypass an untrusted certificate, set POST parameters, cookies, and headers. Ill read headers coming back from the server and use curl for directory traversal attacks.
2024 HHC Blog post: [Coming soon]
Terminal Link: https://hhc24-wetty.holidayhackchallenge.com/?&challenge=termCurling
TamperMonkey Script: https://gitlab.com/0xdf/ctfscripts/-/blob/master/holidayhack/termlink.js
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[00:16] Q1 - Non-standard port
[01:04] Q2 - Untrusted TLS certificate
[01:59] Q3 - POST request with parameter
[03:00] Q4 - Cookie
[04:12] Q5 - Verbose or HEAD request
[05:28] Q6 - Setting header
[06:17] Q7 - Directory traversal with path-as-is
[07:40] Gold solve
[07:56] Gold Q1 - POST with parameters, cookie, and header
[08:40] Gold Q2 - Directory traversal with path-as-is
[09:00] Gold Q3 - Redirect URL
[09:45] Conclusion
#linux #ctf #curl cURLing - An Introduction to curl [Sans Holiday Hack 2024]](https://i.ytimg.com/vi/e3eDxWfPZ3U/mqdefault.jpg)
![Day 11: Cosmic Expansion [AOC2023 Python]
For Advent of Code 2023 Day 11, I get a map of galaxies in space. I need to get the manhattan distance between each pair and sum that. The twist is that any empty row or empty column counts for more than one space. In part 1, its double. In part 2, its a millions times!
Code 2023 AOC: https://gitlab.com/0xdf/aoc2023
Challenge Link: https://adventofcode.com/2023/day/11
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Part 1 description
[01:10] Input
[02:07] Getting Galaxies
[03:46] Getting empty rows and cols
[05:58] Looping over galaxy pairs
[06:56] get_dist function
[08:32] Testing get_dist
[10:44] Solving ex and part 1
[11:03] Part 2 description
[11:16] Updating scale factor
[11:36] Solve part 2
#adventofcode #python Day 11: Cosmic Expansion [AOC2023 Python]](https://i.ytimg.com/vi/e6-AvkRmPDY/mqdefault.jpg)
![Exploring the HackTheBox TwoMillion PHP Application [Beyond Root]
HackTheBox released TwoMillion to celebrate having two million users. This is a fun throwback to what HTB looked like when it first launched in 2017. In this video, Ill explore the PHP code that makes up the site, and the vulnerabilities I exploit to get a shell.
#pentest #ctf #twomillion #hackthebox.
Full TwoMillion Post: https://0xdf.gitlab.io/2023/06/07/htb-twomillion.html
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[00:47] Review of PHP files
[01:14] Routers in index.php
[02:20] Home controller
[03:07] Invite controller
[04:50] Admin controller, first vulnerability
[06:50] Fixing vulnerability allowing non-admin access
[09:45] VPN controller, second vulnerability
[11:45] Conclusion Exploring the HackTheBox TwoMillion PHP Application [Beyond Root]](https://i.ytimg.com/vi/es99eG_VcaI/mqdefault.jpg)
![Day 4: Scratchcards [AOC2023 Python]
For Advent of Code 2023 Day4, I get a series of lines, each of which represents a scratchcard. Each card has a series of winning numbers and a series of numbers for that card. In part 1, I need to calcaulate a score for each card based on the number of winners and sum them up. In part 2, I get copies of later cards based on the number of winners on each card, so I need to keep a list of the number of each card I have and total that up at the end.
Code 2023 AOC: https://gitlab.com/0xdf/aoc2023
Challenge Link: https://adventofcode.com/2023/day/4
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
#adventofcode #python
[00:00] Part 1 description
[01:16] Input
[02:05] score_card function
[05:09] Fixing bug with 0 winners
[06:31] Solving part 1
[07:09] Part 2 description
[08:29] Initial solution
[11:49] Identify score issue
[12:25] Fixing score issue
[16:00] Solving part 2
[16:10] Summary Day 4: Scratchcards [AOC2023 Python]](https://i.ytimg.com/vi/ettyYwXc_F4/mqdefault.jpg)
