Beware what you install

Lately I’ve used my intermediate Python “skills” and the internet for a little experiment: my friend challenged me to make a little piece of malicious code. We wanted to see, what you can do with a computer just with code samples / docs from the internet and basic programming.

Now I used Python since it’s currently the only coding language I really learned. There are some, if relatively small, limitations to what Python can do with a computer - but still, I managed to spy on his clipboard, keyboard presses, and tasks running. The program could also download a copy to the Windows Autostart folder. With that done the program would automatically start every time the PC starts. Then I sent the data to a server where I could retrieve the logs with an FTP client. There is much more you could do!

Since my code had some dependencies, I used PyInstaller which basically compiles a .exe file from the Python code. That made my program easily installable without needing to install Python, and it’s packages.

This little experiment reminded me to check more frequently what I install and what I have installed. The stuff we did wasn’t anything really bad, but still scary.