Windows Firewall Log Analysis: How SOC Teams Detect Hidden Threats Using pfirewall.log
It started with a single outbound connection.
No ransomware alerts. No antivirus popups. No screaming SIEM dashboards.
Just one workstation inside a financial company quietly communicating with an unfamiliar external IP address at 3:12 AM.
The attacker had already bypassed endpoint defenses using a living-off-the-land PowerShell payload. Their malware avoided detection completely. But they made one mistake — Windows Firewall logging was enabled.
Inside pfirewall.log, SOC analysts discovered repeated outbound connections to suspicious infrastructure linked to command-and-control (C2) traffic. That single log file exposed the attacker’s persistence, lateral movement attempts, and data exfiltration behavior.
In modern enterprise environments, firewall logs are often ignored until after a breach. But experienced defenders know the truth:
Windows Firewall logs can reveal cyber attacks long before traditional security tools trigger alerts.
In this guide, you’ll learn how real-world SOC teams use Windows Firewall log analysis to detect suspicious connections, identify malware communication, investigate intrusions, and strengthen enterprise visibility.
Table of Contents
- What Is pfirewall.log?
- Why Firewall Logs Matter in Cybersecurity
- Where Windows Firewall Logs Are Stored
- Understanding Windows Firewall Log Entries
- Real-World Attack Scenario
- Using findstr to Analyze Firewall Logs
- Suspicious Indicators SOC Teams Look For
- Threat Hunting with Firewall Logs
- Detection and Prevention Strategies
- Expert SOC Analyst Tips
- Related Cybersecurity Topics
- FAQ
- Conclusion
What Is pfirewall.log?
pfirewall.log is the native Windows Firewall log file that records network traffic allowed or blocked by Windows Defender Firewall.
This log becomes incredibly valuable during:
- Incident response investigations
- Malware detection
- Outbound traffic analysis
- Lateral movement detection
- Data exfiltration investigations
- Threat hunting operations
- SOC monitoring activities
Unlike antivirus alerts that focus on files or processes, firewall logs reveal actual network behavior.
And in cybersecurity, behavior tells the real story.
Why Firewall Logs Matter in Cybersecurity?
Attackers today rely heavily on stealthy outbound communication.
Once malware infects a system, it usually needs to:
- Contact a command-and-control server
- Download additional payloads
- Exfiltrate stolen data
- Maintain persistence
- Communicate laterally across systems
All of these actions create network traffic.
Even advanced threats eventually “talk” on the network.
That’s where Windows Firewall logs become critical.
Many SOC teams use firewall logging as a lightweight but powerful visibility layer in enterprise Windows environments.
In fact, during several ransomware investigations, analysts discovered suspicious outbound traffic in firewall logs before EDR tools generated alerts.
Where Windows Firewall Logs Are Stored?
By default, Windows Firewall logs are stored here:
C:\Windows\System32\LogFiles\Firewall\pfirewall.log
The log file may not exist if firewall logging is disabled.
You can enable logging through:
- Windows Defender Firewall with Advanced Security
- Group Policy (GPO)
- PowerShell
Enterprise environments often increase log size limits because attackers can generate massive traffic volumes during attacks.
Understanding Windows Firewall Log Entries
A typical firewall log entry may look like this:
2026-05-11 03:12:44 ALLOW TCP 192.168.1.10 45.77.21.55 52133 443
Here’s what it means:
| Field | Description |
| Date & Time | Timestamp of network activity |
| ALLOW / DENY | Whether traffic was allowed or blocked |
| Protocol | TCP, UDP, ICMP, etc. |
| Source IP | Internal system initiating traffic |
| Destination IP | External or internal target |
| Source Port | Temporary outbound port |
| Destination Port | Target service port |
For cybersecurity analysts, these fields provide critical clues.
A suspicious destination IP or unusual port can immediately indicate malicious behavior.
Real-World Attack Scenario: Malware Using HTTPS for C2 Traffic
A healthcare organization in the US experienced unusual outbound traffic spikes overnight.
Initial antivirus scans found nothing.
But SOC analysts reviewing Windows Firewall logs noticed repeated outbound HTTPS connections to a VPS provider in another country.
The traffic pattern showed:
- Connections every 5 minutes
- Outbound traffic on port 443
- Connections from multiple endpoints
- Consistent beaconing behavior
The attackers intentionally used HTTPS because it blends into normal traffic.
However, the firewall logs exposed:
- Unusual connection frequency
- Rare destination IP addresses
- Traffic outside business hours
- Multiple infected systems contacting the same server
Further investigation confirmed a malware infection using encrypted C2 communications.
Without firewall logging, detection would have been delayed significantly.
Using findstr to Analyze Firewall Logs
The following command helps analysts quickly search firewall logs for allowed or denied traffic:
findstr /i "ALLOW DENY" C:\Windows\System32\LogFiles\Firewall\pfirewall.log
What This Command Does:
- findstr searches text inside files
- /i makes the search case-insensitive
- "ALLOW DENY" searches for both allowed and blocked traffic
- The final path points to the Windows Firewall log file
When SOC Analysts Use It:
- Quick triage during investigations
- Checking suspicious outbound traffic
- Reviewing blocked connections
- Searching for attack indicators
- Investigating malware communication
Expected Output
The command returns matching log entries showing network activity.
Example:
2026-05-11 01:22:11 ALLOW TCP 192.168.1.15 104.21.45.67 50122 443
2026-05-11 01:22:14 DENY UDP 192.168.1.15 185.220.101.4 55321 53
Analysts then correlate:
- Destination IPs
- Ports
- Connection timing
- User activity
- Threat intelligence feeds
Suspicious Indicators SOC Teams Look For
1. Unusual Outbound Connections
One of the biggest red flags.
Examples include:
- Connections to rare countries
- Outbound traffic at midnight
- Unexpected cloud hosting providers
- Repeated beaconing patterns
2. Connections to Known Malicious IPs
SOC teams compare firewall logs against:
- Threat intelligence feeds
- IOC databases
- Abuse IP repositories
- Commercial threat platforms
3. Excessive Denied Traffic
Repeated denied connections may indicate:
- Malware attempting communication
- Port scanning activity
- Lateral movement attempts
- Unauthorized tools
4. Beaconing Behavior
Malware often communicates at regular intervals.
Example:
- Every 1 minute
- Every 5 minutes
- Every hour
That repetitive timing pattern is a classic threat hunting indicator.
5. Suspicious Ports
Watch for traffic using:
- 4444
- 1337
- 8080
- 8443
- 9001
- 53 (DNS tunneling)
Threat Hunting with Firewall Logs
Modern threat hunters don’t wait for alerts.
They proactively analyze firewall logs searching for subtle anomalies.
Common Threat Hunting Queries
- Repeated outbound connections
- High-volume denied traffic
- Unusual internal-to-internal traffic
- Rare external destinations
- Connections outside business hours
- Large outbound data transfers
Experienced analysts often combine:
- Firewall logs
- DNS logs
- Proxy logs
- Windows Event Logs
- EDR telemetry
This layered visibility dramatically improves detection accuracy.
Detection and Prevention Strategies
Enable Firewall Logging Enterprise-Wide
Many organizations never enable firewall logging until after a breach.
That’s a costly mistake.
Use Group Policy to enable:
- Allowed connections logging
- Dropped packets logging
- Successful connection logging
Increase Log File Size
The default log size is often too small for enterprise environments.
Increase retention to avoid losing evidence during attacks.
Centralize Logs into SIEM
Send firewall logs into:
- Splunk
- Microsoft Sentinel
- QRadar
- Elastic Stack
- Graylog
Centralization enables:
- Correlation rules
- Threat intelligence matching
- Automated alerting
- Behavior analytics
Use Threat Intelligence Enrichment
Automatically compare destination IPs against:
- C2 infrastructure lists
- Known malware servers
- TOR exit nodes
- Botnet indicators
Monitor Outbound Traffic Aggressively
Most organizations focus heavily on inbound threats.
But outbound traffic often exposes compromised systems faster.
Expert SOC Analyst Tips
1. Baseline Normal Traffic
You can’t detect anomalies without understanding normal behavior first.
Track:
- Regular cloud services
- Common update servers
- Business applications
- Remote worker patterns
2. Investigate Repeated Connections
Even “allowed” traffic can be malicious.
Attackers often hide inside normal-looking HTTPS traffic.
3. Correlate with Process Monitoring
Combine firewall logs with:
- Sysmon Event ID 3
- PowerShell logs
- Process creation events
- DNS activity
This creates powerful visibility into attacker behavior.
4. Watch for LOLBins
Living-off-the-land binaries like:
- powershell.exe
- certutil.exe
- mshta.exe
- rundll32.exe
often generate suspicious outbound traffic.
5. Analyze Traffic Timing
Many attacks occur:
- After business hours
- On weekends
- During holidays
Timing analysis is surprisingly effective.
Related Cybersecurity Topics You Should Explore
- USB Devices Are Quietly Stealing Corporate Data — Event ID 2003 Exposes Everything
- Hackers Love PowerShell: How Event ID 4104 Exposes Stealth Windows Attacks
- Hackers Love Privileged Access: How Event ID 4672 Exposes Silent Windows Attacks
- Windows Event IDs 1116, 5025, and 5156 Could Reveal an Active Cyber Attack
- Hackers Love RDP: How SOC Teams Detect Suspicious Windows Remote Desktop Logins
- Windows Event IDs 106, 140, and 141 Could Reveal Hidden Malware Persistence
FAQ
Does Windows Firewall log all network traffic?
No. Logging depends on firewall configuration. Administrators must enable logging for allowed and/or dropped connections.
Can attackers disable firewall logging?
Yes. Advanced attackers may attempt to disable logging or clear log files. Monitoring configuration changes is critical.
What is the difference between ALLOW and DENY entries?
ALLOW means traffic was permitted. DENY means Windows Firewall blocked the connection attempt.
Are firewall logs useful for ransomware investigations?
Absolutely. Firewall logs can reveal command-and-control communication, lateral movement, and exfiltration traffic.
Can firewall logs help detect insider threats?
Yes. Unusual outbound connections, large data transfers, or unauthorized destinations may indicate insider activity.
Should small businesses enable firewall logging?
Definitely. Even small organizations benefit from network visibility during incidents.
What tools can analyze pfirewall.log?
Common tools include:
- Splunk
- Microsoft Sentinel
- Elastic Stack
- PowerShell scripts
- Command-line utilities like findstr
Conclusion
Cybersecurity isn’t just about blocking malware anymore.
Modern defenders must understand network behavior.
And hidden deep inside Windows systems, pfirewall.log quietly records the evidence many attackers hope nobody notices.
For experienced SOC analysts, firewall logs are more than text files — they’re forensic goldmines.
A single outbound connection can expose:
- Malware infections
- Data exfiltration
- Lateral movement
- C2 communication
- Insider threats
- Persistence mechanisms
In a world where attackers increasingly use stealth, encryption, and legitimate tools, network visibility remains one of the strongest defensive advantages.
And sometimes, the difference between stopping an attack early and suffering a full-scale breach comes down to whether someone reviewed the firewall logs in time.









