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.
If required, you can disable API scanning by deselecting the Parse API definitions crawl option in the Miscellaneous section of your scan configuration.
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.
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:
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:
GET and POST) in the API definition as its own endpoint. For example, if a definition had three servers, each with GET and POST methods, then Burp Scanner would identify six endpoints.
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:
Burp Scanner does not support endpoints that require any of the following to be present in the request:
array. JSON body parameters of this type are supported.
XML.
JSON parameters in an application/x-www-form-urlencoded body.
JSON. Body parameters of this type are supported.
multipart.
To find out why Burp Scanner has skipped an endpoint, check the event log.