Skip to content

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