interactsh Documentation

repository·main·Indexed 26 days ago

https://github.com/projectdiscovery/interactsh

An open-source tool for detecting out-of-band (OOB) interactions to identify vulnerabilities triggering external network requests (DNS, HTTP, SMTP, etc.). It includes a client library, a server for gathering interactions, and a CLI client. The documentation covers installation via Go or Docker, deployment using Ansible playbooks, self-hosting server configuration, and integrations with Burp Suite, OWASP ZAP, and Caido.

Tokens
8.6K
Snippets
20
Records
52
Agent score
89%

What's inside interactsh

  1. Connect to a self-hosted Interactsh server

    main

    You can point the client to a self-hosted server using the -server flag. This flag accepts a single server or multiple servers separated by commas.

    To connect to a protected self-hosted server, use the -token flag alongside the -server flag.

  2. Install and Configure the ZAP OAST Add-On

    main

    Interactsh can be integrated into OWASP ZAP via the OAST add-on.

    1. Install the OAST add-on from the ZAP Marketplace.
    2. Navigate to Tools $\rightarrow$ Options $\rightarrow$ OAST and select Interactsh.
    3. Configure the client options and click New Payload to generate a payload.
    4. View interactions in the OAST Tab.
    5. To use Interactsh for ActiveScan, go to Options > OAST > General and set it as the default.
    6. Enable Use Permanent Database to review interactions after ZAP has been closed.
  3. Enable Responder support in Interactsh

    main

    Interactsh can wrap Responder in a Docker container to expose various service ports. Interactions are retrieved by monitoring the shared log file Responder-Session.log in the temp folder.

    Setup Steps:

    1. Build the Docker container and tag it as interactsh:
      docker build . -t interactsh
    2. Run the service with the -responder flag:
      sudo interactsh-server -responder -d localhost

    Default Ports:

    • UDP: 137, 138, 1434
    • TCP: 21 (Note: may collide with FTP daemon), 110, 135, 139, 389, 445, 1433, 3141, 3128
    docker build . -t interactsh
  4. Prerequisites for deploying interactsh

    main

    Before deploying the application using the provided Ansible playbooks, ensure the following tools and dependencies are installed on your local machine:

    1. Ansible:
      • Ubuntu: sudo apt install ansible-core
      • macOS: brew install ansible
    2. resolvelib: Install a specific version using pip: sudo -H pip install -Iv 'resolvelib<0.6.0'
    3. Ansible Docker Module: Install the community docker collection via ansible-galaxy: ansible-galaxy collection install community.docker
  5. Deploy interactsh using deploy.yaml

    main

    The deploy.yaml playbook automates the deployment of the interactsh application to a remote server. It performs the following actions:

    • Installs required system packages.
    • Installs Docker.
    • Starts the interactsh container.

    Steps to deploy:

    1. Open deploy.yaml and update the parameters in the vars section to match your environment requirements.
    2. Execute the playbook using ansible-playbook deploy.yaml.
    3. (Optional) Override variables via the command line using --extra-vars to specify a specific container tag.
  6. Run Interactsh Server behind a reverse proxy (Nginx)

    main

    If the default service ports are already in use, you can run interactsh-server on custom ports and use a reverse proxy like Nginx to forward traffic to the standard ports (80, 443, 25, 53, etc.).

    Use the http/stream proxy directive (proxy_pass) in Nginx to handle HTTP/HTTPS and TCP/UDP services (like SMTP and DNS).

    # http/https
    http {
       server {
          listen 443 ssl;
          server_name mysite.com;
          ssl_certificate /etc/nginx/interactsh.pem;
          ssl_certificate_key /etc/nginx/interactsh.key;
    
          location / {
             proxy_pass https://interachsh.mysite.com:80/;
             proxy_set_header Host $host;
             proxy_set_header X-Real-IP $remote_addr;
             proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
             proxy_set_header X-Forwarded-Proto $scheme;
          }        
       }
    }
    
    stream {
       # smtp
       server {
          listen 25;
          proxy_pass interachsh.mysite.com:8025;
       }
    
       # dns
       server {
          listen 53;
          proxy_pass interachsh.mysite.com:8053;
       }
       server {
          listen 53 udp;
          proxy_pass interachsh.mysite.com:8053;
       }
    }
  7. Add Grafana agent for metrics and logs

    main

    To collect node metrics and logs for your project, you can deploy a Grafana agent using the grafana_agent.yaml playbook.

    Steps to configure and deploy:

    1. Open grafana_agent.yaml and update the variables according to your project requirements.
    2. Set the necessary environment variables for your Grafana/Prometheus instance.
    3. Run the playbook.
    export GRAFANA_CLOUD=****
    export PROM_URL=****
    export PROM_PASS==****
    export PROM_USERNAME==****
    ansible-playbook grafana_agent.yaml
  8. Install the Burp Suite Interactsh Extension

    main

    You can use Interactsh within Burp Suite using either the original or the revised extension.

    Original Extension:

    1. Download the latest JAR file from the interactsh-collaborator releases.
    2. In Burp Suite, go to Extender $\rightarrow$ Add $\rightarrow$ Java.
    3. Select the downloaded JAR file and click Next.
    4. A new Interactsh tab will appear.

    Revised Extension:

    1. Download the latest JAR file from the interactsh-collaborator-rev releases.
    2. In Burp Suite, go to Extender $\rightarrow$ Add $\rightarrow$ Java.
    3. Select the downloaded JAR file and click Next.
    4. A new Interactsh tab will appear.