Share E-Book
Scan to open this page

Scan with your phone to open this page

Author: Tom Steele, Chris Patten, Dan Kottmann

Like the best-selling Black Hat Python , Black Hat Go explores the darker side of the popular Go programming language. This collection of short scripts will help you test your systems, build and automate tools to fit your needs, and improve your offensive security skillset. Black Hat Go explores the darker side of Go, the popular programming language revered by hackers for its simplicity, efficiency, and reliability. It provides an arsenal of practical tactics from the perspective of security practitioners and hackers to help you test your systems, build and automate tools to fit your needs, and improve your offensive security skillset, all using the power of Go. You'll begin your journey with a basic overview of Go's syntax and philosophy and then start to explore examples that you can leverage for tool development, including common network protocols like HTTP, DNS, and SMB. You'll then dig into various tactics and problems that penetration testers encounter, addressing things like data pilfering, packet sniffing, and exploit development. You'll create dynamic, pluggable tools before diving into cryptography, attacking Microsoft Windows, and implementing steganography. You'll learn how to: • Make performant tools that can be used for your own security projects • Create usable tools that interact with remote APIs • Scrape arbitrary HTML data • Use Go's standard package, net/http, for building HTTP servers • Write your own DNS server and proxy • Use DNS tunneling to establish a C2 channel out of a restrictive network • Create a vulnerability fuzzer to discover an application's security weaknesses • Use plug-ins and extensions to future-proof productsBuild an RC2 symmetric-key brute-forcer • Implant data within a Portable Network Graphics (PNG) image. Are you ready to add to your arsenal of security tools? Then let's Go! **

AI Reading Assistant

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

AI guide
【One-Line Pitch】 A practical, hands-on guide for security professionals and pentesters who want to use Go to build fast, reliable, and offensive security tools—from port scanners and HTTP clients to DNS tunnels and steganography payloads. 【Book Arc】 - **Opening (~0%–3%)**: Introduces the book's mission—leveraging Go's simplicity, efficiency, and concurrency for offensive security work—and sets expectations for a project-based, script-oriented approach rather than a theoretical language tutorial. - **Early (~3%–10%)**: Covers Go fundamentals from a hacker's perspective: data types, control structures, error handling, and how to structure source code for tool building. The focus is on getting readers productive quickly, not on academic language design. - **Middle (~10%–30%)**: Dives into network programming with Go's standard library, including building HTTP clients and servers, interacting with remote APIs, and scraping HTML. This section establishes the core patterns for most offensive tools. - **Middle–Late (~30%–50%)**: Expands into more advanced network protocols—DNS and SMB—showing how to write custom DNS servers and proxies, and how to use DNS tunneling to establish command-and-control (C2) channels out of restrictive networks. - **Late (~50%–80%)**: Moves into exploitation and post-exploitation territory: packet sniffing, data pilfering, vulnerability fuzzing, and building pluggable, extensible tool frameworks. This is where the book shifts from "building tools" to "solving attacker problems." - **Ending (~80%–100%)**: Covers cryptography (including an RC2 brute-forcer), attacking Microsoft Windows targets, and steganography (implanting data in PNG images). The book closes with a capstone-style set of projects that combine earlier techniques. 【Key Takeaways】 - **Go's concurrency is a superpower for security tools** (Early): goroutines and channels let you scan ports, fuzz endpoints, or handle multiple connections in parallel with minimal code—something Python and Ruby struggle to do efficiently. This is the book's core argument for choosing Go. - **The standard library covers most offensive needs** (Early): `net/http`, `net`, `crypto`, and `encoding` packages handle HTTP, DNS, SMB, and data manipulation without third-party dependencies. You can build production-grade tools with only the Go toolchain. - **HTTP is the backbone of modern pentesting** (Middle): the book shows how to build both clients (for API interaction, scraping, and authentication attacks) and servers (for phishing, credential capture, or C2). Mastering `net/http` is non-negotiable for offensive Go. - **DNS is more than name resolution** (Middle): writing your own DNS server and using DNS tunneling for C2 is a recurring theme. This is a practical way to exfiltrate data or maintain persistence when other channels are blocked. - **Fuzzing is a mindset, not a tool** (Late): the book demonstrates how to build your own vulnerability fuzzer in Go, teaching you to think about input validation, edge cases, and crash analysis—skills that transfer to any language. - **Pluggable architectures future-proof your tools** (Late): using Go's plugin system and interface-based design, you can build tools that accept new modules without recompiling. This is critical for long-term engagement tooling. - **Cryptography is a double-edged sword** (Ending): the book covers both implementing crypto (like RC2 brute-forcing) and attacking weak implementations. Understanding symmetric-key algorithms and their weaknesses is essential for real-world pentesting. - **Steganography is a practical exfiltration technique** (Ending): embedding data in PNG images shows how to hide payloads in plain sight—a technique that works against network monitoring and content filters. 【Reading Tips】 - **Skim the first 10% if you already know Go**: the fundamentals section is solid but standard. Jump to the network programming chapters (around 10–30%) where the offensive-specific content begins. - **Deep-read the DNS and SMB chapters**: these are the most unique and least-covered topics in other security books. The DNS tunneling chapter alone is worth the price of the book. - **Type out the code, don't copy-paste**: the book's value is in the patterns and reasoning, not just the snippets. Rebuilding the tools yourself will teach you more than reading them. - **Pair with a lab environment**: set up a virtual network with intentionally vulnerable targets (like Metasploitable or a local Windows VM) to test the tools safely. The book assumes you have a lab ready. - **Expect some rough edges**: the book is written by practitioners, not professional writers. Some chapters feel like extended blog posts, and the code isn't always production-hardened—treat it as a starting point, not a final product. 【Coverage Limits】 The excerpts provided cover the book's front matter, author bios, and table of contents, but do not include substantial code samples or chapter content. This guide synthesizes the book's stated scope and structure from the blurb and TOC; specific implementation details may vary from what's described here.
Excerpt 1
书名: Modern C++ for Absolute Beginners A Friendly Introduction to the C++ Programming Language and C++11 to C++23 Standards, 2nd (Slobodan Dmitrović) (z-libra...
View in text
Excerpt 2
responsibility for any errors or omissions that may be made. The publisher makes no warranty, express or implied, with respect to the material contained here...
View in text
Excerpt 3
1 Chapter 2: What Is C++?
View in text
Excerpt 4
1 Chapter 2: What Is C++?
View in text
Excerpt 5
1 Chapter 2: What Is C++? 3 C++ Standard...
View in text
Excerpt 6
nputs 32 Inputs and Arithmetic O...
View in text
Tags
AI categories
CybersecurityGoProgramming
ISBN: 1593278659
Publisher: No Starch Press
Publish Year: 2020
Language: English
File Format: PDF
File Size: 5.2 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…