This honeypot is designed to simulate various administrative and system paths to attract and log unauthorized access attempts. It serves different pages based on the requested path, including a login page, server status, API data, and system information. It also logs interactions, including form submissions, to help analyze potential security threats.
- Dynamic Paths: Handles various paths to simulate a real admin dashboard and system status.
- Logging: Logs all interactions, including POST request body data and general access details.
- Form Handling: Includes form logging to capture data submitted through the login form.
- Error Handling: Provides a custom 404 page for unknown paths.
- Node.js (>= 12.x)
- npm (Node Package Manager)
-
Clone the Repository
git clone https://github.com/Het-Joshi/HoneyPot_Password-Manager.git cd HoneyPot_Password-Manager
-
Install Dependencies
npm install
-
Create a
.env
FileCreate a
.env
file in the root directory to define environment variables:PORT=3000 RESULT_FILE=log.txt
PORT
: Port number for the server.RESULT_FILE
: File to store log data.
-
Start the Server
npm start
By default, the server will run on port 3000. You can access it at
http://localhost:3000
. -
Access the Application
- Root Path (
/
): Displaysindex.ejs
. - Login Path (
/login
): Displays a login form. - Server Status Path (
/server-status
): Displays server status information. - API Data Path (
/api/v1/data
): Shows sample API data. - Admin Panel Path (
/access
): Lists users and system logs. - Security Alerts Path (
/alerts
): Shows security alerts. - System Info Path (
/config
): Displays system information. - 404 Path: Handles unknown paths.
- Root Path (
- All incoming requests and their details are logged to the file specified in the
RESULT_FILE
environment variable. - Form submissions are logged, including the data entered by users.
- Also logs IP using the
X-Forwarded-For
header
views/
: Contains EJS templates.index.ejs
: Template for the root path.user.ejs
: Template for dynamic paths and 404 handling.
public/
: Contains static files like CSS and JavaScript.app.js
: Main server file.
This project is licensed under the MIT License.