Book Image

Python Penetration Testing Essentials - Second Edition

By : Mohit Raj
Book Image

Python Penetration Testing Essentials - Second Edition

By: Mohit Raj

Overview of this book

This book gives you the skills you need to use Python for penetration testing (pentesting), with the help of detailed code examples. We start by exploring the basics of networking with Python and then proceed to network hacking. Then, you will delve into exploring Python libraries to perform various types of pentesting and ethical hacking techniques. Next, we delve into hacking the application layer, where we start by gathering information from a website. We then move on to concepts related to website hacking—such as parameter tampering, DDoS, XSS, and SQL injection. By reading this book, you will learn different techniques and methodologies that will familiarize you with Python pentesting techniques, how to protect yourself, and how to create automated programs to find the admin console, SQL injection, and XSS attacks.
Table of Contents (11 chapters)

Effects of parameter tampering on business

As a pentester, you will often have to analyze the source code. These days, the world of e-commerce is growing quickly. Consider an example of an e-commerce website, as shown in the following screenshot:

Example of a website

The preceding screenshot shows that the price of a Nokia C7 is 60 and the price of an iPhone 3G is 600. You do not know whether these prices came from the database or if they are written in the web page. The following screenshot shows the price of both mobiles:

View source code

Now, let's look at the source code, as shown in the following screenshot:

Look at the rectangular boxes in the preceding screenshot. The price 60 is written in the web page, but the price 600 is taken from the database. The price 60 can be changed by URL tampering if the GET method is used. The price can be changed to 6 instead of 60...