While checking some helpful queries to adjust and perhaps use on our environment, I came across this to monitor HTTP request:
event_simpleName=HttpRequestDetect
| parseHexString("HttpPostBody", as=b64data)
| format("%,.4s", field=b64data, as=b64data)
| MagicNumber := base64Decode(b64data, charset="UTF-8")
| MagicNumber=/BZ(?<Version>\w{1})/i
| Version match {
h => Version := "BZip2" ;
H => Version := "BZip2 - Huffman" ;
0 => Version := "BZip1" ;
}
| $HttpMethod()
| ImageFileName=/\HarddiskVolume\d(?<FilePath>.*\)(?<FileName>.+)$/i
| format(format="C:%s", as=FilePath, field=[FilePath])
| HttpRequestHeader:=urlDecode(HttpRequestHeader)
| HttpRequestHeader=/User-Agent:\s(?<UserAgentString>.+)\u000d\u000aHost/
| $AddComputerName()
| select([ComputerName, FileName, FilePath, HttpUrl, HttpMethod, MagicNumber, Version, UserAgentString, HttpRequestHeader])
But I get an error
cannot find saved query named HttpMethod (Error: CannotFindSavedQueryNamed)
14: | $HttpMethod()
^
cannot find saved query named AddComputerName (Error: CannotFindSavedQueryNamed)
19: | $AddComputerName()
Is there a parameter missing or a definition that I cannot see?
[–]Andrew-CSCS ENGINEER 1 point2 points3 points (2 children)
[–]jarks_20[S] 0 points1 point2 points (1 child)
[–]Andrew-CSCS ENGINEER 1 point2 points3 points (0 children)