Network Log Analyzer
A Python-based security log analyzer that detects suspicious authentication activity and generates a security risk report.
Project Objective
The objective of this project is to analyze network log data, identify suspicious login activity, detect potentially targeted accounts and IP addresses, and assess the overall security risk.
Technologies Used
- Python
- CSV
- Visual Studio Code
Key Features
- Loads and analyzes CSV-based network logs
- Counts different types of security events
- Detects suspicious IP addresses based on failed login attempts
- Identifies potentially targeted accounts
- Calculates an overall security risk score
- Generates security alerts with recommended actions
- Saves a detailed security report as a text file
How It Works
- Scans the folder for available CSV log files.
- Allows the user to select a log file.
- Loads and processes the selected security logs.
- Analyzes event types, failed logins, users, and IP addresses.
- Identifies suspicious IPs and potentially targeted accounts.
- Calculates a security risk score and risk level.
- Displays the security report.
- Saves the report as
security_report.txt.
Detection & Risk Logic
The analyzer identifies suspicious activity using threshold-based rules. IP addresses with 5 or more failed login attempts are flagged as suspicious, while repeated failures against the same account are used to identify potentially targeted accounts. A risk score from 0–100 is calculated based on failed login activity, suspicious IPs and targeted accounts.
Results
The program generates a security report containing event statistics, failed login activity, suspicious IP addresses, targeted accounts, security alerts, and an overall risk assessment.
Sample Output

Project Structure
network_log_analyzer.py— Main Python program for analyzing network logs.sample_logs.csv— Sample network log data used for analysis.security_report.txt— Generated security analysis report.screenshots/— Screenshot of the program output.