0% found this document useful (0 votes)
136 views2 pages

API Security Testing Checklist

This document contains a checklist of 31 API security testing techniques organized into categories for verb tampering, request parameter issues, content type testing, environment testing, and Google dorks. It suggests trying different HTTP methods, wrapping and duplicating IDs, changing data types, testing non-production environments, and searching for exposed API documentation.

Uploaded by

LEO RC
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
136 views2 pages

API Security Testing Checklist

This document contains a checklist of 31 API security testing techniques organized into categories for verb tampering, request parameter issues, content type testing, environment testing, and Google dorks. It suggests trying different HTTP methods, wrapping and duplicating IDs, changing data types, testing non-production environments, and searching for exposed API documentation.

Uploaded by

LEO RC
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Checklist
API Security
API Security

31 Days of API Security Testing

To change versions: api/v3/login → api/v1/login

Check other AuthN endpoints: /api/mobile/login → /api/v3/login /api/magic_link

Verb Tampering: GET /api/trips/1 → POST /api/trips/1 POST /api/trips DELETE /api/trips/1

Try Object IDs in HTTP headers and bodies, URLs tend to be less vulnerable.

Try Numeric IDs when facing a GUID/UUID GET /api/users/6b95d962-df38 → GET /api/users/1

Wrap ID with an array: {"id":111} → {"id":[111]}

Wrap ID with a JSON object: {"id":111} → {"id":{"id":111}}

HTTP Parameter Pollution: /api/profile?user_id=legit&user_id=victim /api/profile?user_id=victim&user_id=legit

JSON Parameter Pollution: {"user_id":legit,"user_id":victim} {"user_id":victim,"user_id":legit}

Wildcard instead of ID /api/users/1 → /api/users/* /api/users/% /api/users/_ /api/users/.

Ruby application HTTP parameter containing a URL → Pipe as the first character and then a shell command.

Developer APIs differs with mobile and web APIs. Test them separately.

Change Content-Type to application/xml and see if the API parse it.

Non-Production environments tend to be less secure (staging/qa/etc.) Leverage this fact to bypass AuthZ,
AuthN, rate limiting & input validation.

Export Injection if you see Convert to PDF feature.

Expand your attack surface and test old versions of APKs IPAs.

Misc

Google Dorks

site:[Link] inurl:api
site:[Link] intitle:"index of" "[Link]"
site:[Link] inurl:/[Link]
site:[Link] ext:wsdl inurl:/%24metadata
site:[Link] ext:wadl
site:[Link] ext:wsdl

Checklist 1
user filetype:wadl
user filetype:wsdl

Check different Content-Types

x-www-form-urlencoded --> user=test


application/json --> {"user": "test"}
application/xml --> <user>test</user>

If it's regular POST data try sending arrays, dictionaries

username[]=John
username[$neq]=lalala

If JSON is supported try to send unexpected data types

{"username": "John"}
{"username": true}
{"username": null}
{"username": 1}
{"username": [true]}
{"username": ["John", true]}
{"username": {"$neq": "lalala"}}

If XML is supported, check for XXE

Gathered By: HolyBugx

Checklist 2

Common questions

Powered by AI

Changing the Content-Type to application/xml affects API security testing by potentially exposing the application to XML-specific vulnerabilities, such as XML External Entity (XXE) attacks. Some APIs might not handle XML payloads securely, leading to the exposure of sensitive data or server-side request forgery, if the application processes and parses the XML inputs without proper validation .

Numeric IDs can be more vulnerable than GUIDs/UUIDs in API security because they are more predictable and easier to guess. Sequential or simple numeric IDs can allow attackers to iterate over them to discover and exploit resources or user data, known as an 'IDOR' (Insecure Direct Object Reference) vulnerability, whereas GUIDs/UUIDs are harder to guess due to their complexity and randomness .

API endpoint testing differs between mobile and web applications, as mobile apps might use different authentication, data handling, or additional endpoints that are not exposed or utilized in web applications. Testers must thus tailor their security tests to account for these differences to effectively identify security vulnerabilities unique to each platform .

Using Google Dorks in API security testing can detect potential vulnerabilities such as exposed configuration files, debug logs, or documentation files like api.yaml, application.wadl, or metadata files that should not be publicly accessible. Google Dorks can find forgotten, misconfigured, or publicly indexed endpoints, thereby identifying potential entry points for further exploitation .

Common methods to test API security vulnerabilities using parameter manipulation include HTTP Parameter Pollution, where multiple parameters with the same name but different values are sent, such as /api/profile?user_id=legit&user_id=victim, and JSON Parameter Pollution, where JSON objects include duplicate keys with different values, like {"user_id":legit,"user_id":victim}. These techniques can exploit APIs that handle parameters incorrectly .

Leveraging non-production environments in API security testing is beneficial because these environments are typically less secure. They may have relaxed security measures such as weaker authentication and authorization controls or insufficient rate limiting and input validation. This allows testers to attempt bypasses and identify vulnerabilities that might not be apparent in a secure production environment .

The use of wildcard characters in API endpoints can be a security risk because it might allow attackers to access unintended resources or bypass restrictions meant to limit access to specific IDs. For example, replacing an ID with a wildcard like * or % in an endpoint such as /api/users/* could inadvertently expose all user data if the API does not properly validate and restrict access .

Testing old versions of APKs and IPAs can expand the attack surface in API security testing because older versions may contain vulnerabilities that have since been patched. These versions might have outdated security mechanisms or exposed endpoints that current versions no longer support, providing additional vectors for an attacker to exploit .

Testing different data types in JSON payloads is important for API security because the system's handling of unexpected or malicious data types can reveal vulnerabilities. For example, sending data types like booleans or complex nested structures instead of expected strings can cause parsing errors, unexpected behavior, or expose applications to injection attacks if proper validation isn't implemented .

Verb tampering is an API security test technique where the HTTP method (verb) used in a request is altered to test for unintended access or functionality. For example, changing a GET request like GET /api/trips/1 to a POST request may expose unintended behaviors or invoke modifications unintended for the original request, revealing insecure method handling .

You might also like