Want Sweet Deals? Join our Mailing List

Black Hat Bash

Creative Scripting for Hackers and Pentesters

By Nick Aleks and Dolev Farhi

Clear

Master the art of offensive bash scripting. This highly practical hands-on guide covers chaining commands together, automating tasks, crafting living-off-the-land attacks, and more!

Description

Download Chapter 5: Venerability Scanning and Fuzzing

In the hands of the penetration tester, bash scripting becomes a powerful offensive security tool. In Black Hat Bash, you’ll learn how to use bash to automate tasks, develop custom tools, uncover vulnerabilities, and execute advanced, living-off-the-land attacks against Linux servers. You’ll build a toolbox of bash scripts that will save you hours of manual work. And your only prerequisite is basic familiarity with the Linux operating system.

You’ll learn the basics of bash syntax, then set up a Kali Linux lab to apply your skills across each stage of a penetration test—from initial access to data exfiltration. Along the way, you’ll learn how to perform OS command injection, access remote machines, gather information stealthily, and navigate restricted networks to find the crown jewels. Hands-on exercises throughout will have you applying your newfound skills.

Key topics covered include:

  • Bash scripting essentials: From control structures, functions, loops, and text manipulation with grep, awk, and sed.
  • How to set up your lab: Create a hacking environment with Kali and Docker and install additional tools.
  • Reconnaissance and vulnerability scanning:  Learn how to perform host discovery, fuzzing, and port scanning using tools like Wfuzz, Nmap, and Nuclei.
  • Exploitation and privilege escalation: Establish web and reverse shells, and maintain continuous access.
  • Defense evasion and lateral movement: Audit hosts for landmines, avoid detection, and move through networks to uncover additional targets.

Whether you’re a pentester, a bug bounty hunter, or a student entering the cybersecurity field, Black Hat Bash will teach you how to automate, customize, and optimize your offensive security strategies quickly and efficiently, with no true sorcery required.

DETAILS

August 2024, 344 pp.
ISBN-13: 9781718503748

TABLE OF CONTENTS

Acknowledgments
Introduction
Chapter 1: Bash Basics
Chapter 2: Flow Control and Text Processing
Chapter 3: Setting Up a Hacking Lab
Chapter 4: Reconnaissance
Chapter 5: Vulnerability Scanning and Fuzzing
Chapter 6: Gaining a Web Shell
Chapter 7: Reverse Shells
Chapter 8: Local Information Gathering
Chapter 9: Privilege Escalation
Chapter 10: Persistence
Chapter 11: Network Probing and Lateral Movement
Chapter 12: Defense Evasion and Exfiltration
Index

View the Copyright page
View the detailed Table of Contents
View the Index

AUTHOR BIO

Dolev Farhi is a security engineer and author of Black Hat GraphQL (No Starch Press, 2023). He is a distinguished security engineer at Palo Alto Networks, where he uses bash daily to automate security tests and sift through network and application artifacts.

Nick Aleks has served as a distinguished security engineer at TD Bank and is the chief hacking officer at ASEC. He has extensive experience using bash scripting on red teams,  in penetration tests, and in software development projects. Aleks is also coauthor of Black Hat GraphQL (No Starch Press, 2023).

RESOURCES

A repository of code and errata for this title can be found at Dolev Farhi’s GitHub page.

REVIEWS

“[A] much needed resource for offensive security professionals. Having a book that teaches offensive security practitioners and cyber security professionals alike how to harness the power of the native Bash shell is amazing. Thanks to Dolev Farhi and Nick Aleks for writing this excellent resource!”
—Phillip Wylie, offensive security professional and host of The Phillip Wylie Show

You Might Also Like

Newsletter Subscription

We’ll send you sweet deals on upcoming books and let you know when new books are released. We’ll never sell, give away, or use your personal information for nefarious purposes. Choose the categories you’re interested in (check as many as you’d like):