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

[Go]: Add Improper LDAP Authentication query #762

Closed
1 of 2 tasks
maikypedia opened this issue Jun 4, 2023 · 13 comments
Closed
1 of 2 tasks

[Go]: Add Improper LDAP Authentication query #762

maikypedia opened this issue Jun 4, 2023 · 13 comments
Assignees
Labels
All For One Submissions to the All for One, One for All bounty

Comments

@maikypedia
Copy link

Query PR

github/codeql#13366

Language

GoLang

CVE(s) ID list

CWE

CWE-287

Report

This query covers Improper LDAP Authentication, that con occur when an application uses user-supplied data to establish a connection to a LDAP server.

I used a dataflow configuration looking for UntrustedFlowSource flowing to the password used in LDAP binding.

In order to avoid false positives I used RegexpCheck and equalityAsSanitizerGuard as barriers. For equalityAsSanitizerGuard I have taken as an example the equalityAsSanitizerGuard used in SSRF query. The difference here is that the query will consider whether the string to be compared is empty or not (this should avoid several possible FP)

Are you planning to discuss this vulnerability submission publicly? (Blog Post, social networks, etc).

  • Yes
  • No

Blog post link

No response

@maikypedia maikypedia added the All For One Submissions to the All for One, One for All bounty label Jun 4, 2023
@jorgectf jorgectf self-assigned this Jun 13, 2023
@jorgectf
Copy link
Contributor

👋 @maikypedia

Thank you for your contribution!

This reminds me of github/codeql#5444, but using user-controlled data instead 🚀
What do you think about also adding an empty string as a source in your query (like this)?

@maikypedia
Copy link
Author

maikypedia commented Jun 18, 2023

Hi 👋 @jorgectf, done here 😃 .

@jorgectf
Copy link
Contributor

Hi 👋 @jorgectf, done here 😃 .

🎉

Could you address github/codeql#13366 (comment)? It seems that your query should catch UnauthenticatedBind instead of Bind.

@maikypedia
Copy link
Author

Hi @jorgectf , I didn't realize that in v3 empty password option with Bind is disabled, sorry for the inconvenience 😅

@ghsecuritylab
Copy link
Collaborator

Your submission is now in status Closed.

For information, the evaluation workflow is the following:
Initial triage > Test run > Results analysis > Query review > Final decision > Pay > Closed

@maikypedia maikypedia reopened this Aug 26, 2023
@maikypedia
Copy link
Author

Due to the fact that LDAP version 3 is not vulnerable, it will not be included in the query. However, the reviewer has said that it would make sense to add v2 to the query instead. 😄

@maikypedia
Copy link
Author

Sorry for the delay, it has already been rewritten :)

@ghsecuritylab
Copy link
Collaborator

Your submission is now in status Test run.

For information, the evaluation workflow is the following:
Initial triage > Test run > Results analysis > Query review > Final decision > Pay > Closed

@ghsecuritylab
Copy link
Collaborator

Your submission is now in status Query review.

For information, the evaluation workflow is the following:
Initial triage > Test run > Results analysis > Query review > Final decision > Pay > Closed

@ghsecuritylab
Copy link
Collaborator

Your submission is now in status Final decision.

For information, the evaluation workflow is the following:
Initial triage > Test run > Results analysis > Query review > Final decision > Pay > Closed

@ghsecuritylab
Copy link
Collaborator

Your submission is now in status Pay.

For information, the evaluation workflow is the following:
Initial triage > Test run > Results analysis > Query review > Final decision > Pay > Closed

@xcorail
Copy link
Contributor

xcorail commented Nov 13, 2023

Created Hackerone report 2250587 for bounty 530077 : [762] [Go]: Add Improper LDAP Authentication query

@xcorail xcorail closed this as completed Nov 13, 2023
@ghsecuritylab
Copy link
Collaborator

Your submission is now in status Closed.

For information, the evaluation workflow is the following:
Initial triage > Test run > Results analysis > Query review > Final decision > Pay > Closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
All For One Submissions to the All for One, One for All bounty
Projects
None yet
Development

No branches or pull requests

4 participants