Penetration Testing with the Bash shell

Book description

Make the most of the Bash shell and Kali Linux's commandlinebased security assessment tools

In Detail

This book teaches you to take your problem solving capabilities to the next level with the Bash shell, to assess network and application level security by leveraging the power of the command-line tools available with Kali Linux.

The book begins by introducing some of the fundamental bash scripting and information processing tools. Building on this, the next few chapters focus on detailing ways to customize your Bash shell using functionalities such as tab completion and rich text formatting. After the fundamental customization techniques and general purpose tools have been discussed, the book breaks into topics such as the command-line-based security tools in the Kali Linux operating system. The general approach in discussing these tools is to involve general purpose tools discussed in previous chapters to integrate security assessment tools. This is a one stop solution to learn Bash and solve information security problems.

What You Will Learn

  • Perform network enumeration techniques with Dig, whois, dnsenum, dnsmap, and others
  • Learn how to fuzz and reverse engineer using the Kali Linux command line tools
  • Exploit common web application vulnerabilities using skipfish, arcachi, and sqlmap
  • Accomplish man-in-the-middle attacks straight from your command line
  • Assess SSL security using sslyze and openssl
  • Carry out network traffic analysis using tcpdump

Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at If you purchased this book elsewhere, you can visit and register to have the files e-mailed directly to you.

Publisher resources

Download Example Code

Table of contents

  1. Penetration Testing with the Bash shell
    1. Table of Contents
    2. Penetration Testing with the Bash shell
    3. Credits
    4. Disclaimer
    5. About the Author
    6. About the Reviewers
      1. Support files, eBooks, discount offers, and more
        1. Why subscribe?
        2. Free access for Packt account holders
    8. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Downloading the example code
        2. Errata
        3. Piracy
        4. Questions
    9. 1. Getting to Know Bash
      1. Getting help from the man pages
      2. Navigating and searching the filesystem
        1. Navigating directories
        2. Listing directory contents
        3. Searching the filesystem
          1. Directory traversal options
          2. File testing options
          3. File action options
      3. Using I/O redirection
        1. Redirecting output
        2. Redirecting input
      4. Using pipes
      5. Getting to know grep
        1. Regular expression language – a crash course
        2. Regular expression matcher selection options
        3. Regular expression matching control options
        4. Output control options
        5. File selection options
      6. Summary
      7. Further reading
    10. 2. Customizing Your Shell
      1. Formatting the terminal output
      2. The prompt string
        1. Prompt string customizations
      3. Aliases
      4. Customizing the command history
        1. Protecting sensitive information from leakage
      5. Customizing tab completion
      6. Summary
      7. Further reading
    11. 3. Network Reconnaissance
      1. Interrogating the Whois servers
      2. Interrogating the DNS servers
        1. Using Dig
        2. Using dnsmap
      3. Enumerating targets on the local network
        1. Host discovery with Arping
        2. Target enumeration with Nmap
      4. Summary
      5. Further reading
    12. 4. Exploitation and Reverse Engineering
      1. Using the Metasploit command-line interface
        1. Getting started with msfcli
        2. Using invocation modes with msfcli
        3. Bash hacks and msfcli
      2. Preparing payloads with Metasploit
      3. Creating and deploying a payload
      4. Disassembling binaries
        1. Disassembling with Objdump
        2. A note about the reverse engineering assembler code
      5. Debugging binaries for dynamic analysis
        1. Getting started with GDB
        2. Setting execution breakpoints and watch points
        3. Inspecting registers, memory values, and runtime information
      6. Summary
      7. Further reading
    13. 5. Network Exploitation and Monitoring
      1. MAC and ARP abuse
        1. Spoofing MAC addresses
        2. Abusing address resolution
      2. Man-in-the-middle attacks
        1. Ettercap DNS spoofing
      3. Interrogating servers
        1. SNMP interrogation
        2. SMTP server interrogation
      4. Brute-forcing authentication
        1. Using Medusa
      5. Traffic filtering with TCPDump
        1. Getting started with TCPDump
        2. Using the TCPDump packet filter
      6. Assessing SSL implementation security
        1. Using SSLyze
        2. Bash hacks and SSLyze
      7. Automated web application security assessment
        1. Scanning with SkipFish
        2. Scanning with Arachni
      8. Summary
      9. Further reading
    14. Index

Product information

  • Title: Penetration Testing with the Bash shell
  • Author(s): Keith Makan
  • Release date: May 2014
  • Publisher(s): Packt Publishing
  • ISBN: 9781849695107