Persistent Python Backdoor

A Proof of Concept Python Virus

Alex Rodriguez
Python in Plain English
4 min readJan 7, 2021

--

Hello, World! In this article, I will demonstrate a proof of concept Python “virus” that infects other Python files with backdoor code. The Python script uses Python’s built-in socket module for creating a listener to connect to and Python’s built-in subprocess module for executing commands on the victim machine, while also establishing persistence by creating a…

--

--

I am an Offensive Security Engineer @ Amazon who writes about cybersecurity and anything related to technology. Opinions are my own.