Ethical Hacking with Python
Learn How To Build 50+ Ethical Hacking Tools from Scratch using Python
From simple port scanners to advanced reverse shells, you'll be amazed how such tools can be made with Python!
Python is one of the best programming languages for building automation scripts, Infosec tools, and even malware!
This eBook is a practical hands-on for Python programmers who hope to expand their knowledge in Cyber security and Python by building their own tools for information gathering, penetration testing, digital forensic investigation, and more!
Here's what you'll get:
- Reading everywhere: PDF or EPUB formats Ebook, no DRM.
- Tons of Programs to Build: Build 50+ tools, 340 pages.
- Working Code: You'll get access to a downloadable link of 71 Python (.py) code files counting 5,000+ lines of code!
Buy For $29.0
Notice: This eBook is intended solely for educational use in cybersecurity. Readers must use the provided tools and techniques ethically and legally, refraining from any unauthorized or malicious activities. Responsibility for complying with legal and ethical standards rests with the user. The aim is to empower ethical hacking practices using Python.
You'll learn to build the following programs:
- Chapter 1: Information Gathering:
- Extracting Domain Name Information: Using the WHOIS database and DNS enumeration to extract domain name information.
- Reverse DNS Lookup: You will learn how to perform reverse DNS lookup, converting IP addresses back into domain names.
- Subdomain Enumeration Tool: Using requests to scan for available subdomains in domain names.
- Geolocating IP Addresses: Using the IPinfo service, you'll learn to extract physical geolocation from IP addresses.
- Port Scanning: You'll have a chance to build a simple and fast port scanner with sockets and the Nmap tools in Python.
- Username Search Tool: You'll build a tool to search for usernames on social media platforms.
- Bluetooth Device Scanning: You'll also build a Bluetooth device scanner program, providing insights into local wireless environments.
- Chapter 2: Building Malware (Download for free here):
- Making a Ransomware: You'll learn to build a program that can encrypt any file or folder in your system with a password, and you can only decrypt it with that key.
- Making a Keylogger: A program that listens for keys pressed on your keyboard and sends them either to a log file or via email.
- Making a Fork Bomb: A program that consumes all the computer's resources until crashing.
- Making a Reverse Shell: You will write a program that can remotely control a target machine with shell/cmd commands.
- Making an Advanced Reverse Shell: A program that extends the previous reverse shell and adds many features, such as recording the microphone, making screenshots, and sending and receiving files.
- Making Malware Persistent: Adding persistent code to any Python code so it runs even after the system restarts.
- Chapter 3: Building Password Crackers:
- Making a Wordlist Generator: A tool like Crunch (in Python) that generates a wordlist based on character set, pattern, and more parameters passed by the user.
- Locking PDFs: Adding passwords to PDF documents with Python.
- Locking ZIP Files: Adding passwords to ZIP files using the
pyzipper
library.
- Cracking ZIP Files: ZIP files are a file format used to store compressed files; these files can be zipped and unzipped using a password. You'll build a program that uses brute force to search for the password.
- Cracking PDF documents: PDF files are a file format used to store documents; these files can be protected using a password. We will make a script that tries to crack this password.
- Brute-forcing SSH Servers: SSH is a secure shell protocol that generally connects to a remote server via a password. We will build a Python tool to read from a wordlist and try to connect using every password with that list.
- Brute-forcing FTP Servers: FTP is a file transfer protocol that generally transfers files to and from a remote server via a password. Similarly, we will make a Python tool to read from a wordlist and try to extract the password.
- Cracking Cryptographic Hashes: Hashes are used to securely store sensitive information such as passwords. They're designed to be one-way, meaning it's computationally impossible to reverse the process and obtain the original data from the hash. We'll explore Python's built-in
hashlib
library and build a hash cracker.
- Password Generator: We make an advanced password generator that allows you to create strong passwords.
- Checking Password Strength: At the end of the chapter, we explore multiple techniques to learn about the strength of passwords with Python.
- Chapter 4: Forensic Investigations:
- Extracting PDF Metadata: You'll learn to extract metadata information from PDF documents using Python.
- Extracting Image Metadata: Building a tool that can extract EXIF image metadata such as the model of the device, exact date and time, and even GPS info on some devices.
- Extracting Video Metadata: Extracting track/music metadata and various other technical data from videos and audio.
- Extracting DOCX Metadata: Extracting metadata from Microsoft Word (.docx) documents with
python-docx
library.
- Removing Metadata from Files: Ensure privacy by removing metadata from PDFs, images, audio/video and docx files with Python.
- Extracting Passwords from Chrome: By making a script that extracts saved passwords on your Chrome browser in Windows, you'll also learn how to protect yourself from this.
- Extracting Cookies from Chrome: Write a program that extracts cookies from all visited websites on your Chrome browser in Windows.
- Hiding Data in Images: Using Steganography, you will learn to hide data inside images with the Least Significant bit technique using OpenCV in Python.
- Verifying File Integrity: Make sure your files aren't tampered with by checking file checksum with the
hashlib
library in Python.
- Changing your MAC address: One major technique hackers use is changing their MAC address after an attack to hide their identity. We'll build one with Python.
- Extracting Saved Wi-Fi Passwords: A program that searches for saved Wi-Fi passwords in your machine, either on Windows or Unix-based systems.
- Generating Fake User Data: Learn how to use the Faker library to generate fake user profiles and data.
- Chapter 5: Packet Manipulation with Scapy
- DHCP Listener: We build a Python script that looks for DNS request packets and prints them to the console. Since DHCP is enabled for most networks, you'll be able to capture any device's important information that was recently connected to your network.
- Network Scanner: A simple network scanner that uses ARP requests to discover connected devices in the same network.
- Wi-Fi Scanner: We'll build an
airodump-ng
clone that scans for nearby Wi-Fi's using Scapy.
- SYN Flooding Attack: One of the most common denial of service (DOS) attacks, we'll make a script that does that.
- Creating Fake Access Points: We'll build a script to send 802.11 beacon frames continuously to forge fake access points nearby.
- Forcing Devices to Disconnect: Like beacon frames, we make a Python code that can send 802.11 deauthentication frames in the air to kick devices from their connected network.
- ARP Spoofing Attack: You'll learn how to forge malicious ARP packets and send them into the network to be man-in-the-middle.
- Detecting ARP Spoofing Attacks: A Python script that can detect malicious ARP replies and warn the user when that happens.
- DNS Spoofing: After you're man-in-the-middle using ARP spoofing, you can modify the target machine's packets on the fly. This program will target DNS response packets and change the response domain name to a modified domain to forward the target users to malicious websites.
- Sniffing HTTP Packets: Another use case of being man-in-the-middle is that you can sniff many packets that include valuable information, such as HTTP data.
- Injecting Code into HTTP Packets: Rather than just viewing the packets, why not modify them and include malicious Javascript, HTML, or CSS code on the websites the user visits?
- Advanced Network Scanner: Finally, we build an advanced network scanner that is robust in most network settings; we bundle a bunch of scanners such as passive monitoring, ARP scanning, UDP scanning, and ICMP scanning. We even include the DHCP listener in it. Besides that, you'll be able to write more than 500 lines of Python code and learn a lot about Python classes, IP addresses, threading, and more.
- Chapter 6: Extracting Email Addresses from the Web
- Building a Simple Email Extractor: We start this chapter by making a simple script that looks for email addresses on a single web page.
- Building an Advanced Email Spider: In this one, we extend our simple email extractor with the following features:
- Instead of extracting emails from a single page, we add a crawler that searches every link on that page and parses emails.
- To prevent the program from crawling indefinitely, we add an integer parameter to stop crawling when the number of crawled links reaches this parameter.
- We run multiple email extractors simultaneously using threads to take advantage of the Internet speed.
- When the crawler produces links to be visited for extracting emails, other threads will consume these links and visit them to search for email addresses.
This EBook is for:
- Python programmers who are interested in building tools in the cyber security field.
- Python beginners who seek to expand their knowledge in Python and information security.
- Cyber security enthusiasts who want to utilize the tools built in the EBook and apply their skills.
If you don't have experience with Python, I highly recommend you take an online course, a Python book, or even a quick YouTube playlist before buying the EBook, and you're good to go! You can check this page to see our recommended Python courses.
We'll constantly update the EBook; you'll have free access to future versions if you purchase now!
Still not convinced? To see it by yourself, click here to get a free chapter from the book.
We're confident that you'll find the information in this EBook to be valuable and useful. However, if for any reason you're not satisfied with your purchase, we offer a 15-day money-back guarantee. Simply contact us within 15 days of your purchase, and we'll fully refund your money. No questions asked.
Whether you're a beginner or an advanced Python programmer, this eBook will provide you with the knowledge and skills you need to excel in cybersecurity. Don't miss out on this opportunity to take your Python skills to the next level and become an expert in ethical hacking. Get your copy now and start building your own tools today!
Buy For $29.0