Establishing baselines for anomaly detection
Network and server profiling involves establishing "normal" behavior patterns for systems and network traffic. This baseline enables detection of anomalies that may indicate compromise, misconfiguration, or performance issues. Without a baseline, every event looks the same.
Know what's normal so you can spot what's abnormal. A server making outbound DNS queries might be normal - or might indicate C2.
Baseline-aware rules generate fewer alerts because expected behavior is filtered out.
When you know a system's profile, you can quickly determine if activity is suspicious or business-as-usual.
Historical baselines help identify when anomalous behavior started - crucial for timeline building.
A complete server profile captures these attributes. Any deviation from baseline warrants investigation:
| Attribute | Normal Baseline Example | Suspicious Deviation |
|---|---|---|
| Listening ports | Web server: 80, 443, 22 | New port 4444 opened (potential reverse shell) |
| Running processes | nginx, sshd, syslog-ng | Unknown process kworker-update running as www-data |
| Outbound connections | Updates to apt.ubuntu.com, NTP to time.nist.gov | HTTP to unknown IP in Eastern Europe at 3 AM |
| CPU / Memory | Average 15% CPU, 4GB RAM used | Sustained 95% CPU (crypto mining or DDoS participation) |
| DNS queries | Resolves company domains, CDN endpoints | High volume DNS queries to newly registered domains (DGA detection) |
| User logins | Admin SSH from jump box during business hours | Root login via password from external IP at 2 AM |
| Scheduled tasks | Cron: logrotate daily, backup at midnight | New cron entry running curl to download a script every 5 minutes |
This topic extends the Log Basics presentation from Eye House, adding practical profiling techniques for SOC operations.
| Element | What to Baseline | Anomaly Example |
|---|---|---|
| Traffic Volume | Bytes/packets per hour by segment | 10x normal traffic at 3 AM |
| Protocol Distribution | % HTTP, DNS, SMB, etc. | Sudden spike in DNS traffic |
| Connection Patterns | Common src-dst pairs | Workstation connecting to file server directly |
| Port Usage | Expected ports by system type | Web server making outbound port 4444 |
| Geographic Destinations | Normal countries for traffic | Traffic to unexpected foreign IPs |
List of expected services/processes. New unknown process = investigate.
Expected local/domain accounts. New admin account = red flag.
Expected network ports. Unexpected listener = backdoor potential.
Known cron jobs/scheduled tasks. New persistence mechanism = investigate.
| Alert | Without Profile | With Profile |
|---|---|---|
| Outbound SSH from 10.1.2.100 | Unknown - need to research | Web server - should NEVER initiate SSH. High priority! |
| Large file transfer at 2 AM | Suspicious timing | Backup server - scheduled backup window. Expected. |
| New listening port 8080 | Unknown service | Dev server - expected for testing. Verify with owner. |
| Connection to foreign IP | Potentially suspicious | CDN server - expected for content delivery. Normal. |
Start with CMDB or asset management. Know what systems exist.
Use NetFlow/IPFIX to establish traffic patterns over 30+ days.
Review authentication logs, service logs to understand normal behavior.
Profiles change! Review quarterly or after major changes.
Profile Your Critical Assets First: You can't profile everything. Start with crown jewels - domain controllers, database servers, key applications. These are high-value targets where anomaly detection matters most.
Test your understanding of network/server profiling. Score 80% or higher to pass.
1. What is the primary purpose of network/server profiling?
2. A web server suddenly begins making outbound connections to port 4444. Why is this concerning?
3. Which element is NOT typically part of a server profile?
4. How often should system profiles be reviewed and updated?
5. Which systems should be profiled FIRST in a SOC environment?