Hacking Tools

Graphpython – A Comprehensive Tool For Microsoft Graph API Enumeration And Exploitation

Graphpython is a modular Python tool for cross-platform Microsoft Graph API enumeration and exploitation.

It builds upon the capabilities of AADInternals (Killchain.ps1), GraphRunner, and TokenTactics(V2) to provide a comprehensive solution for interacting with the Microsoft Graph API for red team and cloud assumed breach operations.

Graphpython covers external reconnaissance, authentication/token manipulation, enumeration, and post-exploitation of various Microsoft services, including Entra ID (Azure AD), Office 365 (Outlook, SharePoint, OneDrive, Teams), and Intune (Endpoint Management).

Index

  • Installation
  • Usage
  • Commands
  • Demos

Installation

Graphpython is designed to be cross-platform, ensuring compatibility with both Windows and Linux based operating systems:

git clone https://github.com/mlcsec/Graphpython.git
cd Graphpython
pip install .
Graphpython -h
# or
python3 Graphpython.py -h

Commands

Please refer to the Wiki for more details on the available commands

Outsider

  • Invoke-ReconAsOutsider
  • Invoke-UserEnumerationAsOutsider

Authentication

  • Get-GraphTokens
  • Get-TenantID
  • Get-TokenScope
  • Decode-AccessToken
  • Invoke-RefreshToMSGraphToken
  • Invoke-RefreshToAzureManagementToken
  • Invoke-RefreshToVaultToken
  • Invoke-RefreshToMSTeamsToken
  • Invoke-RefreshToOfficeAppsToken
  • Invoke-RefreshToOfficeManagementToken
  • Invoke-RefreshToOutlookToken
  • Invoke-RefreshToSubstrateToken
  • Invoke-RefreshToYammerToken
  • Invoke-RefreshToIntuneEnrollmentToken
  • Invoke-RefreshToOneDriveToken
  • Invoke-RefreshToSharePointToken
  • Invoke-CertToAccessToken
  • Invoke-ESTSCookieToAccessToken
  • Invoke-AppSecretToAccessToken
  • New-SignedJWT

Post-Auth Enumeration

  • Get-CurrentUser
  • Get-CurrentUserActivity
  • Get-OrgInfo
  • Get-Domains
  • Get-User
  • Get-UserProperties
  • Get-UserGroupMembership
  • Get-UserTransitiveGroupMembership
  • Get-Group
  • Get-GroupMember
  • Get-AppRoleAssignments
  • Get-ConditionalAccessPolicy
  • Get-Application
  • Get-AppServicePrincipal
  • Get-ServicePrincipal
  • Get-ServicePrincipalAppRoleAssignments
  • Get-PersonalContacts
  • Get-CrossTenantAccessPolicy
  • Get-PartnerCrossTenantAccessPolicy
  • Get-UserChatMessages
  • Get-AdministrativeUnitMember
  • Get-OneDriveFiles
  • Get-UserPermissionGrants
  • Get-oauth2PermissionGrants
  • Get-Messages
  • Get-TemporaryAccessPassword
  • Get-Password
  • List-AuthMethods
  • List-DirectoryRoles
  • List-Notebooks
  • List-ConditionalAccessPolicies
  • List-ConditionalAuthenticationContexts
  • List-ConditionalNamedLocations
  • List-SharePointRoot
  • List-SharePointSites
  • List-SharePointURLs
  • List-ExternalConnections
  • List-Applications
  • List-ServicePrincipals
  • List-Tenants
  • List-JoinedTeams
  • List-Chats
  • List-ChatMessages
  • List-Devices
  • List-AdministrativeUnits
  • List-OneDrives
  • List-RecentOneDriveFiles
  • List-SharedOneDriveFiles
  • List-OneDriveURLs

For more information click here.

Tamil S

Tamil has a great interest in the fields of Cyber Security, OSINT, and CTF projects. Currently, he is deeply involved in researching and publishing various security tools with Kali Linux Tutorials, which is quite fascinating.

Recent Posts

Shadow-rs : Harnessing Rust’s Power For Kernel-Level Security Research

shadow-rs is a Windows kernel rootkit written in Rust, demonstrating advanced techniques for kernel manipulation…

2 weeks ago

ExecutePeFromPngViaLNK – Advanced Execution Of Embedded PE Files via PNG And LNK

Extract and execute a PE embedded within a PNG file using an LNK file. The…

3 weeks ago

Red Team Certification – A Comprehensive Guide To Advancing In Cybersecurity Operations

Embark on the journey of becoming a certified Red Team professional with our definitive guide.…

3 weeks ago

CVE-2024-5836 / CVE-2024-6778 : Chromium Sandbox Escape via Extension Exploits

This repository contains proof of concept exploits for CVE-2024-5836 and CVE-2024-6778, which are vulnerabilities within…

4 weeks ago

Rust BOFs – Unlocking New Potentials In Cobalt Strike

This took me like 4 days (+2 days for an update), but I got it…

4 weeks ago

MaLDAPtive – Pioneering LDAP SearchFilter Parsing And Security Framework

MaLDAPtive is a framework for LDAP SearchFilter parsing, obfuscation, deobfuscation and detection. Its foundation is…

4 weeks ago