Ethernaut CTF - Magic Number (Level 18)
D-Squared
View ChannelAbout
Day Job: Professional AI Whisperer at Gradient Labs | Side Hustle: Showing you the AI automation tricks
Latest Posts
Video Description
Get the free 30-day AI Mastery series 💌: https://insights.gradientlabs.co/ Work with me 💪: https://offerings.gradientlabs.co/ Next up! Level 18 - Magic Number In this CTF series, we’re going to learn more about the practical side of smart contract auditing and security. If you’re interested in more/similar content, checkout my channel or website below. My digital dumping ground - dylandavis.net Additional Resources Ethernaut CTF - https://ethernaut.openzeppelin.com/ Foundry Solution (Too steep for me) - https://github.com/ciaranmcveigh5/ethernaut-x-foundry 0xSage (solution) - https://medium.com/coinmonks/ethernaut-lvl-19-magicnumber-walkthrough-how-to-deploy-contracts-using-raw-assembly-opcodes-c50edb0f71a2 Opcodes simply explained - https://medium.com/@blockchain101/solidity-bytecode-and-opcode-basics-672e9b1a88c2 Deconstructing Smart Contract (blog series) - https://blog.openzeppelin.com/deconstructing-a-solidity-contract-part-i-introduction-832efd2d7737/ Amazing bytecode diagram - https://gists.rawgit.com/ajsantander/23c032ec7a722890feed94d93dff574a/raw/a453b28077e9669d5b51f2dc6d93b539a76834b8/BasicToken.svg R1oga (solution) - https://listed.to/@r1oga/13786/ethernaut-levels-16-to-18 Coder-question (solution) - https://coder-question.com/cq-blog/525392 Opcode chart - https://github.com/crytic/evm-opcodes Free Memory Pointer - https://docs.soliditylang.org/en/v0.4.24/assembly.html#conventions-in-solidity Stack Machine (wiki) - https://en.wikipedia.org/wiki/Stack_machine#Design The Magnum Look - https://youtu.be/gx9O6q0pDAU Timeline 00:00 - Intro to challenge 02:19 - solution resources 08:08 - Opcode contract diagram 10:22 - code review (target) 11:40 - Grooking the solution (1) 13:31 - Grooking the solution (2) 15:15 - Notes review (bytecode/opcode intro) 17:50 - Notes review (free memory pointer) 20:50 - Notes review (stack machine) 26:05 - Notes review (runtime code) 31:20 - Notes review (creation code) 38:05 - Solving challenge 41:33 - Outro
You May Also Like
Upgrade Your Hacking Toolkit
AI-recommended products based on this video

Laplink PCmover Ultimate 11 - Migration of your Applications, Files and Settings from an Old PC to a New PC - Data Transfer Software - With Optional High Speed Ethernet Cable - 1 License

10.1 Inch Touch Portable Monitor IPS Screen 1366x768P 60Hz 400 Brightness 99% sRGB HDMI USB-C Monitors Switch for Xbox PS3/4/5 Laptop Compatible with Raspberry Pi, Mini Touch Screen

ELECROW 8 Inch Portable Monitor, 1280x800 Mini HD Display with Built-in Speakers, USB Powered, Non-Touch LCD Screen for Raspberry Pi, PC, Laptop, Jetson Nano, Game Consoles

7 Inch Portable Monitor Touchscreen HD 1024x600 LED Display Dual HDMI Port Small Monitor for PC Raspberry Pi Laptop Computer Xbox PS4/5 Switch Built-in Speakers

BrosTrend 1800Mbps WiFi 6 Linux WiFi Adapter for PC and Raspberry Pi 2+, Long Range USB WiFi Dongle Linux for Ubuntu, Mint, Debian, Kubuntu, Lubuntu, Zorin, Windows 11/10, Dual Band Wireless Antenna

BrosTrend Linux USB WiFi Adapter 1200Mbps Supports Ubuntu, Mint, Debian, Kubuntu, Mate, Zorin, PureOS, Raspberry Pi 2+, Windows 11/10, USB3.0 Wireless Dual Band Wi-Fi 5GHz/867Mbps + 2.4GHz/300Mbps

BrosTrend 1800Mbps WiFi 6 Linux WiFi Adapter for PC and Raspberry Pi 2+, Long Range USB WiFi Dongle Linux for Ubuntu, Mint, Debian, Kubuntu, Lubuntu, Zorin, Windows 11/10, Dual Band Wireless Antenna

MeLE Quieter DL Mini PC Windows 11 Home, N100 4GB 128GB, 2.5G Dual LAN,IoT Industrial Desktop Computer Support Windows 10 11 Linux Ubuntu Debian 4K Triple Display, Dual HDMI, All-in-One USB-C

Wireless Print Server for USB Printer (NOT Plug&Play), 2 Port USB Print Server, Convert Wired Printer to Wireless WiFi Ethernet Networking - Windows Mac Linux Compliant - CR202

KINGRACK 4 Step Ladder, Sturdy Steel Step Stool with Tool Platform, Safe-Lock, Handrail, Anti-Slip Wide Pedals, Pass 800lbs Load Testing, Folding Portable Ladder for Multi-Purpose, Home Kitchen, Black Global Recycled Standard

TP-Link 5 Port Gigabit Ethernet Network Switch (TL-SG1005D) - Plug and Play, Desktop or Wall Mount, Plastic Case, Ethernet Splitter, Fanless, Traffic Optimization, Unmanaged (TL-SG1005D)






















