A Python cybersecurity project focused on authentication log analysis and the investigation of potentially suspicious login activity.
Authentication logs provide valuable information for security monitoring and incident investigation.
This project explores techniques for examining login records and identifying patterns that may warrant further investigation.
- Authentication event analysis
- Failed login investigation
- Suspicious login pattern identification
- Security log processing
- Python-based analysis workflows
- Defensive security automation
flowchart TD
A["Authentication Logs"]
B["Python Log Processing"]
C["Pattern Analysis"]
D["Suspicious Activity Findings"]
E["Security Investigation"]
A --> B
B --> C
C --> D
D --> E
| Technology | Purpose |
|---|---|
| Python | Log processing |
| Authentication logs | Security event data |
| Linux | Security analysis environment |
| Git / GitHub | Source control |
- Expand suspicious-login detection
- Add configurable detection thresholds
- Improve log format compatibility
- Add CSV and JSON reporting
- Develop automated tests
- Add investigation examples
- Explore Sentinel 2.0 integration
This project supports defensive security learning, log investigation, and authorized analysis.
Clone the repository:
git clone https://github.com/cabralisjota/auth-log-analyzer.git
cd auth-log-analyzerGitHub: @cabralisjota
Interests: Cybersecurity, Python, network security, security automation, and IoT.
A small Python tool that scans an SSH authentication log, counts failed login attempts per IP address, and flags IPs that exceed a threshold as suspicious.
Brute-force login attempts are one of the most common signs of an attack. This project is my practice at parsing logs and turning raw text into a simple security report.
- Reads
auth.logline by line - Finds lines containing "Failed password"
- Extracts the source IP with a regular expression
- Counts failures per IP using a dictionary
- Flags any IP over the threshold (default: 3)
python analyzer.py
=== Failed Login Report ===
SUSPICIOUS: 203.0.113.5 - 5 failed attempts
ok: 198.51.100.7 - 1 failed attempts
auth.logis sample data with fake entries, using documentation-reserved IP ranges.- Change
THRESHOLDat the top ofanalyzer.pyto adjust sensitivity. - Built and committed entirely from a phone using Termux.
- Accept a log file path as a command-line argument
- Output the report to a file
- Add time-window detection (many failures within a minute)