π What is Log Analysis?
Log Analysis is the process of collecting, reviewing, and analyzing log files generated by systems, servers, applications, firewalls, and security devices. SOC analysts use logs to detect cyberattacks, investigate suspicious activities, identify system errors, and monitor security events in real time.
Every action inside a system leaves a digital footprint called a log. By analyzing these logs, security teams can identify brute-force attacks, malware infections, unauthorized access attempts, phishing attacks, and more.
π‘οΈ Why is Log Analysis Important in SOC?
- π Detect suspicious activities and cyberattacks
- π¨ Identify brute-force login attempts
- π§ Monitor phishing and email threats
- π§ Investigate malware infections
- π Monitor network and system behavior
- π Collect evidence during incident response
βοΈ Common Tools Used for Log Analysis
- π οΈ Splunk β Enterprise SIEM and log analysis platform
- π ELK Stack β Elasticsearch, Logstash, and Kibana
- π‘οΈ Wazuh β Open-source security monitoring tool
- π Graylog β Centralized log management
- π§ Linux Commands:
greptailcatlessjournalctl
π SSH Log Analysis
SSH logs help SOC analysts detect unauthorized login attempts, brute-force attacks, and suspicious remote access activities.
π Common SSH Log Locations
/var/log/auth.log(Ubuntu/Debian)/var/log/secure(CentOS/RHEL)
π Find Failed Login Attempts
grep "Failed password" /var/log/auth.log
π§ Example Suspicious Log
Failed password for root from 192.168.1.5 port 45678 ssh2
This indicates someone attempted to log in as the root user using SSH but failed. Multiple failed attempts may indicate a brute-force attack.
π Find Successful SSH Logins
grep "Accepted password" /var/log/auth.log
π§ SMTP Log Analysis
SMTP logs are analyzed to detect spam activity, phishing attempts, email delivery issues, and malicious attachments.
π SMTP Log Locations
/var/log/mail.log/var/log/maillog
π Check Failed Email Deliveries
grep "status=bounced" /var/log/mail.log
π Detect Suspicious Email Activity
grep "authentication failed" /var/log/mail.log
π§ Example SMTP Log
authentication failed for unknown user from 10.10.10.5
This may indicate someone attempting unauthorized access to the mail server.
π Web Server Log Analysis
Web server logs help identify attacks targeting websites and applications.
π Common Web Logs
/var/log/apache2/access.log/var/log/nginx/access.log
π Find Suspicious Requests
grep "wp-login.php" access.log
Repeated requests to login pages may indicate brute-force attempts.
π¨ Common Indicators SOC Analysts Look For
- β Multiple failed login attempts
- π Login attempts from unusual countries
- β οΈ Privilege escalation events
- π¦ Malware execution alerts
- π€ Large outbound data transfers
- π§ Suspicious email attachments
- π Unauthorized account creation
π§ͺ Real-World Example: SSH Brute Force Attack
A SOC analyst notices thousands of failed SSH login attempts from the same IP address.
grep "Failed password" /var/log/auth.log | wc -l
After identifying the attacker's IP address, the analyst blocks the IP using a firewall and investigates whether any accounts were compromised.
π§ Final Thoughts
Log analysis is one of the most important skills for a SOC analyst. Every cyberattack leaves traces inside logs, and understanding how to analyze them helps security teams detect, investigate, and respond to threats effectively.
Whether itβs SSH logs, SMTP logs, firewall logs, or web server logs, mastering log analysis will greatly improve your cybersecurity and incident response skills.
π FTP Log Analysis
FTP logs help SOC analysts identify unauthorized file transfers, brute-force attacks, and suspicious uploads or downloads.
π Common FTP Log Locations
/var/log/vsftpd.log/var/log/proftpd/proftpd.log/var/log/xferlog
π Find Failed FTP Login Attempts
grep "FAIL LOGIN" /var/log/vsftpd.log
π§ Example FTP Log
FAIL LOGIN: Client "192.168.1.10"
Multiple failed FTP login attempts may indicate a brute-force attack.
π€ Detect File Upload Activity
grep "UPLOAD" /var/log/xferlog
π Web Login Attempt Analysis
Web application logs help analysts detect brute-force attacks, credential stuffing, SQL injection attempts, and suspicious login behavior.
π Common Web Server Logs
/var/log/apache2/access.log/var/log/nginx/access.log
π Detect Login Attempts
grep "POST /login" access.log
π§ Example Login Attempt Log
192.168.1.20 - - [25/May/2026:10:22:10] "POST /login HTTP/1.1" 401
Status code 401 indicates failed authentication.
π¨ Detect SQL Injection Attempts
grep "UNION SELECT" access.log
π Detect Access to Admin Panels
grep "/admin" access.log
π₯ Firewall Log Analysis
Firewall logs help identify blocked attacks, port scans, malicious IP addresses, and suspicious network traffic.
π Common Firewall Logs
/var/log/ufw.log/var/log/firewalld
π Find Blocked Connections
grep "BLOCK" /var/log/ufw.log
π§ Example Firewall Log
UFW BLOCK IN=eth0 SRC=10.10.10.5 DST=192.168.1.8 PROTO=TCP DPT=22
This log shows the firewall blocked an incoming SSH connection attempt.
π¦ Malware & Process Log Analysis
SOC analysts monitor system logs and processes to detect malware execution and suspicious activities.
π Find Suspicious Processes
ps aux
π Monitor System Logs
journalctl -xe
π§ Example Suspicious Activity
python3 malware.py running as root
Unexpected scripts running with root privileges may indicate malware infection.
π‘ Network Log Analysis
Network logs help identify unusual traffic patterns, scanning activity, and communication with malicious servers.
π Check Active Connections
netstat -tulnp
π Monitor Live Network Traffic
tcpdump -i eth0
π§ Detect Port Scanning
grep "SYN" firewall.log
Large numbers of SYN packets may indicate a port scanning attack.
π Advanced Log Analysis Techniques
- π§ Correlation Analysis: Compare logs from multiple systems to identify attack patterns.
- β° Timeline Analysis: Track events in chronological order during investigations.
- π GeoIP Analysis: Identify suspicious login locations from different countries.
- π Behavior Analysis: Detect unusual user or system behavior.
- π¨ Alert Tuning: Reduce false positives in SIEM alerts.
- π Threat Hunting: Search logs proactively for hidden threats.
- π¦ IOC Matching: Compare logs with Indicators of Compromise (IOCs).
π οΈ Useful Linux Commands for Log Analysis
tail -f /var/log/auth.log
Monitor logs in real time.
grep "Failed" /var/log/auth.log
Search for failed login attempts.
awk '{print $1}' access.log
Extract IP addresses from logs.
sort access.log | uniq
Remove duplicate log entries.



