A CLI HTTP shell to connect to remote shells
Project description
Netshell
A lightweight HTTP CLI Shell that enables custom command injection into vulnerable web applications with a familiar shell-like interface.
Installation
Install using pip:
pip install netshell
or manually by downloading the git repository:
git clone https://github.com/dubniczky/Netshell
Usage
The q query parameter of http://example.com/vln.php is vulnerable to command injections, then the following command connects to it and starts a shell-like environment:
httpshell -a http://example.com/vln.php -p q
Connection successful!
example.com > whoami
www-data
Use httpshell --help for all flags and options.
Command line options:
-h,--help- show this help message and exit--address,-aADDRESS Target address containing the full path. E.g., http://example.com/vulnerable.php--parameter,-pPARAMETER Parameter name where the injection will occur. E.g., 'cmd' for http://example.com/vulnerable.php?cmd=...- -
-cookies,-cCOOKIES Use cookies for the request - -
-agentAGENT Set a custom User-Agent header for the requests --prefix,-PPREFIX Set a custom prefix for the commands. This is usually the command escape. By default there is none. No modifications apply to this, so make sure to encode it properly if needed.--suffix,-SSUFFIX Set a custom suffix for the commands. This is usually the command escape. By default there is none. No modifications apply to this, so make sure to encode it properly if needed.--verbose,-vVerbose output--no-url-encodeDisable URL encoding of commands--no-preflightSkip preflight checks and go straight to the shell interface
Testing
The /test folder contains a simple injectable web server that can be started using Docker Compose.
cd test
docker compose up
The injectable point is at /good path with the p query parameter. By contrast the /bad path is not injectable.
Then starting the shell
netshell -a http://localhost:8000/good -p q
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file netshell-1.0.1.tar.gz.
File metadata
- Download URL: netshell-1.0.1.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
93c8653d9ccad410edaaa94ceaa1c0dc9ddfc7232abf20dc66eee552a42b6b44
|
|
| MD5 |
21b29b0db07a1583b2e5dd9a69a6b9ec
|
|
| BLAKE2b-256 |
0b10ac1fc0428d5d1c1dee3f4930cab7abceee0240caf5e1c80d4428aafb803a
|
Provenance
The following attestation bundles were made for netshell-1.0.1.tar.gz:
Publisher:
publish.yml on dubniczky/Netshell
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
netshell-1.0.1.tar.gz -
Subject digest:
93c8653d9ccad410edaaa94ceaa1c0dc9ddfc7232abf20dc66eee552a42b6b44 - Sigstore transparency entry: 1396711305
- Sigstore integration time:
-
Permalink:
dubniczky/Netshell@2d4e8406cc0edf24463cd591c5a4cd7b9bbc1ff9 -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/dubniczky
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2d4e8406cc0edf24463cd591c5a4cd7b9bbc1ff9 -
Trigger Event:
release
-
Statement type:
File details
Details for the file netshell-1.0.1-py3-none-any.whl.
File metadata
- Download URL: netshell-1.0.1-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
82cd55b91ca4343db92be776ac05c251853c709f6abc87b74e1dfe1aeb67185f
|
|
| MD5 |
0c422e323502e7bdc2a1bdde3d9ac962
|
|
| BLAKE2b-256 |
9621dc6a9c9ed5b1ef849951cdc1a1ee08968ca4c37da18ef023761eaac58143
|
Provenance
The following attestation bundles were made for netshell-1.0.1-py3-none-any.whl:
Publisher:
publish.yml on dubniczky/Netshell
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
netshell-1.0.1-py3-none-any.whl -
Subject digest:
82cd55b91ca4343db92be776ac05c251853c709f6abc87b74e1dfe1aeb67185f - Sigstore transparency entry: 1396711315
- Sigstore integration time:
-
Permalink:
dubniczky/Netshell@2d4e8406cc0edf24463cd591c5a4cd7b9bbc1ff9 -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/dubniczky
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2d4e8406cc0edf24463cd591c5a4cd7b9bbc1ff9 -
Trigger Event:
release
-
Statement type: