Skip to content

JackMason1/AttackServer

Repository files navigation

AttackServer

A lightweight, local HTTPS server designed for security professionals and developers. Quickly host files, generate payloads with AI, and monitor access logs in real-time.

Disclaimer: This tool is intended for educational and authorized testing purposes only. Use it responsibly and ethically. The developer is not responsible for any misuse.

Screenshot

Attacker Server Screenshot


Table of Contents

Features

  • Simple Setup: Get up and running with a single setup script.
  • Local HTTPS: Serves content over HTTPS for realistic testing scenarios.
  • AI Payload Generation: Leverage AI to quickly create payloads, from simple web pages to reverse shells.
  • File Hosting: Easily host any file with custom content and a specific filename.
  • Live Access Log: Monitor all incoming requests to your hosted files in real-time, capturing IP addresses, user agents, and timestamps.

Getting Started

Follow these steps to get the Attack Server running on your local machine.

Prerequisites

  • A Unix-like operating system (Linux, macOS).
  • Administrative/root privileges for installation.
  • An internet connection for AI configuration.

Installation

  1. Run the Setup Script This script will install dependencies and create the necessary server files.

    sudo ./setup.sh
  2. Install the Local Certificate Authority To avoid browser security warnings, you need to trust the server's self-signed certificate.

    macOS Instructions
    1. Open Keychain Access.app.
    2. Go to File > Import Items....
    3. Navigate to the AttackServer/certs/ directory and select cert.pem.
    4. In the System keychain, find and double-click the attackserver.com certificate.
    5. Expand the Trust section.
    6. For "When using this certificate:", select Always Trust.
    7. Close the window (you may need to enter your password).
    Linux (Debian/Ubuntu) Instructions
    1. Copy the certificate to the system's CA directory.
      sudo cp certs/cert.pem /usr/local/share/ca-certificates/attackserver.crt
    2. Update the system's certificate store.
      sudo update-ca-certificates
    Windows Instructions
    1. Double-click the certs/cert.pem file.
    2. Click the "Install Certificate..." button.
    3. Choose "Local Machine" and click Next.
    4. Select "Place all certificates in the following store".
    5. Click "Browse..." and select the "Trusted Root Certification Authorities" store.
    6. Click OK, then Next, and finally Finish.
  3. Configure Local Hostname You need to map the attackserver.com domain to your local machine.

    1. Open your hosts file with root privileges.
      sudo nano /etc/hosts
    2. Add the following line to the end of the file:
      127.0.0.1       attackserver.com
      
    3. Save and close the file (In nano, press Ctrl+X, then Y, then Enter).

Usage

Starting the Server

Once setup is complete, you can start the server with a single command.

  1. In your terminal, type:
    sudo attackserver
  2. Navigate to https://attackserver.com in your web browser.

Stopping the Server

When you want to stop the server run:

sudo attackserver stop

Configuring the AI

To use the AI payload generation feature, you must first configure your API key.

  1. Navigate to the Settings page on the web interface.
  2. Click the provided link to generate a new API key from the service provider.
  3. Copy your API key and paste it into the "API Key" input field in the Settings page.
  4. Click Save.

AI-Powered Payload Generation

  1. From the home page, click Create with AI.
  2. In the prompt box, describe the payload you want to create. Be specific for the best results.
    • Example 1: A simple HTML page with a login form.
    • Example 2: A python3 reverse shell to 10.10.15.2 on port 9001.
  3. The AI will generate the content and filename for you. Review and click Create File to host it.

Manually Hosting a File

You can also host a file manually without using the AI.

  1. Filename: Enter the path where the file will be accessible (e.g., payload.sh, index.html).
  2. Content: Paste or type the content of the file.
  3. Host: Click the Create File button. The file will now be available at https://attackserver.com/your-filename.

Monitoring the Access Log

The Access Log page functions like a collaborator client in a security engagement. It shows a real-time log of every visitor who accesses a file you are hosting. Each entry includes:

  • Timestamp
  • IP Address
  • Method
  • Source IP Address

About

A lightweight, local HTTPS server designed for security professionals and developers. Quickly host files, generate payloads with AI, and monitor access logs in real-time.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors