Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Offensive Shellcode from Scratch

You're reading from   Offensive Shellcode from Scratch Get to grips with shellcode countermeasures and discover how to bypass them

Arrow left icon
Product type Paperback
Published in Apr 2022
Publisher Packt
ISBN-13 9781803247427
Length 208 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Rishalin Pillay Rishalin Pillay
Author Profile Icon Rishalin Pillay
Rishalin Pillay
Arrow right icon
View More author details
Toc

Shellcode techniques

Before we look at the various shellcode techniques within Linux, let's spend some time on system calls (abbreviated as syscalls). Syscalls are the mechanism in which a Linux program calls functions in the kernel. When a program performs a read or a write, it is making use of a syscall, hence syscalls provide an essential interface.

Pro Tip

To view a full list of 64-bit system call numbers, you can run the following command:

cat /usr/include/x86_64-linux-gnu/asm/unistd_64.h

Or if you want to view the 32-bit system call numbers, you can run the following command:

cat /usr/include/x86_64-linux-gnu/asm/unistd_32.h

You can also view this from the tovalds/linux GitHub repository:

https://github.com/torvalds/linux/blob/master/arch/x86/entry/syscalls/syscall_64.tbl

Basic Linux shellcode

To get started with shellcoding in Linux, let's start with the basics. In this section, we will look at shellcode that spawns a bin/bash shell and utilizes...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image