LogShield is a cybersecurity-focused web application that analyzes server and application log files to identify suspicious activities, visualize security events, and generate detailed reports. Built with Python, Flask, SQLite, HTML, CSS, and JavaScript, it helps users understand log analysis and basic threat detection techniques through an intuitive dashboard.
- Upload
.log,.txt, and.csvfiles. - Validate supported file types.
- Securely store uploaded logs for analysis.
Extracts key information such as:
- Timestamp
- IP Address
- Username (if available)
- Event Type
- HTTP Method
- Status Code
- Log Message
Analyze uploaded logs to identify:
- Multiple failed login attempts
- Possible brute-force attacks
- Repeated HTTP 401 Unauthorized responses
- Repeated HTTP 404 errors
- High request rates from a single IP
- Suspicious activity patterns
Alerts are categorized by severity:
- 🟢 Low
- 🟡 Medium
- 🔴 High
View:
- Total Log Entries
- Total Security Alerts
- Failed Login Attempts
- Top Source IP Addresses
- Event Distribution
- Alert Severity Summary
Visualize:
- Event Type Distribution
- Alerts by Severity
- Top Active IP Addresses
- Security Events Over Time
Search logs by:
- IP Address
- Event Type
- Status Code
- Severity
- Date
Generate downloadable reports containing:
- Security Alerts
- Summary Statistics
- Log Analysis Results
- Python 3
- Flask
- SQLite
- Pandas
- HTML5
- CSS3
- JavaScript
- Chart.js
LogShield/
│
├── app.py
├── parser.py
├── analyzer.py
├── report_generator.py
├── database.py
├── models.py
├── requirements.txt
├── README.md
│
├── templates/
│ ├── index.html
│ ├── dashboard.html
│ ├── upload.html
│ ├── logs.html
│ ├── alerts.html
│ └── reports.html
│
├── static/
│ ├── css/
│ ├── js/
│ └── images/
│
└── database.db
Clone the repository:
git clone https://github.com/yourusername/LogShield.gitNavigate to the project:
cd LogShieldInstall dependencies:
pip install -r requirements.txtRun the application:
python app.pyOpen your browser:
http://127.0.0.1:5000
Upload a supported .log, .txt, or .csv file.
The application parses log entries and applies built-in detection rules.
View detected security events along with severity levels and descriptions.
Monitor statistics, charts, and recent activity.
Download CSV reports for further analysis.
Add screenshots inside:
screenshots/
├── home.png
├── upload.png
├── dashboard.png
├── logs.png
├── alerts.png
└── reports.png
- Log Parsing
- Threat Detection Rules
- Failed Login Analysis
- Brute-force Detection
- Event Classification
- Severity-Based Alerts
- CSV Report Export
- Responsive Dashboard
- Real-time log monitoring
- Email alert notifications
- GeoIP lookup for IP addresses
- Threat intelligence integration
- SIEM platform integration
- Machine learning anomaly detection
- User authentication
- PDF report generation
- Docker deployment
- Multi-user support
This project demonstrates knowledge of:
- Security Log Analysis
- Threat Detection
- Incident Monitoring
- Data Visualization
- Flask Web Development
- SQLite Database Integration
- Cybersecurity Fundamentals
LogShield is intended for educational purposes and authorized security monitoring only.
Only analyze log files that you own or have explicit permission to access.
Aashish S
Bachelor of Engineering (Computer Science)
Networking & Cybersecurity Enthusiast
This project is licensed under the MIT License.