Forum Discussion

HA13029's avatar
HA13029
Brass Contributor
Feb 14, 2025
Solved

KQL to match URL FW LOGS and Threatfox URL feeds

Hi all, I try to match RequestURL field (in CommonSecurityLog) from a Fortigate FW with URL Haus live feeds. The query does not produce any errors but it doesn't match anything. let ThreatFox = ex...
  • HA13029's avatar
    HA13029
    Feb 17, 2025

    Hello,

     

    Finally got it !

    let ThreatFox = externaldata(URL: string, Data:string ) ["https://threatfox.abuse.ch/export/csv/recent/"] with (format="txt", ignoreFirstRecord=True);
    let ThreatFoxUrl = ThreatFox
    | where URL contains "url"
    | extend URL = replace_string(URL, "\"", "")
    | extend URL = replace_string(URL, "\x20", "")
    | extend parse_csv(URL)
    | extend URL = URL[2];
    CommonSecurityLog
    | where isnotempty(RequestURL)
    | where RequestURL has_any (ThreatFoxUrl)

     

    Many thanks for your help !

Resources