The Nen-Book
LinkedinTwitterMediumGithubHTB
  • Whoami
  • Walkthroughs & Writeups
    • My CTF Methodology
    • Hack The Box Machines
      • Administrator
      • Escape two
      • Cicada
      • HTB Permx Machine(CVE-2023–4220 Chamilo LMS)
    • Intigriti 1337Up 2024
      • Intigriti 1337Up 2024-CTF OSINT Challenges
      • Intigriti 1337Up Live 2024-CTF Web Challenges
    • CyCTF Quals 2024
      • OSINT Challenges CyCTF Quals 2024
      • Old Friend OSINT Challenge CyCTF 2024 Quals Writeup
    • PicoCTF
      • PicoCTF 2024 Web Exploitation Challenges
      • PicoCTF 2024 General Skills Challenges
      • PicoCTF 2021 Web Exploitation Challenges Walkthrough
      • PicoCTF 2019 Web Exploitation Challenges
  • Web_AppSec
    • Web_Recon
    • SQli
    • ATO
    • Backend_Technology_Tricks
    • XSS
    • SSRF
    • CSRF
    • XXE
    • SSTI
    • Insecure_Deserialization
    • Open_Redirects
    • Information_Disclosures
    • Rate_Limiting
    • Clickjacking
    • Broken Access Control & IDORS
    • Bash_Scripting
    • Authentication_Vulnerabilities
    • App_Logic_Errors
  • Network & AD Pentesting
    • Scanning & Enumeration
    • Active_Directory
      • AD_Overview_&_ Lab Build
      • AD_Initial_Attack_Vectors
      • AD_Post-Compromise_Enumeration
      • AD_Post-Compromise_Attacks
    • Buffer_Overflow_Attacks
    • Web_Applications
    • Privilege_Escalation
  • Cloud_Security
    • AWS Pentesting
  • APISec
    • API_Recon
    • Broken_Access_Control & Info_Leaks
  • Code_Review
    • Source_Code_Review_101
    • Code Review Tools
  • Bug_Hunting
    • Picking_A_BugBounty_Program
    • Writing_A_Good_Report
  • MITRE ATT&CK
    • Introducing the ATT&CK Framework
    • MITRE Engenuity
    • Threat-Informed Defense
Powered by GitBook
On this page
  • Passive Recon
  • Active Recon

Was this helpful?

Edit on GitHub
  1. APISec

API_Recon

Passive Recon

  • find public API documentations by searching the internet for company_name API or company_name developer docs

  • company_name inurl:swagger, This documentation often includes all API endpoints even the private, their input parameters, and sample responses

  • Google Dorking

    • inurl:"/wp-json/wp/v2/users"

    • intitle:"index.of" intext:"api.txt"

    • inurl:"/api/v1" intext:"index of /"

  • Shodan

    • hostname:"targetname.com"

    • content-type: application/json

    • content-type: application/xml

    • wp-json

  • The Wayback Machine

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

    • Test for older Versions ex-> /api/v2/user_emails -> `/api/v1/user_emails

Active Recon

  • Try Fuzzing techniques for discovering API endpoints and resources, the best for APIs is Kite Runner

    • kiterunner:

kr scan HTTP://127.0.0.1 -w ~/api/wordlists/data/kiterunner/routes-large.kite
kr scan https://domain.com/api/ -w routes-large.kite -x 20
kr scan https://domain.com/api/ -A=apiroutes-220828 -x 20
kr brute https://domain.com/api/ -A=raft-large-words -x 20 -d=0
kr brute https://domain.com/api/ -w /tmp/lang-english.txt -x 20 -d=0
  • nmap

    • nmap -sC -sV [target]

    • nmap -p- [target] all ports

    • nmap -sV --script=http-enum [target] -p 80,443,8000,8080

  • amass: amass enum -active/passive -d [target] | grep api

  • Map the the App while intercepting requests

  • try to generate error messages in hopes that the API leaks information about itself

  • understand each API endpoint’s functionality, parameters, and query structure

  • Identify all the possible user data input locations

  • Look out for any authentication mechanisms, including these:

    • Do access tokens expire when updating or resetting passwords?

    • What access tokens are needed?

    • Which endpoints require tokens and which do not?

    • How are access tokens generated?

    • Can users use the API to generate a valid token without logging in?

PreviousAPISecNextBroken_Access_Control & Info_Leaks

Last updated 8 months ago

Was this helpful?

search for other API endpoints by using recon techniques from

Web_Recon