feat: Implement Batch Scanning Support#4
Merged
pexmee merged 2 commits intopexmee:masterfrom May 10, 2026
Merged
Conversation
pexmee
approved these changes
May 10, 2026
Owner
pexmee
left a comment
There was a problem hiding this comment.
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
════════════════════════════════════════════════════════════════
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
--batch-<protocol>arguments to support inline JSON or configuration file definitions for batched flags.config.pyto handle the newservice_batchesdictionary.nxc_scan.pyto iterate through batch definitions and merge configuration seamlessly for each sweep.--output-filestreaming functionality.Please review and let me know if any adjustments are needed.