Bash Shell Scripting for Pentesters

by Steve Campbell

Cybersecurity

Book Details

Book Title

Bash Shell Scripting for Pentesters

Author

Steve Campbell

Publisher

Packt Publishing City: Birmingham, UK

Publication Date

2024

ISBN

9781835880821

Number of Pages

403

Language

English

Format

PDF

File Size

5.7MB

Subject

Security; Cybersecurity; Bash Programming; Bash Scripting; Pentesting

Table of Contents

  • Cover
  • Title Page
  • Copyright and Credits
  • Dedications
  • Foreword
  • Contributors
  • Table of Contents
  • Preface
  • Part 1: Getting Started with Bash Shell Scripting
  • Chapter 1: Bash Command-Line and Its Hacking Environment
  • Technical requirements
  • Introduction to Bash
  • Lab setup
  • Configuring your hacker shell
  • Setting up essential pentesting tools
  • Summary
  • Chapter 2: File and Directory Management
  • Technical requirements
  • Working with files and directories
  • Directory navigation and manipulation
  • File permissions and ownership
  • Linking files – hard links and symlinks
  • Summary
  • Chapter 3: Variables, Conditionals, Loops, and Arrays
  • Technical requirements
  • Introducing variables
  • Branching with conditional statements
  • Repeating with loops
  • Using arrays for data containers
  • Summary
  • Chapter 4: Regular Expressions
  • Technical requirements
  • The basics of regex
  • Advanced regex patterns and techniques
  • Demonstrating practical applications
  • Regex tips and best practices
  • Summary
  • Chapter 5: Functions and Script Organization
  • Introduction to Bash functions
  • Passing arguments to functions
  • The scope and lifetime of variables in functions
  • Advanced function techniques
  • Functions versus aliases
  • Summary
  • Chapter 6: Bash Networking
  • Technical requirements
  • Networking basics with Bash
  • Scripting network enumeration
  • Network exploitation
  • Network traffic analysis
  • Summary
  • Chapter 7: Parallel Processing
  • Understanding parallel processing in Bash
  • Implementing basic parallel execution
  • Advanced parallel processing with xargs and GNU parallel
  • Practical applications and best practices
  • Summary
  • Part 2: Bash Scripting for Pentesting
  • Chapter 8: Reconnaissance and Information Gathering
  • Technical requirements
  • Introducing reconnaissance with Bash
  • Formatting usernames and email addresses
  • Using Bash for DNS enumeration
  • Using Bash to identify web applications
  • Summary
  • Chapter 9: Web Application Pentesting with Bash
  • Technical requirements
  • Automating HTTP requests in Bash
  • Analyzing web application security with Bash
  • Learning advanced data manipulation techniques
  • Summary
  • Chapter 10: Network and Infrastructure Pentesting with Bash
  • Technical requirements
  • Fundamentals of network pentesting with Bash
  • Advanced network scanning techniques in Bash
  • Enumerating network services and protocols using Bash
  • Infrastructure vulnerability assessment with Bash
  • Summary
  • Chapter 11: Privilege Escalation in the Bash Shell
  • Technical requirements
  • Understanding privilege escalation in Unix/Linux systems
  • Enumeration techniques for privilege escalation
  • Exploiting SUID and SGID binaries with Bash
  • Leveraging misconfigured services and scheduled tasks
  • Summary
  • Chapter 12: Persistence and Pivoting
  • Technical requirements
  • The fundamentals of persistence with Bash
  • Learning advanced persistence techniques
  • The basics of network pivoting with Bash
  • Mastering advanced pivoting and lateral movement
  • Cleanup and covering tracks
  • Summary
  • Chapter 13: Pentest Reporting with Bash
  • Technical requirements
  • Automating data collection for reporting with Bash
  • Storing and managing pentest data with SQLite
  • Integrating Bash with reporting tools
  • Summary
  • Part 3: Advanced Applications of Bash Scripting for Pentesting
  • Chapter 14: Evasion and Obfuscation
  • Technical requirements
  • Enumerating the environment for AV and EDR
  • Basic obfuscation techniques in Bash
  • Advanced evasion tactics using Bash
  • Automating evasion script generation in Bash
  • Summary
  • Chapter 15: Interfacing with Artificial Intelligence
  • Technical requirements
  • Ethical and practical considerations of AI in pentesting
  • The basics of AI in pentesting
  • Enhancing vulnerability identification with AI
  • AI-assisted decision-making in pentesting
  • Summary
  • Chapter 16: DevSecOps for Pentesters
  • Technical requirements
  • Introduction to DevSecOps for pentesters
  • Configuring the CI/CD pipeline with Bash
  • Crafting security-focused Bash scripts for DevSecOps
  • Integrating real-time security monitoring with Bash
  • Automating custom Kali Linux builds for pentesting
  • Summary
  • Index
  • Other Books You May Enjo