Share E-Book
Scan to open this page

Scan with your phone to open this page

Author: David Martínez Oliveira

Rating No ratings yet

Your spellbook for code close to the metal. In hacker circles, heavy wizardry means code that trades on intimate knowledge of a system—the kind that speaks its private dialects and bends its rules. Heavy Wizardry 101 teaches you to write it. You’ll build shellcode, backdoors, droppers, and worms from scratch, working at the instruction level where magic happens. Every project is implemented for four architectures: x86_64, ARM, MIPS, and RISC-V. You’ll write the same program four times, seeing exactly what stays constant and what changes. Each chapter starts with architecture fundamentals, such as memory layout, calling conventions, and stack mechanics, then walks through complete working implementations on Linux in safe, contained environments. Learn to - Write position-independent shellcode and programs that execute in constrained memory spaces - Implement TCP reverse shells that bypass basic network restrictions - Build executable droppers that embed and deploy payloads without detection - Create self-replicating worms that propagate across networked systems - Write basic port scanners to discover services in a network - Port low-level code between architectures by understanding instruction-level differences Whether you’re a penetration tester who wants to stop depending on Metasploit, a security researcher analyzing malware, or a systems programmer who needs to understand how computers work, this book gives you the skills to build and reason about code at the lowest level.

AI Reading Assistant

Whole-book reading guide from stratified index samples; jump to passages in the text

AI guide
【One-Line Pitch】 A hands-on guide to writing low-level offensive code—shellcode, reverse shells, droppers, worms—from scratch on Linux, implemented four times across x86_64, ARM, MIPS, and RISC-V. Best for penetration testers, malware analysts, and systems programmers who want to understand and build code at the instruction level rather than rely on existing toolkits. 【Book Arc】 - **Opening (~0%–10%)**: Frames the "heavy wizardry" mindset and sets up the toolchain—building a minimal computer model, writing and assembling first programs, and getting the same trivial program to build for ARM, MIPS, and RISC-V. Solves the "how does code actually reach the metal" problem. - **Early (~10%–35%)**: Moves from C down to assembly: system calls, `_start` vs. `main`, static vs. dynamic binaries, dropping libc, linker flags, and per-architecture syscall conventions. Then covers data representation, memory layout, endianness, and writing a first "Hello, World!" shellcode. - **Middle (~35%–60%)**: Deepens into stack mechanics—frames, prologues/epilogues, local variables, parameters—then buffer overflows and a first exploit, with per-architecture function layouts and canaries. Builds a C REPL and ports it to each architecture, culminating in a minimal botnet with a C2 and zombie REPL. - **Late (~60%–85%)**: (Excerpts do not detail this range.) Based on the book's stated scope, this is where reverse shells, droppers, worms, and port scanners are implemented across architectures. - **Ending (~85%–100%)**: (Excerpts do not cover the closing chapters.) Presumably consolidates porting lessons and deployment practice. 【Key Takeaways】 - **The same program, four times, is the pedagogical core** (Early): Implementing each project on x86_64, ARM, MIPS, and RISC-V forces you to see what is architecture-invariant (logic, syscall intent) versus what changes (registers, calling conventions, instruction encoding). - **Syscall conventions are the real portability boundary** (Early): The book tabulates conventions for x86_64, ARM32, AArch64, MIPS32/64, and RISC-V—knowing these is what lets low-level code move between machines. - **Stripping dependencies is a skill, not a trick** (Early): Dropping libc, choosing `_start` over `main`, controlling static vs. dynamic linking, and avoiding an executable stack are presented as deliberate engineering choices for constrained environments. - **Stack mechanics underpin both exploitation and defense** (Middle): Stack frames, prologues/epilogues, and per-architecture canary placement are taught concretely, then turned into a working buffer-overflow exploit. - **A REPL is a compact vehicle for architecture comparison** (Middle): Building a C REPL and porting it reveals jump instructions, processor flags, and buffer-initialization differences across all four architectures. - **Small components compose into a botnet** (Middle): A C2 REPL plus a zombie REPL plus deployment steps form a minimal botnet—showing how individually simple pieces combine into offensive infrastructure. - **Safe, contained Linux environments are the assumed lab** (Opening): All implementations are meant to run in isolated setups, reinforcing that this is controlled study, not live operation. 【Reading Tips】 - **Deep-read Part I** (chapters on binary/ASM/shellcode/stack): this is the foundation everything else builds on; skimming it will make later ports confusing. - **Pick one architecture as your "home"** (likely x86_64) and read its sections fully; skim the other three on first pass, then return when porting. - **Type and build every example**—the book's value is in the build/link/debug loop, not the prose. - **Treat the botnet/worm material as lab-only**; keep environments isolated and note the ethical framing. - **Use the per-architecture comparison tables as reference**, not narrative—bookmark the syscall-convention and stack-frame sections. 【Coverage Limits】 The excerpts are dominated by front matter and table of contents; the late chapters on reverse shells, droppers, worms, and port scanners are named in the blurb but not detailed in the sampled material, so this guide's late-stage descriptions are inferred from stated scope rather than excerpt content.
Page 6
6 by David Martínez Oliveira, aka Pico. All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or...
View in text
Page 13
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxvi What’s in the Book . . . . . . . . . . . . . . . . . . . . ....
View in text
Page 14
. . . . . . . . . 74 Bits, Bytes, Words, and Beyond . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 Processor Native W...
View in text
Page 15
es . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 AArch64 Functions . . . . . . . . . . . . . . . . . . ....
View in text
Page 11
230 MIPS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233 RISC-V . . ....
View in text
Page 18
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311 Packet Storms . . . . . . . . . . . . . . . . ....
View in text
Page 19
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373 B SECRETS OF THE FORGE: ARCANE TRICKS FOR LOW-LEVEL TOOLS 375 GNU Assembler Tricks . . . . ....
View in text
Page 20
lete x86_64 Worm Source Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399 The Complete ARM Worm Source Code . . . . . . . . . . . . ....
View in text
Tags
AI categories
CybersecurityProgramming LanguageLinux
ISBN: 1718504438
Publisher: No Starch Press
Publish Year: 2026
Language: English
Pages: 467
File Format: PDF
File Size: 2.9 MB
Text Preview (First 20 pages)
Registered users can read the full content for free

Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.

Generating text preview…