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

DeathStar fails after successful infection #30

Closed TheDauntless closed 6 years ago

TheDauntless commented 6 years ago

Version: Latest + Fix for TLS + Fix for "KeyID" bug

We acquired an agent on a system, but the script crashed:

[*] Powering up the Death Star
[*] Polling for agents
[+] New Agent => Name: PD2E7SZA IP: __________HostName: ___________ UserName: ZZZZZZ\SYSTEM HighIntegrity: 1
[+] Agent: PD2E7SZA => Found 1 users logged into localhost: ['YYYYY\\XXXX']
['explorer', '11972', 'x64', 'YYYYYYY\\XXXXXX', 'YYYYYYY', '85,64', 'MB']
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
    self.run()
  File "./DeathStar.py", line 59, in __run
    self.__run_backup()
  File "/usr/lib/python3.5/threading.py", line 862, in run
    self._target(*self._args, **self._kwargs)
  File "./DeathStar.py", line 609, in pwn_the_shit_out_of_everything
    for process in tasklist(agent_name, process='explorer'):
  File "./DeathStar.py", line 437, in tasklist
    raise
RuntimeError: No active exception to reraise

I modified the lines 430 and 431 to account for 6 elements (instead of 5) and the script now appears to be running ok. I assume that's not a valid solution, but I don't immediately know why there are extra elements.

tratteur commented 6 years ago

I think I'm seeing a similar issue. DeathStar and Empire from git from today (12/10/2017).

$ ./DeathStar.py
[*] Powering up the Death Star
[*] Created Death Star listener => {'success': 'listener DeathStar successfully started'}
[*] Polling for agents
[+] New Agent => Name: PN68UFTH IP: x.x.x.x HostName: xxx UserName: DOMAIN\bob HighIntegrity: 0
[*] Agent: PN68UFTH => Starting recon
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
    self.run()
  File "./DeathStar.py", line 59, in __run
    self.__run_backup()
  File "/usr/lib/python3.5/threading.py", line 862, in run
    self._target(*self._args, **self._kwargs)
  File "./DeathStar.py", line 585, in pwn_the_shit_out_of_everything
    recon(agent_name)
  File "./DeathStar.py", line 507, in recon
    domain_sid = get_domain_sid(agent_name)
  File "./DeathStar.py", line 213, in get_domain_sid
    results = execute_module_with_results('powershell/management/get_domain_sid', agent_name)
  File "./DeathStar.py", line 180, in execute_module_with_results
    if result['taskID'] == r['taskID']:
KeyError: 'taskID'
ssi0202 commented 6 years ago

seeing the same thing.....

launcher works flawlessly is this due to any security setting already on the windows 10 or otherwise?

] Agent: 29A46PMW => Starting recon Exception in thread Thread-1: Traceback (most recent call last): File "/usr/lib/python3.4/threading.py", line 920, in _bootstrap_inner self.run() File "./DeathStar.py", line 59, in run self.run_backup() File "/usr/lib/python3.4/threading.py", line 868, in run self._target(self._args, **self._kwargs) File "./DeathStar.py", line 585, in pwn_the_shit_out_of_everything recon(agent_name) File "./DeathStar.py", line 507, in recon domain_sid = get_domain_sid(agent_name) File "./DeathStar.py", line 213, in get_domain_sid results = execute_module_with_results('powershell/management/get_domain_sid', agent_name) File "./DeathStar.py", line 180, in execute_module_with_results if result['taskID'] == r['taskID']: KeyError: 'taskID'

Exception in thread Thread-1: Traceback (most recent call last): File "/usr/lib/python3.4/threading.py", line 920, in _bootstrap_inner self.run()

TheDauntless commented 6 years ago

The two issues above are different from mine, and have already been addressed here: https://github.com/byt3bl33d3r/DeathStar/issues/29

byt3bl33d3r commented 6 years ago

Duplicate of #29