A proof-of-concept virus written in Python

Harshad_sharma_img_20111012_00

Now for something completely different… got news that we now have a virus written in Python! Security analysts have named it Python.Pytroj.

It is a proof of concept, but it could be put to malicious use. Python has full system access (with all the permissions that the current user has, if not more), and has not been suspected to contain malicious code up till now.
Developers/users will have to be careful when executing python compiled code from untrusted sources henceforth.

This example virus executes only as a compiled bytecode file (.pyc) and it searches for other pyc files and infects them. The payload is a plain message that prints on console - "you have been exploited".

Curious ones can download the source files here:http://packetstormsecurity.org/files/105385/Pytroj-Tool-Python-Injector.html [more info]
http://packetstormsecurity.org/files/download/105385/Pytroj-v01.tar.gz [direct download]

Brings back my memories from college days when I was keen to learn about virii, worms and similar self-replicating codes :)

Meta