Book Image

Offensive Shellcode from Scratch

By : Rishalin Pillay
5 (1)
Book Image

Offensive Shellcode from Scratch

5 (1)
By: Rishalin Pillay

Overview of this book

Shellcoding is a technique that is executed by many red teams and used in penetration testing and real-world attacks. Books on shellcode can be complex, and writing shellcode is perceived as a kind of "dark art." Offensive Shellcode from Scratch will help you to build a strong foundation of shellcode knowledge and enable you to use it with Linux and Windows. This book helps you to explore simple to more complex examples of shellcode that are used by real advanced persistent threat (APT) groups. You'll get to grips with the components of shellcode and understand which tools are used when building shellcode, along with the automated tools that exist to create shellcode payloads. As you advance through the chapters, you'll become well versed in assembly language and its various components, such as registers, flags, and data types. This shellcode book also teaches you about the compilers and decoders that are used when creating shellcode. Finally, the book takes you through various attacks that entail the use of shellcode in both Windows and Linux environments. By the end of this shellcode book, you'll have gained the knowledge needed to understand the workings of shellcode and build your own exploits by using the concepts explored.
Table of Contents (11 chapters)
1
Section 1: Shellcode
5
Section 2: Writing Shellcode
8
Section 3: Countermeasures and Bypasses

Interpreters, compilers, and assemblers

A computer program contains a set of instructions that, once executed by the CPU, tells the computer what to do. We have established that the norm today is for these programs to be written in a high-level language, which ultimately makes it easier to translate them into assembly language. As you learned in the previous chapters, these programs are simple to read and understand for programmers, but not for computers. Only machine language is understood by computers. As you may recall, machine language is made up of binary – that is, ones and zeros. For the computer to interpret these instructions, it needs to understand machine language. Machine language is ultimately derived from the translation of high-level or assembly languages. This is where interpreters, compilers, and assemblers come in. These are tools for translating high-level or assembly-language programs into machine language.

Let's dissect each of these to understand...