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

Parser does not handle MS-WSMV extension (encrypted Kerberos payload) #10

Open
bbannier opened this issue May 22, 2024 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@bbannier
Copy link
Member

bbannier commented May 22, 2024

If HTTP traffic contains Kerberos encrypted traffic it would have a header like

Content-Type: multipart/encrypted;protocol="application/HTTP-Kerberos-session-encrypted";boundary="Encrypted Boundary"

Our current parsing does not handle this. After stripping away the multipart prefix we end up with Message.content_type_parameter = b"protocol=\"application/HTTP-Kerberos-session-encrypted\";boundary=\"Encrypted Boundary\",". When trying to handle this in

if ( self.content_type[0] == b"MULTIPART" ) {
local boundary = self.content_type_parameter.match(/boundary="([^"]*)"/, 1);
if ( ! boundary )
boundary = self.content_type_parameter.match(/boundary=([^ ;]*)/, 1);
self.delivery_mode = DeliveryMode::Multipart;
self.multipart_boundary = b"--" + *boundary + b"--\r\n";
}
we do not anticipate to see something before boundary so we match nothing; this cause a protocol violation when dereferencing boundary which has no value,
self.multipart_boundary = b"--" + *boundary + b"--\r\n";

Zeek's builtin HTTP analyzer does not handle this either and instead reports a weird

#separator \x09
#set_separator  ,
#empty_field    (empty)
#unset_field    -
#path   weird
#open   2024-05-22-09-05-24
#fields name    addl    notice  peer    source
#types  string  string  bool    string  string
line_terminated_with_single_CR  -       F       zeek    CONTENTLINE
#close  2024-05-22-09-05-24
@bbannier bbannier added the enhancement New feature or request label May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant