Book description
Implement defensive techniques in your ecosystem successfully with Python
Key Features
- Identify and expose vulnerabilities in your infrastructure with Python
- Learn custom exploit development .
- Make robust and powerful cybersecurity tools with Python
Book Description
With the current technological and infrastructural shift, penetration testing is no longer a process-oriented activity. Modern-day penetration testing demands lots of automation and innovation; the only language that dominates all its peers is Python. Given the huge number of tools written in Python, and its popularity in the penetration testing space, this language has always been the first choice for penetration testers.
Hands-On Penetration Testing with Python walks you through advanced Python programming constructs. Once you are familiar with the core concepts, you'll explore the advanced uses of Python in the domain of penetration testing and optimization. You'll then move on to understanding how Python, data science, and the cybersecurity ecosystem communicate with one another. In the concluding chapters, you'll study exploit development, reverse engineering, and cybersecurity use cases that can be automated with Python.
By the end of this book, you'll have acquired adequate skills to leverage Python as a helpful tool to pentest and secure infrastructure, while also creating your own custom exploits.
What you will learn
- Get to grips with Custom vulnerability scanner development
- Familiarize yourself with web application scanning automation and exploit development
- Walk through day-to-day cybersecurity scenarios that can be automated with Python
- Discover enterprise-or organization-specific use cases and threat-hunting automation
- Understand reverse engineering, fuzzing, buffer overflows , key-logger development, and exploit development for buffer overflows.
- Understand web scraping in Python and use it for processing web responses
- Explore Security Operations Centre (SOC) use cases
- Get to understand Data Science, Python, and cybersecurity all under one hood
Who this book is for
If you are a security consultant , developer or a cyber security enthusiast with little or no knowledge of Python and want in-depth insight into how the pen-testing ecosystem and python combine to create offensive tools , exploits , automate cyber security use-cases and much more then this book is for you. Hands-On Penetration Testing with Python guides you through the advanced uses of Python for cybersecurity and pen-testing, helping you to better understand security loopholes within your infrastructure .
Table of contents
- Title Page
- Copyright and Credits
- Dedication
- About Packt
- Contributors
- Preface
-
Introduction to Python
- Technical requirements
- Why Python?
- Getting started
-
Python data types
- Numbers
- String types
- String indexes
-
String operations through methods and built-in functions
- The replace( ) method
- Substrings or string slicing
- String concatenation and replication
- The strip(), lstrip(), and rstrip() methods
- The split() method
- The find(), index(), upper(), lower(), len(), and count() methods
- The in and not in methods
- The endswith(), isdigit(), isalpha(), islower(), isupper(), and capitalize() methods
- List types
- Tuples in Python
- Dictionaries in Python
- Python operators
- Summary
- Questions
- Building Python Scripts
- Concept Handling
- Advanced Python Modules
- Vulnerability Scanner Python - Part 1
-
Vulnerability Scanner Python - Part 2
-
Architectural overview
-
A closer look at the code
- Driver_scanner.py
- driver_meta.py
-
auto_commands.py
- Pexpect – automating terminal: <SSH, Telnet, Wireshark, w3af>
- custom_meta() – automating Metasploit
- singleLineCommands_Timeout() – automating Java , Ruby, Perl, NSE, Python, Bash scripts
- general_interactive() – automating interactive terminal scripts (test_ssl.sh)
- generalCommands_Tout_Sniff() – automating Tshark
- HTTP_based() – automating web specific use-cases
- Storing details in database
- Executing the code
- Database schema for the service-scanning portion of the vulnerability scanner
- GUI version of vulnerability scanner
-
A closer look at the code
- Usage [PTO-GUI]
- Pausing and resuming scans
- Reporting
- Summary
- Questions
- Further reading
-
Architectural overview
- Machine Learning and Cybersecurity
- Automating Web Application Scanning - Part 1
- Automated Web Application Scanning - Part 2
- Building a Custom Crawler
- Reverse Engineering Linux Applications
- Reverse Engineering Windows Applications
- Exploit Development
- Cyber Threat Intelligence
- Other Wonders of Python
-
Assessments
- Chapter 1, Introduction to Python
- Chapter 2, Building Python Scripts
- Chapter 3, Concept Handling
- Chapter 4, Advanced Python Modules
- Chapter 5, Vulnerability Scanner Python - Part 1
- Chapter 6, Vulnerability Scanner Python - Part 2
- Chapter 7, Machine Learning and Cybersecurity
- Chapter 8, Automating Web Application Scanning - Part 1
- Chapter 9, Automating Web Application Scanning - Part 2
- Chapter 10, Building a Custom Crawler
- Chapter 11, Reverse Engineering Linux Applications
- Chapter 12, Reverse Engineering Windows Applications
- Chapter 13, Exploit Development
- Chapter 14, Cyber Threat Intelligence
- Chapter 15, Other Wonders of Python
- Other Books You May Enjoy
Product information
- Title: Hands-On Penetration Testing with Python
- Author(s):
- Release date: January 2019
- Publisher(s): Packt Publishing
- ISBN: 9781788990820
You might also like
book
Learning Python Web Penetration Testing
Leverage the simplicity of Python and available libraries to build web security testing tools for your …
book
Python Distilled
Expert Insight for Modern Python (3.6+) Development from the Author of Python Essential Reference The richness …
book
Python for Cybersecurity
Discover an up-to-date and authoritative exploration of Python cybersecurity strategies Python For Cybersecurity: Using Python for …
video
Complete Python Scripting for Automation
Over the last few years, Python has gained immense popularity. The demand for the programming language …