Code Monkey home page Code Monkey logo

sharpyshell's Introduction

SharPyShell


SharPyShell is a tiny and obfuscated ASP.NET webshell that executes commands received by an encrypted channel compiling them in memory at runtime.

SharPyShell supports only C# web applications that runs on .NET Framework >= 2.0
VB is not supported atm.

Usage

python3 SharPyShell.py generate -p somepassword
python3 SharPyShell.py interact -u http://target.url/sharpyshell.aspx -p somepassword

Requirements

Python version >= 3.6

and

pip3 install -r requirements.txt

Description

SharPyShell is a post-exploitation framework written in Python that are capable of:

  • Generate obfuscated webshell (generate);
  • Simulate a windows terminal as an interaction for the webshell (interact).

The main aim of this framework is providing the penetration tester a series of tools to ease the post exploitation phase once an exploitation has been succesfull against an IIS webserver.

This tool is not intended as a replacement of the frameworks for C2 Server (i.e. Meterpreter, Empire, ecc..) but this should be used when you land to a fully restricted server where inbound and outbound connections are very limited.
In this framework you will have all the tools needed to privesc, netdiscovery and lateral movement as you are typing behind the cmd of the target server.

Moreover this framework aim to be stealthy as much as possible implementing in memory execution for c# code and powershell modules.

The obfuscation implemented in SharPyShell aim to evade both file signatures and network signatures ids.
For the network signatures evasion, a fully encrypted channel has been developed for sending commands and receiving outputs.
The evasion for file signatures has been achieved using Reflection on a precompiled dll in charge of runtime compiling c# code.

Technical Diagram

Generated with asciiflow.com

+-------------------------------------------+                      +--------------------------------------------+
| SharPyShell Client (Local)                |                      | Target Server (Remote)                     |
+-------------------------------------------+   +--------------+   +--------------------------------------------+
|                                           |   |  Encrypted   |   |                                            |
|   +--------+-----------------^-----------<---->     HTTP     <---->-----------+-----------------^--------+    |
|            |                 |            |   |   Channel    |   |            |                 |             |
|            |4-Receive        |1-Send      |   +--------------+   |            |2-Receive        |3-Send       |
|            |                 |            |                      |            |                 |             |
|   +--------v-----------------+--------+   |                      |   +--------v-----------------+--------+    |
|   |              Module               |   |                      |   |           Webshell URL            |    |
|   +--------+-----------------^--------+   |                      |   +--------+-----------------^--------+    |
|   |        |Parse            |Generate|   |                      |   |        |Parse            |Generate|    |
|   | +------v------+   +------+------+ |   |                      |   | +------v------+   +------+------+ |    |
|   | |Base64 Resp  |   |Base64 Req   | |   |                      |   | |Base64 Req   |   |Base64 Resp  | |    |
|   | +------+------+   +------^------+ |   |                      |   | +------+------+   +------^------+ |    |
|   |        |Decode           |Encode  |   |                      |   |        |Decode           |Encode  |    |
|   | +------v------+   +------+------+ |   |                      |   | +------v------+   +------+------+ |    |
|   | |Xor/Aes Data |   |Xor/Aes Data | |   |                      |   | |Xor/Aes Data |   |Xor/Aes Data | |    |
|   | +------+------+   +------^------+ |   |                      |   | +------+------+   +------^------+ |    |
|   |        |Decrypt          |Encrypt |   |                      |   |        |Decrypt          |Encrypt |    |
|   | +------v------+   +------+------+ |   |                      |   | +------v------+   +------+------+ |    |
|   | |Response     |   |C# Code      | |   |                      |   | |C# Code      |   |Output       | |    |
|   | +------+------+   +------+------+ |   |                      |   | +------+------+   +------+------+ |    |
|   |        |                 ^        |   |                      |   |        |                 ^        |    |
|   |        v                 |        |   |                      |   |        v                 |        |    |
|   |        +--------+--------+        |   |                      |   |        +--------+--------+        |    |
|   |                 |                 |   |                      |   |                 |                 |    |
|   +---------------- ^ ----------------+   |                      |   +---------------- ^ ----------------+    |
|                     |                     |                      |                     |                      |
|                     |Run&Parse            |                      |                     |Compile&Run           |
|                     |                     |                      |                     |                      |
|             +------ v ------+             |                      |             +------ v ------+              |
|             |Terminal       |             |                      |             |csc.exe        |              |
|             +---------------+             |                      |             +---------------+              |
|             |Modules:       |             |                      |             |System.dll     |              |
|             |#exec_cmd      |             |                      |             |Compile in Mem |              |
|             |#exec_ps       |             |                      |             |No exe output  |              |
|             |#runas         |             |                      |             |               |              |
|             |.....          |             |                      |             |               |              |
|             |               |             |                      |             |               |              |
|             +---------------+             |                      |             +---------------+              |
|                                           |                      |                                            |
+-------------------------------------------+                      +--------------------------------------------+

Modules

 #download               Download a file from the server                                            
 #exec_cmd               Run a cmd.exe /c command on the server                                     
 #exec_ps                Run a powershell.exe -nop -noni -enc 'base64command' on the server         
 #inject_dll_reflective  Inject a reflective DLL in a new (or existing) process                     
 #inject_dll_srdi        Inject a generic DLL in a new (or existing) process                        
 #inject_shellcode       Inject shellcode in a new (or existing) process                            
 #invoke_ps_module       Run a ps1 script on the target server                                      
 #invoke_ps_module_as    Run a ps1 script on the target server as a specific user                   
 #lateral_psexec         Run psexec binary to move laterally                                        
 #lateral_wmi            Run builtin WMI command to move laterally                                  
 #mimikatz               Run an offline version of mimikatz directly in memory                      
 #net_portscan           Run a port scan using regular sockets, based (pretty) loosely on nmap      
 #privesc_juicy_potato   Launch InMem Juicy Potato attack trying to impersonate NT AUTHORITY\SYSTEM 
 #privesc_powerup        Run Powerup module to assess all misconfiguration for privesc              
 #runas                  Run a cmd.exe /c command spawning a new process as a specific user         
 #runas_ps               Run a powershell.exe -enc spawning a new process as a specific user        
 #upload                 Upload a file to the server 

Windows version tested

Windows Server >= 2008 Standard x64

Credits

sharpyshell's People

Contributors

antoniococo avatar ngohuy avatar nuharbormartin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sharpyshell's Issues

SharPyShell Cannot run the script

Hello, my python version on CENTOS is 2.7.17
Cannot run this script.

Please provide details of your successful operation environment.

I like this tool very much. Please help me to resolve this problem.

Still maintained?

Hello @antonioCoco,

I would like to know if this project is still maintained or not. I would like to add GodPotato and your fabulous JuicyPotatoNG, a command ConPtyShell to send it to your machine to get a better shell and other features.

Could you let me know if you are able to accept Pull-Requests or if I can help you as a maintainer, etc.?

Best regards,

python 2.7.5 for centos7

{{{Offline}}}{{{GetTempDirectoryException}}}{{{PythonError}}}
Traceback (most recent call last):
File "/root/SharPyShell/core/Module.py", line 90, in run
encrypted_response = self._post_request(encrypted_request)
File "/root/SharPyShell/core/Module.py", line 67, in _post_request
self._request_object.send_request(request_encrypted_encoded)
File "/root/SharPyShell/core/Request.py", line 49, in send_request
retries=False
File "/usr/lib/python2.7/site-packages/urllib3/request.py", line 79, in request
method, url, fields=fields, headers=headers, **urlopen_kw
File "/usr/lib/python2.7/site-packages/urllib3/request.py", line 170, in request_encode_body
return self.urlopen(method, url, **extra_kw)
File "/usr/lib/python2.7/site-packages/urllib3/poolmanager.py", line 375, in urlopen
response = conn.urlopen(method, u.request_uri, **kw)
File "/usr/lib/python2.7/site-packages/urllib3/connectionpool.py", line 756, in urlopen
method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
File "/usr/lib/python2.7/site-packages/urllib3/util/retry.py", line 506, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/usr/lib/python2.7/site-packages/urllib3/connectionpool.py", line 706, in urlopen
chunked=chunked,
File "/usr/lib/python2.7/site-packages/urllib3/connectionpool.py", line 382, in _make_request
self.validate_conn(conn)
File "/usr/lib/python2.7/site-packages/urllib3/connectionpool.py", line 1010, in validate_conn
conn.connect()
File "/usr/lib/python2.7/site-packages/urllib3/connection.py", line 421, in connect
tls_in_tls=tls_in_tls,
File "/usr/lib/python2.7/site-packages/urllib3/util/ssl
.py", line 429, in ssl_wrap_socket
sock, context, tls_in_tls, server_hostname=server_hostname
File "/usr/lib/python2.7/site-packages/urllib3/util/ssl
.py", line 472, in _ssl_wrap_socket_impl
return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
File "/usr/lib64/python2.7/ssl.py", line 348, in wrap_socket
_context=self)
File "/usr/lib64/python2.7/ssl.py", line 609, in init
self.do_handshake()
File "/usr/lib64/python2.7/ssl.py", line 831, in do_handshake
self._sslobj.do_handshake()
SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:618)


{{{Offline}}}{{{GetTempDirectoryException}}}{{{PythonError}}}
Traceback (most recent call last):
File "/root/SharPyShell/core/Module.py", line 90, in run
encrypted_response = self._post_request(encrypted_request)
File "/root/SharPyShell/core/Module.py", line 67, in _post_request
self._request_object.send_request(request_encrypted_encoded)
File "/root/SharPyShell/core/Request.py", line 49, in send_request
retries=False
File "/usr/lib/python2.7/site-packages/urllib3/request.py", line 79, in request
method, url, fields=fields, headers=headers, **urlopen_kw
File "/usr/lib/python2.7/site-packages/urllib3/request.py", line 170, in request_encode_body
return self.urlopen(method, url, **extra_kw)
File "/usr/lib/python2.7/site-packages/urllib3/poolmanager.py", line 375, in urlopen
response = conn.urlopen(method, u.request_uri, **kw)
File "/usr/lib/python2.7/site-packages/urllib3/connectionpool.py", line 756, in urlopen
method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
File "/usr/lib/python2.7/site-packages/urllib3/util/retry.py", line 506, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/usr/lib/python2.7/site-packages/urllib3/connectionpool.py", line 706, in urlopen
chunked=chunked,
File "/usr/lib/python2.7/site-packages/urllib3/connectionpool.py", line 382, in _make_request
self.validate_conn(conn)
File "/usr/lib/python2.7/site-packages/urllib3/connectionpool.py", line 1010, in validate_conn
conn.connect()
File "/usr/lib/python2.7/site-packages/urllib3/connection.py", line 421, in connect
tls_in_tls=tls_in_tls,
File "/usr/lib/python2.7/site-packages/urllib3/util/ssl
.py", line 429, in ssl_wrap_socket
sock, context, tls_in_tls, server_hostname=server_hostname
File "/usr/lib/python2.7/site-packages/urllib3/util/ssl
.py", line 472, in _ssl_wrap_socket_impl
return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
File "/usr/lib64/python2.7/ssl.py", line 348, in wrap_socket
_context=self)
File "/usr/lib64/python2.7/ssl.py", line 609, in init
self.do_handshake()
File "/usr/lib64/python2.7/ssl.py", line 831, in do_handshake
self._sslobj.do_handshake()
SSLError: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:618)

Issue folder names

I have an issue in cd into a folder has a name containing spaces!
`c:\users\public\documents> dir
Volume in drive C has no label.
Volume Serial Number is 2404-7994

Directory of c:\users\public\documents

04/12/2020 03:53 AM

.
04/12/2020 03:53 AM ..
04/12/2020 03:50 AM 'test
04/12/2020 03:53 AM foo poo
04/12/2020 03:50 AM test
04/12/2020 03:50 AM test test 3
04/12/2020 03:50 AM test'
04/12/2020 03:50 AM test2
0 File(s) 0 bytes
8 Dir(s) 163,082,391,552 bytes free
c:\users\public\documents>
`

`c:\users\public\documents> cd "foo poo"
{{{ExecCmdModuleException}}}{{{SharPyShellError}}}
Volume in drive C has no label.
Volume Serial Number is 2404-7994

Directory of c:\users\public\documents

Directory of c:\users\public\documents

File Not Found

c:\users\public\documents>
c:\users\public\documents> cd 'foo poo'
{{{ExecCmdModuleException}}}{{{SharPyShellError}}}
Volume in drive C has no label.
Volume Serial Number is 2404-7994

Directory of c:\users\public\documents

File Not Found

c:\users\public\documents>
`

I tried putting folder name in single / double quotes, still getting same error!

SSLError: [SSL] internal error (_ssl.c:727)

any idea why this will happen

{{{Offline}}}{{{GetTempDirectoryException}}}{{{PythonError}}}
Traceback (most recent call last):

File "/usr/lib/python2.7/ssl.py", line 828, in do_handshake
self._sslobj.do_handshake()
SSLError: [SSL] internal error (_ssl.c:727)

403

can't execute anything , a long response with 403 error when execution any command.

any help please?

Error while trying to install PyCrypto requirement for SharpyShell with pip

When i perform the command
pip install -r requirements.txt
i got the following error

DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Requirement already satisfied: urllib3 in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 1)) (1.25.9)
Requirement already satisfied: PySocks in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 2)) (1.7.1)
Collecting pycrypto
  Using cached pycrypto-2.6.1.tar.gz (446 kB)
Collecting pyopenssl
  Using cached pyOpenSSL-19.1.0-py2.py3-none-any.whl (53 kB)
Processing /root/.cache/pip/wheels/1c/a1/95/4f33011a0c013c872fe6f0f364dc463a2588120820e40a30d8/pefile-2019.4.18-cp27-none-any.whl
Processing /root/.cache/pip/wheels/80/34/1c/3967380d9676d162cb59513bd9dc862d0584e045a162095606/prettytable-0.7.2-cp27-none-any.whl
Collecting cryptography>=2.8
  Using cached cryptography-2.9.2-cp27-cp27mu-manylinux2010_x86_64.whl (2.7 MB)
Collecting six>=1.5.2
  Using cached six-1.14.0-py2.py3-none-any.whl (10 kB)
Processing /root/.cache/pip/wheels/8b/99/a0/81daf51dcd359a9377b110a8a886b3895921802d2fc1b2397e/future-0.18.2-cp27-none-any.whl
Collecting enum34; python_version < "3"
  Using cached enum34-1.1.10-py2-none-any.whl (11 kB)
Collecting ipaddress; python_version < "3"
  Using cached ipaddress-1.0.23-py2.py3-none-any.whl (18 kB)
Collecting cffi!=1.11.3,>=1.8
  Using cached cffi-1.14.0-cp27-cp27mu-manylinux1_x86_64.whl (387 kB)
Collecting pycparser
  Using cached pycparser-2.20-py2.py3-none-any.whl (112 kB)
Building wheels for collected packages: pycrypto
  Building wheel for pycrypto (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-1cQAUC/pycrypto/setup.py'"'"'; __file__='"'"'/tmp/pip-install-1cQAUC/pycrypto/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-fYJx9B
       cwd: /tmp/pip-install-1cQAUC/pycrypto/
  Complete output (212 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-2.7
  creating build/lib.linux-x86_64-2.7/Crypto
  copying lib/Crypto/pct_warnings.py -> build/lib.linux-x86_64-2.7/Crypto
  copying lib/Crypto/__init__.py -> build/lib.linux-x86_64-2.7/Crypto
  creating build/lib.linux-x86_64-2.7/Crypto/Hash
  copying lib/Crypto/Hash/hashalgo.py -> build/lib.linux-x86_64-2.7/Crypto/Hash
  copying lib/Crypto/Hash/HMAC.py -> build/lib.linux-x86_64-2.7/Crypto/Hash
  copying lib/Crypto/Hash/MD4.py -> build/lib.linux-x86_64-2.7/Crypto/Hash
  copying lib/Crypto/Hash/SHA384.py -> build/lib.linux-x86_64-2.7/Crypto/Hash
  copying lib/Crypto/Hash/MD5.py -> build/lib.linux-x86_64-2.7/Crypto/Hash
  copying lib/Crypto/Hash/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/Hash
  copying lib/Crypto/Hash/SHA256.py -> build/lib.linux-x86_64-2.7/Crypto/Hash
  copying lib/Crypto/Hash/SHA.py -> build/lib.linux-x86_64-2.7/Crypto/Hash
  copying lib/Crypto/Hash/SHA224.py -> build/lib.linux-x86_64-2.7/Crypto/Hash
  copying lib/Crypto/Hash/MD2.py -> build/lib.linux-x86_64-2.7/Crypto/Hash
  copying lib/Crypto/Hash/RIPEMD.py -> build/lib.linux-x86_64-2.7/Crypto/Hash
  copying lib/Crypto/Hash/SHA512.py -> build/lib.linux-x86_64-2.7/Crypto/Hash
  creating build/lib.linux-x86_64-2.7/Crypto/Cipher
  copying lib/Crypto/Cipher/ARC2.py -> build/lib.linux-x86_64-2.7/Crypto/Cipher
  copying lib/Crypto/Cipher/DES3.py -> build/lib.linux-x86_64-2.7/Crypto/Cipher
  copying lib/Crypto/Cipher/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/Cipher
  copying lib/Crypto/Cipher/Blowfish.py -> build/lib.linux-x86_64-2.7/Crypto/Cipher
  copying lib/Crypto/Cipher/ARC4.py -> build/lib.linux-x86_64-2.7/Crypto/Cipher
  copying lib/Crypto/Cipher/CAST.py -> build/lib.linux-x86_64-2.7/Crypto/Cipher
  copying lib/Crypto/Cipher/PKCS1_OAEP.py -> build/lib.linux-x86_64-2.7/Crypto/Cipher
  copying lib/Crypto/Cipher/DES.py -> build/lib.linux-x86_64-2.7/Crypto/Cipher
  copying lib/Crypto/Cipher/AES.py -> build/lib.linux-x86_64-2.7/Crypto/Cipher
  copying lib/Crypto/Cipher/PKCS1_v1_5.py -> build/lib.linux-x86_64-2.7/Crypto/Cipher
  copying lib/Crypto/Cipher/blockalgo.py -> build/lib.linux-x86_64-2.7/Crypto/Cipher
  copying lib/Crypto/Cipher/XOR.py -> build/lib.linux-x86_64-2.7/Crypto/Cipher
  creating build/lib.linux-x86_64-2.7/Crypto/Util
  copying lib/Crypto/Util/asn1.py -> build/lib.linux-x86_64-2.7/Crypto/Util
  copying lib/Crypto/Util/Counter.py -> build/lib.linux-x86_64-2.7/Crypto/Util
  copying lib/Crypto/Util/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/Util
  copying lib/Crypto/Util/py21compat.py -> build/lib.linux-x86_64-2.7/Crypto/Util
  copying lib/Crypto/Util/_number_new.py -> build/lib.linux-x86_64-2.7/Crypto/Util
  copying lib/Crypto/Util/number.py -> build/lib.linux-x86_64-2.7/Crypto/Util
  copying lib/Crypto/Util/winrandom.py -> build/lib.linux-x86_64-2.7/Crypto/Util
  copying lib/Crypto/Util/py3compat.py -> build/lib.linux-x86_64-2.7/Crypto/Util
  copying lib/Crypto/Util/RFC1751.py -> build/lib.linux-x86_64-2.7/Crypto/Util
  copying lib/Crypto/Util/randpool.py -> build/lib.linux-x86_64-2.7/Crypto/Util
  creating build/lib.linux-x86_64-2.7/Crypto/Random
  copying lib/Crypto/Random/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/Random
  copying lib/Crypto/Random/random.py -> build/lib.linux-x86_64-2.7/Crypto/Random
  copying lib/Crypto/Random/_UserFriendlyRNG.py -> build/lib.linux-x86_64-2.7/Crypto/Random
  creating build/lib.linux-x86_64-2.7/Crypto/Random/Fortuna
  copying lib/Crypto/Random/Fortuna/FortunaGenerator.py -> build/lib.linux-x86_64-2.7/Crypto/Random/Fortuna
  copying lib/Crypto/Random/Fortuna/FortunaAccumulator.py -> build/lib.linux-x86_64-2.7/Crypto/Random/Fortuna
  copying lib/Crypto/Random/Fortuna/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/Random/Fortuna
  copying lib/Crypto/Random/Fortuna/SHAd256.py -> build/lib.linux-x86_64-2.7/Crypto/Random/Fortuna
  creating build/lib.linux-x86_64-2.7/Crypto/Random/OSRNG
  copying lib/Crypto/Random/OSRNG/rng_base.py -> build/lib.linux-x86_64-2.7/Crypto/Random/OSRNG
  copying lib/Crypto/Random/OSRNG/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/Random/OSRNG
  copying lib/Crypto/Random/OSRNG/posix.py -> build/lib.linux-x86_64-2.7/Crypto/Random/OSRNG
  copying lib/Crypto/Random/OSRNG/fallback.py -> build/lib.linux-x86_64-2.7/Crypto/Random/OSRNG
  copying lib/Crypto/Random/OSRNG/nt.py -> build/lib.linux-x86_64-2.7/Crypto/Random/OSRNG
  creating build/lib.linux-x86_64-2.7/Crypto/SelfTest
  copying lib/Crypto/SelfTest/st_common.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest
  copying lib/Crypto/SelfTest/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest
  creating build/lib.linux-x86_64-2.7/Crypto/SelfTest/Cipher
  copying lib/Crypto/SelfTest/Cipher/test_ARC2.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Cipher
  copying lib/Crypto/SelfTest/Cipher/test_pkcs1_15.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Cipher
  copying lib/Crypto/SelfTest/Cipher/test_AES.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Cipher
  copying lib/Crypto/SelfTest/Cipher/test_ARC4.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Cipher
  copying lib/Crypto/SelfTest/Cipher/test_DES.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Cipher
  copying lib/Crypto/SelfTest/Cipher/test_CAST.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Cipher
  copying lib/Crypto/SelfTest/Cipher/test_Blowfish.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Cipher
  copying lib/Crypto/SelfTest/Cipher/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Cipher
  copying lib/Crypto/SelfTest/Cipher/test_pkcs1_oaep.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Cipher
  copying lib/Crypto/SelfTest/Cipher/test_DES3.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Cipher
  copying lib/Crypto/SelfTest/Cipher/common.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Cipher
  copying lib/Crypto/SelfTest/Cipher/test_XOR.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Cipher
  creating build/lib.linux-x86_64-2.7/Crypto/SelfTest/Hash
  copying lib/Crypto/SelfTest/Hash/test_MD4.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Hash
  copying lib/Crypto/SelfTest/Hash/test_MD2.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Hash
  copying lib/Crypto/SelfTest/Hash/test_RIPEMD.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Hash
  copying lib/Crypto/SelfTest/Hash/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Hash
  copying lib/Crypto/SelfTest/Hash/test_SHA256.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Hash
  copying lib/Crypto/SelfTest/Hash/test_HMAC.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Hash
  copying lib/Crypto/SelfTest/Hash/test_SHA.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Hash
  copying lib/Crypto/SelfTest/Hash/common.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Hash
  copying lib/Crypto/SelfTest/Hash/test_SHA384.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Hash
  copying lib/Crypto/SelfTest/Hash/test_SHA224.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Hash
  copying lib/Crypto/SelfTest/Hash/test_MD5.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Hash
  copying lib/Crypto/SelfTest/Hash/test_SHA512.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Hash
  creating build/lib.linux-x86_64-2.7/Crypto/SelfTest/Protocol
  copying lib/Crypto/SelfTest/Protocol/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Protocol
  copying lib/Crypto/SelfTest/Protocol/test_KDF.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Protocol
  copying lib/Crypto/SelfTest/Protocol/test_chaffing.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Protocol
  copying lib/Crypto/SelfTest/Protocol/test_rfc1751.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Protocol
  copying lib/Crypto/SelfTest/Protocol/test_AllOrNothing.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Protocol
  creating build/lib.linux-x86_64-2.7/Crypto/SelfTest/PublicKey
  copying lib/Crypto/SelfTest/PublicKey/test_importKey.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/PublicKey
  copying lib/Crypto/SelfTest/PublicKey/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/PublicKey
  copying lib/Crypto/SelfTest/PublicKey/test_DSA.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/PublicKey
  copying lib/Crypto/SelfTest/PublicKey/test_RSA.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/PublicKey
  copying lib/Crypto/SelfTest/PublicKey/test_ElGamal.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/PublicKey
  creating build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random
  copying lib/Crypto/SelfTest/Random/test_rpoolcompat.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random
  copying lib/Crypto/SelfTest/Random/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random
  copying lib/Crypto/SelfTest/Random/test_random.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random
  copying lib/Crypto/SelfTest/Random/test__UserFriendlyRNG.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random
  creating build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random/Fortuna
  copying lib/Crypto/SelfTest/Random/Fortuna/test_FortunaAccumulator.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random/Fortuna
  copying lib/Crypto/SelfTest/Random/Fortuna/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random/Fortuna
  copying lib/Crypto/SelfTest/Random/Fortuna/test_FortunaGenerator.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random/Fortuna
  copying lib/Crypto/SelfTest/Random/Fortuna/test_SHAd256.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random/Fortuna
  creating build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random/OSRNG
  copying lib/Crypto/SelfTest/Random/OSRNG/test_fallback.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random/OSRNG
  copying lib/Crypto/SelfTest/Random/OSRNG/test_posix.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random/OSRNG
  copying lib/Crypto/SelfTest/Random/OSRNG/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random/OSRNG
  copying lib/Crypto/SelfTest/Random/OSRNG/test_generic.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random/OSRNG
  copying lib/Crypto/SelfTest/Random/OSRNG/test_nt.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random/OSRNG
  copying lib/Crypto/SelfTest/Random/OSRNG/test_winrandom.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random/OSRNG
  creating build/lib.linux-x86_64-2.7/Crypto/SelfTest/Util
  copying lib/Crypto/SelfTest/Util/test_Counter.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Util
  copying lib/Crypto/SelfTest/Util/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Util
  copying lib/Crypto/SelfTest/Util/test_number.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Util
  copying lib/Crypto/SelfTest/Util/test_asn1.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Util
  copying lib/Crypto/SelfTest/Util/test_winrandom.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Util
  creating build/lib.linux-x86_64-2.7/Crypto/SelfTest/Signature
  copying lib/Crypto/SelfTest/Signature/test_pkcs1_15.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Signature
  copying lib/Crypto/SelfTest/Signature/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Signature
  copying lib/Crypto/SelfTest/Signature/test_pkcs1_pss.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Signature
  creating build/lib.linux-x86_64-2.7/Crypto/Protocol
  copying lib/Crypto/Protocol/KDF.py -> build/lib.linux-x86_64-2.7/Crypto/Protocol
  copying lib/Crypto/Protocol/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/Protocol
  copying lib/Crypto/Protocol/Chaffing.py -> build/lib.linux-x86_64-2.7/Crypto/Protocol
  copying lib/Crypto/Protocol/AllOrNothing.py -> build/lib.linux-x86_64-2.7/Crypto/Protocol
  creating build/lib.linux-x86_64-2.7/Crypto/PublicKey
  copying lib/Crypto/PublicKey/ElGamal.py -> build/lib.linux-x86_64-2.7/Crypto/PublicKey
  copying lib/Crypto/PublicKey/RSA.py -> build/lib.linux-x86_64-2.7/Crypto/PublicKey
  copying lib/Crypto/PublicKey/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/PublicKey
  copying lib/Crypto/PublicKey/_slowmath.py -> build/lib.linux-x86_64-2.7/Crypto/PublicKey
  copying lib/Crypto/PublicKey/pubkey.py -> build/lib.linux-x86_64-2.7/Crypto/PublicKey
  copying lib/Crypto/PublicKey/DSA.py -> build/lib.linux-x86_64-2.7/Crypto/PublicKey
  copying lib/Crypto/PublicKey/_RSA.py -> build/lib.linux-x86_64-2.7/Crypto/PublicKey
  copying lib/Crypto/PublicKey/_DSA.py -> build/lib.linux-x86_64-2.7/Crypto/PublicKey
  creating build/lib.linux-x86_64-2.7/Crypto/Signature
  copying lib/Crypto/Signature/PKCS1_PSS.py -> build/lib.linux-x86_64-2.7/Crypto/Signature
  copying lib/Crypto/Signature/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/Signature
  copying lib/Crypto/Signature/PKCS1_v1_5.py -> build/lib.linux-x86_64-2.7/Crypto/Signature
  running build_ext
  running build_configure
  checking for gcc... gcc
  checking whether the C compiler works... yes
  checking for C compiler default output file name... a.out
  checking for suffix of executables...
  checking whether we are cross compiling... no
  checking for suffix of object files... o
  checking whether we are using the GNU C compiler... yes
  checking whether gcc accepts -g... yes
  checking for gcc option to accept ISO C89... none needed
  checking for __gmpz_init in -lgmp... yes
  checking for __gmpz_init in -lmpir... no
  checking whether mpz_powm is declared... yes
  checking whether mpz_powm_sec is declared... yes
  checking how to run the C preprocessor... gcc -E
  checking for grep that handles long lines and -e... /usr/bin/grep
  checking for egrep... /usr/bin/grep -E
  checking for ANSI C header files... yes
  checking for sys/types.h... yes
  checking for sys/stat.h... yes
  checking for stdlib.h... yes
  checking for string.h... yes
  checking for memory.h... yes
  checking for strings.h... yes
  checking for inttypes.h... yes
  checking for stdint.h... yes
  checking for unistd.h... yes
  checking for inttypes.h... (cached) yes
  checking limits.h usability... yes
  checking limits.h presence... yes
  checking for limits.h... yes
  checking stddef.h usability... yes
  checking stddef.h presence... yes
  checking for stddef.h... yes
  checking for stdint.h... (cached) yes
  checking for stdlib.h... (cached) yes
  checking for string.h... (cached) yes
  checking wchar.h usability... yes
  checking wchar.h presence... yes
  checking for wchar.h... yes
  checking for inline... inline
  checking for int16_t... yes
  checking for int32_t... yes
  checking for int64_t... yes
  checking for int8_t... yes
  checking for size_t... yes
  checking for uint16_t... yes
  checking for uint32_t... yes
  checking for uint64_t... yes
  checking for uint8_t... yes
  checking for stdlib.h... (cached) yes
  checking for GNU libc compatible malloc... yes
  checking for memmove... yes
  checking for memset... yes
  configure: creating ./config.status
  config.status: creating src/config.h
  building 'Crypto.PublicKey._fastmath' extension
  creating build/temp.linux-x86_64-2.7
  creating build/temp.linux-x86_64-2.7/src
  x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -fdebug-prefix-map=/build/python2.7-x6KfBw/python2.7-2.7.17=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/include/ -I/usr/include/python2.7 -c src/_fastmath.c -o build/temp.linux-x86_64-2.7/src/_fastmath.o
  src/_fastmath.c:31:10: fatal error: Python.h: No such file or directory
     31 | #include "Python.h"
        |          ^~~~~~~~~~
  compilation terminated.
  error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for pycrypto
  Running setup.py clean for pycrypto
Failed to build pycrypto
Installing collected packages: pycrypto, enum34, ipaddress, six, pycparser, cffi, cryptography, pyopenssl, future, pefile, prettytable
    Running setup.py install for pycrypto ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-1cQAUC/pycrypto/setup.py'"'"'; __file__='"'"'/tmp/pip-install-1cQAUC/pycrypto/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-HiYwyv/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python2.7/pycrypto
         cwd: /tmp/pip-install-1cQAUC/pycrypto/
    Complete output (157 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-2.7
    creating build/lib.linux-x86_64-2.7/Crypto
    copying lib/Crypto/pct_warnings.py -> build/lib.linux-x86_64-2.7/Crypto
    copying lib/Crypto/__init__.py -> build/lib.linux-x86_64-2.7/Crypto
    creating build/lib.linux-x86_64-2.7/Crypto/Hash
    copying lib/Crypto/Hash/hashalgo.py -> build/lib.linux-x86_64-2.7/Crypto/Hash
    copying lib/Crypto/Hash/HMAC.py -> build/lib.linux-x86_64-2.7/Crypto/Hash
    copying lib/Crypto/Hash/MD4.py -> build/lib.linux-x86_64-2.7/Crypto/Hash
    copying lib/Crypto/Hash/SHA384.py -> build/lib.linux-x86_64-2.7/Crypto/Hash
    copying lib/Crypto/Hash/MD5.py -> build/lib.linux-x86_64-2.7/Crypto/Hash
    copying lib/Crypto/Hash/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/Hash
    copying lib/Crypto/Hash/SHA256.py -> build/lib.linux-x86_64-2.7/Crypto/Hash
    copying lib/Crypto/Hash/SHA.py -> build/lib.linux-x86_64-2.7/Crypto/Hash
    copying lib/Crypto/Hash/SHA224.py -> build/lib.linux-x86_64-2.7/Crypto/Hash
    copying lib/Crypto/Hash/MD2.py -> build/lib.linux-x86_64-2.7/Crypto/Hash
    copying lib/Crypto/Hash/RIPEMD.py -> build/lib.linux-x86_64-2.7/Crypto/Hash
    copying lib/Crypto/Hash/SHA512.py -> build/lib.linux-x86_64-2.7/Crypto/Hash
    creating build/lib.linux-x86_64-2.7/Crypto/Cipher
    copying lib/Crypto/Cipher/ARC2.py -> build/lib.linux-x86_64-2.7/Crypto/Cipher
    copying lib/Crypto/Cipher/DES3.py -> build/lib.linux-x86_64-2.7/Crypto/Cipher
    copying lib/Crypto/Cipher/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/Cipher
    copying lib/Crypto/Cipher/Blowfish.py -> build/lib.linux-x86_64-2.7/Crypto/Cipher
    copying lib/Crypto/Cipher/ARC4.py -> build/lib.linux-x86_64-2.7/Crypto/Cipher
    copying lib/Crypto/Cipher/CAST.py -> build/lib.linux-x86_64-2.7/Crypto/Cipher
    copying lib/Crypto/Cipher/PKCS1_OAEP.py -> build/lib.linux-x86_64-2.7/Crypto/Cipher
    copying lib/Crypto/Cipher/DES.py -> build/lib.linux-x86_64-2.7/Crypto/Cipher
    copying lib/Crypto/Cipher/AES.py -> build/lib.linux-x86_64-2.7/Crypto/Cipher
    copying lib/Crypto/Cipher/PKCS1_v1_5.py -> build/lib.linux-x86_64-2.7/Crypto/Cipher
    copying lib/Crypto/Cipher/blockalgo.py -> build/lib.linux-x86_64-2.7/Crypto/Cipher
    copying lib/Crypto/Cipher/XOR.py -> build/lib.linux-x86_64-2.7/Crypto/Cipher
    creating build/lib.linux-x86_64-2.7/Crypto/Util
    copying lib/Crypto/Util/asn1.py -> build/lib.linux-x86_64-2.7/Crypto/Util
    copying lib/Crypto/Util/Counter.py -> build/lib.linux-x86_64-2.7/Crypto/Util
    copying lib/Crypto/Util/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/Util
    copying lib/Crypto/Util/py21compat.py -> build/lib.linux-x86_64-2.7/Crypto/Util
    copying lib/Crypto/Util/_number_new.py -> build/lib.linux-x86_64-2.7/Crypto/Util
    copying lib/Crypto/Util/number.py -> build/lib.linux-x86_64-2.7/Crypto/Util
    copying lib/Crypto/Util/winrandom.py -> build/lib.linux-x86_64-2.7/Crypto/Util
    copying lib/Crypto/Util/py3compat.py -> build/lib.linux-x86_64-2.7/Crypto/Util
    copying lib/Crypto/Util/RFC1751.py -> build/lib.linux-x86_64-2.7/Crypto/Util
    copying lib/Crypto/Util/randpool.py -> build/lib.linux-x86_64-2.7/Crypto/Util
    creating build/lib.linux-x86_64-2.7/Crypto/Random
    copying lib/Crypto/Random/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/Random
    copying lib/Crypto/Random/random.py -> build/lib.linux-x86_64-2.7/Crypto/Random
    copying lib/Crypto/Random/_UserFriendlyRNG.py -> build/lib.linux-x86_64-2.7/Crypto/Random
    creating build/lib.linux-x86_64-2.7/Crypto/Random/Fortuna
    copying lib/Crypto/Random/Fortuna/FortunaGenerator.py -> build/lib.linux-x86_64-2.7/Crypto/Random/Fortuna
    copying lib/Crypto/Random/Fortuna/FortunaAccumulator.py -> build/lib.linux-x86_64-2.7/Crypto/Random/Fortuna
    copying lib/Crypto/Random/Fortuna/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/Random/Fortuna
    copying lib/Crypto/Random/Fortuna/SHAd256.py -> build/lib.linux-x86_64-2.7/Crypto/Random/Fortuna
    creating build/lib.linux-x86_64-2.7/Crypto/Random/OSRNG
    copying lib/Crypto/Random/OSRNG/rng_base.py -> build/lib.linux-x86_64-2.7/Crypto/Random/OSRNG
    copying lib/Crypto/Random/OSRNG/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/Random/OSRNG
    copying lib/Crypto/Random/OSRNG/posix.py -> build/lib.linux-x86_64-2.7/Crypto/Random/OSRNG
    copying lib/Crypto/Random/OSRNG/fallback.py -> build/lib.linux-x86_64-2.7/Crypto/Random/OSRNG
    copying lib/Crypto/Random/OSRNG/nt.py -> build/lib.linux-x86_64-2.7/Crypto/Random/OSRNG
    creating build/lib.linux-x86_64-2.7/Crypto/SelfTest
    copying lib/Crypto/SelfTest/st_common.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest
    copying lib/Crypto/SelfTest/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest
    creating build/lib.linux-x86_64-2.7/Crypto/SelfTest/Cipher
    copying lib/Crypto/SelfTest/Cipher/test_ARC2.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Cipher
    copying lib/Crypto/SelfTest/Cipher/test_pkcs1_15.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Cipher
    copying lib/Crypto/SelfTest/Cipher/test_AES.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Cipher
    copying lib/Crypto/SelfTest/Cipher/test_ARC4.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Cipher
    copying lib/Crypto/SelfTest/Cipher/test_DES.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Cipher
    copying lib/Crypto/SelfTest/Cipher/test_CAST.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Cipher
    copying lib/Crypto/SelfTest/Cipher/test_Blowfish.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Cipher
    copying lib/Crypto/SelfTest/Cipher/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Cipher
    copying lib/Crypto/SelfTest/Cipher/test_pkcs1_oaep.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Cipher
    copying lib/Crypto/SelfTest/Cipher/test_DES3.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Cipher
    copying lib/Crypto/SelfTest/Cipher/common.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Cipher
    copying lib/Crypto/SelfTest/Cipher/test_XOR.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Cipher
    creating build/lib.linux-x86_64-2.7/Crypto/SelfTest/Hash
    copying lib/Crypto/SelfTest/Hash/test_MD4.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Hash
    copying lib/Crypto/SelfTest/Hash/test_MD2.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Hash
    copying lib/Crypto/SelfTest/Hash/test_RIPEMD.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Hash
    copying lib/Crypto/SelfTest/Hash/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Hash
    copying lib/Crypto/SelfTest/Hash/test_SHA256.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Hash
    copying lib/Crypto/SelfTest/Hash/test_HMAC.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Hash
    copying lib/Crypto/SelfTest/Hash/test_SHA.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Hash
    copying lib/Crypto/SelfTest/Hash/common.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Hash
    copying lib/Crypto/SelfTest/Hash/test_SHA384.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Hash
    copying lib/Crypto/SelfTest/Hash/test_SHA224.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Hash
    copying lib/Crypto/SelfTest/Hash/test_MD5.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Hash
    copying lib/Crypto/SelfTest/Hash/test_SHA512.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Hash
    creating build/lib.linux-x86_64-2.7/Crypto/SelfTest/Protocol
    copying lib/Crypto/SelfTest/Protocol/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Protocol
    copying lib/Crypto/SelfTest/Protocol/test_KDF.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Protocol
    copying lib/Crypto/SelfTest/Protocol/test_chaffing.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Protocol
    copying lib/Crypto/SelfTest/Protocol/test_rfc1751.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Protocol
    copying lib/Crypto/SelfTest/Protocol/test_AllOrNothing.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Protocol
    creating build/lib.linux-x86_64-2.7/Crypto/SelfTest/PublicKey
    copying lib/Crypto/SelfTest/PublicKey/test_importKey.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/PublicKey
    copying lib/Crypto/SelfTest/PublicKey/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/PublicKey
    copying lib/Crypto/SelfTest/PublicKey/test_DSA.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/PublicKey
    copying lib/Crypto/SelfTest/PublicKey/test_RSA.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/PublicKey
    copying lib/Crypto/SelfTest/PublicKey/test_ElGamal.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/PublicKey
    creating build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random
    copying lib/Crypto/SelfTest/Random/test_rpoolcompat.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random
    copying lib/Crypto/SelfTest/Random/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random
    copying lib/Crypto/SelfTest/Random/test_random.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random
    copying lib/Crypto/SelfTest/Random/test__UserFriendlyRNG.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random
    creating build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random/Fortuna
    copying lib/Crypto/SelfTest/Random/Fortuna/test_FortunaAccumulator.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random/Fortuna
    copying lib/Crypto/SelfTest/Random/Fortuna/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random/Fortuna
    copying lib/Crypto/SelfTest/Random/Fortuna/test_FortunaGenerator.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random/Fortuna
    copying lib/Crypto/SelfTest/Random/Fortuna/test_SHAd256.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random/Fortuna
    creating build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random/OSRNG
    copying lib/Crypto/SelfTest/Random/OSRNG/test_fallback.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random/OSRNG
    copying lib/Crypto/SelfTest/Random/OSRNG/test_posix.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random/OSRNG
    copying lib/Crypto/SelfTest/Random/OSRNG/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random/OSRNG
    copying lib/Crypto/SelfTest/Random/OSRNG/test_generic.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random/OSRNG
    copying lib/Crypto/SelfTest/Random/OSRNG/test_nt.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random/OSRNG
    copying lib/Crypto/SelfTest/Random/OSRNG/test_winrandom.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Random/OSRNG
    creating build/lib.linux-x86_64-2.7/Crypto/SelfTest/Util
    copying lib/Crypto/SelfTest/Util/test_Counter.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Util
    copying lib/Crypto/SelfTest/Util/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Util
    copying lib/Crypto/SelfTest/Util/test_number.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Util
    copying lib/Crypto/SelfTest/Util/test_asn1.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Util
    copying lib/Crypto/SelfTest/Util/test_winrandom.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Util
    creating build/lib.linux-x86_64-2.7/Crypto/SelfTest/Signature
    copying lib/Crypto/SelfTest/Signature/test_pkcs1_15.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Signature
    copying lib/Crypto/SelfTest/Signature/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Signature
    copying lib/Crypto/SelfTest/Signature/test_pkcs1_pss.py -> build/lib.linux-x86_64-2.7/Crypto/SelfTest/Signature
    creating build/lib.linux-x86_64-2.7/Crypto/Protocol
    copying lib/Crypto/Protocol/KDF.py -> build/lib.linux-x86_64-2.7/Crypto/Protocol
    copying lib/Crypto/Protocol/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/Protocol
    copying lib/Crypto/Protocol/Chaffing.py -> build/lib.linux-x86_64-2.7/Crypto/Protocol
    copying lib/Crypto/Protocol/AllOrNothing.py -> build/lib.linux-x86_64-2.7/Crypto/Protocol
    creating build/lib.linux-x86_64-2.7/Crypto/PublicKey
    copying lib/Crypto/PublicKey/ElGamal.py -> build/lib.linux-x86_64-2.7/Crypto/PublicKey
    copying lib/Crypto/PublicKey/RSA.py -> build/lib.linux-x86_64-2.7/Crypto/PublicKey
    copying lib/Crypto/PublicKey/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/PublicKey
    copying lib/Crypto/PublicKey/_slowmath.py -> build/lib.linux-x86_64-2.7/Crypto/PublicKey
    copying lib/Crypto/PublicKey/pubkey.py -> build/lib.linux-x86_64-2.7/Crypto/PublicKey
    copying lib/Crypto/PublicKey/DSA.py -> build/lib.linux-x86_64-2.7/Crypto/PublicKey
    copying lib/Crypto/PublicKey/_RSA.py -> build/lib.linux-x86_64-2.7/Crypto/PublicKey
    copying lib/Crypto/PublicKey/_DSA.py -> build/lib.linux-x86_64-2.7/Crypto/PublicKey
    creating build/lib.linux-x86_64-2.7/Crypto/Signature
    copying lib/Crypto/Signature/PKCS1_PSS.py -> build/lib.linux-x86_64-2.7/Crypto/Signature
    copying lib/Crypto/Signature/__init__.py -> build/lib.linux-x86_64-2.7/Crypto/Signature
    copying lib/Crypto/Signature/PKCS1_v1_5.py -> build/lib.linux-x86_64-2.7/Crypto/Signature
    running build_ext
    running build_configure
    building 'Crypto.PublicKey._fastmath' extension
    creating build/temp.linux-x86_64-2.7
    creating build/temp.linux-x86_64-2.7/src
    x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -fdebug-prefix-map=/build/python2.7-x6KfBw/python2.7-2.7.17=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/include/ -I/usr/include/python2.7 -c src/_fastmath.c -o build/temp.linux-x86_64-2.7/src/_fastmath.o
    src/_fastmath.c:31:10: fatal error: Python.h: No such file or directory
       31 | #include "Python.h"
          |          ^~~~~~~~~~
    compilation terminated.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-1cQAUC/pycrypto/setup.py'"'"'; __file__='"'"'/tmp/pip-install-1cQAUC/pycrypto/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-HiYwyv/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python2.7/pycrypto Check the logs for full command output.

Bug in AES decryption agent c# code

The agent webshell has a bug that converts the returned decrypted blob data into a string and then converts it back to an array of bytes. While it seems there are no particular problems in exchanging data, it could cause some issues for future use, e.g. Network tunneling.

This code https://github.com/antonioCoco/SharPyShell/blob/master/agent/runtime_compiler/runtime_compiler_aes.cs#L49 should be replaced with something like this:

ICryptoTransform decryptor = rijAlg.CreateDecryptor(rijAlg.Key, rijAlg.IV);
using (MemoryStream msDecrypt = new MemoryStream(encrypted))
{
    using (CryptoStream csDecrypt = new CryptoStream(msDecrypt, decryptor, CryptoStreamMode.Read))
    {
        csDecrypt.Read(encrypted, 0, encrypted.Length);
    }
    plain = msDecrypt.ToArray();
}

Logo Proposal

Hello! I was just reading through your project and I'd like to contribute to it by designing a logo. If you'd want that too, please let me know if there are any specific things you'd want this logo to represent, and if you don't have any I'll just implement my own ideas. Looking forward to hearing from you :)

python3

This project is finished?
can help You if You need this project and support for python3?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.