EmpireProject / Empire

Empire is a PowerShell and Python post-exploitation agent.
http://www.powershellempire.com/
BSD 3-Clause "New" or "Revised" License
7.36k stars 2.8k forks source link

Onedrive listener options #1364

Closed hackelin closed 5 years ago

hackelin commented 5 years ago

Empire Version

2.5

OS Information (Linux flavor, Python version)

4.19.0-kali5-amd64 #1 SMP Debian 4.19.37-5kali1 (2019-06-20) x86_64 GNU/Linux Python 2.7.16

Expected behavior and description of the error, including any actions taken immediately prior to the error. The more detail the better.

Instructions at gist.github.com/mr64bit/3fd8f321717c9a6423f7949d494b6cd9 conduct to set ClientSecret parameter but this one is not available.

Screenshot of error, embedded text output, or Pastebin link to the error

Here is the behavior avoiding this step: (Empire: listeners/onedrive) > set ClientID fa0xxxxxf-1ece-4503-bf81-16axxxxx (Empire: listeners/onedrive) > execute [*] Get your AuthCode from "https://login.microsoftonline.com/common/oauth2/v2.0/authorize?scope=files.readwrite+offline_access&redirect_uri=https%3A%2F%2Flogin.live.com%2Foauth20_desktop.srf&response_type=code&client_id=fa0xxxxxf-1ece-4503-bf81-16axxxxx" and try starting the listener again.


(Empire: listeners/onedrive) > set AuthCode M0f9xxxxxx-d9cd-b0d2-4a77-1xxxxxxxc928 (Empire: listeners/onedrive) > execute [] Starting listener 'onedrive' [!] Something went wrong, HTTP response 401, error code [70002]: AADSTS70002: The provided request must include a 'client_secret' input parameter. Trace ID: a186d9df-709f-4302-8433-b1af28d43800 Correlation ID: 8a074878-5368-4eb2-9f31-b25a24a2d424 Timestamp: 2019-07-01 12:47:48Z Exception in thread Thread-1: Traceback (most recent call last): File "/usr/lib/python2.7/threading.py", line 801, in bootstrap_inner self.run() File "/root/empire2/Empire/lib/common/helpers.py", line 936, in run self.run_backup() File "/usr/lib/python2.7/threading.py", line 754, in run self.target(self.args, **self.kwargs) File "/root/empire2/Empire//lib/listeners/onedrive.py", line 619, in start_server token = get_token(client_id, auth_code) File "/root/empire2/Empire//lib/listeners/onedrive.py", line 496, in get_token r_token['expires_at'] = time.time() + (int)(r_token['expires_in']) - 15 KeyError: 'expires_in'

[!] Listener failed to start!

Any additional information