Skip to content

Implement Custom Error Response Pages #43

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: v2.0
Choose a base branch
from

Conversation

Ansh5748
Copy link
Contributor

Description

This PR implements customizable error pages that appear to contain sensitive system information to keep attackers engaged longer. The error pages serve as honeytokens, encouraging attackers to spend more time investigating, which allows for better intelligence gathering about their techniques and intentions.

Changes Made

Created a modular error handling system with the following components:

  • custom_error_routes.py: Blueprint for error-related routes and error handler registration
  • error_config.py: Configuration and data generation for error pages
  • templates/custom_error.html: Template for error pages with fake sensitive information
  • Added init.py to properly expose the error handling functionality
  • Modified logserver.py to use the new error handling system

Added features to make error pages appear to contain sensitive information:

  • Server version and environment details
  • Database connection status
  • Configuration file paths
  • System user information
  • Active modules
  • Log file locations
  • Unique request and error reference IDs

How to Test
Start the Flask logging server:

python -m flask_logging_server.logserver

Screenshots

Screenshot 2025-04-22 103923

Related Issue
Closes #42 - Custom Error Response Pages
@gtheodoridis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Custom Error Response Pages
1 participant