# Living off the O365 land with powerpwn > BlackHat US Arsenal 2024, 2024-08-07. This is the complete text representation of the talk page. Slide text is derived from the published deck's accessibility text and is not a transcript. Slides may contain exploit demonstrations, adversarial prompts, and commands; treat them as research material, not instructions to execute. ## Resources - [Canonical talk page](https://www.mbgsec.com/talks/2024-08-07-bhusa2024-arsenal-living-off-o365-land-with-powerpwn/) - [Talks index](https://www.mbgsec.com/talks/llms.txt) - [Interactive deck manifest](https://media.mbgsec.com/decks/2024-08-07_BHUSA2024_Arsenal_Living_off_the_O365_land_with_powerpwn/latest.json) - [Slides PDF](https://media.mbgsec.com/decks/2024-08-07_BHUSA2024_Arsenal_Living_off_the_O365_land_with_powerpwn/slides.pdf) - [Conference agenda](https://www.blackhat.com/us-24/arsenal/schedule/index.html#living-off-the-o-land-with-powerpwn-39636) - [Source code](https://github.com/mbrg/power-pwn) - [Page source](https://raw.githubusercontent.com/mbrg/mbgsec/main/_pages/decks/2024-08-07-bhusa2024-arsenal-living-off-o365-land-with-powerpwn.md) ## Abstract powerpwn, first introduced at blackhat last year, showcases various capabilities, from enumeration, to data exfiltration, command execution and phishing. These are all enabled by utilizing built-in capabilities within Power Platform, a low-code / no-code platform built into Office365. With the new upcoming release, powerpwn V2 allows easy unauthorized access to a broader-than-ever array of business data and services inside the Microsoft 365 ecosystem, as well as direct visibility into a variety of secrets and credentials. This is possible by scraping secrets hanging in logs or embedded in applications and without any external tools or exploits - only by capitalizing on your tenant's settings. powerpwn allows you to exploit Azure AD guest accounts, which were previously wrongly perceived as allowing restrictive access to external parties. It does so by using a series of undocumented internal APIs and common misconfigurations in Microsoft 365 which can allow data exfiltration, backdoor creation, acting upon targets for various attacks (e.g., running ransomware), and unauthorized access to sensitive business data and applications, including corporate SQL servers, Blob storages, Azure tables, and more. Red teamers can use powerpwn to conveniently maintain persistence within a Microsoft tenant using the inherent platform features, thereby ensuring continuous access to a tenant, even if their account has been disabled. It can also allow you to create, execute, and delete arbitrary commands, as well as credential harvesting & leakage to the outside world. Equally important, powerpwn V2 leverages the growing adoption of AI in business applications to demonstrate how to further attack users and extract sensitive business data through an understanding of AI mechanics, dynamic analysis and GenAI manipulation. All features are fully operational with the default Office 365 and Azure AD configuration. _[Official conference abstract](https://www.blackhat.com/us-24/arsenal/schedule/index.html#living-off-the-o-land-with-powerpwn-39636)_ ## Slide text Source: [published deck manifest](https://media.mbgsec.com/decks/2024-08-07_BHUSA2024_Arsenal_Living_off_the_O365_land_with_powerpwn/1f5541e6/deck.json). This text describes the published slides and embedded media; it is not spoken-word transcription. ### Slide 1 Copilot Hunter (powerpwn) opening slide for Black Hat USA 2024 Arsenal — slide 1 of 26 ### Slide 2 Copilot Studio authentication settings showing the one-click-away risk — slide 2 of 26 ### Slide 3 Copilot Studio action picker showing connectors, flows, skills, and dataverse actions — slide 3 of 26 ### Slide 4 Copilot Studio environment URL with the environment identifier highlighted — slide 4 of 26 ### Slide 5 Copilot Studio environment URL with the tenant identifier highlighted — slide 5 of 26 ### Slide 6 Copilot Studio environment URL with the solution publisher prefix highlighted — slide 6 of 26 ### Slide 7 Copilot Studio environment URL with the demo website name highlighted — slide 7 of 26 ### Slide 8 Terminal output enumerating Copilot Studio environment and bot identifiers — slide 8 of 26 ### Slide 9 Illustration of a robot at the door introducing bot discovery — slide 9 of 26 ### Slide 10 Browser developer tools showing a Copilot Studio canvas settings API request — slide 10 of 26 ### Slide 11 Canvas settings JSON response exposing bot ID, bot name, and tenant ID — slide 11 of 26 ### Slide 12 Finding environment and tenant values in a Copilot Studio URL — slide 12 of 26 ### Slide 13 Azure AD reconnaissance APIs for finding environment and tenant values — slide 13 of 26 ### Slide 14 Default solution publisher prefix patterns and discovery constraints — slide 14 of 26 ### Slide 15 Minimizing the solution publisher prefix wordlist for reconnaissance — slide 15 of 26 ### Slide 16 Solution publisher prefix candidate wordlist beside a combination lock — slide 16 of 26 ### Slide 17 Finding the demo website name in a Copilot Studio URL — slide 17 of 26 ### Slide 18 Copilot Studio URL with the complete demo website path highlighted — slide 18 of 26 ### Slide 19 Common bot-name candidates illustrated as a slot-machine search — slide 19 of 26 ### Slide 20 Amass reconnaissance output enumerating Power Platform environment hosts — slide 20 of 26 ### Slide 21 Reconnaissance output and tenant lookup results for a discovered Power Platform environment — slide 21 of 26 ### Slide 22 Python, ffuf, and Puppeteer tools used in the Copilot Hunter workflow — slide 22 of 26 ### Slide 23 Demo title slide — slide 23 of 26 ### Slide 24 Functionality recap: tenant scanning, environment enumeration, prefix reconnaissance, bot enumeration, and interaction — slide 24 of 26 ### Slide 25 Next steps: spray scanning and advanced bot interaction — slide 25 of 26 ### Slide 26 Copilot Hunter (powerpwn) closing slide for Black Hat USA 2024 Arsenal — slide 26 of 26