Observed since 21 Oct, 09:39 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
System log analyzer for detecting suspicious activities
System Log Security Analyzer
Developed by Ahmet KAHRAMAN (AhmetXHero) - Mobile Developer & Cyber Security Expert
LogHero is a powerful command-line tool designed to analyze system log files and detect suspicious security activities. It specializes in identifying SSH brute-force attacks, unauthorized root access attempts, and other security threats across Linux, Windows, and macOS systems.
pip install AhmetX-LogHero
git clone https://github.com/ahmetxhero/AhmetX-LogHero.git
cd loghero
pip install -e .
click, colorama, python-dateutil, tabulate# Analyze a single log file
loghero scan /var/log/auth.log
# Analyze with specific severity filter
loghero scan /var/log/secure --severity HIGH
# Output in JSON format
loghero scan /var/log/auth.log --output json
# Save detailed report
loghero scan /var/log/auth.log --save-report security_report.json
# Analyze all log files in a directory
loghero batch /var/log
# Analyze with specific pattern
loghero batch /var/log --pattern "auth*" --recursive
loghero scan--output, -o: Output format (table, json, csv)--severity, -s: Filter by minimum severity (LOW, MEDIUM, HIGH, CRITICAL)--threat-type, -t: Filter by specific threat type--limit, -l: Limit number of results (default: 50)--quiet, -q: Suppress banner and extra output--save-report: Save detailed report to fileloghero batch--pattern, -p: File pattern to match (default: *.log)--recursive, -r: Search recursively in subdirectoriessu attempts to rootsudo usage╔══════════════════════════════════════════════════════════════╗
║ LogHero v1.0.0 ║
║ System Log Security Analyzer ║
║ Detecting suspicious activities... ║
╚══════════════════════════════════════════════════════════════╝
📁 Analyzing log file: /var/log/auth.log
📊 Analysis Summary:
• Total log entries processed: 15,432
• Total threats found: 23
• Unique source IPs: 8
🚨 Security Threats Detected:
┌─────────────────────┬──────────┬─────────────────────┬─────────────┬──────────────────────────────────┬───────┐
│ Timestamp │ Severity │ Type │ Source IP │ Description │ Count │
├─────────────────────┼──────────┼─────────────────────┼─────────────┼──────────────────────────────────┼───────┤
│ 2024-01-15 14:23:45 │ CRITICAL │ SSH_BRUTE_FORCE │ 192.168.1.100│ SSH brute-force attack: 25 fail...│ 25 │
│ 2024-01-15 13:45:12 │ HIGH │ ROOT_LOGIN_ATTEMPT │ 10.0.0.50 │ Failed direct root login attempt│ 1 │
└─────────────────────┴──────────┴─────────────────────┴─────────────┴──────────────────────────────────┴───────┘
🎯 Top Threatening IPs:
┌─────────────────┬─────────┬───────┬─────────────────────┐
│ IP Address │ Threats │ Score │ Types │
├─────────────────┼─────────┼───────┼─────────────────────┤
│ 192.168.1.100 │ 25 │ 100 │ SSH_BRUTE_FORCE │
│ 10.0.0.50 │ 3 │ 9 │ ROOT_LOGIN_ATTEMPT │
└─────────────────┴─────────┴───────┴─────────────────────┘
💡 Security Recommendations:
1. Consider implementing fail2ban to automatically block IPs
2. Use SSH key authentication instead of passwords
3. Disable direct root login via SSH
4. Implement SSH rate limiting
5. Set up real-time alerts for security events
/var/log/auth.log (Debian/Ubuntu)/var/log/secure (RedHat/CentOS)/var/log/syslog/var/log/system.log/var/log/auth.logLogHero works out of the box with sensible defaults, but you can customize detection thresholds:
su, sudo, and direct root login attemptsWe welcome contributions! Please see our Contributing Guide for details.
pip install --index-url https://test.pypi.org/simple/ AhmetX-LogHero/loghero.git cd loghero pip install -e ".[dev]"
pytest tests/
This project is licensed under the MIT License - see the LICENSE file for details.
Ahmet KAHRAMAN (AhmetXHero) is a Mobile Developer & Cyber Security Expert with 10+ years of experience in Public Sector IT. He specializes in:
"Security first, innovation always" 🚀
⚠️ Security Notice: LogHero is a detection tool. Always implement proper security measures like firewalls, intrusion prevention systems, and regular security updates alongside log monitoring.
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 1.0.0 | 7 Sept 2025 | 4 |
This describes our collected data; it is not a security assessment.
Observed since 21 Oct, 09:39 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:e21aa8d6de43da3db4d2a78140d2056dc671870ab5a2c5176283e18180bb4d76