Passwordspraying over SMB does not close connections after failed attempt

Aperta
#401 5 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
python
Ambito
security

Direzione di ricerca

The report concerns SMB login attempts in NetExec's SMB protocol module, which keeps connections open after a failed password attempt; start from the SMB connection and login code in the smb protocol module and check where the socket is created and whether it is closed after each attempt. Reproduce with a multi-user password spray through a proxy and count open connections. Done when each attempt closes its connection and the spray no longer exhausts the proxy.

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

Descrizione

investigation

Describe the bug
nxc smb does not seem to close the connection after a login attempt. This means, that when running nxc smb through a socks proxy, the socks proxy will eventually die due to too many concurrent connections.

To Reproduce

  1. Set up a socks proxy on your victim machine (i.e. using meterpreter or mythic)
  2. Route traffic to the socks proxy from your attacker machine (i.e. using Proxifier on Windows)
  3. Run netexec smb target_computer -u user_list.txt -p password (with user list containing many users, e.g. 64)
  4. The amount of working connections depend on your socks proxy, but in my case, after 32 concurrent connections (and working login attempts via smb), the socks proxy tunnel dies.

Expected behavior
After a login attempt via SMB, the connection closes, preventing too many concurrent connections.

NetExec info

  • OS: Windows
  • Version of nxc: 1.2.0
  • Installed from: github
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.