URI requests from single client
Description
'This finds connections to server files requested by only one client. Effective when actor uses static operational IP addresses. Threshold can be modified. Larger execution window increases reliability of results.'
Query · kql
let clientThreshold = 1; let scriptExtensions = dynamic([".php", ".aspx", ".asp", ".cfml"]); let data = W3CIISLog | where csUriStem has_any(scriptExtensions) // find sucessfull connection |where scStatus == 200 //Exclude local addresses, needs editing to match your network configuration using ipv4_is_private operator |where ipv4_is_private(cIP) == false and cIP !startswith "fe80" and cIP !startswith "::" and cIP !startswith "127." // excluded internal web page |where ipv4_is_private(sIP) == false | summarize StartTime = min(TimeGenerated), EndTime = max(TimeGenerated), makelist(cIP), dcount(TimeGenerated) by csUriStem, sSiteName, csUserAgent; data | mvexpand list_cIP | distinct StartTime, EndTime, tostring(list_cIP), csUriStem, sSiteName, csUserAgent | summarize StartTime = min(StartTime), EndTime = max(StartTime), dcount(list_cIP), makelist(list_cIP), makelist(sSiteName) by csUriStem, csUserAgent | where dcount_list_cIP == clientThreshold //Selects user agent strings that are probably browsers, comment out to see all | where csUserAgent startswith "Mozilla" | extend timestamp = StartTime, UserAgentCustomEntity = csUserAgent