API Discovery / Reco

ko-fi

Google Dorking

Google Dorks
inurl:"/wp-json/wp/v2/users"
intitle:"index.of" intext:"api.txt"
inurl:"/api/v1" intext:"index of /"
ext:php inurl:"api.php?action="
intitle:"index of" api_key OR "api key" OR apiKey -pool

Git Dorking

Git Dorks
filename:swagger.json
extension: .json

Search GitHub for your target organization’s name paired with potentially sensitive types of information, such as “api key,” "api keys", "apikey", "key", "authorization: Bearer", "access_token", "secret", or “token.”

TruffleHog

 $ sudo docker run -it -v "$PWD:/pwd" trufflesecurity/trufflehog:latest github --org=target-name

Wayback Machine

Finding and comparing historical snapshots of API documentation can simplify testing for Improper Assets Management.

Amass

Fuzzing

api-endpoints.txt: https://gist.github.com/spenkk/af31fd6c4ebeaa15cf6996826109334a

Documentation

Docs - subdomains

API Subdomains

API endpoints

Known API

API Detector

Kiterunner

Run with authorization header

GraphQL endpoint

Detect the Programming Language

Header X-Powered-By:

  • PHP/x.x.x – the API is written in PHP

  • ASP.NET – the API is written in C#

  • Express – this API is written in NodeJS

  • Next.js – this API is written in NodeJS for use with the React framework

  • PleskLin – this API was written in PHP

Other headers:

  • Server – this header will occasionally contain information about the server software being used. For example, Microsoft-IIS/x.x or nginx.

  • X-AspNet-Version – this header will be present if the API is written in ASP.NET and can help you determine which version is being used.

  • X-AspNetMvc-Version – this header is present when an API is written in ASP.NET MVC.

  • Set-Cookie – while it’s not a guarantee, some languages have distinct cookie patterns that may give away what technology is in use. For example, ASP.NET_SessionId, JSESSIONID or PHPSESSID

  • X-Runtime – this header is often used in Ruby on Rails applications and can give you a good indication that the API is written in Ruby.

Generate verbose errors, stack trace

Finding hidden parameters

Fuzzing

Refer to API Endpoints and check Web Enumeration - Parameter Fuzzing (Arjun, etc.)

Burp - Param Miner

Burp - Content Discovery Tool

Interesting Books

Interesting Books

Disclaimer: As an Amazon Associate, I earn from qualifying purchases. This helps support this GitBook project at no extra cost to you.

Support this Gitbook

I hope it helps you as much as it has helped me. If you can support me in any way, I would deeply appreciate it.

ko-fi

buymeacoffee

Last updated