Uploaded January 2024 | Updated November 2026, 3 hours ago
The Linux 101 terminal in the 2023 Holiday Hack Challenge is a great chance to learn Linux command line tricks and techniques.
Holiday Hack 2023 Solution: 0xdf.gitlab.io/holidayhack2023
Holiday Hack 2023 Game: 2023.holidayhackchallenge.com
☕ Buy Me A Coffee: buymeacoffee.com/0xdf
[00:00] Introduction
[00:30] Q1 - Terminal Overview
[00:47] Q2 - ls
[00:56] Q3 - cat
[01:20] Q4 - rm
[01:38] Q5 - pwd
[01:46] Q6 - ls -a
[02:06] Q7 - history
[02:14] Q8 - env
[02:25] grep and pipe tangent
[02:59] Q9 - cd
[03:21] Q10 - grep
[04:04] Q11 - chmod
[05:53] Q12 - mv
[06:14] Q13 - ln -s
[06:47] Q14 - cp
[07:13] Q15 - echo / redirection
[07:43] Q16 - find
[08:47] Q17 - find -user
[09:06] Q18 - find -size
[09:39] Q19 - ps
[10:15] Q20 - netstat
[11:04] Q21 - curl
[11:35] Q22 - kill
[11:52] Conclusion
#adventofcode #python
The Linux 101 terminal in the 2023 Holiday Hack Challenge is a great chance to learn Linux command line tricks and techniques.
Holiday Hack 2023 Solution: 0xdf.gitlab.io/holidayhack2023
Holiday Hack 2023 Game: 2023.holidayhackchallenge.com
☕ Buy Me A Coffee: buymeacoffee.com/0xdf
[00:00] Introduction
[00:30] Q1 - Terminal Overview
[00:47] Q2 - ls
[00:56] Q3 - cat
[01:20] Q4 - rm
[01:38] Q5 - pwd
[01:46] Q6 - ls -a
[02:06] Q7 - history
[02:14] Q8 - env
[02:25] grep and pipe tangent
[02:59] Q9 - cd
[03:21] Q10 - grep
[04:04] Q11 - chmod
[05:53] Q12 - mv
[06:14] Q13 - ln -s
[06:47] Q14 - cp
[07:13] Q15 - echo / redirection
[07:43] Q16 - find
[08:47] Q17 - find -user
[09:06] Q18 - find -size
[09:39] Q19 - ps
[10:15] Q20 - netstat
[11:04] Q21 - curl
[11:35] Q22 - kill
[11:52] Conclusion
#adventofcode #python
![Reassembling Werkzeugs Pin - Getting RCE in HackTheBox Agile [Part 2]
After showing how to enumerate and recover the pin in a HelloWorld app for part 1, this video will look at applying that to a HackTheBox machine, Agile, to recover the pin and get remote code execution.
Part 1: https://www.youtube.com/watch?v=6BWaea0nfE0
Agile Blog Post: https://0xdf.gitlab.io/2023/08/05/htb-agile.html
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[00:50] Look at application file read and debug
[02:28] HackTricks Werkzeug pin script
[03:35] username
[04:15] Full path to flask
[04:35] MAC / getnode
[06:50] machine_id
[08:25] Comments about hash function
[09:42] Running and failing
[10:00] Recreating app, getting command line
[12:26] Getting wsgi.py
[13:15] Getting and simplifying app.py
[17:08] Running simplified app
[17:18] Adding prints to Werkzeug debug
[19:15] Updating pin.py, getting RCE
[19:40] Conclusion
#pentest #ctf #bugbounty Reassembling Werkzeugs Pin - Getting RCE in HackTheBox Agile [Part 2]](https://i.ytimg.com/vi/MVItEDBBcgg/mqdefault.jpg)
![Playing with a (CTF) Smart Contract [Hackvent 2022 - Day 6]
The day 6 challenge in Hackvent 2022 is to read data from a smart contract. In this video, Ill go over how to use Metamask and Remix to interact with smart contracts, and then switch to Python / web3 to read data from the blockchain even though its private.
Hackvent 2022 writeup: https://0xdf.gitlab.io/hackvent2022/easy
Metamask: https://metamask.io/
Remix: https://remix.ethereum.org/
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
#hackvent
[00:00] Introduction
[00:26] Challenge description
[01:05] Installing / configuring Metamask
[02:34] Getting contract into Remix
[03:18] Setting up Remix environment
[04:36] Deploying / interactiving with an instance of the contract
[05:50] Interacting with given contract
[06:57] Analysis of contract source
[07:43] Description of the vulnerability
[08:09] Interacting with the contract in Python / web3
[11:25] Reading raw data, including flag
[12:32] Summary Playing with a (CTF) Smart Contract [Hackvent 2022 - Day 6]](https://i.ytimg.com/vi/MpCd9hZu8bE/mqdefault.jpg)
![Automating Malicious Zip with Symlinks [HackTheBox Zipping]
In the Zipping box from HackTheBox, I can read files from the target host by submitting a zip file containing a symlink to the file I want to read. That can be done manually, but Ill want to script it to make life easier for myself. In this video, Ill show the vulnerability and then write the script. Ill use zipfile, io.BytesIO, regex, and requests. Ill update the script to handle cleanly binary files, and show that works by checking VirusTotal.
HackTheBox Zipping: https://www.hackthebox.com/machines/zipping
Zipping Blog Post: https://0xdf.gitlab.io/2024/01/13/htb-zipping.html
FoxyProxy / Burp Video: https://www.youtube.com/watch?v=iTm33Miymdg
Stack Overflow Post: https://stackoverflow.com/questions/35782941/archiving-symlinks-with-python-zipfile
zipfile Docs: https://docs.python.org/3/library/zipfile.html#zipinfo-objects
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[00:20] Manual Exploit Demo
[02:34] Rationale for scripting
[03:01] Getting symlink in Zip
[07:34] Testing Zip creation
[09:37] Improving file timestamp
[12:00] Sending file to website
[15:40] Getting URL of upload
[17:15] Getting raw result file
[17:42] Reading binary files
[18:32] Testing updated script
[19:33] Conclusion
#pentest #ctf #bugbounty #python #zip #virustotal Automating Malicious Zip with Symlinks [HackTheBox Zipping]](https://i.ytimg.com/vi/NPlkZVm-C7M/mqdefault.jpg)
![Day 16: The Floor Will Be Laba [AOC2023 Python]
For Advent of Code 2023 Day 16, I get a grid representing open space with mirrors in it. A beam enters the grid and bounces off of and splits when hitting these mirrors. Ill track the beam through the grid, first from the top right corner, and then from each possible entry location.
Code 2023 AOC: https://gitlab.com/0xdf/aoc2023
Challenge Link: https://adventofcode.com/2023/day/16
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Part 1 description
[01:40] Input analysis
[02:35] Breadth-first fill
[03:35] Loop queue, move and check bounds
[05:20] Handle turns
[11:45] Add next to queue
[12:24] Debugging small errors
[13:55] Debugging bad turns
[15:37] Solve part 1
[16:21] Part 2 description
[16:40] Refactor part 1 as function
[18:12] Looping over all entry points
[20:00] Solve part 2
[20:15] Summary
#adventofcode #python Day 16: The Floor Will Be Laba [AOC2023 Python]](https://i.ytimg.com/vi/NjbS2DjZ0sw/mqdefault.jpg)
![Bridge Repair [Day 7 - Advent of Code 2024 - Python]
Im given a target number and a list of numbers and have to find the way to combine the numbers using add and multiple to get the target. In part 2, I can use concatenate as well.
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:25] Setup / data overview
[02:55] Recursive check_possible function
[07:00] Feeding lines to check_possible
[09:04] Fix issue and solve part 1
[10:07] Part 2 challenge
[10:30] Refactor part 1
[11:26] Adding part 2 to main loop
[12:33] Adding concatenation check
[14:24] Fixing issue with exhausted string
[15:30] Fixing issue missing part2 bool in call
[16:24] Solving part 2
#adventofcode #python Bridge Repair [Day 7 - Advent of Code 2024 - Python]](https://i.ytimg.com/vi/Np6ti3t36XA/mqdefault.jpg)
![Day 14: Parabolic Reflector Dish [AOC2023 Python]
For Advent of Code 2023 Day 14, Im given a grid with rocks that roll around as I tilt the grid in different directions. The rocks roll to the end of the barrier, another rock, or some other rocks that dont move. In part one, I will tilt once and make a calculation based on the position of the rocks. In part 2, I will tilt four billion times. Ill have to find a cycle and use math to get the correct state.
Code 2023 AOC: https://gitlab.com/0xdf/aoc2023
Challenge Link: https://adventofcode.com/2023/day/14
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Part 1 description
[01:40] Input analysis
[02:30] rotate_count_clockwise / print_grid
[08:23] Converting to class
[11:11] tilt_north
[16:38] total_load
[19:10] Solve part 1
[19:32] Refactor total_load
[21:42] Description of struggles
[22:08] Part 2 description
[23:23] Description of bugs
[23:49] Create second Grid
[24:54] tilt_cycle
[26:06] testing title_cycle
[27:07] tile_cycles
[29:05] Math to get state
[32:50] Running 1000000000 times
[33:39] Solving part 2
[24:04] Summary
#adventofcode #python Day 14: Parabolic Reflector Dish [AOC2023 Python]](https://i.ytimg.com/vi/NpabLZ3jjWQ/mqdefault.jpg)
![Day 23 - Safe Cracking [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 23 challenge, Safe Cracking, involves picking up with the computer from day 12, but adding a toggle instruction, which changes the instructions at a given offset. In part 2, it enters a long loop that can be effectively reduces to a += b * c, but does it rather by one inc at a time. Ill short-circuit that to make it run in reasonable time.
Advent of Code 2016 Day 12 video: https://www.youtube.com/watch?v=Z-qDyL-vyNA
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:16] Challenge part 1
[01:41] Bringing in the day 12 code
[03:10] Test for part 1
[04:11] Adding toggle instruction
[08:49] Fixing tests, solving part 1
[09:40] Challenge part 2
[10:12] Showing part2 has long runtime without change
[11:00] Using VSCode debug to find whats slow
[12:55] Assembunny code analysis
[14:07] Function to handle multiply/add
[16:03] Regex development
[17:26] Continuing with multiple/add
[20:32] Summary of function
[20:52] Debugging issue with findall
[21:34] Solving and conclusion
#ctf #adventofcode #revivalofcode #python Day 23 - Safe Cracking [Revival of Code 2023 - Advent of Code 2016]](https://i.ytimg.com/vi/O-a0pQc7pxw/mqdefault.jpg)
![Oddly Even [HackTheBox - Coding Challenge]
Oddly even is a very easy challenge. I just read a number from standard in and print odd or even. Ill walk through the HTB coding interface, and show three ways to solve it.
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[01:12] Coding interface
[02:10] input function
[02:59] string to int
[03:37] Solving
[04:06] Alternative solve
[04:45] One-liner solve
[05:16] Conclusion
#python Oddly Even [HackTheBox - Coding Challenge]](https://i.ytimg.com/vi/OC5J9yvkUBQ/mqdefault.jpg)
![Free AI HTB Tutor
Generative AI has many applications. An amazing one is to give it a writeup to a challenge youre trying to solve but stuck on and getting it to coach you though it without spoiling it. Ill show two ways to do that in this video, using a manual prompt and a Claude skill.
HTB-Mentor Repo: https://gitlab.com/0xdf/htb-ai-mentor
Its Ok To Use Writeups: https://www.hackthebox.com/blog/It-is-Okay-to-Use-Writeups
Claude: https://claude.ai/
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[01:31] Repo overview
[02:11] Using free prompt on HTB Sightless
[06:58] Claude skill overview
[07:42] Install skill
[08:22] Using skill on HTB Sightless
[09:31] Conclusion
#HackTheBox #claude #ai Free AI HTB Tutor](https://i.ytimg.com/vi/Oy1HrVm5vxo/mqdefault.jpg)
![Day 20: Pulse Propagation [AOC2023 Python]
For Advent of Code 2023 Day 20, I get a list of modules that propagate pulses either as high or low and change state based on what they receive. Ill use a queue (deque) to handle the propagations and in part one just count pulses. In part two, I have to do some input analysis to understand what Im looking for, and then find cycles on four modules. Knowing their cycle lengths, I can calculate the LCM to get the time they all line up to give the desired output.
Code 2023 AOC: https://gitlab.com/0xdf/aoc2023
Challenge Link: https://adventofcode.com/2023/day/20
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Part 1 description
[02:53] Input analysis
[03:54] Module class init
[07:01] System class init
[09:43] Validating System
[12:28] System.push
[19:52] Debugging example
[20:44] Adding loops to push
[21:03] Solve part 1
[22:51] Part 2 description
[23:41] Getting info about rx
[27:40] Tracking pulses to previous module
[31:17] Cheat solve part 2
[32:22] Code solve part 2
[37:12] Allowing part2 to run until cycle
[39:08] Summary
#adventofcode #python Day 20: Pulse Propagation [AOC2023 Python]](https://i.ytimg.com/vi/P8DyRHYFfsE/mqdefault.jpg)
![Malicious LNK File Analysis
I noticed a LNK file uploaded to Malware Bazaar and wanted to take a look. It turns out to be an onion of obfuscated PowerShell that eventually leads to an executable (tagged as Colbalt Strike, though we wont go into the EXE in this video).
Sample on MalwareBazaar: https://bazaar.abuse.ch/sample/0135c4f45de3e2187708033da3135210b03c9db4275dfa794dbcbff21b4f4df9/
LnkParse3: https://pypi.org/project/LnkParse3/
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[01:04] Overview of file in Malware Bazaar
[02:00] Looking at lnk in a Windows VM
[03:11] lnkparse on file
[04:04] Downloading and unobfuscating layer 1
[05:20] Analysis of layer 1, unobfuscating layer 2
[07:55] Analysis of layer 2
[08:50] Accidentally download directory listing
[10:45] Looking at decoy PDF
[12:03] Comparing binaries from two tmp zip files
[12:54] Not going to RE binary here
[13:23] Looking up hashes in Malware Bazaar and VirusTotal
[14:56] Wrap up Malicious LNK File Analysis](https://i.ytimg.com/vi/PJ0axuYlBxs/mqdefault.jpg)