s1ber

API Learning path

API

REST and GraphQL security, authentication, authorization and rate limiting.

11 rooms55 topicsFinish the path, pass the exam: API certificate.

Start for freeOpen in the lab

Learning rooms 3 rooms

Step-by-step lessons with questions.

01Introduction to API Security: REST, JSON and AuthenticationBeginner45 min3 topicsVirtual machine

APIs are the back end of modern applications. REST logic, JSON requests, API keys, Bearer tokens and the core risks of the OWASP API Top 10.

  1. What is an API and how does REST talk?
  2. Authentication methods
  3. OWASP API Security Top 10
02JWT and OAuth 2.0: Token SecurityIntermediate65 min3 topicsVirtual machine

The structure of a JWT, alg=none and weak secret key attacks, kid injection; the OAuth 2.0 authorization code flow, redirect_uri, state and PKCE.

  1. Anatomy of a JWT
  2. Classic JWT attacks
  3. OAuth 2.0 authorization code flow
03Advanced API: GraphQL, Rate Limiting and FuzzingAdvanced75 min3 topicsVirtual machine

GraphQL introspection and depth attacks, rate limit bypass techniques, discovering hidden endpoints and schema-based fuzzing.

  1. GraphQL-specific risks
  2. Rate limiting and bypass
  3. Finding hidden endpoints and fuzzing

Practice tasks 8 rooms

Apply what you learned in a realistic scenario.

01Leaked API Key HuntBeginner34 min6 topicsVirtual machine

An API key may have leaked in the mobile app's JavaScript bundle and in a public GitHub repository. You will find it and verify its validity harmlessly.

  1. Scenario and machine
  2. Download the web app's JavaScript bundle
  3. Search the packet for key-like strings
  4. Run a secret scan over the whole history of the company's public repo
  5. Verify who owns the AWS key with a harmless call
  6. Report and remediation
02Attack Surface from the Swagger DocumentIntermediate34 min6 topicsVirtual machine

The API documentation may be public. You will find the Swagger file for https://api.kurusbank.lab, extract the endpoints and test those that do not require authentication.

  1. Scenario and machine
  2. Try common document paths
  3. List all paths in the document
  4. Find which endpoints have no security definition
  5. Call the unprotected debug endpoint
  6. Report and remediation
03Rate Limit TestingIntermediate28 min5 topicsVirtual machine

Is the login endpoint https://api.kurusbank.lab/v2/auth/login protected against brute force? You will test the rate limit and the ways to bypass it.

  1. Scenario and machine
  2. Look at the response to a single failed login
  3. Send many attempts in a short time
  4. Try to bypass the limit by pretending to change IP with the X-Forwarded-For header
  5. Report and remediation
04API Object Enumeration (IDOR/BOLA)Intermediate28 min5 topicsVirtual machine

You logged in with your own account (id=1001). You will test whether other people's accounts can be reached on the https://api.kurusbank.lab/v2/accounts/{id} endpoint.

  1. Scenario and machine
  2. Fetch your own account's details
  3. Try neighboring IDs one by one
  4. Automatically scan the 1000–1100 range
  5. Report and remediation
05Finding Undocumented API EndpointsIntermediate28 min5 topicsVirtual machine

https://api.kurusbank.lab, used by the mobile app, is undocumented. You will find hidden endpoints with real API route lists.

  1. Scenario and machine
  2. Look at the API root response and version info
  3. Scan with a list built from real API routes
  4. Check what the export endpoint in the old version returns
  5. Report and remediation
06GraphQL Security TestingAdvanced40 min7 topicsVirtual machine

The GraphQL endpoint is https://api.kurusbank.lab/graphql. You will test whether the schema is exposed, unauthorised data access and the query depth limit.

  1. Scenario and machine
  2. Confirm the endpoint is GraphQL with a simple query
  3. List every type in the schema with introspection
  4. Learn the fields of the Musteri type
  5. Query another customer's data with your own token (IDOR test)
  6. Test with nested queries whether there is a depth/complexity limit
  7. Report and remediation
07OAuth 2.0 Flow AnalysisAdvanced34 min6 topicsVirtual machine

Kuruşbank uses the "Sign in with Kuruş" OAuth provider (https://auth.kurusbank.lab). You will test redirect_uri validation, the state parameter and code reuse.

  1. Scenario and machine
  2. Read the provider's configuration document (discovery)
  3. Change redirect_uri to another domain and send an authorization request
  4. Test whether the request is accepted without the state parameter
  5. Check whether the authorization code can be used a second time
  6. Report and remediation
08API Parameter FuzzingAdvanced34 min6 topicsVirtual machine

You will find hidden parameters on the https://api.kurusbank.lab/v2/accounts endpoint and how it reacts to unexpected input.

  1. Scenario and machine
  2. Learn the response size of a normal request
  3. Search for hidden query parameters with a wordlist
  4. See what the admin parameter returns
  5. Send an unexpected type of value to the id parameter
  6. Report and remediation

Other learning paths