WINRM with NTLM disabled fails

Aperta
#600 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
22/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
python

Direzione di ricerca

The payload names only the nxc winrm command with -k and --use-kcache, plus the Impacket NTLMSSP unpacking error, so start by reproducing the Kerberos WinRM path and tracing where the NTLMSSP parse is called. Check whether the Impacket version pinned by NetExec already includes the linked fix for the -dc-host behavior. Done means a Kerberos-authenticated WinRM attempt no longer raises the unpacking exception and fails or succeeds with a clear authentication message. The thread has one comment and no maintainer decision, so confirm the approach with maintainers first.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Describe the bug

When executing nxc winrm against a domain that has NTLM authentication disabled, Netexec throws an error.

To Reproduce

I encountered this error in the Vintage machine on HTB. As of writing it is still an active machine, so I do not want to put exact commands in this report. I'd be happy to share more privately / when the machine is retired.

nxc winrm --use-kcache -k -dc-host DC01.EXAMPLE.COM
nxc winrm --use-kcache -k DC01.EXAMPLE.COM

Both resulted in:
Exception: ("Unpacked data doesn't match constant value 'b')\\xea\\xdbz\\xba,'' should be ''NTLMSSP\\x00''", 'When unpacking field \' | "NTLMSSP\x00 | b\')\\xea\\xdbz\\xba,\'[:8]\'') 
Expected behavior

A logon attempt be made. In my example, these are valid credentials. They work great with:
nxc ldap --use-kcache -k -dc-host DC01.EXAMPLE.COM
nxc ldap --use-kcache -k DC01.EXAMPLE.COM
nxc smb --use-kcache -k DC01.EXAMPLE.COM

NetExec info

  • OS: Debian 12
  • Version of nxc: 1.3.0
  • Installed from: pipx

Additional context
This appears to be an issue in Impacket, but it seems it was fixed with the addition of the -dc-host flag. As demonstrated above, the issue persists today regardless.

Lingua principale
Python
Stelle
6k
Fork
803
Merge medio
2g 13h
PR unite (30g)
23

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Pennyw0rth/NetExec

Tutte le issue di Pennyw0rth/NetExec

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.