byt3bl33d3r / DeathStar

Uses Empire's (https://github.com/BC-SECURITY/Empire) RESTful API to automate gaining Domain and/or Enterprise Admin rights in Active Directory environments using some of the most common offensive TTPs.
GNU General Public License v3.0
1.57k stars 331 forks source link

'NoneType' Error in invoke_wmi #42

Closed utkusen closed 6 years ago

utkusen commented 6 years ago

I'm trying to use latest deathstar and empire but it seems the old bug is still there. It's hard to define the exact problem since it sometimes work, sometimes doesn't. But let me write the issue here, maybe someone can explain it better.

[-] Agent: K4AX2UV9 => Error executing module 'powershell/lateral_movement/invoke_wmi': {'error': 'module produced an empty script'}
Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/local/Cellar/python3/3.6.0/Frameworks/Python.framework/Versions/3.6/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "deathstar.py", line 58, in __run
    self.__run_backup()
  File "/usr/local/Cellar/python3/3.6.0/Frameworks/Python.framework/Versions/3.6/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "deathstar.py", line 529, in spread
    invoke_wmi(agent_name, box)
  File "deathstar.py", line 454, in invoke_wmi
    results = execute_module_with_results('powershell/lateral_movement/invoke_wmi', agent_name, module_options)
  File "deathstar.py", line 179, in execute_module_with_results
    if entry['taskID'] == r['taskID']:
TypeError: 'NoneType' object is not subscriptable

Please note that old version of deathstar with old version of empire (taskid workaround applied) works without any problem for me

DanMcInerney commented 6 years ago

This is fixed in my PR

byt3bl33d3r commented 6 years ago

Resolved in #50.

Closing