Skip to content

Commit

Permalink
Fix check admin false positive on certain target (e.g Netapp)
Browse files Browse the repository at this point in the history
  • Loading branch information
nikaiw committed Jul 20, 2024
1 parent 398716d commit 48d6969
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nxc/protocols/smb.py
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,8 @@ def check_if_admin(self):
try:
# 0xF003F - SC_MANAGER_ALL_ACCESS
# http://msdn.microsoft.com/en-us/library/windows/desktop/ms685981(v=vs.85).aspx
scmr.hROpenSCManagerW(dce, f"{self.host}\x00", "ServicesActive\x00", 0xF003F)
scmrobj = scmr.hROpenSCManagerW(dce, f"{self.host}\x00", "ServicesActive\x00", 0xF003F)
scmr.hREnumServicesStatusW(dce, scmrobj['lpScHandle'])
self.logger.debug(f"User is admin on {self.host}!")
self.admin_privs = True
except scmr.DCERPCException:
Expand Down

0 comments on commit 48d6969

Please sign in to comment.