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 LDAP fingerprints for Windows #630

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gustavoluvizotto
Copy link
Contributor

Description

I noticed that Windows AD instances could reply with the domainControllerFunctionality attribute before or after the OID from the supportedCapabilities attribute that determines it as ADC or LDS. I fixed the Windows fingerprints to allow the identification of such servers.

Motivation and Context

There is no current open issue related to the current change. I observed the behavior of a few instances of LDAP servers and updated their fingerprints.

How Has This Been Tested?

I tested manually against LDAP servers in my research. I could identify the servers as AD, whereas before, I identified them as Windows Server (without AD). However, the auto testers are not passing now. I added s to the regex pattern (?im: of the fingerprints. For example:

(?ims:(?:1.2.840.113556.1.4.1851.*domainControllerFunctionality1.{1,5}\x04\x013)|(?:domainControllerFunctionality1.{1,5}\x04\x013.*1.2.840.113556.1.4.1851))

Rationale: I wrote a Golang application that uses the recog-go lib. Then, the Go regex indicates that s "let . match \n", which is necessary. However, the ruby auto testers does not recognize such letter:

rake tests
...
An error occurred while loading ./spec/lib/fingerprint_self_test_spec.rb.
Failure/Error: db = Recog::DB.new(xml_file_name)

RegexpError:
  undefined group option: /(?ims:(?:1.2.840.113556.1.4.800.*domainControllerFunctionality1.{1,5}\x04\x017)|(?:domainControllerFunctionality1.{1,5}\x04\x017.*1.2.840.113556.1.4.800))/
...
Finished in 0.00005 seconds (files took 8.01 seconds to load)
0 examples, 0 failures, 1 error occurred outside of examples
...

Removing the s, the issue disappears.

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.

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.

1 participant