Leanpub Header

Skip to main content

Filters

Category: "Offensive Security"

Offensive Security

New to Cybersecurity? Read the Cybersecurity article

  1. Offensive Security with Kali Linux
    Offensive Security with Kali Linux
    A Comprehensive Guide to Ethical Hacking and Penetration Testing
    Steve Publications

    Offensive Security with Kali Linux is a practical guide to ethical hacking and penetration testing, taking you from foundational Linux and networking concepts to advanced exploitation techniques. With a strong emphasis on ethical practice and real-world methodology, you'll learn to identify vulnerabilities, assess systems responsibly, and strengthen security using Kali Linux.

  2. Adversarial Rust
    Adversarial Rust
    Build Your Own Pentest Arsenal — In Rust
    Andrew Ingram

    Most offensive-security books hand you a framework and a flag. This one hands you `cargo new` and a target. Apex Foundry is a precision-manufacturing company that builds industrial control interfaces, runs a customer-facing web application backed by Postgres, operates an Active Directory domain for its corporate workforce, and recently bolted an AI assistant onto its support portal. It also happens to be running entirely inside your homelab — Docker containers, a virtual AD forest, and a vulnerable web stack you control end to end. Your job is to break it. Your constraint is that every tool you use must be one you wrote yourself, in Rust. Over thirteen chapters you will work through a single, continuous penetration test — from passive reconnaissance through data exfiltration and final reporting. Each chapter adds a link to the attack chain: you will build async port scanners, web crawlers, exploit frameworks, a prompt-injection fuzzer, an encrypted implant, Kerberoasting tooling, a covert DNS exfiltration channel, and a report generator that pulls every finding into a finished deliverable. Every tool compiles to a single, dependency-free binary you can drop on a target without a runtime. Along the way you will capture twenty flags (format: `APEX{...}`) and document **twenty-two findings**, building a portfolio that doubles as a real-world pentest report.

  3. Adversarial C
    Adversarial C
    Embedded Exploitation from Buffer Overflows to Firmware Rootkits
    Andrew Ingram

    Adversarial C is Book X in the Adversarial Series — a continuous penetration testing engagement against Crucible Embedded, a defense-adjacent embedded systems manufacturer. Over thirteen chapters you will exploit buffer overflows in firmware update daemons, abuse format string vulnerabilities in logging services, corrupt heap metadata in real-time operating system processes, fuzz custom network protocols until they crack, extract secrets from firmware images, pivot through IoT gateways running stripped-down BusyBox, exploit race conditions in privileged services, and attack the software supply chain through build system manipulation. The Adversarial C++ book is currently in the works, and should be released sometime before Christmas. So keep an eye open for that!

  4. Adversarial Assembly
    Adversarial Assembly
    Bare-Metal Exploitation from Shellcode to Bootkit
    Andrew Ingram

    This book teaches x86-64 assembly language through the lens of offensive security. You will write shellcode by hand, exploit stack and heap vulnerabilities, build ROP chains that defeat modern mitigations, craft position-independent implants that resolve APIs at runtime, evade analysis environments, exploit kernel drivers, analyze firmware boot processes, and instrument binaries with inline hooks — all at the lowest level of abstraction the processor offers.

  5. Adversarial Nim
    Adversarial Nim
    Custom Offensive Tooling for the Modern Red Team
    Andrew Ingram

    Nim compiles to C. That single fact changes everything for a red teamer. While defenders build detection signatures for Python scripts, PowerShell commands, and .NET assemblies, a Nim binary lands on disk looking like any other native executable — small, fast, and unfamiliar to most EDR heuristics. The language gives you Python-like syntax with C-level performance, direct Windows API access without P/Invoke wrappers, cross-compilation from Linux to Windows with one flag, and compile-time metaprogramming that can encrypt strings, encode payloads, and generate polymorphic code before the binary is even built.

  6. Adversarial SQL
    Adversarial SQL
    A Penetration Tester's Guide to Database Exploitation
    Andrew Ingram

    SQL is not just a query language. In the hands of a penetration tester, it is a weapon that can read files, execute operating system commands, pivot between servers, and exfiltrate entire databases through covert channels. Every enterprise runs on SQL databases, and nearly every web application speaks to one. When the application doesn't properly separate user input from SQL logic, the attacker controls the database — and often the host underneath it. This book teaches database exploitation through one continuous engagement against **Lumen Dataworks**, a fictional financial data aggregation platform. You will deploy a realistic multi-database lab — PostgreSQL, Microsoft SQL Server, and MySQL behind vulnerable web applications — and systematically compromise it from SQL injection discovery through lateral movement, persistence, and exfiltration. Every tool you build works. Every payload you craft is real. Every technique maps to a finding you will document in a professional penetration test report. This book assumes you are comfortable with basic SQL syntax (SELECT, INSERT, UPDATE, DELETE, JOIN) and have a working knowledge of web application testing. You do not need to be a DBA — the book teaches the internals that matter for exploitation as you encounter them.

  7. Adversarial JavaScript
    Adversarial JavaScript
    A full-stack penetration test built entirely in JavaScript — from first packet to final report.
    Andrew Ingram

    Every chapter of this book advances a single, continuous engagement against one fictional target that lives entirely in your homelab: Vectrix Labs, a cloud-native SaaS company that sells a threat-intelligence platform to enterprise security teams. Vectrix runs the modern JavaScript stack end to end — a React front end, a Node.js/Express API layer, a GraphQL gateway, MongoDB for persistence, Redis for sessions, and a Kubernetes cluster that ties it all together. One target carries every phase of the pentest: the external edge, a web application thick with client-side logic, a real-time WebSocket feed, an AI-powered analyst chatbot, and the cloud infrastructure underneath. You don't just run tools against Vectrix. You build the tools, in JavaScript, one phase at a time: your own recon harness, your own scanner, your own crawler, your own exploits, your own post-exploitation agents, and finally your own report generator. Each phase ends with a captured flag — `VECTRIX{...}` — and those flags become the evidence trail for the deliverable you assemble in the final chapter.

  8. Adversarial Go
    Adversarial Go
    A compiled penetration test built entirely in Go — from first packet to final report
    Andrew Ingram

    Every chapter of this book advances a single, continuous engagement against one fictional target that lives entirely in your homelab: Obsidian Grid, a critical-infrastructure monitoring company that sells a SCADA/ICS visibility platform to energy utilities, water treatment facilities, and manufacturing plants. Obsidian runs Go end to end — a fleet of Go microservices connected by gRPC and Protocol Buffers, a PostgreSQL database for asset inventory, an etcd cluster for configuration, a NATS messaging bus for real-time telemetry, an MQTT broker that talks to field sensors, Prometheus for metrics, and a custom TLS PKI that issues certificates to every component. One target carries every phase of the pentest: the external web dashboard, an API gateway, an operational-technology bridge, an AI-powered anomaly-detection engine, and the infrastructure underneath. You don't just run tools against Obsidian Grid. You build the tools, in Go, one phase at a time: your own recon harness, your own scanner, your own exploits, your own implants, and finally your own report generator. Every tool compiles to a single static binary that you can cross-compile for any OS and drop on any target without dependencies. Each phase ends with a captured flag — `OBSIDIAN{...}` — and those flags become the evidence trail for the deliverable you assemble in the final chapter.

  9. Adversarial PowerShell
    Adversarial PowerShell
    Offensive Security Tools from Scratch in PowerShell
    Andrew Ingram

    PowerShell is not just a scripting language. It is a direct interface to the Windows operating system, the .NET framework, COM objects, WMI, Active Directory, the registry, and the Win32 API. Every modern Windows host ships with it. Every domain controller speaks its language. Every EDR vendor fears what it can do. Across thirteen chapters, you will conduct a single, continuous penetration test against Meridian Financial Group — a fictional mid-market financial services firm with a realistic Windows enterprise environment: Active Directory forests, IIS web applications, SQL Server databases, file shares, Exchange-style mail, and endpoint detection. You start with nothing but a PowerShell prompt and finish with domain admin, crown jewels exfiltrated, and a professional pentest report.

  10. Adversarial Bash
    Adversarial Bash
    Build Your Own Pentest Arsenal — In Bash
    Andrew Ingram

    Most offensive-security books hand you a framework and a flag. This one hands you a terminal prompt and a target. Apex Foundry is a precision-manufacturing company that builds industrial control interfaces, runs a customer-facing web application backed by Postgres, operates an Active Directory domain for its corporate workforce, and recently bolted an AI assistant onto its support portal. It also happens to be running entirely inside your homelab — Docker containers, a virtual AD forest, and a vulnerable web stack you control end to end. Your job is to break it. Your constraint is that every tool you use must be one you wrote yourself, in Bash. Over thirteen chapters you will work through a single, continuous penetration test — from passive reconnaissance through data exfiltration and final reporting. Each chapter adds a link to the attack chain: you will build port scanners with `/dev/tcp`, web crawlers with `curl`, SQL-injection extractors with pipes and string manipulation, a prompt-injection fuzzer with `jq`, a cron-persisted reverse-shell implant, Kerberoasting wrappers, a covert DNS exfiltration channel with `dig`, and a report generator that pulls every finding into a finished deliverable. Every tool is a script you can paste into any Linux terminal with zero dependencies beyond a standard installation. Along the way you will capture twenty flags (format: `APEX{...}`) and document twenty-two findings, building a portfolio that doubles as a real-world pentest report. Why Bash?Python dominates offensive tooling for good reason — it is powerful, readable, and everywhere. Rust compiles to fast, dependency-free binaries. But Bash offers something neither can: - It is already on the target. Every Linux host, every container, every cloud instance ships with a POSIX shell. There is nothing to install, nothing to upload, nothing to compile. Your tool is the terminal.- No forensic footprint. A Bash script leaves no binary on disk, no interpreter to flag, no package manager log. When you pipe commands through a reverse shell, the tool exists only in memory and in process lists.- Living off the land. `curl`, `dig`, `awk`, `grep`, `find`, `openssl`, `base64`, `xxd`, `sqlite3` — standard utilities that defenders expect to see in log files. Using them for offense is indistinguishable from normal administration.- Instant iteration. No compile step, no dependency resolution, no virtual environment. Edit, run, observe. The feedback loop is measured in keystrokes.- Universal skill transfer. Every sysadmin writes Bash. Learning to weaponize it teaches you to defend against the same techniques — because the attacker at the keyboard looks exactly like the admin. This book does not replace your Python toolkit or your compiled Rust binaries. It extends your capabilities into the space where those tools cannot go — the compromised host where you have a shell and nothing else.

  11. Advanced Privilege Escalation Techniques 101
    Advanced Privilege Escalation Techniques 101
    From Operating System Internals to Enterprise and Cloud Compromise
    Steve Publications

    Explore the art and science of privilege escalation across modern operating systems, enterprise networks and cloud environments. From system internals and misconfigurations to advanced exploitation techniques, this book delivers the technical depth, practical insights and defensive knowledge needed to uncover privilege escalation paths and strengthen security in complex infrastructures.

  12. The Art and Science of LLM Jailbreaking
    The Art and Science of LLM Jailbreaking
    A Comprehensive Guide to Techniques, Strategies, Methodologies, Exploitation Approaches and AI Security Research
    Steve Publications

    Explore the hidden weaknesses of large language models and the techniques used to push their safety boundaries. From foundational concepts to advanced exploitation strategies, this book offers a deep dive into the mechanics of AI jailbreaking, backed by practical demonstrations and research-driven insights into detection, mitigation and responsible AI security.

  13. Inside the Domain: A Field Manual for Active Directory Penetration Testing

    “Guns. Lots of guns.” — Neo, The Matrix (1999)Every domain has its weaknesses. Every privilege has a path.Go inside Active Directory with a practical, 100-page field manual featuring six phases of penetration testing, real-world attack techniques, actionable commands, and defensive insights.Know the domain. Understand the attack paths. Master the methodology.

  14. Intelligent Discovery
    Intelligent Discovery
    AI-Powered Vulnerability Research and Software Security
    Steve Publications

    AI is changing the way we find and fix software vulnerabilities. Intelligent Discovery explores the techniques behind this shift, from static analysis to AI-driven vulnerability research and automated repair. With a clear-eyed look at both the potential and the pitfalls, it shows what these tools can do, where they fall short and why human expertise still matters.

  15. Practical Metasploit
    Practical Metasploit
    Mastering the Metasploit Framework from First Exploit to Advanced Post-Exploitation
    Ground Truth Books

    Go beyond clicking through msfconsole. A progressive, hands-on course that takes you from your first canned exploit to writing custom Ruby modules, pivoting through compromised networks, and extending the Metasploit Framework itself.