-
Notifications
You must be signed in to change notification settings - Fork 807
Closed
Labels
BugAn error, flaw, misbehavior or failure in the Monkey or Monkey Island.An error, flaw, misbehavior or failure in the Monkey or Monkey Island.Complexity: HighImpact: Lowsp/3
Milestone
Description
Describe the bug
If the Zerologon exploiter is run before the WMI exploiter, errors occur in the the WMI exploiter when attempting to connect/disconnect to the victim using impacket. This doesn't appear to affect functionality, as the WMI exploiter is still able to authenticate to the victim when the correct credentials are used.
To Reproduce
Steps to reproduce the behavior:
- Configure a machine to be exploitable with Zerologon and WMI
- Configure Infection Monkey to use the Zerologon and WMI exploiters
- Run the monkey agent
- View errors in the logs.
Screenshots
Code that triggers errors
monkey/monkey/infection_monkey/exploit/tools/wmi_tools.py
Lines 52 to 75 in dd2168e
dcom = DCOMConnection( | |
host.ip_addr, | |
username=username, | |
password=password, | |
domain=domain, | |
lmhash=lmhash, | |
nthash=nthash, | |
oxidResolver=True, | |
) | |
try: | |
iInterface = dcom.CoCreateInstanceEx( | |
wmi.CLSID_WbemLevel1Login, wmi.IID_IWbemLevel1Login | |
) | |
except Exception as exc: | |
try: | |
dcom.disconnect() | |
except KeyError: | |
logger.exception("Disconnecting the DCOMConnection failed") | |
if "rpc_s_access_denied" == exc.error_string: | |
raise AccessDeniedException(host, username, password, domain) | |
raise |
Tasks
- Investigate and maybe fix 0d - @cakekoa
Metadata
Metadata
Assignees
Labels
BugAn error, flaw, misbehavior or failure in the Monkey or Monkey Island.An error, flaw, misbehavior or failure in the Monkey or Monkey Island.Complexity: HighImpact: Lowsp/3