ENGLISH

Python for Offensive PenTest: A Complete Practical Guide to Ethical Hacking and Penetration Testing Using Python

Book information

Publisher
Packt Publishing
Year
2018
ISBN
9781788838979
Language
english
Format
PDF
Filesize
7 MB (7675776 bytes)
Pages
\169
Time added
2022-07-09 21:59:38

Description

Your one-stop guide to using Python along with creating your own hacking tools, and make the most out of available resources that are made using this programming language Key Features Power-packed with comprehensive information on how to build a web application penetration testing framework using Python Master web application penetration testing using the multi-paradigm programming language Python Instead of relying on external tools, detect vulnerabilities in a system or application by writing your own Python script Book Description Python is easy to learn and a cross-platform programming language which has unlimited third party libraries. Plenty of open source hacking tools are written in python which can be easily integrated within your script. This book is packed with step-by-step instructions and working examples which make you a true penetration tester. It is divided into clear bite-size chunks so you can learn at your own pace and focus on the areas of most interest to you. This book will teach you how to code your reverse shell and make an anonymous shell. You will learn how to hack passwords and how to perform privilege escalation on Windows with practical examples. You will be setting up your own virtual hacking environment in virtual box. Finally, you can challenge yourself with exercises which will enable you to test your knowledge. By the end of this book, you will learn how to code your own scripts and learn ethical hacking from scratch. What You Will Learn Learn how to code your own reverse shell [TCP+HTTP] Make anonymous shell by interacting with [Twitter, Google Form, Sourceforge] Replicate Metasploit features and make an advanced shell Learn how to hack passwords using multiple techniques [API Hooking. Keylogger, - Clipboard Hijacking] Learn how to exfiltrate data from your target Learn how malware abusing cryptography by adding [AES,RSA,XOR] encryption to your shell Privilege escalation on windows with practical example Export your python script into EXE You'll get answers to your questions! You will setup your home virtual hacking lab You will learn countermeasures against most of the attacks Challenge yourself with UNSOLVED Exercises Who This Book Is For Ethical hackers and penetration testers, Students preparing for OSCP, OSCE, GPEN, GXPN, CEH, Information security professionals and cyber security consultants, System and network security administrators, Programmers who want to get their hands dirty. Cover Title Page Copyright and Credits Packt Upsell Contributors Table of Contents Preface Chapter 1: Warming up – Your First Antivirus-Free Persistence Shell Preparing the attacker machine Setting up internet access Preparing the target machine TCP reverse shell Coding a TCP reverse shell Server side Client side Data exfiltration – TCP Server side Client side Exporting to EXE HTTP reverse shell Coding the HTTP reverse shell Server side Client side Data exfiltration – HTTP Client side Server side Exporting to EXE Persistence Making putty.exe persistent Making a persistent HTTP reverse shell Tuning the connection attempts Tips for preventing a shell breakdown Countermeasures Summary Chapter 2: Advanced Scriptable Shell Dynamic DNS DNS aware shell Interacting with Twitter Parsing a tweet in three lines Countermeasures Replicating Metasploit's screen capturing Replicating Metasploit searching for content Target directory navigation Integrating low-level port scanner Summary Chapter 3: Password Hacking Antivirus free keylogger Installing pyHook and pywin Adding code to keylogger Hijacking KeePass password manager Man in the browser Firefox process Firefox API hooking with Immunity Debugger Python in Firefox proof of concept (PoC) Python in Firefox EXE Dumping saved passwords out of Google Chrome Acquiring the password remotely Submitting the recovered password over HTTP session Testing the file against antivirus Password phishing – DNS poisoning Using Python script Facebook password phishing Countermeasures Securing the online account Securing your computer Securing your network Keeping a watch on any suspicious activity Summary Chapter 4: Catch Me If You Can! Bypassing host-based firewalls Hijacking IE Bypassing reputation filtering in next generation firewalls Interacting with SourceForge Interacting with Google Forms Bypassing botnet filtering Bypassing IPS with handmade XOR encryption Summary Chapter 5: Miscellaneous Fun in Windows Privilege escalation – weak service file Privilege escalation – preparing vulnerable software Privilege escalation – backdooring legitimate windows service Privilege escalation – creating a new admin account and covering the tracks Summary Chapter 6: Abuse of Cryptography by Malware Introduction to encryption algorithms Protecting your tunnel with AES – stream mode Cipher Block Chaining (CBC) mode encryption Counter (CTR) mode encryption  Protecting your tunnel with RSA Hybrid encryption key Summary Other Books You May Enjoy Index

Similar books