Skip to main content

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, -a ADDRESS Target address containing the full path. E.g., http://example.com/vulnerable.php
  • --parameter, -p PARAMETER Parameter name where the injection will occur. E.g., 'cmd' for http://example.com/vulnerable.php?cmd=...
  • --cookies, -c COOKIES Use cookies for the request
  • --agent AGENT Set a custom User-Agent header for the requests
  • --prefix, -P PREFIX 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, -S SUFFIX 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, -v Verbose output
  • --no-url-encode Disable URL encoding of commands
  • --no-preflight Skip 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

netshell-1.0.1.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

netshell-1.0.1-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

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

Hashes for netshell-1.0.1.tar.gz
Algorithm Hash digest
SHA256 93c8653d9ccad410edaaa94ceaa1c0dc9ddfc7232abf20dc66eee552a42b6b44
MD5 21b29b0db07a1583b2e5dd9a69a6b9ec
BLAKE2b-256 0b10ac1fc0428d5d1c1dee3f4930cab7abceee0240caf5e1c80d4428aafb803a

See more details on using hashes here.

Provenance

The following attestation bundles were made for netshell-1.0.1.tar.gz:

Publisher: publish.yml on dubniczky/Netshell

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for netshell-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 82cd55b91ca4343db92be776ac05c251853c709f6abc87b74e1dfe1aeb67185f
MD5 0c422e323502e7bdc2a1bdde3d9ac962
BLAKE2b-256 9621dc6a9c9ed5b1ef849951cdc1a1ee08968ca4c37da18ef023761eaac58143

See more details on using hashes here.

Provenance

The following attestation bundles were made for netshell-1.0.1-py3-none-any.whl:

Publisher: publish.yml on dubniczky/Netshell

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page