Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Python Penetration Testing Cookbook

You're reading from   Python Penetration Testing Cookbook Practical recipes on implementing information gathering, network security, intrusion detection, and post-exploitation

Arrow left icon
Product type Paperback
Published in Nov 2017
Publisher Packt
ISBN-13 9781784399771
Length 226 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Rejah Rehim Rejah Rehim
Author Profile Icon Rejah Rehim
Rejah Rehim
Arrow right icon
View More author details
Toc

Table of Contents (21) Chapters Close

Title Page
Credits
About the Author
About the Reviewers
www.PacktPub.com
Customer Feedback
Preface
1. Why Python in Penetration Testing? FREE CHAPTER 2. Setting Up a Python Environment 3. Web Scraping with Python 4. Data Parsing with Python 5. Web Scraping with Scrapy and BeautifulSoup 6. Network Scanning with Python 7. Network Sniffing with Python 8. Scapy Basics 9. Wi-Fi Sniffing 10. Layer 2 Attacks 11. TCP/IP Attacks 12. Introduction to Exploit Development 13. Windows Exploit Development 14. Linux Exploit Development

Windows memory layout


The Windows OS memory has a number of sections that can be considered as the high-level components. To write exploits and take advantage of vulnerable programs, we have to understand the memory structure and its sections.

Getting ready

Before starting the exploit script writing, we have to get an idea about the structure of the Windows memory layout.

Let's have a look at the memory structure for an executable:

As we use a stack and heap in most cases of exploits, we can start with these.

The stack

The stack is used for short-term local storage in an ordered manner. Each thread in an application has a stack. A unique stack with a fixed size is assigned for a thread or a function when it is called. The size of the stack is defined when the application or thread starts. Also, this stack gets destroyed when this function or thread gets finished. The stack is mainly used to store local variables, save function return pointers, function argument exception handler records, and much...

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 €14.99/month. Cancel anytime
Visually different images