Skip to content

feat: Implement Batch Scanning Support#4

Merged
pexmee merged 2 commits intopexmee:masterfrom
techwallahexplorer:add-batch-support
May 10, 2026
Merged

feat: Implement Batch Scanning Support#4
pexmee merged 2 commits intopexmee:masterfrom
techwallahexplorer:add-batch-support

Conversation

@techwallahexplorer
Copy link
Copy Markdown

Resolves #1

This PR adds batch scanning functionality to nxc-scan, allowing users to define multiple sets of flags for sequential execution against the same target services.

Key changes:

  • Added --batch-<protocol> arguments to support inline JSON or configuration file definitions for batched flags.
  • Updated config.py to handle the new service_batches dictionary.
  • Modified the main loop in nxc_scan.py to iterate through batch definitions and merge configuration seamlessly for each sweep.
  • Preserved existing features such as the --output-file streaming functionality.

Please review and let me know if any adjustments are needed.

Copy link
Copy Markdown
Owner

@pexmee pexmee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested it and it works as intended. See example below.

┌──(kali㉿kali)-[~/hackthebox/puppy]
└─$ nxc-scan dc.puppy.htb -u 'ant.edwards' -p 'Antman2025!' --services="smb,ldap" --batch-ldap='[["--users"],["--gmsa"]]'

════════════════════════════════════════════════════════════════
  nxc-scan
════════════════════════════════════════════════════════════════
  Target   : dc.puppy.htb
  Username : ant.edwards
  Password : Antman2025!
  Services : 1.ldap, 10.smb
  S-Timeout: none
════════════════════════════════════════════════════════════════

────────────────────────────────────────────────────────────────
  Running ldap batch 1/2
────────────────────────────────────────────────────────────────

────────────────────────────────────────────────────────────────
  Protocol : LDAP
  Command  : nxc ldap dc.puppy.htb -u ant.edwards -p 'Antman2025!' --users
────────────────────────────────────────────────────────────────
LDAP        10.129.232.75   389    DC               [*] Windows Server 2022 Build 20348 (name:DC) (domain:PUPPY.HTB) (signing:None) (channel binding:No TLS cert) 
LDAP        10.129.232.75   389    DC               [+] PUPPY.HTB\ant.edwards:Antman2025! 
LDAP        10.129.232.75   389    DC               [*] Enumerated 9 domain users: PUPPY.HTB
LDAP        10.129.232.75   389    DC               -Username-                    -Last PW Set-       -BadPW-  -Description-                                               
LDAP        10.129.232.75   389    DC               Administrator                 2025-02-20 02:33:28 0        Built-in account for administering the computer/domain      
LDAP        10.129.232.75   389    DC               Guest                         <never>             0        Built-in account for guest access to the computer/domain    
LDAP        10.129.232.75   389    DC               krbtgt                        2025-02-19 18:46:15 0        Key Distribution Center Service Account                     
LDAP        10.129.232.75   389    DC               levi.james                    2025-02-19 19:10:56 5                                                                    
LDAP        10.129.232.75   389    DC               ant.edwards                   2025-02-19 19:13:14 0                                                                    
LDAP        10.129.232.75   389    DC               adam.silver                   2026-05-10 17:19:30 0                                                                    
LDAP        10.129.232.75   389    DC               jamie.williams                2025-02-19 19:17:26 5                                                                    
LDAP        10.129.232.75   389    DC               steph.cooper                  2025-02-19 19:21:00 5                                                                    
LDAP        10.129.232.75   389    DC               steph.cooper_adm              2025-03-08 22:50:40 5                                                                    

────────────────────────────────────────────────────────────────
  Running ldap batch 2/2
────────────────────────────────────────────────────────────────

────────────────────────────────────────────────────────────────
  Protocol : LDAP
  Command  : nxc ldap dc.puppy.htb -u ant.edwards -p 'Antman2025!' --gmsa
────────────────────────────────────────────────────────────────
LDAP        10.129.232.75   389    DC               [*] Windows Server 2022 Build 20348 (name:DC) (domain:PUPPY.HTB) (signing:None) (channel binding:No TLS cert) 
LDAP        10.129.232.75   389    DC               [+] PUPPY.HTB\ant.edwards:Antman2025! 
LDAP        10.129.232.75   389    DC               [*] Getting GMSA Passwords

────────────────────────────────────────────────────────────────
  Protocol : SMB
  Command  : nxc smb dc.puppy.htb -u ant.edwards -p 'Antman2025!'
────────────────────────────────────────────────────────────────
SMB         10.129.232.75   445    DC               [*] Windows Server 2022 Build 20348 x64 (name:DC) (domain:PUPPY.HTB) (signing:True) (SMBv1:None) (Null Auth:True)
SMB         10.129.232.75   445    DC               [+] PUPPY.HTB\ant.edwards:Antman2025! 

════════════════════════════════════════════════════════════════
  Scan summary
────────────────────────────────────────────────────────────────
  ldap      OK
  smb       OK
════════════════════════════════════════════════════════════════

@pexmee pexmee merged commit 14b4f5a into pexmee:master May 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for batches

3 participants