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

update openldap root dse fp pattern #621

Merged
merged 3 commits into from
Jul 3, 2024

Conversation

gustavoluvizotto
Copy link
Contributor

@gustavoluvizotto gustavoluvizotto commented Jul 2, 2024

Description

Updated the fingerprint matching pattern to identify more OpenLDAP instances.

Motivation and Context

When queried by the RootDSE, OpenLDAP servers could be identified under the objectClass attribute name or structuralObjectClass attribute name. Hence, it is necessary to adapt the current matching pattern to identify such servers.

Here are a few examples:
With objectClass:
https://search.censys.io/hosts/61.222.164.42/data/table#389-TCP-LDAP
With structuralObjectClass:
https://search.censys.io/hosts/213.55.162.229/data/table#636-TCP-LDAP

How Has This Been Tested?

rake tests

Output:

...

Finished in 1 minute 15.75 seconds (files took 17.88 seconds to load)
186303 examples, 0 failures

Randomized with seed 53283

Coverage report generated for RSpec to <path>/recog/coverage. 82 / 82 LOC (100.0%) covered.
...
bin/recog_verify xml/ldap_searchresult.xml

Output:

xml/ldap_searchresult.xml: SUMMARY: Test completed with 69 successful, 0 warnings, and 0 failures

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I have updated the documentation accordingly (or changes are not required).
  • I have added tests to cover my changes (or new tests are not required).
  • All new and existing tests passed.

@gustavoluvizotto
Copy link
Contributor Author

gustavoluvizotto commented Jul 2, 2024

@dtwaddle2-r7 @adfoster-r7 @jira-r7
Can someone review my PR?

<description>OpenLDAP</description>
<example _encoding="base64">
dm9iamVjdENsYXNzMRYEA3RvcAQPT3BlbkxEQVByb290RFNFMA==
</example>
<example _encoding="base64">
BBVzdHJ1Y3R1cmFsT2JqZWN0Q2xhc3MxEQQPT3BlbkxEQVByb290RFNFMBwEDQ
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this might be missing padding or similar; Looks like the the Go test suite fails:

time="2024-07-02T14:38:06Z" level=error msg="error verifying examples in recog-content/xml/ldap_searchresult.xml: base64: (?i-s:\\x04..PENLDAPROOTDSE): illegal base64 data at input byte 60 (BBVzdHJ1Y3R1cmFsT2JqZWN0Q2xhc3MxEQQPT3BlbkxEQVByb290RFNFMBwEDQ)"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indeed. I updated the b64 data. Can you trigger the test again? Thank you

@adfoster-r7
Copy link
Contributor

Tests are passing now; thanks!

@adfoster-r7 adfoster-r7 merged commit 9aa81d4 into rapid7:main Jul 3, 2024
13 checks passed
@gustavoluvizotto gustavoluvizotto deleted the research branch July 3, 2024 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants