Skip to Content
Learning Malware Analysis
book

Learning Malware Analysis

by Monnappa K A
June 2018
Beginner
510 pages
13h 7m
English
Packt Publishing
Content preview from Learning Malware Analysis

2.4 Decrypting In Python

After you have identified the encryption algorithm and the key used to encrypt the data, you can decrypt the data using the PyCryto (https://www.dlitz.net/software/pycrypto/) Python module. To install PyCrypto, you can use apt-get install python-crypto or pip install pycrypto or compile it from the source. Pycrypto supports hashing algorithms such as MD2MD4MD5RIPEMD SHA1, and SHA256. It also supports encryption algorithms such as AESARC2BlowfishCASTDESDES3 (Triple DES),   IDEARC5 and ARC4.

The following Python commands demonstrate how to generate MD5, SHA1, and SHA256 hashes using the Pycrypto module:

>>> from Crypto.Hash import MD5,SHA256,SHA1>>> text = "explorer.exe">>> MD5.new(text).hexdigest() ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Practical Malware Analysis

Practical Malware Analysis

Michael Sikorski, Andrew Honig
Mastering Malware Analysis

Mastering Malware Analysis

Alexey Kleymenov, Amr Thabet
Evasive Malware

Evasive Malware

Kyle Cucci

Publisher Resources

ISBN: 9781788392501Other