Conversation
Introduces the nxc/protocols/rpc.py module implementing RPC protocol operations, including authentication, domain/user/group enumeration, and LSA queries. Adds supporting modules and a test for RPC database functionality.
|
Stop doing vibe-coding, please Now we have dcerpc(wmi), smb support, why U add |
|
Having the RPC protocol could be useful in case the smb port is closed but this is a hugeeeee PR holy shit. @kasem545 can you provide screenshots on a test lab for each functions so that we don't have to make sure everything works ? |
|
Hi and thanks for the PR. This looks indeed a little AI generated. @kasem545 could you please provide information which parts are generated and which are coded by hand? Which have you tested? Please provide screenshots of your work and demonstrate how the proto looks like etc. Just posting a (probably also AI generated) function list into the PR description is not enough. Also, we extensively use rpc inside of the SMB protocol. As @Dfte said it could be worth adding an rpc protocol for situations where SMB is not available, but we could also very well integrate that into the SMB protocol. Up for discussion if a whole new protocol makes sense for this. |
|
@XiaoliChan @NeffIsBack thanks for sharing your perspective on vibe coding. I understand the concerns around it, but that’s not what this was about. I was working on a box focused on RPC, As a heavy NetExec user, having everything in one place for penetration testing why not having RPC support , and this can inspire other programmers to work RPC and not vibe coding it Thanks @Dfte for supporting the idea
|
|
To prevent misunderstandings, I am not generally against using AI for coding. Personally I use AI for coding stuff all the time, but when it comes to huge PRs that in addition lack documentation I get hesitant because that is often a sign (but not a direct necessity) of low code quality and not or not enough testing. Thanks for the screenshots, looks great :) |
|
i done it so it be on its own protocol because RPC have large attack surfs, great thing can be achieved here |
|
@kasem545 can you use the template we have for PRs? It looks like you deleted it and just put down the flags, etc. |
I get Ur innovation, but I think you can make the pr to From but why I said it’s dup? Because calling And if you check Ur history PR, you will find this one #534 The |
|
@XiaoliChan i understand your concerns also i have refactored rpc.py to inherit from smb, so named pipe operations now reuse smb connection handling rather than creating duplicate logic this addresses the SMBTransport version issue you mentioned. and but do you think doing |
That is what I means, U can move the new funcs to smb.py, I check there are lots of new funcs which doesn't include in smb.py For the nxc smb --rpc-*, we call it --pipe --pipe-method, for example, --pipe efsr --pipe-method EfsRpcOpenFileRaw (U may have a dictionary to map the method) |
commit b566d26 Author: Kasem Shibli <kasem545@proton.me> Date: Sun Jan 25 01:47:22 2026 +0200 Enhance SMB RPC enumeration and LSA security output Improved user and group information display by adding more user attributes and resolving group members to names instead of raw SIDs or RIDs. Enhanced the LSA security descriptor output with detailed parsing, including ACE types, permissions, and well-known SID names. Updated connection enumeration to aggregate connections across all shares when no qualifier is provided, and improved output formatting for share information. commit f601b50 Author: Kasem Shibli <kasem545@proton.me> Date: Sun Jan 25 00:23:08 2026 +0200 Update e2e_commands.txt commit e4c2fec Author: Kasem Shibli <kasem545@proton.me> Date: Sat Jan 24 22:56:39 2026 +0200 Migrate RPC test commands to SMB section RPC-related test commands previously under the 'rpc' section have been moved and adapted to the 'smb' section, consolidating protocol operations and improving organization. Redundant 'rpc' commands were removed, and SMB commands now cover equivalent RPC operations. commit 1358427 Author: Kasem Shibli <kasem545@proton.me> Date: Sat Jan 24 22:55:46 2026 +0200 Add RPC enumeration and management to SMB protocol Introduces a new RPCEnumerator helper and integrates extensive RPC-based enumeration and management methods into the SMB protocol, including user/group queries, password and account management, LSA operations, and share/session enumeration. Updates argument parsing to support these new features via command-line options.
|
@kasem545 So now U have to de-duplicate the function, for example, like Don't forget remove the |
commit dcec315 Author: Kasem Shibli <kasem545@proton.me> Date: Sun Jan 25 16:30:39 2026 +0200 Remove deprecated RPC protocol implementation Deleted nxc/protocols/rpc.py and related RPC protocol files, including database and argument handling modules. All associated tests and references have been updated or removed to reflect the deprecation and replacement of the old RPC protocol implementation. commit b566d26 Author: Kasem Shibli <kasem545@proton.me> Date: Sun Jan 25 01:47:22 2026 +0200 Enhance SMB RPC enumeration and LSA security output Improved user and group information display by adding more user attributes and resolving group members to names instead of raw SIDs or RIDs. Enhanced the LSA security descriptor output with detailed parsing, including ACE types, permissions, and well-known SID names. Updated connection enumeration to aggregate connections across all shares when no qualifier is provided, and improved output formatting for share information. commit f601b50 Author: Kasem Shibli <kasem545@proton.me> Date: Sun Jan 25 00:23:08 2026 +0200 Update e2e_commands.txt commit e4c2fec Author: Kasem Shibli <kasem545@proton.me> Date: Sat Jan 24 22:56:39 2026 +0200 Migrate RPC test commands to SMB section RPC-related test commands previously under the 'rpc' section have been moved and adapted to the 'smb' section, consolidating protocol operations and improving organization. Redundant 'rpc' commands were removed, and SMB commands now cover equivalent RPC operations. commit 1358427 Author: Kasem Shibli <kasem545@proton.me> Date: Sat Jan 24 22:55:46 2026 +0200 Add RPC enumeration and management to SMB protocol Introduces a new RPCEnumerator helper and integrates extensive RPC-based enumeration and management methods into the SMB protocol, including user/group queries, password and account management, LSA operations, and share/session enumeration. Updates argument parsing to support these new features via command-line options.
|
@XiaoliChan the rid-brute no longer reimplements RPC logic the SMB side only parses args and prints results all RPC functionality has been consolidated into rpc_enum.py via RPCEnumerator. The RPC structure has been removed so there is now a single consistent RPC path shared with the other |
|
Actually i don't agree on this one. We should not just label everyhing A few notes:
What i want to say is that for each rpc function we must 1. check if it already exists and 2. if not see how we can integrate it in a way that makes sense (e.g. add a module, arg etc.) and is good to understand. |







Description
This PR adds a new MSRPC protocol to NetExec, providing direct RPC-based enumeration and management operations via SAMR (Security Account Manager Remote) and LSA (Local Security Authority) interfaces.
Key Features:
This provides rpcclient-equivalent functionality natively within NetExec, enabling direct RPC access without SMB overhead for scenarios where granular control over SAM/LSA operations is needed.
Dependencies: No new dependencies required - uses existing Impacket DCERPC libraries.
Type of change
Setup guide for the review
Testing Environment:
Testing the new RPC protocol:
Screenshots (if appropriate):
Checklist:
I have ran Ruff against my changes (via poetry:
poetry run python -m ruff check . --preview, use--fixto automatically fix what it can)I have added or updated the
tests/e2e_commands.txtfile if necessary (new modules or features are required to be added to the e2e tests)New and existing e2e tests pass locally with my changes
If reliant on changes of third party dependencies, such as Impacket, dploot, lsassy, etc, I have linked the relevant PRs in those projects
I have performed a self-review of my own code
I have commented my code, particularly in hard-to-understand areas
I have made corresponding changes to the documentation (PR here: Added MSRPC protocol NetExec-Wiki#83)