You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
index=main sourcetype="opnsense:filterlog"
| stats count(bytes) as TotalBytes by dest_ip
Filewall Source IP Most bytes (graphable)
index=main sourcetype="opnsense:filterlog" src_ip="192.168.*"
| stats count(bytes) as TotalBytes by src_ip
Search by country and region for stats (graphable)
host="{FIREWALL}" dest_ip="{WAN}" action=*
| iplocation src_ip
| search Country = China
| stats count by Country, Region, action
out going to countries from internal
host="{FIREWALL}" src_ip="192.168.*" action=*
| iplocation dest_ip
| search Country = *
| stats count by Country
WinEventLog:Security
events pre hour BY sourctype
sourcetype="WinEventLog:Security"
| bin _time span=1h
| eval date_hour=strftime(_time, "%H")
| stats count AS hits first(date_hour) AS date_hour BY _time
| stats avg(hits) BY date_hour
events per hour by Windows EventLogs BY HOST
sourcetype="WinEventLog:Security" EventCode=4673
| timechart span=1h count by host
events per hour by windows EventLogs BY EVENT TYPE
sourcetype="WinEventLog:Security"
| timechart span=1h count by EventCode
Event Log clears in windows
index=* (source="WinEventLog:Security" AND (EventCode=1102 OR EventCode=1100)) OR ((source="WinEventLog:System") AND EventCode=104)
| stats count BY _time EventCode sourcetype host
source="WinEventLog:Security" "EventCode=4723" src_user!="*$" src_user!="_svc_*"
| eval daynumber=strftime(_time,"%Y-%m-%d")
| chart count by daynumber, status
| eval daynumber = mvindex(split(daynumber,"-"),2)
Security Access granted to an Account
sourcetype="WinEventLog:Security" EventCode=4717
| eval Date=strftime(_time, "%Y/%m/%d")
| stats count by src_user, user, Access_Right, Date, Keywords
| rename src_user as "Source Account"
| rename user as "Target Account"
| rename Access_Right as "New Rights Granted"
System Security Access Removed from Account
sourcetype="WinEventLog:Security" EventCode=4718
| eval Date=strftime(_time, "%Y/%m/%d")
| stats count by src_user, user, Access_Right, Date, Keywords
| rename src_user as "Source Account"
| rename user as "Target Account"
| rename Access_Right as "Rights Removed"
Timechart of the status of an Locked Out Account
sourcetype="WinEventLog:Security" EventCode=4625 AND Status=0xC0000234
| timechart count by user
| sort -count
Failed Logon Attempts – Windows
source="WinEventLog:security" EventCode=4625
| timechart span=1h count by host
source="WinEventLog:security" EventCode=4625
| eval Workstation_Name=lower(Workstation_Name)
| eval host=lower(host)
| eval hammer=_time
| bucket span=5m hammer
| stats count sparkline by user host, hammer, Workstation_Name
| rename hammer as "5 minute blocks" host as "Target Host" Workstation_Name as "Source Host"
| convert ctime("5 minute blocks")
Failed Attempt to Login to a Disabled Account
source="WinEventLog:security" EventCode=4625 (Sub_Status="0xc0000072" OR Sub_Status="0xC0000072") Security_ID!="NULL SID" Account_Name!="*$"
| eval Date=strftime(_time, "%Y/%m/%d")
| rex "Which\sLogon\sFailed:\s+\S+\s\S+\s+\S+\s+Account\sName:\s+(?<facct>\S+)"
| eval Date=strftime(_time, "%Y/%m/%d")
| stats count by Date, facct, host, Keywords
| rename facct as "Target Account" host as "Host" Keywords as "Status" count as "Count"
User Logon / Session Duration
source=WinEventLog:Security (EventCode=4624 OR EventCode=4634) (Logon_Type=2 OR Logon_Type=10)
| eval Date=strftime(_time, "%Y/%m/%d")
| eval LogonType=case(Logon_Type="2", "Local Console Access", Logon_Type="10", "Remote Desktop via Terminal Services")
| transaction host user startswith=EventCode=4624 endswith=EventCode=4634
| where duration > 5
| eval duration = duration/60
| eval duration=round(duration,2)
| table host, user, LogonType duration, Date
| rename duration as "Session Duration in Minutes"
| sort ```date
Successful Logons – Windows
source="WinEventLog:security" EventCode=4624 Logon_Type IN (2,7,10,11) NOT user IN ("DWM-*", "UMFD-*")
| eval Workstation_Name=lower(Workstation_Name)
| eval host=lower(host)
| eval hammer=_time
| bucket span=12h hammer
| stats values(Logon_Type) as "Logon Type" count sparkline by user host, hammer, Workstation_Name
| rename hammer as "12 hour blocks" host as "Target Host" Workstation_Name as "Source Host"
| convert ctime("12 hour blocks")
| sort ```"12 hour blocks"