Add 4 new middlewares based on MS-ADTS research#6
Open
j0hnZ3RA wants to merge 1 commit intoMacmod:mainfrom
Open
Add 4 new middlewares based on MS-ADTS research#6j0hnZ3RA wants to merge 1 commit intoMacmod:mainfrom
j0hnZ3RA wants to merge 1 commit intoMacmod:mainfrom
Conversation
New filter middlewares: - P (DNAttributesNoise): Randomly toggle dnAttributes on extensible match filters. AD ignores this field per MS-ADTS 3.1.1.3.1.3.1, adding noise without affecting results. - L (TransitiveEval): Convert equality matches on link attributes (memberOf, member, manager, etc) to LDAP_MATCHING_RULE_TRANSITIVE_EVAL (1.2.840.113556.1.4.1941) per MS-ADTS 3.1.1.3.4.4.3. New BaseDN middlewares: - U (GUIDFormat): Replace BaseDN with <GUID=hex> alternative form per MS-ADTS 3.1.1.3.1.2.4. Requires -o BDNGuid=hex. - I (SIDFormat): Replace BaseDN with <SID=string> alternative form per MS-ADTS 3.1.1.3.1.2.4. Requires -o BDNSid=S-1-... Tested against real Active Directory (Windows Server).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
dnAttributeson extensible match filters. AD ignores this field per MS-ADTS 3.1.1.3.1.3.1, adding noise without affecting query results.memberOf,member,manager, etc.) to useLDAP_MATCHING_RULE_TRANSITIVE_EVAL(1.2.840.113556.1.4.1941) per MS-ADTS 3.1.1.3.4.4.3.<GUID=hex>alternative DN form per MS-ADTS 3.1.1.3.1.2.4. Requires-o BDNGuid=hex.<SID=string>alternative DN form per MS-ADTS 3.1.1.3.1.2.4. Requires-o BDNSid=S-1-....Changes
middlewares/filter/obfuscation.go— 2 new filter middleware functionsmiddlewares/basedn/obfuscation.go— 2 new BaseDN middleware functionsconfig.go— Register 4 new middleware codes (P, L, U, I)middlewares/options.go— 3 new options (BDNGuid, BDNSid, FiltDNAttrNoiseProb)4 files changed, ~75 lines added.
Test plan
go build .):dn:returns same resultsmemberOfquery via matching rule 1941 returns correct members<GUID=hex>accepted as BaseDN, correct results<SID=S-1-5-...>accepted as BaseDN, correct resultsldapx -f PL -b CU -o BDNGuid=... -F 2with ldapsearch through proxy — all transformations applied correctly