Scanning APIs

Burp Scanner can scan JSON-based API definitions for vulnerabilities. This enables you to discover a larger potential attack surface in your applications.

API scanning works in a similar way to web page scanning, but instead of crawling for web content Burp Scanner crawls for exposed API endpoints. Burp Scanner then audits these endpoints using the same configurations and techniques that it uses when scanning web pages.

Note

If required, you can disable API scanning by deselecting the Parse API definitions crawl option in the Miscellaneous section of your scan configuration.

Starting an API scan

By default, Burp Scanner attempts to scan any API definitions that it encounters as part of its regular crawling activity. You can also provide the URL of an API definition explicitly when launching a scan.

Related pages

Prerequisites for API definitions

Burp Scanner needs to be able to parse an API definition in order to scan it.

Burp Scanner can only parse definitions that meet the following requirements:

Deciding what parameters to send in the crawl

When crawling an API definition, Burp Scanner sends a series of requests to identify potential endpoints, along with their supported methods and parameters. Burp Scanner can then derive new locations to crawl and audit based on the endpoints that it discovers.

Depending on the design of the API, each endpoint could have a huge number of potential parameters. For example, an open String parameter with no constraints would have a virtually unlimited number of potential valid inputs.

In these cases, it would be impossible for the crawler to attempt all parameter combinations. However the crawler still needs to try a reasonable number of possible parameter combinations to make sure that it exposes all possible attack surfaces.

As such, Burp Scanner sends requests in line with the following rules:

Scannable endpoint definition

Burp Scanner can only scan API endpoints that meet certain criteria. Any endpoints that do not conform to these criteria are excluded from the scan:

Note

To find out why Burp Scanner has skipped an endpoint, check the event log.