Python Malware - Part 3
I used my YARA rule PE_File_pyinstaller to scan for Python malware for some time now, and came across some interesting samples (after discarding false positives, PyInstaller is of course also used for benign software).
This is a sample I found (MD5 B79713939E97C80E204DE1EDC154A9EB).
I use pyinstxtractor.py to extract the Python code from the EXE created by PyInstaller.
This creates a folder (sample filename + _extracted):
File implant contains the malicious Python code:
This turns out to be a Remote Access Tool (RAT) that uses Gmail as C&C.
It can execute shellcode, upload and download files, make screenshots, execute commands, lock the screen and log keystrokes:
Armed with this information and with the help of Google, I found the code for this sample back on Github.
If you come across malicious PE file created with PyInstaller, don't use a disassembler like IDA Pro, but extract the Python code.
Didier Stevens
Microsoft MVP Consumer Security
blog.DidierStevens.com DidierStevensLabs.com
Comments
www
Nov 17th 2022
6 months ago
EEW
Nov 17th 2022
6 months ago
qwq
Nov 17th 2022
6 months ago
mashood
Nov 17th 2022
6 months ago
isc.sans.edu
Nov 23rd 2022
6 months ago
isc.sans.edu
Nov 23rd 2022
6 months ago
isc.sans.edu
Dec 3rd 2022
6 months ago
isc.sans.edu
Dec 3rd 2022
6 months ago
<a hreaf="https://technolytical.com/">the social network</a> is described as follows because they respect your privacy and keep your data secure. The social networks are not interested in collecting data about you. They don't care about what you're doing, or what you like. They don't want to know who you talk to, or where you go.
<a hreaf="https://technolytical.com/">the social network</a> is not interested in collecting data about you. They don't care about what you're doing, or what you like. They don't want to know who you talk to, or where you go. The social networks only collect the minimum amount of information required for the service that they provide. Your personal information is kept private, and is never shared with other companies without your permission
isc.sans.edu
Dec 26th 2022
5 months ago
isc.sans.edu
Dec 26th 2022
5 months ago