Skip to main content

Next generation fireprox AWS API endpoint creation utility.

Project description

fireproxng

fireproxng is a refresh of the widely loved fireprox.


WhyInstallationGetting startedUsageExample UsageComing SoonThanks

Check out the Sprocket Security Blog for more details!


Why

The original fireprox project appears to be mostly unchanged and I assume most organizations have transitioned to maintaining an internal version of the tool. We need fireprox to enable continuous penetration testing and would like to open up the updated version of the tool to the public.

fireproxng also includes some evasion features that are not present in the original fireprox. Please see the Thanks section for more information.


Installation

fireproxng be installed from the PyPi using the following command:

pipx install fireproxng

If this tool is not yet availible via PyPi, you can install it directly from the repository using:

pipx install git+https://github.com/puzzlepeaches/fireproxng.git

For development, clone the repository and install it locally using Poetry.

git clone https://github.com/puzzlepeaches/fireproxng.git
cd fireproxng
poetry shell && poetry install

Getting started

fireproxng holds the same functionality as its predecessor, fireprox. The utility now however has been moderized to be more user friendly with argument driven operations along with a more intuitive interface.

fireproxng has four subcommands:

  • create
  • delete
  • list
  • update

All functionality is shared with the original tool. fireproxng can be called using fireproxng or fpng.


Usage

The help menu for the base utility is shown below:

Usage: fireproxng [OPTIONS] COMMAND [ARGS]...

  fireproxng is a tool for deploying AWS API Gateway proxies.

Options:
  -ak, --access_key TEXT          AWS Access Key ID
  -sk, --secret_access_key TEXT   AWS Secret Access Key
  -r, --region [us-east-1|us-east-2|us-west-1|us-west-2|ca-central-1|eu-west-1|eu-west-2|eu-central-1|ap-southeast-1|ap-southeast-2|ap-south-1|ap-northeast-1|ap-northeast-2|sa-east-1|cn-north-1]
                                  AWS Region
  -st, --session_token TEXT       AWS Session Token
  -p, --profile TEXT              AWS Profile
  -h, --help                      Show this message and exit.

Commands:
  create  Create a new fireproxng proxy.
  delete  Delete a fireproxng proxy.
  list    List all fireproxng proxies.
  update  Update a fireproxyng proxy.

All subcommands expect AWS credentials sourced from command line parameters, environment variables, or the aws credentials file (perfered). Major regions are supported.

The environment variables fireproxng can read from are as follows:

  • access_key - AWS_ACCESS_KEY_ID
  • secret_access_key - AWS_SECRET_ACCESS_KEY
  • region - AWS_REGION

To specify a profile in your existing AWS credentials file, use the -p or --profile flag.


Create

An example help menu for the create subcommand is shown below:

Usage: fireproxng create [OPTIONS] TARGET...

When creating a new proxy endpoint, you can specify an arbitrary number of URLs to stage the API gateway. The tool will automatically generate a unique name for the proxy endpoint. For example you can do the following:

fpng create https://example.com https://example.com/api/v1 https://example.com/api/v2

This will stage multiple endpoints with the same name and different api-id values. You can additionally specify a list of URLs from a file:

fpng create /tmp/urls.txt

The file should contain one URL per line.

Output files in JSON format are also supported for tracking created existing endpoints and integrating with existing tools:

fpng create -o /tmp/proxies.json /tmp/urls.txt

Delete

The same goes as above for the delete subcommand with the fireproxng enhanced capability to delete multiple endpoints at once. The help menu for the delete subcommand is shown below:

 Usage: fpng delete [OPTIONS] [PROFILE_NAME] [API_ID]...

An example of the delete command in action is shown below:

fpng delete lvofzv6sc2 n7sark2eei

You can alternatively specify "all" as the API ID to delete all endpoints.

fpng delete all

Similarly to the create subcommand, you can specify a list of API IDs from a file:

fpng delete /tmp/api_ids.txt

List

fireproxng can also list existing API endpoints not in a deleted state. The help menu for the list subcommand is shown below:

 Usage: fpng list [OPTIONS] [PROFILE_NAME]

An example command to list all endpoints is shown below:

fpng list

Update

The update subcommand includes the ability to update the target of an existing endpoint using an API ID. The help menu for the update subcommand is shown below:

 Usage: fpng update [OPTIONS] [PROFILE_NAME] API_ID TARGET

Example Usage

Create multiple API endpoints from the command line using the create subcommand while sourcing from environment variables:

export AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE
export AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
fpng create https://example.com https://example.com/api/v1 https://example.com/api/v2

Delete all API endpoints using the delete subcommand while sourcing credentials from a profile:

fpng delete -p default all

List all API endpoints using the list subcommand while sourcing credentials from the command line:

fpng -ak AKIAIOSFODNN7EXAMPLE -sk wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY list

Coming Soon

Some planned features coming in the next release:

  • Create proxy endpoints across multiple regions
  • Update fireproxng endpoint name when updating target
  • Alternate service usage for proxying traffic
  • Session token handling (This is borken currently and I don't know anyone who uses it)
  • YAML config file support

Thanks

  • The original fireprox of course from ustayready.
  • Evasion features added by the authors of CredMaster.

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

fireproxng-0.0.1.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

fireproxng-0.0.1-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

File details

Details for the file fireproxng-0.0.1.tar.gz.

File metadata

  • Download URL: fireproxng-0.0.1.tar.gz
  • Upload date:
  • Size: 12.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.10.8 Darwin/22.1.0

File hashes

Hashes for fireproxng-0.0.1.tar.gz
Algorithm Hash digest
SHA256 8b661d0c276888f2e33c01a14b6142f4afa1f614efe758eef9d8aa59c94a9746
MD5 3cefd43f3da9e15c763c8c3fea71fbd1
BLAKE2b-256 2c172d51f6e1ba572b9b7952c2534875580b0540345727e8997671e642577e61

See more details on using hashes here.

File details

Details for the file fireproxng-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: fireproxng-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 11.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.10.8 Darwin/22.1.0

File hashes

Hashes for fireproxng-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e1d1af0ba5fe32b5b22e5748bb4ca25ee32928cbd869cca75510f2aebfc4c915
MD5 5bc02af0127346c454afaccbf3d4d3d1
BLAKE2b-256 1f437b00678c266d5a868fa40359fb002891be53314326cff3a748f83fbfa847

See more details on using hashes here.

Supported by

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