Preface

Shellcode is code that is used to execute a command within software memory to take control or exploit a target computer. In this book, you will learn what shellcode is, what components it has, the tools used to build shellcode, and how shellcode can be used within Linux and Windows.

Who this book is for

The audience of this book will be red teamers, penetration testers, and those who are looking to learn about shellcode and how it is used to break into systems by making use of simple to complex instructions of code in memory. Basic assembly and shellcode knowledge would be helpful.

What this book covers

Chapter 1, The Ins and Outs of Shellcode, introduces you to shellcode. We will ensure you have a good understanding of what shellcode is, how it is used, and how to read its syntax.

Chapter 2, Assembly Language, focuses on assembly language. It will cover a number of aspects of assembly language, such as the following:

  • Registers and flags
  • Data types
  • Data movement instructions
  • Arithmetic instructions
  • Conditional instructions

Chapter 3, Shellcode Tools and Resources, focuses on the various compilers and tools that can be used with assembly language to create shellcode.

Chapter 4, Developing Shellcode for Windows, dives into the development of shellcode on Windows operating systems.

You will learn how to make use of different shellcode techniques to deploy shellcode within a program. The chapter will focus on the thought process around creating and deploying shellcode along with practical examples that you can perform in your own lab environment.

Chapter 5, Developing Shellcode for Linux, dives into the development of shellcode on Linux operating systems.

You will learn how to make use of different shellcode techniques to deploy shellcode within a program. The chapter will focus on the thought process around creating and deploying shellcode along with practical examples that you can perform in your own lab environment.

Chapter 6, Countermeasures and Bypasses, looks at the various countermeasures and bypasses for both Windows and Linux. The aim here is to sum up the book by discussing how software vendors have made advancements in mitigations against shellcode. However, on the flip side, we will cover how to bypass those countermeasures where possible.

To get the most out of this book

To perform the practical exercises in this book, you will need to make use of virtual machines. Alternatively, you can also perform these on physical machines if you have them. There is no hard requirement to use cloud-based or host-based virtualization; as long as you are able to make use of the various operating systems, you are good to go.

Download the color images

We also provide a PDF file that has color images of the screenshots/diagrams used in this book. You can download it here: https://static.packt-cdn.com/downloads/9781803247427_ColorImages.pdf.

Conventions used

There are a number of text conventions used throughout this book.

Code in text: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "This command uses the -m switch to specify the modules to perform the search on. In this case, we are looking at all DLLs depicted by *.dll."

Bold: Indicates a new term, an important word, or words that you see onscreen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: "To view the chains, you can click on VIEW | SEH Chain."

A block of code is set as follows:

#!/usr/bin/python

import socket, struct, sys

server = '192.168.44.141'

sport = 9999

Any command-line input or output is written as follows:

!mona rop -m *.dll -cp nonull

Tips or Important Notes

Appear like this.

Get in touch

Feedback from our readers is always welcome.

General feedback: If you have questions about any aspect of this book, mention the book title in the subject of your message and email us at [email protected].

Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you have found a mistake in this book, we would be grateful if you would report this to us. Please visit www.packtpub.com/support/errata, selecting your book, clicking on the Errata Submission Form link, and entering the details.

Piracy: If you come across any illegal copies of our works in any form on the Internet, we would be grateful if you would provide us with the location address or website name. Please contact us at [email protected] with a link to the material.

If you are interested in becoming an author: If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, please visit authors.packtpub.com.

Share Your Thoughts

Once you've read Offensive Shellcode from Scratch, we'd love to hear your thoughts! Please click here to go straight to the Amazon review page for this book and share your feedback.

Your review is important to us and the tech community and will help us make sure we're delivering excellent quality content.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.224.33.107