Skip to content

Instantly share code, notes, and snippets.

@krlozadan
Last active June 3, 2021 05:59
Show Gist options
  • Save krlozadan/10cd0d09d0a5b09cc922e2b8c049eeb1 to your computer and use it in GitHub Desktop.
Save krlozadan/10cd0d09d0a5b09cc922e2b8c049eeb1 to your computer and use it in GitHub Desktop.
Hacking API Notes

This is a summary of the OWASP YouTube video I watched, hosted by Katie Paxton:

Top 10 API vulnerabilities

1 - Broken Object Level Authorization

Check if the user has access to the resource being edited. You can check this by:

  • Logging out and trying to access the resource OR
  • Logging with a different user credential and try to edit the resource of someone else

2 - Broken User Authentication

  • Check if you can find API keys by Google Dorking
  • Check if the API has some form of generating API keys without securing them
  • Test Login, logout, reset password, etc

3 - Excessive Data Exposure

  • The endpoint returns too much information, it could be sensitive.
  • Check what responses are you getting back.

4 - Lack Resource & Rate Limiting

  • Check if the server has enough resources to match the demand of the users

5 - Broken Function Level Authorization

  • Giving users roles or levels of access, you can check if the API is granting permissions that the user role shouldn't have.
  • Have a lower permission user and a higher permission user and check if they have access to resources they shouldn't

6 Mass Assignment

  • Gives an endpoint the ability to modify things that aren't suposed to be modifyable by it. For example, an ednpoit to edit a user, should be able to change the name, email, etc but not the password. Say with additional parameters.

7 Security Misconfiguration

  • This could be stuff like misconfigured http headers, resource sharing (CORS) and verbose error messages containing sensitive information

8 Injection

  • Unsanitized strings by the API resulting in SQL Injection, or maybe Javascript injection on a mobile app

9 Improper Assets Management

  • This is common when atlking about different API versions. Sometimes the developer leaves versions of an API with bugs or open endpoints with less security

10 Insufficient Logging and Monitoring

  • If you don't have enoough logging how is a team supposed to trace an attack?

Tools

  • Ffuf
  • Kiterunner Http Proxies:
  • Owasp Zap
  • Burp Suite Pro/Community. Check addons: Autorize, InQL (GraphQL) Request Crafting:
  • Postman
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment