Refine Exchange IIS authentication detection
This commit is contained in:
@@ -39,4 +39,29 @@ public sealed class ExchangeIisLogParserTests
|
||||
Assert.Equal(444, attack.DestinationPort);
|
||||
Assert.Equal("user@example.test", attack.Username);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void IgnoresNormalIisAuthenticationHandshake()
|
||||
{
|
||||
string[] lines =
|
||||
[
|
||||
"#Fields: date time cs-uri-stem cs-username c-ip s-port cs(User-Agent) sc-status sc-substatus",
|
||||
"2026-08-02 04:15:00 /mapi/emsmdb/ - 198.51.100.8 443 Outlook 401 1",
|
||||
"2026-08-02 04:15:01 /mapi/emsmdb/ user@example.test 198.51.100.8 443 Outlook 200 0"
|
||||
];
|
||||
|
||||
Assert.Empty(ExchangeIisLogParser.ParseLines(lines, new DateTimeOffset(2026, 8, 2, 4, 0, 0, TimeSpan.Zero)));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void IgnoresNonCredentialIis401Substatus()
|
||||
{
|
||||
string[] lines =
|
||||
[
|
||||
"#Fields: date time cs-uri-stem cs-username c-ip s-port sc-status sc-substatus",
|
||||
"2026-08-02 04:15:00 /ews/Exchange.asmx - 198.51.100.8 443 401 0"
|
||||
];
|
||||
|
||||
Assert.Empty(ExchangeIisLogParser.ParseLines(lines, new DateTimeOffset(2026, 8, 2, 4, 0, 0, TimeSpan.Zero)));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user