Book Image

Effective Python Penetration Testing

By : Rejah Rehim
Book Image

Effective Python Penetration Testing

By: Rejah Rehim

Overview of this book

Penetration testing is a practice of testing a computer system, network, or web application to find weaknesses in security that an attacker can exploit. Effective Python Penetration Testing will help you utilize your Python scripting skills to safeguard your networks from cyberattacks. We will begin by providing you with an overview of Python scripting and penetration testing. You will learn to analyze network traffic by writing Scapy scripts and will see how to fingerprint web applications with Python libraries such as ProxMon and Spynner. Moving on, you will find out how to write basic attack scripts, and will develop debugging and reverse engineering skills with Python libraries. Toward the end of the book, you will discover how to utilize cryptography toolkits in Python and how to automate Python tools and libraries.
Table of Contents (16 chapters)
Effective Python Penetration Testing
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface

Hash functions


Hash functions are mainly used in cryptography to check the integrity of messages, digital signatures, manipulation detection, fingerprints, and password storage. A function is a good hash function if the input string cannot be guessed based on the output. As hash functions convert random amounts of data to fixed-length strings, there may be some inputs that hash into the same string. Hash functions are created in such a way as to make these collisions extremely difficult to find. The most used hash functions are as follows:

MD2, MD4, and MD5 have 128-bits length and are not secure. SHA-1 has 160-bits length, but it is also not secure.

Hashed Message Authentication Code (HMAC)

Hashed Message Authentication Code (HMAC) is used when we need to check for integrity and authenticity. It provides both server and client with a public key and a private key. The private key is only known to the server and client, but the public key is known to all.

In the case of HMAC, the key and the...