API gateway command
The api-gateway
command is used to configure and manage AWS API Gateway for the purpose of IP address rotation. This configuration is written to .api_gateway_config.json
by default. This allows you to make requests from a pool of different IP addresses, which can be useful for avoiding rate limiting.
Note that the only module that makes an HTTP request is lazyload
. So, the configuration generated by this module will only work there.
Usage
js-recon api-gateway [options]
Options
Option | Alias | Description | Default | Required |
---|---|---|---|---|
--init | -i | Initialize the config file and create a new API Gateway. | false | No |
--destroy <id> | -d | Destroy the API with the given ID. | No | |
--destroy-all | Destroy all APIs created by this tool in all regions. | false | No | |
--region <region> | -r | AWS region to create the API in. | random region | No |
--access-key <access-key> | -a | AWS access key. Uses AWS_ACCESS_KEY_ID env var if not provided. | No | |
| -s | AWS secret key. Uses AWS_SECRET_ACCESS_KEY env var if not provided. | No | |
--config <config> | -c | Name of the config file (if different from the default) | .api_gateway_config.json | No |
--list | -l | List all APIs created by this tool. | false | No |
--feasibility | Check the feasibility of using API Gateway for a target. | false | No | |
--feasibility-url <url> | URL to check the feasibility of. | No |
Examples
Initialize API gateway
Create a new API Gateway and save its configuration:
js-recon api-gateway --init
List created APIs
List all the API gateways this tool creates:
js-recon api-gateway --list
Destroy an API
Destroy a specific API Gateway using its ID:
js-recon api-gateway --destroy <api-id>
Destroy all APIs
Destroy all APIs created by this tool in all regions:
js-recon api-gateway --destroy-all
Check feasibility
Check if a target URL returns a response that contains known traces of a firewall. If the result says firewall detected, then it means that the target has blocked the IP addresses originating from the AWS infrastructure.
js-recon api-gateway --feasibility --feasibility-url https://example.com