Making a persistent HTTP reverse shell

In this section, we will make our HTTP reverse shell, which we coded earlier. Then, we will export it to EXE, and give it a try and test it. Now, almost all of the hard work is done already and at this point you should be familiar with every part of the code.

So for a quick recap, what we've done here is change putty.exe to Persistence.exe, which will be our EXE filename. The destination part will be the same, that is, the Documents folder. Finally, we start our HTTP reverse shell as usual. 

The setup file here will be as follows:

# py2exe download link: http://sourceforge.net/projects/py2exe/files/py2exe/0.6.9/# Persistence Setupfrom distutils.core import setupimport py2exe , sys, ossys.argv.append("py2exe") ...

Get Python for Offensive PenTest now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.