Skip to content

About

Python security analysis tool for examining authentication logs, identifying suspicious login patterns, and supporting incident investigations.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

🔐 Auth Log Analyzer

Python | Log Analysis | Security Monitoring

A Python cybersecurity project focused on authentication log analysis and the investigation of potentially suspicious login activity.

Overview

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.

Technical Focus

  • Authentication event analysis
  • Failed login investigation
  • Suspicious login pattern identification
  • Security log processing
  • Python-based analysis workflows
  • Defensive security automation

Architecture

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
Loading

Technology Stack

Technology Purpose
Python Log processing
Authentication logs Security event data
Linux Security analysis environment
Git / GitHub Source control

Development Roadmap

  • 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

Security Research

This project supports defensive security learning, log investigation, and authorized analysis.

Getting Started

Clone the repository:

git clone https://github.com/cabralisjota/auth-log-analyzer.git
cd auth-log-analyzer

Developer

GitHub: @cabralisjota

Interests: Cybersecurity, Python, network security, security automation, and IoT.


Additional Project Documentation

Auth Log Analyzer

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.

Why I built it

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.

How it works

  1. Reads auth.log line by line
  2. Finds lines containing "Failed password"
  3. Extracts the source IP with a regular expression
  4. Counts failures per IP using a dictionary
  5. Flags any IP over the threshold (default: 3)

Usage

python analyzer.py

Example output

=== Failed Login Report ===
SUSPICIOUS: 203.0.113.5 - 5 failed attempts
ok: 198.51.100.7 - 1 failed attempts

Notes

  • auth.log is sample data with fake entries, using documentation-reserved IP ranges.
  • Change THRESHOLD at the top of analyzer.py to adjust sensitivity.
  • Built and committed entirely from a phone using Termux.

Ideas for next steps

  • 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)

About

Python security analysis tool for examining authentication logs, identifying suspicious login patterns, and supporting incident investigations.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages