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

Countermeasures and bypasses for Linux

When it comes to verifying which exploit protections are in place for a particular binary on Linux, a good tool to use is checksec command. This tool can be downloaded from the following location: https://github.com/slimm609/checksec.sh.

Once downloaded, you can view the protection measures by running the following command:

checksec  --file=FILENAME

In the following screenshot, I have run the checksec tool on the bin/ls program on Ubuntu. Take note of the various protections that are in place:

Figure 6.5 – Verifying exploit protections using CheckSec

The primer for all exploit bypasses in Linux is the ability to control the EIP. If you are able to control the EIP, you are already on your way toward a working exploit. Countermeasures within Linux become a hindrance on your way to controlling the EIP. If you look at a buffer overflow attack, without protections such as ASLR, it would be easy to...

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