Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add detection for inbound HTTP/API requests #563

Closed
cqueern opened this issue Sep 29, 2023 · 7 comments · Fixed by #578
Closed

Add detection for inbound HTTP/API requests #563

cqueern opened this issue Sep 29, 2023 · 7 comments · Fixed by #578
Labels
enhancement New feature or request rule Related to a default Application Inspector Rule

Comments

@cqueern
Copy link
Contributor

cqueern commented Sep 29, 2023

Large organizations struggle to create and maintain an inventory of their APIs, so they can consider applying the appropriate security controls for the ones that matter.

If a large organization could leverage App Inspector to identify whether software offers API services (makes API calls or answers API calls) it'd allow them to target that subset of their portfolio for implementation of the appropriate controls.

@cqueern cqueern added the enhancement New feature or request label Sep 29, 2023
@gfs
Copy link
Contributor

gfs commented Oct 4, 2023

@cqueern

Are you specifically interested in instances of calling an endpoint directly with an HTTP request? For example, if you call into an SDK and the SDK makes a request to the API that would be infeasible to detect with Application Inspector. AppInspector already has some coverage depending on lanugage for detecting HTTP requests themselves -

.

If you want to know what endpoints are being called, application inspector also has a rule for detecting urls starting with http or https:

.

Looking over the rules I think what can be feasibly gathered towards this end should already be captured, but how would you expand this coverage? I'm not sure how we could distinguish an API endpoint vs just a URL with a data file in the above queries - the structure of the URL doesn't tell you if an endpoint is an API or not.

@gfs
Copy link
Contributor

gfs commented Oct 4, 2023

You can also potentially leverage CodeQL for a more precise way to find all endpoints in the source.

@cqueern
Copy link
Contributor Author

cqueern commented Nov 3, 2023

Hey thanks @gfs . Those look helpful for sure but not really what I'm looking for. Those would seem to identify code that makes outbound HTTP requests, but I'm hoping for a feature that says, "This code appears to listen for inbound API requests". Not sure I'm explaining it well...

@gfs gfs added the rule Related to a default Application Inspector Rule label Nov 3, 2023
@gfs
Copy link
Contributor

gfs commented Nov 3, 2023

@cqueern Ah, I see. Sorry I misunderstood and thought you were looking for outbound HTTP. I agree, inbound HTTP listeners could be a good addition.

@gfs gfs changed the title Add detection for software that makes or answers API requests Add detection for inbount HTTP/API requests Nov 3, 2023
@gfs
Copy link
Contributor

gfs commented Nov 3, 2023

Updated title to be for a rule/rules for inbound HTTP. For outbound HTTP I think the existing rules cover many cases, but if you have samples that are not detected you'd expect to be detected I can also look into expanding those.

@cqueern cqueern changed the title Add detection for inbount HTTP/API requests Add detection for inbound HTTP/API requests Nov 3, 2023
@gfs
Copy link
Contributor

gfs commented Mar 12, 2024

PR #578 adds some basic Socket and HTTP Listener detections. If you have other examples for other cases you'd want these rules to catch those would be helpful.

@gfs gfs closed this as completed in #578 Mar 13, 2024
@cqueern
Copy link
Contributor Author

cqueern commented Mar 15, 2024

Thank you Team!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request rule Related to a default Application Inspector Rule
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants