Violent Python
eBook - ePub

Violent Python

A Cookbook for Hackers, Forensic Analysts, Penetration Testers and Security Engineers

  1. 288 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Violent Python

A Cookbook for Hackers, Forensic Analysts, Penetration Testers and Security Engineers

About this book

Violent Python shows you how to move from a theoretical understanding of offensive computing concepts to a practical implementation. Instead of relying on another attacker's tools, this book will teach you to forge your own weapons using the Python programming language. This book demonstrates how to write Python scripts to automate large-scale network attacks, extract metadata, and investigate forensic artifacts. It also shows how to write code to intercept and analyze network traffic using Python, craft and spoof wireless frames to attack wireless and Bluetooth devices, and how to data-mine popular social media websites and evade modern anti-virus.- Demonstrates how to write Python scripts to automate large-scale network attacks, extract metadata, and investigate forensic artifacts- Write code to intercept and analyze network traffic using Python. Craft and spoof wireless frames to attack wireless and Bluetooth devices- Data-mine popular social media websites and evade modern anti-virus

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription.
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes! You can use the Perlego app on both iOS or Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app.
Yes, you can access Violent Python by TJ O'Connor in PDF and/or ePUB format, as well as other popular books in Computer Science & Cyber Security. We have over one million books available in our catalogue for you to explore.

Information

Chapter 1

Introduction

Information in this chapter:

ent
Setting up a Development Environment for Python
ent
Introduction to the Python Programming Language
ent
An Explanation of Variables, Data types, Strings, Lists, Dictionaries, Functions
ent
Work with Networking, Iteration, Selection, Exception Handling and Modules
ent
Write Your First Python Program, a Dictionary Password Cracker
ent
Write Your Second Python Program, a Zipfile Brute-Force Cracker
To me, the extraordinary aspect of martial arts lies in its simplicity. The easy way is also the right way, and martial arts is nothing at all special; the closer to the true way of martial arts, the less wastage of expression there is.
– Master Bruce Lee, Founder, Jeet Kune Do

Introduction: A Penetration Test with Python

Recently, a friend of mine penetration tested a Fortune 500 company’s computer security system. While the company had established and maintained an excellent security scheme, he eventually found a vulnerability in an unpatched server. Within a few minutes, he used open source tools to compromise the system and gained administrative access to it. He then scanned the remaining servers as well as the clients and did not discover any additional vulnerabilities. At this point his assessment ended and the true penetration test began.
Opening the text editor of his choice, my friend wrote a Python script to test the credentials found on the vulnerable server against the remainder of the machines on the network. Literally, minutes later, he gained administrative access to over one thousand machines on the network. However, in doing so, he was subsequently presented with an unmanageable problem. He knew the system administrators would notice his attack and deny him access so he quickly used some triage with the exploited machines in order to find out where to install a persistent backdoor.
After examining his pentest engagement document, my friend realized that his client placed a high level of importance on securing the domain controller. Knowing the administrator logged onto the domain controller with a completely separate administrator account, my friend wrote a small script to check a thousand machines for logged on users. A little while later, my friend was notified when the domain administrator logged onto one of the machines. His triage essentially complete, my friend now knew where to continue his assault.
My friend’s ability to quickly react and think creatively under pressure made him a penetration tester. He forged his own tools out of short scripts in order to successfully compromise the Fortune 500 Company. A small Python script granted him access to over one thousand workstations. Another small script allowed him to triage the one thousand workstations before an adept administrator disconnected his access. Forging your own weapons to solve your own problems makes you a true penetration tester.
Let us begin our journey of learning how to build our own tools, by installing our development environment.

Setting Up Your Development Environment

The Python download site (http://www.python.org/download/) provides a repository of Python installers for Windo...

Table of contents

  1. Cover image
  2. Title page
  3. Table of Contents
  4. Copyright
  5. Trade marks
  6. Acknowledgements
  7. Dedication
  8. Lead Author – TJ O’Connor
  9. Contributing Author Bio – Rob Frost
  10. Technical Editor Bio – Mark Baggett
  11. Introduction
  12. Chapter 1. Introduction
  13. Chapter 2. Penetration Testing with Python
  14. Chapter 3. Forensic Investigations with Python
  15. Chapter 4. Network Traffic Analysis with Python
  16. Chapter 5. Wireless Mayhem with Python
  17. Chapter 6. Web Recon with Python
  18. Chapter 7. Antivirus Evasion with Python
  19. Index