0%

Book Description

Master Shellcode to leverage the buffer overflow concept

About This Book

  • Understand how systems can be bypassed both at the operating system and network level with shellcode, assembly, and Metasploit
  • Learn to write and modify 64-bit shellcode along with kernel-level shellcode concepts
  • A step-by-step guide that will take you from low-level security skills to covering loops with shellcode

Who This Book Is For

This book is intended to be read by penetration testers, malware analysts, security researchers, forensic practitioners, exploit developers, C language programmers, software testers, and students in the security field.

Readers should have a basic understanding of OS internals (Windows and Linux). Some knowledge of the C programming language is essential, and a familiarity with the Python language would be helpful.

What You Will Learn

  • Create an isolated lab to test and inject shellcodes (Windows and Linux).
  • Understand both Windows and Linux behavior.
  • Learn the assembly programming language.
  • Create shellcode using assembly and Metasploit.
  • Detect buffer overflows.
  • Debug and reverse-engineer using tools such as GDB, edb, and Immunity (Windows and Linux).
  • Exploit development and shellcodes injections (Windows & Linux).
  • Prevent and protect against buffer overflows and heap corruption.

In Detail

Security has always been a major concern for your application, your system, or your environment. This book's main goal is to build your skills for low-level security exploits, finding vulnerabilities and covering loopholes with shellcode, assembly, and Metasploit.

This book will teach you topics ranging from memory management and assembly to compiling and extracting shellcode and using syscalls and dynamically locating functions in memory. This book also covers techniques to compile 64-bit shellcode for Linux and Windows along with Metasploit shellcode tools. Lastly, this book will also show you to how to write your own exploits with intermediate techniques, using real-world scenarios.

By the end of this book, you will have become an expert in shellcode and will understand how systems are compromised both at the operating system and network level.

Style and approach

This practical guide helps you understand buffer overflows and how to become creative about creating shellcode, looking inside code and analyzing it, and mastering the injection of shellcode into infected code. At the end of the book, there is a recap with a real-world scenario.

Table of Contents

  1. Title Page
  2. Copyright and Credits
    1. Penetration Testing with Shellcode
  3. Packt Upsell
    1. Why subscribe?
    2. PacktPub.com
  4. Contributors
    1. About the author
    2. About the reviewers
    3. Packt is searching for authors like you
  5. Preface
    1. Who this book is for
    2. What this book covers
    3. To get the most out of this book
      1. Download the example code files
      2. Download the color images
      3. Conventions used
    4. Get in touch
      1. Reviews
    5. Disclaimer
  6. Introduction
    1. What is a stack?
      1. What is a buffer?
      2. What is stack overflow?
      3. What is a heap?
      4. What is heap corruption?
      5. Memory layout
      6. What is shellcode?
    2. Computer architecture
      1. Registers
        1. General purpose registers
        2. Instruction pointer
        3. Flags registers
        4. Segment registers
        5. Endianness
    3. System calls
      1. What are syscalls?
    4. Summary
  7. Lab Setup
    1. Configuring the attacker machine
    2. Configuring Linux victim machine
    3. Configuring Windows victim machine
    4. Configuring Ubuntu for assembly x86
    5. Networking
    6. Summary
  8. Assembly Language in Linux
    1. Assembly language code structure
    2. Data types
    3. Hello world
    4. Stack
    5. Data manipulation
      1. The mov instruction 
      2. Data swapping
      3. Load effective address
    6. Arithmetic operations
    7. Loops
    8. Controlling the flow
    9. Procedures
    10. Logical operations 
      1. Bitwise operations
      2. Bit-shifting operations
        1. Arithmetic shift operation 
        2. Logical shift
        3. Rotate operation
    11. Summary 
  9. Reverse Engineering
    1. Debugging in Linux
    2. Debugging in Windows 
    3. Summary
  10. Creating Shellcode
    1. The basics
      1. Bad characters
    2. The relative address technique 
      1. The jmp-call technique 
      2. The stack technique 
    3. The execve syscall
    4. TCP bind shell
    5. Reverse TCP shell
    6. Generating shellcode using Metasploit
    7. Summary 
  11. Buffer Overflow Attacks
    1. Stack overflow on Linux
    2. Stack overflow on Windows
    3. Summary
  12. Exploit Development – Part 1
    1. Fuzzing and controlling instruction pointer
      1. Using Metasploit Framework and PEDA
    2. Injecting shellcode
    3. A complete example of buffer overflow
    4. Summary
  13. Exploit Development – Part 2
    1. Injecting shellcode
    2. Return-oriented programming
    3. Structured exception handling
    4. Summary
  14. Real-World Scenarios – Part 1
    1. Freefloat FTP Server
    2. Fuzzing 
    3. Controlling the instruction pointer
    4. Injecting shellcode 
    5. An example
    6. Summary 
  15. Real-World Scenarios – Part 2
    1. Sync Breeze Enterprise
    2. Fuzzing
    3. Controlling the instruction pointer
    4. Injecting shell code 
    5. Summary 
  16. Real-World Scenarios – Part 3
    1. Easy File Sharing Web Server
    2. Fuzzing 
    3. Controlling SEH
    4. Injecting shellcode 
    5. Summary 
  17. Detection and Prevention
    1. System approach
    2. Compiler approach 
    3. Developer approach 
    4. Summary
  18. Other Books You May Enjoy
    1. Leave a review - let other readers know what you think
18.118.171.20