Uploaded January 2023 | Updated November 2026, 3 hours ago
The day 6 challenge in Hackvent 2022 is to read data from a smart contract. In this video, I'll 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 it's private.
Hackvent 2022 writeup: 0xdf.gitlab.io/hackvent2022/easy
Metamask: metamask.io
Remix: remix.ethereum.org
☕ Buy Me A Coffee: 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
The day 6 challenge in Hackvent 2022 is to read data from a smart contract. In this video, I'll 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 it's private.
Hackvent 2022 writeup: 0xdf.gitlab.io/hackvent2022/easy
Metamask: metamask.io
Remix: remix.ethereum.org
☕ Buy Me A Coffee: 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
![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)
![0o337 [0xff: One Last Address]
The HTB Content team made me a goodbye CTF consisting of four challenges. In this video, Ill solve 0o337, a forensics challenge digging through a PCAP file to solver layers of puzzle.
pdf-parser.py: https://github.com/DidierStevens/DidierStevensSuite/blob/master/pdf-parser.py
uv CheatSheet: https://0xdf.gitlab.io/cheatsheets/uv
CyberChef: https://gchq.github.io/CyberChef/
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[00:50] Challenge introduction
[01:18] PCAP statistics
[04:00] Message1 - reverse shell
[05:30] Making smaller PCAP
[06:45] Message2 - TLS decrypt (RSA)
[07:54] Message3 - PGP email
[10:15] Message4 - PDF in encrypted zip
[11:30] Message5 - Hidden ELF in PDF
[17:16] Flag - PasteBin xor
[18:42] Conclusion
#ctf #pcap #ghidra #forensics 0o337 [0xff: One Last Address]](https://i.ytimg.com/vi/PNv9LEQ5GjI/mqdefault.jpg)
![HackTheBox Napper: Read Elastic, Generate Key, Decrypt Blob in Golang
In Napper from HackTheBox, Ill need to pull values from an Elastic database that rotated every 5 minutes. The values are a seed and an encrypted blob. Ill use the seed with the random function in Go to generate a key, and use it to AES decrypt the blob. So today were working in Go!
HackTheBox Napper Blog post: https://0xdf.gitlab.io/2024/05/04/htb-napper.html
HackTheBox Napper: https://www.hackthebox.com/machines/napper
Elastic Go Example: https://github.com/elastic/go-elasticsearch/blob/main/_examples/encoding/gjson.go
Go gjson: https://github.com/tidwall/gjson
Elastic Client docs: https://pkg.go.dev/github.com/elastic/go-elasticsearch/v7#section-readme
Go getting started: https://go.dev/doc/tutorial/getting-started
☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
[00:00] Introduction
[01:17] Show data with curl
[03:23] Creating Go project
[04:25] Elastic example code
[06:28] Updating code to connect to Napper
[10:33] Removing unneeded example code
[11:23] Getting seed
[14:56] Getting blob
[19:11] Converting main to function
[21:38] Generating key from seed
[24:26] Decrypt blob
[29:12] Conclusion
#pentest #ctf #bugbounty #golang #go #elastic HackTheBox Napper: Read Elastic, Generate Key, Decrypt Blob in Golang](https://i.ytimg.com/vi/PRbcj-7AScs/mqdefault.jpg)