Shellcodes, Backdoors, Droppers, and Worms
David Martínez Oliveira, aka Pico

#Shellcodes,
#Backdoors,
#Droppers,
#and
#Worms
🧙♂️ کتاب جادوی شما برای نوشتن کدی که واقعاً به سختافزار نزدیکه.
⚙️ در دنیای هکرها، اصطلاح Heavy Wizardry به کدی گفته میشه که بر پایه درک عمیق و جزئی از سیستم نوشته شده باشه؛ کدی که زبان پنهان سیستم رو بلد باشه و قوانینش رو به نفع خودش خم کنه. کتاب Heavy Wizardry 101 بهت یاد میده چطور چنین کدی بنویسی. در این مسیر با ساخت Shellcodeها، Backdoorها، Dropperها و Wormها از صفر آشنا میشی و در سطح Instructionها کار میکنی؛ جایی که جادوی واقعی اتفاق میفته.
🧠 تمام پروژههای کتاب برای چهار معماری مختلف پیادهسازی میشن:
این یعنی یک برنامه رو چهار بار مینویسی و دقیقاً میبینی چه چیزهایی بین معماریها ثابت میمونن و چه بخشهایی تغییر میکنن.
🧱 هر فصل با مفاهیم بنیادی معماری شروع میشه؛ موضوعاتی مثل Layout حافظه، Calling Conventionها و مکانیزم Stack. بعد از اون، پیادهسازیهای کامل و عملی روی Linux در محیطهای ایزوله و کنترلشده بررسی میشن.
📌 در این کتاب یاد میگیری:
🧩 Shellcodeها و برنامههای Position-Independent بنویسی که در فضای حافظه محدود اجرا بشن
🌐 Reverse Shellهای مبتنی بر TCP پیادهسازی کنی که محدودیتهای پایه شبکه رو دور بزنن
📦 Dropperهای اجرایی بسازی که Payloadها رو درون خودشون جاسازی و Deploy کنن
🪱 Wormهای Self-Replicating ایجاد کنی که در سیستمهای متصل به شبکه منتشر میشن
🔎 Port Scannerهای ساده برای کشف سرویسهای موجود در شبکه بنویسی
⚙️ با درک تفاوتهای Instruction-Level، کدهای Low-Level رو بین معماریهای مختلف Port کنی
🎯 فرقی نمیکنه یک Penetration Tester باشی که میخواد کمتر به Metasploit وابسته باشه، یک Security Researcher که بدافزارها رو تحلیل میکنه، یا یک Systems Programmer که میخواد عملکرد واقعی کامپیوترها رو درک کنه؛ این کتاب مهارت لازم برای ساخت و تحلیل کد در پایینترین لایههای سیستم رو در اختیارت قرار میده.
📑فهرست
📑 بخش اول: به درون ماشین؛ بیدار کردن طلسمهای کد
فصل 1: طلسم پیشگوی دودویی: زمانی که سختافزار با Opcodeها نجوا میکند
فصل 2: طلسم جوهره: تقطیر C به شکل اولیه ASM
فصل 3: طلسم تولد دوباره: تبدیل یک پیام ساده به Shellcode
فصل 4: طلسم فریم سرریز شده: تسلط بر رازهای Stack
فصل 5: طلسم مردگان متحرک: نوشتن یک REPL برای جانبخشیدن به Botnet
📑 بخش دوم: ورود به شبکه؛ آشکارسازی دروازههای پنهان
فصل 6: نقاب سایهها: آشکارسازی Backdoorهای مخفی
فصل 7: نقاب خاکستر: Dropperی که هیچ ردپایی باقی نمیگذارد
📑 بخش سوم: عبور از شبکه؛ احضار خزندهها
فصل 8: احضار مار دوقلو: فراخوانی یک Worm دو سر
فصل 9: احضار رشته تنها: ساخت Worm تکمرحلهای
فصل 10: احضار میزبانهای گمشده: ایجاد Scannerهای شبکه
📑 ضمیمهها: آهنگری جادو
ضمیمه A: کارگاه جادوگر: آمادهسازی محیط کار
ضمیمه B: اسرار آهنگری: ترفندهای پیشرفته برای ابزارهای Low-Level
ضمیمه C: سندان جادوگر: فهرست کامل پیادهسازیها
🗣️ نظرها
👨💻 «Heavy Wizardry 101 یک مقدمه منظم، روان و قابلفهم برای برنامهنویسی Low-Level و Assembly در Linux است. این کتاب ساخت Loaderهای چندمرحلهای Shellcode، ابزارهای شبکه، ابزارهای باینری و فایلهای ELF را تنها با استفاده از ابزارهای متنباز و استاندارد GNU آموزش میدهد.»
— Sergi Àlvarez i Capilla، نویسنده radare2
✍️ درباره نویسنده
👨💻 دیوید مارتینز اولیویرا، معروف به «پیکو»، از دهه ۱۹۹۰ مشغول نوشتن کدهای نزدیک به سختافزار بوده است. او در حوزههایی مانند بینایی ماشین، سیستمهای ارتباطی، تجهیزات آزمایشگاهی و اپلیکیشنهای AR/VR/MR نرمافزار توسعه داده است.
🐧 او سالهاست از GNU/Linux استفاده میکند و چه در محیط حرفهای و چه از روی علاقه شخصی، به بررسی امنیت سیستمها و جزئیات داخلی سیستمعاملها در پایینترین لایهها میپردازد.
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:
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.
Table of Contents
Part I: Into The Machine: Awakening Code Spells
Chapter 1: Spell Of The Binary Oracle: When Hardware Whispers In Opcodes
Chapter 2: Spell Of Essence: Distilling C To Its Primordial ASM
Chapter 3: Spell Of Rebirth: Transmuting Greetings Into Shellcode
Chapter 4: Spell Of The Overflowing Frame: Mastering Stack Secrets
Chapter 5: Spell Of The Undead: Writing A REPL To Animate A Botnet
Part II: Onto The Network: Unveiling Mystic Gateways
Chapter 6: Veil Of Shadows: Unlocking Hidden Backdoors
Chapter 7: Veil Of Ash: The Dropper That Leaves No Flame Behind
Part III: Through The Network: Casting Crawlers
Chapter 8: Casting The Twin Serpent: Summoning A Two-Headed Worm
Chapter 9: Casting The Lone Strand: Single-Stage Wormcraft
Chapter 10: Casting The Lost Hosts: Conjuring Network Scanners
Appendixes: The Forge
Appendix A: The Sorcerer's Forge: Preparing Your Workshop
Appendix B: Secrets Of The Forge: Arcane Tricks For Low-Level Tools
Appendix C: The Sorcerer's Anvil: Full Spellcraft Listings
"Heavy Wizardry 101 is a well-organized and accessible introduction to low-level programming in assembly for Linux, crafting multi-stage shellcode loaders, network and binary tools, and ELF binaries using only standard, open-source GNU command-line tools."
—Sergi Àlvarez i Capilla (aka pancake), Author of radare2
David Martínez Oliveira, aka Pico, has been writing code close to the metal since the 1990s, building software for computer vision, communications systems, laboratory equipment, and AR/VR/MR applications. A longtime GNU/Linux user, he explores security and low-level system internals both professionally and for fun.









