-
Notifications
You must be signed in to change notification settings - Fork 95
Modules: Copilot M365 ‐ Whoami
lanasalameh1 edited this page Aug 7, 2024
·
5 revisions
Extracts useful information about the current user such as:
- Name, title, email, manager etc.
- Accessible documents
- Weekly schedule
- Accessible Sharepoint sites
- Access to financial data
- Emails
- Collaborators and Contacts
and more
- Run the following command:
powerpwn copilot whoami --user {user} --password {password} --scenario {scenario} --verbose {verbosity level}
The access token is cached in
tokens.json
local cache file if acquired successfully.
- Run the
whoami
command with following arguments to use the cached access token:
powerpwn copilot whoami --user {user} --cached-token --scenario {scenario} --verbose {verbosity level}
-
user: The email of the connected user. Required parameter.
-
password: The password of the connected account. Optional parameter.
-
scenario: Copilot application to connect to. 'teamshub' for Teams and 'officeweb' Business Chat web applications. Required parameter.
-
verbose: Verbosity flag for writing logs to a local file with name 'session_{session_id}.log'. Options are 'off', 'mid' and 'full'. Default is
'off'
-
cached-token: If presents in the command arguments, it tries to use the cached access token if exists, otherwise
it falls back to user/password authentication
if password is provided.
Notice:
All command outputs are saved to 'who_i_am_{random execution GUID}'
directory
The final findings will be saved to file 'who_i_am_report.txt'
The execution logs will be saved to file 'who_i_am_debug.log'
from powerpwn.copilot.models.chat_argument import ChatArguments
from powerpwn.copilot.enums.copilot_scenario_enum import CopilotScenarioEnum
from powerpwn.copilot.enums.verbose_enum import VerboseEnum
from powerpwn.copilot.whoami.whoami import WhoAmI
args = ChatArguments(
user="USER",
password="PASSWORD",
verbose=VerboseEnum.full,
scenario=CopilotScenarioEnum.teamshub,
use_cached_access_token=False
)
whoami = WhoAmI(args).execute()