8000 Update v1.0 · wisdark/Graphpython@6c81710 · GitHub
[go: up one dir, main page]

Skip to content

Co 8000 mmit 6c81710

Browse files
committed
Update v1.0
1 parent 6ca2e85 commit 6c81710

File tree

2 files changed

+153
-155
lines changed

2 files changed

+153
-155
lines changed

.github/usage.png

-93.8 KB
Loading

README.md

Lines changed: 153 additions & 155 deletions
Original file line numberDiff line numberDiff line change
@@ -79,170 +79,168 @@ python3 Graphpython.py -h
7979

8080
## Commands
8181

82-
Please refer to the [Wiki](https://github.com/mlcsec/Graphpython/wiki) for the full user guide and details of available functionality.
83-
84-
### Outsider
85-
86-
* **Invoke-ReconAsOutsider** - Perform outsider recon of the target domain
87-
* **Invoke-UserEnumerationAsOutsider** - Checks whether the user exists within Azure AD
88-
89-
### Authentication
90-
91-
* **Get-GraphTokens** - Obtain graph token via device code phish
92-
* **Get-TenantID** - Get tenant ID for target domain
93-
* **Get-TokenScope** - Get scope of supplied token
94-
* **Decode-AccessToken** - Get all token payload attributes
95-
* **Invoke-RefreshToMSGraphToken** - Convert refresh token to Microsoft Graph token
96-
* **Invoke-RefreshToAzureManagementToken** - Convert refresh token to Azure Management token
97-
* **Invoke-RefreshToVaultToken** - Convert refresh token to Azure Vault token
98-
* **Invoke-RefreshToMSTeamsToken** - Convert refresh token to MS Teams token
99-
* **Invoke-RefreshToOfficeAppsToken** - Convert refresh token to Office Apps token
100-
* **Invoke-RefreshToOfficeManagementToken** - Convert refresh token to Office Management token
101-
* **Invoke-RefreshToOutlookToken** - Convert refresh token to Outlook token
102-
* **Invoke-RefreshToSubstrateToken** - Convert refresh token to Substrate token
103-
* **Invoke-RefreshToYammerToken** - Convert refresh token to Yammer token
104-
* **Invoke-RefreshToIntuneEnrollmentToken** - Convert refresh token to Intune Enrollment token
105-
* **Invoke-RefreshToOneDriveToken** - Convert refresh token to OneDrive token
106-
* **Invoke-RefreshToSharePointToken** - Convert refresh token to SharePoint token
107-
* **Invoke-CertToAccessToken** - Convert Azure Application certificate to JWT access token
108-
* **Invoke-ESTSCookieToAccessToken** - Convert ESTS cookie to MS Graph access token
109-
* **Invoke-AppSecretToAccessToken** - Convert Azure Application secretText credentials to access token
110-
* **New-SignedJWT** - Construct JWT and sign using Key Vault PEM certificate (Azure Key Vault access token required) then generate Azure Management token
111-
112-
### Post-Auth Enumeration
113-
114-
* **Get-CurrentUser** - Get current user profile
115-
* **Get-CurrentUserActivity** - Get recent activity and actions of current user
116-
* **Get-OrgInfo** - Get information relating to the target organization
117-
* **Get-Domains** - Get domain objects
118-
* **Get-User** - Get all users (default) or target user
119-
* **Get-UserProperties** - Get current user properties (default) or target user
120-
* **Get-UserGroupMembership** - Get group memberships for current user (default) or target user
121-
* **Get-UserTransitiveGroupMembership** - Get transitive group memberships for current user (default) or target user
122-
* **Get-Group** - Get all groups (default) or target group
123-
* **Get-GroupMember** - Get all members of target group
124-
* **Get-AppRoleAssignments** - Get application role assignments for current user (default) or target user
125-
* **Get-ConditionalAccessPolicy** - Get conditional access policy properties
126-
* **Get-Application** - Get Enterprise Application details for app (NOT object) ID
127-
* **Get-AppServicePrincipal** - Get details of the application's service principal from the app ID
128-
* **Get-ServicePrincipal** - Get Service Principal details
129-
* **Get-ServicePrincipalAppRoleAssignments** - Get Service Principal app role assignments (shows available admin consent permissions that are already granted)
130-
* **Get-PersonalContacts** - Get contacts of the current user
131-
* **Get-CrossTenantAccessPolicy** - Get cross tenant access policy properties
132-
* **Get-PartnerCrossTenantAccessPolicy** - Get partner cross tenant access policy
133-
* **Get-UserChatMessages** - Get ALL messages from all chats for target user (Chat.Read.All)
134-
* **Get-AdministrativeUnitMember** - Get members of administrative unit
135-
* **Get-OneDriveFiles** - Get all accessible OneDrive files for current user (default) or target user
136-
* **Get-UserPermissionGrants** - Get permissions grants of current user (default) or target user
137-
* **Get-oauth2PermissionGrants** - Get oauth2 permission grants for current user (default) or target user
138-
* **Get-Messages** - Get all messages in signed-in user's mailbox (default) or target user
139-
* **Get-TemporaryAccessPassword** - Get TAP details for current user (default) or target user
140-
* **Get-Password** - Get passwords registered to current user (default) or target user
141-
* **List-AuthMethods** - List authentication methods for current user (default) or target user
142-
* **List-DirectoryRoles** - List all directory roles activated in the tenant
143-
* **List-Notebooks** - List current user notebooks (default) or target user
144-
* **List-ConditionalAccessPolicies** - List conditional access policy objects
145-
* **List-ConditionalAuthenticationContexts** - List conditional access authentication context
146-
* **List-ConditionalNamedLocations** - List conditional access named locations
147-
* **List-SharePointRoot** - List root SharePoint site properties
148-
* **List-SharePointSites** - List any available SharePoint sites
149-
* **List-SharePointURLs** - List SharePoint site web URLs visible to current user
150-
* **List-ExternalConnections** - List external connections
151-
* **List-Applications** - List all Azure Applications
152-
* **List-ServicePrincipals** - List all service principals
153-
* **List-Tenants** - List tenants
154-
* **List-JoinedTeams** - List joined teams for current user (default) or target user
155-
* **List-Chats** - List chats for current user (default) or target user
156-
* **List-ChatMessages** - List messages in target chat
157-
* **List-Devices** - List devices
158-
* **List-AdministrativeUnits** - List administrative units
159-
* **List-OneDrives** - List current user OneDrive (default) or target user
160-
* **List-RecentOneDriveFiles** - List current user recent OneDrive files
161-
* **List-SharedOneDriveFiles** - List OneDrive files shared with the current user
162-
* **List-OneDriveURLs** - List OneDrive web URLs visible to current user
163-
164-
### Post-Auth Exploitation
165-
166-
* **Invoke-CustomQuery** - Custom GET query to target Graph API endpoint
167-
* **Invoke-Search** - Search for string within entity type (driveItem, message, chatMessage, site, event)
168-
* **Find-PrivilegedRoleUsers** - Find users with privileged roles assigned
169-
* **Find-PrivilegedApplications** - Find privileged apps (via their service principal) with granted admin consent API permissions
170-
* **Find-UpdatableGroups** - Find groups which can be updated by the current user
171-
* **Find-SecurityGroups** - Find security groups and group members
172-
* **Find-DynamicGroups** - Find groups with dynamic membership rules
173-
* **Update-UserPassword** - Update the passwordProfile of the target user (NewUserS3cret@Pass!)
174-
* **Update-UserProperties** - Update a specific user property of the target user
175-
* **Add-UserTAP** - Add new Temporary Access Password (TAP) to target user
176-
* **Add-GroupMember** - Add member to target group
177-
* **Add-ApplicationPassword** - Add client secret to target application
178-
* **Add-ApplicationCertificate** - Add client certificate to target application
179-
* **Add-ApplicationPermission** - Add permission to target application e. F438 g. Mail.Send and attempt to grant admin consent
180-
* **Grant-AppAdminConsent** - Grant admin consent for Graph API permission already assigned to enterprise application
181-
* **Create-Application** - Create new enterprise application with default settings
182-
* **Create-NewUser** - Create new Entra ID user
183-
* **Invite-GuestUser** - Invite guest user to Entra ID
184-
* **Assign-PrivilegedRole** - Assign chosen privileged role to user/group/object
185-
* **Open-OWAMailboxInBrowser** - Open an OWA Office 365 mailbox in BurpSuite's embedded Chromium browser using either a Substrate.Office.com or Outlook.Office.com access token
186-
* **Dump-OWAMailbox** - Dump OWA Office 365 mailbox
187-
* **Spoof-OWAEmailMessage** - Send email from current user's Outlook mailbox or spoof another user (Mail.Send)
188-
189-
### Post-Auth Intune Enumeration
190-
191-
* **Get-ManagedDevices** - Get managed devices
192-
* **Get-UserDevices** - Get user devices
193-
* **Get-CAPs** - Get conditional access policies
194-
* **Get-DeviceCategories** - Get device categories
195-
* **Get-DeviceComplianceSummary** - Get device compliance summary
196-
* **Get-DeviceConfigurations** - Get device configurations
197-
* **Get-DeviceConfigurationPolicySettings** - Get device configuration policy settings
198-
* **Get-DeviceEnrollmentConfigurations** - Get device enrollment configurations
199-
* **Get-DeviceGroupPolicyConfigurations** - Get device group policy configurations and assignment details
200-
* **Get-DeviceGroupPolicyDefinition** - Get device group policy definition
201-
* **Get-RoleDefinitions** - Get role definitions
202-
* **Get-RoleAssignments** - Get role assignments
203-
* **Get-DeviceCompliancePolicies** - Get all device compliance policies (Android, iOS, macOS, Windows, Linux, etc.)
204-
* **Get-DeviceConfigurationPolicies** - Get device configuration policies and assignment details (AV, ASR, DiskEnc, etc.)
205-
82+
Please refer to the [Wiki](https://github.com/mlcsec/Graphpython/wiki) for more details on the available functionality.
83+
84+
### Outsider
85+
86+
- Invoke-ReconAsOutsider
87+
- Invoke-UserEnumerationAsOutsider
88+
89+
### Authentication
90+
91+
- Get-GraphTokens
92+
- Get-TenantID
93+
- Get-TokenScope
94+
- Decode-AccessToken
95+
- Invoke-RefreshToMSGraphToken
96+
- Invoke-RefreshToAzureManagementToken
97+
- Invoke-RefreshToVaultToken
98+
- Invoke-RefreshToMSTeamsToken
99+
- Invoke-RefreshToOfficeAppsToken
100+
- Invoke-RefreshToOfficeManagementToken
101+
- Invoke-RefreshToOutlookToken
102+
- Invoke-RefreshToSubstrateToken
103+
- Invoke-RefreshToYammerToken
104+
- Invoke-RefreshToIntuneEnrollmentToken
105+
- Invoke-RefreshToOneDriveToken
106+
- Invoke-RefreshToSharePointToken
107+
- Invoke-CertToAccessToken
108+
- Invoke-ESTSCookieToAccessToken
109+
- Invoke-AppSecretToAccessToken
110+
- New-SignedJWT
111+
112+
### Post-Auth Enumeration
113+
114+
- Get-CurrentUser
115+
- Get-CurrentUserActivity
116+
- Get-OrgInfo
117+
- Get-Domains
118+
- Get-User
119+
- Get-UserProperties
120+
- Get-UserGroupMembership
121+
- Get-UserTransitiveGroupMembership
122+
- Get-Group
123+
- Get-GroupMember
124+
- Get-AppRoleAssignments
125+
- Get-ConditionalAccessPolicy
126+
- Get-Application
127+
- Get-AppServicePrincipal
128+
- Get-ServicePrincipal
129+
- Get-ServicePrincipalAppRoleAssignments
130+
- Get-PersonalContacts
131+
- Get-CrossTenantAccessPolicy
132+
- Get-PartnerCrossTenantAccessPolicy
133+
- Get-UserChatMessages
134+
- Get-AdministrativeUnitMember
135+
- Get-OneDriveFiles
136+
- Get-UserPermissionGrants
137+
- Get-oauth2PermissionGrants
138+
- Get-Messages
139+
- Get-TemporaryAccessPassword
140+
- Get-Password
141+
- List-AuthMethods
142+
- List-DirectoryRoles
143+
- List-Notebooks
144+
- List-ConditionalAccessPolicies
145+
- List-ConditionalAuthenticationContexts
146+
- List-ConditionalNamedLocations
147+
- List-SharePointRoot
148+
- List-SharePointSites
149+
- List-SharePointURLs
150+
- List-ExternalConnections
151+
- List-Applications
152+
- List-ServicePrincipals
153+
- List-Tenants
154+
- List-JoinedTeams
155+
- List-Chats
156+
- List-ChatMessages
157+
- List-Devices
158+
- List-AdministrativeUnits
159+
- List-OneDrives
160+
- List-RecentOneDriveFiles
161+
- List-SharedOneDriveFiles
162+
- List-OneDriveURLs
163+
164+
### Post-Auth Exploitation
165+
166+
- Invoke-CustomQuery
167+
- Invoke-Search
168+
- Find-PrivilegedRoleUsers
169+
- Find-PrivilegedApplications
170+
- Find-UpdatableGroups
171+
- Find-SecurityGroups
172+
- Find-DynamicGroups
173+
- Update-UserPassword
174+
- Update-UserProperties
175+
- Add-UserTAP
176+
- Add-GroupMember
177+
- Add-ApplicationPassword
178+
- Add-ApplicationCertificate
179+
- Add-ApplicationPermission
180+
- Grant-AppAdminConsent
181+
- Create-Application
182+
- Create-NewUser
183+
- Invite-GuestUser
184+
- Assign-PrivilegedRole
185+
- Open-OWAMailboxInBrowser
186+
- Dump-OWAMailbox
187+
- Spoof-OWAEmailMessage
188+
189+
### Post-Auth Intune Enumeration
190+
191+
- Get-ManagedDevices
192+
- Get-UserDevices
193+
- Get-CAPs
194+
- Get-DeviceCategories
195+
- Get-DeviceComplianceSummary
196+
- Get-DeviceConfigurations
197+
- Get-DeviceConfigurationPolicySettings
198+
- Get-DeviceEnrollmentConfigurations
199+
- Get-DeviceGroupPolicyConfigurations
200+
- Get-DeviceGroupPolicyDefinition
201+
- Get-RoleDefinitions
202+
- Get-RoleAssignments
203+
- Get-DeviceCompliancePolicies
204+
- Get-DeviceConfigurationPolicies
206205

207206
### Post-Auth Intune Exploitation
208207

209-
* **Dump-DeviceManagementScripts** - Dump device management PowerShell scripts
210-
* **Dump-WindowsApps**: Dump managed Windows OS applications (exe, msi, appx, msix, etc.)
211-
* **Dump-iOSApps**: Dump managed iOS/iPadOS mobile applications
212-
* **Dump-macOSApps**: Dump managed macOS applications
213-
* **Dump-AndroidApps**: Dump managed Android mobile applications
214-
* **Get-ScriptContent** - Get device management script content
215-
* **Backdoor-Script** - Add malicious code to pre-existing device management script
216-
* **Deploy-MaliciousScript** - Deploy new malicious device management PowerShell script (all devices)
217-
* **Display-AVPolicyRules** - Display antivirus policy rules
218-
* **Display-ASRPolicyRules** - Display Attack Surface Reduction (ASR) policy rules
219-
* **Display-DiskEncryptionPolicyRules** - Display disk encryption policy rules
220-
* **Display-FirewallConfigPolicyRules** - Display firewall configuration policy rules
221-
* **Display-FirewallRulePolicyRules** - Display firewall rule policy rules (firewall rules not firewall config policy)
222-
* **Display-EDRPolicyRules** - Display EDR policy rules
223-
* **Display-LAPSAccountProtectionPolicyRules** - Display LAPS account protection policy rules
224-
* **Display-UserGroupAccountProtectionPolicyRules** - Display user group account protection policy rules
225-
* **Add-ExclusionGroupToPolicy** - Bypass av, asr, etc. rules by adding an exclusion group containing compromised user or device
226-
* **Reboot-Device** - Reboot managed device
227-
* **Retire-Device** - Retire managed device
228-
* **Lock-Device** - Lock managed device
229-
* **Shutdown-Device** - Shutdown managed device
230-
* **Update-DeviceConfig** - Update properties of the managed device configuration
208+
- Dump-DeviceManagementScripts
209+
- Dump-WindowsApps
210+
- Dump-iOSApps
211+
- Dump-macOSApps
212+
- Dump-AndroidApps
213+
- Get-ScriptContent
214+
- Backdoor-Script
215+
- Deploy-MaliciousScript
216+
- Display-AVPolicyRules
217+
- Display-ASRPolicyRules
218+
- Display-DiskEncryptionPolicyRules
219+
- Display-FirewallConfigPolicyRules
220+
- Display-FirewallRulePolicyRules
221+
- Display-EDRPolicyRules
222+
- Display-LAPSAccountProtectionPolicyRules
223+
- Display-UserGroupAccountProtectionPolicyRules
224+
- Add-ExclusionGroupToPolicy
225+
- Reboot-Device
226+
- Retire-Device
227+
- Lock-Device
228+
- Shutdown-Device
229+
- Update-DeviceConfig
231230

232231
### Cleanup
233232

234-
* **Delete-User** - Delete a user
235-
* **Delete-Group** - Delete a group
236-
* **Remove-GroupMember** - Remove user from a group
237-
* **Delete-Application** - Delete an application
238-
* **Delete-Device** - Delete managed device
239-
* **Wipe-Device** - Wipe managed device
233+
- Delete-User
234+
- Delete-Group
235+
- Remove-GroupMember
236+
- Delete-Application
237+
- Delete-Device
238+
- Wipe-Device
240239

241240
### Locators
242241

243-
* **Locate-ObjectID** - Find object ID and display object properties
244-
* **Locate-PermissionID** - Find Graph permission ID details (application/delegated, description, admin consent required, ...)
245-
242+
- Locate-ObjectID
243+
- Locate-PermissionID
246244

247245 3CD9
<br>
248246

0 commit comments

Comments
 (0)
0