Fix NETLOGON_LOGON_QUERY parsing: Add mailslot name alignment#4952
Open
MatrixEditor wants to merge 1 commit intosecdev:masterfrom
Open
Fix NETLOGON_LOGON_QUERY parsing: Add mailslot name alignment#4952MatrixEditor wants to merge 1 commit intosecdev:masterfrom
MatrixEditor wants to merge 1 commit intosecdev:masterfrom
Conversation
Member
|
Hi and thanks for the PR ! Could you add the example packet you provided to the unit tests, at the end of this file: scapy/test/scapy/layers/ldap.uts Line 211 in b1add1f |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4952 +/- ##
==========================================
- Coverage 80.30% 80.30% -0.01%
==========================================
Files 379 379
Lines 93102 93102
==========================================
- Hits 74767 74766 -1
- Misses 18335 18336 +1
🚀 New features to boost your workflow:
|
gpotter2
requested changes
Mar 23, 2026
Comment on lines
945
to
+949
| StrNullField("MailslotName", ""), | ||
| ConditionalField( | ||
| ByteField("MailslotPad", default=0x00), | ||
| lambda pkt: (len(pkt.MailslotName) + 1) % 2 != 0 | ||
| ), |
Member
There was a problem hiding this comment.
Suggested change
| StrNullField("MailslotName", ""), | |
| ConditionalField( | |
| ByteField("MailslotPad", default=0x00), | |
| lambda pkt: (len(pkt.MailslotName) + 1) % 2 != 0 | |
| ), | |
| PadField(StrNullField("MailslotName", ""), 2), |
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.
As described in MS-ADTS "6.3.1.4 NETLOGON_LOGON_QUERY", the "MailslotName" field must be "aligned to an even byte boundary, with padding (bytes of value 0) to the next even byte boundary as necessary.".
This pull request fixes parsing
NETLOGON_LOGON_QUERYmessages by adding an optional padding byte.