Skip to content

The Log File Analyzer is a web-based tool for detecting and analyzing cybersecurity threats like DDoS attacks and Brute Force attempts from server logs. Users can upload log files through an intuitive dashboard, and the system highlights suspicious activities, providing detailed results and visualizations. Built with HTML, CSS, and JavaScript.

Notifications You must be signed in to change notification settings

Harshhrajj/Logfile-analyzer

Repository files navigation

Security Log Analyzer

A Flask-based web application for analyzing security log files to detect potential cyber attacks. The application provides a modern user interface for uploading log files and visualizes the analysis results using interactive charts.

Features

  • Upload and analyze security log files
  • Detect multiple types of attacks:
    • SQL Injection attempts
    • Cross-Site Scripting (XSS)
    • DDoS attacks
    • Brute Force attempts
  • Interactive visualizations using Chart.js
  • Detailed attack analysis with timestamps and IP addresses
  • Download analysis results in JSON or CSV format
  • Drag-and-drop file upload interface

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/security-log-analyzer.git
cd security-log-analyzer
  1. Create a virtual environment (recommended):
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt

Usage

  1. Start the Flask application:
python app.py
  1. Open your web browser and navigate to:
http://localhost:5000
  1. Upload a log file using one of these methods:

    • Click the upload area and select a file
    • Drag and drop a file onto the upload area
  2. View the analysis results:

    • Attack distribution chart
    • IP frequency chart
    • Detailed attack table
    • Statistics summary
  3. Download results:

    • Click "Download JSON" for raw data
    • Click "Download CSV" for spreadsheet format

Supported Log Formats

The analyzer supports common log formats including:

  • Apache access logs
  • Nginx access logs
  • Custom log formats with timestamps and IP addresses

Security Considerations

  • Maximum file size: 16MB
  • Allowed file extensions: .log, .txt
  • Files are processed in memory without permanent storage
  • Input sanitization for XSS prevention
  • Secure file handling using Werkzeug

About

The Log File Analyzer is a web-based tool for detecting and analyzing cybersecurity threats like DDoS attacks and Brute Force attempts from server logs. Users can upload log files through an intuitive dashboard, and the system highlights suspicious activities, providing detailed results and visualizations. Built with HTML, CSS, and JavaScript.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •