PowerZure Azure 보안 평가 도구 열 시트¶
제품정보¶
PowerZure는 힘입니다 라이언 Hausknecht (@haus3c)가 작성한 Shell 프로젝트는 Azure 보안을 평가합니다. Azure reconnaissance, 특권 escalation, persistence 및 Azure 환경에서 데이터 exfiltration에 대한 포괄적 인 기능을 제공합니다.
· ** 보증**: 이 도구는 공인된 침투 테스트 및 보안 평가에만 적용됩니다. 모든 환경에서 사용하기 전에 적절한 권한이 있습니다.
설치하기¶
PowerShell 갤러리 설치¶
카지노사이트
수동 설치¶
카지노사이트
Git 설치¶
카지노사이트
기본 사용¶
모듈 설정¶
카지노사이트
인증현황¶
카지노사이트
명령 참조¶
Reconnaissance 기능¶
Function | Description |
---|---|
Invoke-AzureRecon |
Comprehensive Azure reconnaissance |
Get-AzureTargets |
Identify potential targets |
Get-AzureUsers |
Enumerate Azure AD users |
Get-AzureGroups |
Enumerate Azure AD groups |
Get-AzureApps |
Enumerate applications |
Get-AzureResources |
Enumerate Azure resources |
Privilege 확장 기능¶
Function | Description |
---|---|
Invoke-AzurePrivEsc |
Automated privilege escalation |
Get-AzureRoleAssignments |
Check role assignments |
Set-AzureRole |
Assign roles to principals |
Get-AzureKeyVaults |
Enumerate Key Vaults |
Get-AzureVMs |
Enumerate virtual machines |
Persistence 기능¶
Function | Description |
---|---|
New-AzureBackdoor |
Create backdoor accounts |
Set-AzureUserPassword |
Change user passwords |
New-AzureApplication |
Create malicious applications |
Add-AzureKeyVaultSecret |
Add secrets to Key Vault |
Reconnaissance 및 정보 수집¶
종합 Reconnaissance¶
카지노사이트
사용자 및 그룹¶
카지노사이트
신청 및 서비스 폐기¶
카지노사이트
회사연혁¶
카지노사이트
구독 및 입찰 정보¶
카지노사이트
Privilege 확장¶
자동화된 Privilege 확장¶
ο 회원 관리
역할 기반 Privilege 확장¶
카지노사이트
키 볼트 Privilege 에스컬레이션¶
카지노사이트
가상 머신 Privilege 에스컬레이션¶
카지노사이트
Persistence 기술¶
계정 Persistence¶
카지노사이트
Application 기반 Persistence¶
카지노사이트
인증서 기반 지속¶
카지노사이트
자원 기반 지속¶
카지노사이트
자료 Exfiltration¶
Azure 광고 자료 Exfiltration¶
카지노사이트
저장 계정 자료 Exfiltration¶
오프화이트
키 볼트 자료 Exfiltration¶
카지노사이트
데이터베이스 데이터 Exfiltration¶
오프화이트
고급 공격 기술¶
토큰 매립¶
카지노사이트
크로스 테넌트 공격¶
카지노사이트
리소스 그룹 Takeover¶
카지노사이트
Evasion 기술¶
스텔스 운영¶
카지노사이트
비율 제한 Evasion¶
카지노사이트
로그인 Evasion¶
카지노사이트
자동화 및 스크립트¶
자동화된 평가 스크립트¶
```powershell
Comprehensive Azure security assessment¶
param( [string]\(TenantId, [string]\)SubscriptionId, [string]$OutputPath = ".\azure_assessment" )
Create output directory¶
New-Item -ItemType Directory -Path $OutputPath -Force|Out-Null
Authenticate¶
Connect-AzAccount -TenantId $TenantId
Set subscription context¶
if ($SubscriptionId) \\{ Set-AzContext -SubscriptionId $SubscriptionId \\}
Perform reconnaissance¶
Write-Host "Performing reconnaissance..." $recon = Invoke-AzureRecon \(recon|Out-File "\)OutputPath\reconnaissance.txt"
Check for privilege escalation opportunities¶
Write-Host "Checking privilege escalation paths..." $privesc = Invoke-AzurePrivEsc \(privesc|Out-File "\)OutputPath\privilege_escalation.txt"
Export user and group information¶
Write-Host "Exporting user and group data..." $users = Get-AzureUsers \(users|Export-Csv "\)OutputPath\users.csv" -NoTypeInformation
$groups = Get-AzureGroups \(groups|Export-Csv "\)OutputPath\groups.csv" -NoTypeInformation
Export application information¶
Write-Host "Exporting application data..." $apps = Get-AzureApps \(apps|Export-Csv "\)OutputPath\applications.csv" -NoTypeInformation
Generate summary report¶
$summary = @\\{ AssessmentDate = Get-Date TenantId = $TenantId SubscriptionId = $SubscriptionId TotalUsers = $users.Count TotalGroups = $groups.Count TotalApplications = $apps.Count PrivilegeEscalationPaths = $privesc.Count \\}
\(summary|ConvertTo-Json|Out-File "\)OutputPath\summary.json"
Write-Host "Assessment completed. Results saved to $OutputPath" ```의 경우
연속 모니터링 스크립트¶
```powershell
Continuous Azure monitoring script¶
param( [int]\(IntervalMinutes = 60, [string]\)LogPath = ".\azure_monitoring.log" )
while ($true) \\{ \(timestamp = Get-Date Write-Output "[\)timestamp] Starting Azure monitoring cycle"|Tee-Object -FilePath $LogPath -Append
try \\\\{
# Check for new users
$newUsers = Get-AzureUsers|Where-Object \\\\{$_.CreatedDateTime -gt (Get-Date).AddMinutes(-$IntervalMinutes)\\\\}
if ($newUsers) \\\\{
Write-Output "[$timestamp] New users detected: $($newUsers.Count)"|Tee-Object -FilePath $LogPath -Append
\\\\}
# Check for new applications
$newApps = Get-AzureApps|Where-Object \\\\{$_.CreatedDateTime -gt (Get-Date).AddMinutes(-$IntervalMinutes)\\\\}
if ($newApps) \\\\{
Write-Output "[$timestamp] New applications detected: $($newApps.Count)"|Tee-Object -FilePath $LogPath -Append
\\\\}
# Check for role assignments
$recentRoleAssignments = Get-AzRoleAssignment|Where-Object \\\\{$_.CreatedOn -gt (Get-Date).AddMinutes(-$IntervalMinutes)\\\\}
if ($recentRoleAssignments) \\\\{
Write-Output "[$timestamp] New role assignments detected: $($recentRoleAssignments.Count)"|Tee-Object -FilePath $LogPath -Append
\\\\}
\\\\}
catch \\\\{
Write-Output "[$timestamp] Error during monitoring: $($_.Exception.Message)"|Tee-Object -FilePath $LogPath -Append
\\\\}
Start-Sleep -Seconds ($IntervalMinutes * 60)
\\} ```에 대하여
문제 해결¶
인증 문제¶
```powershell
Clear cached credentials¶
Clear-AzContext -Force
Test authentication¶
$context = Get-AzContext if (-not $context) \\{ Write-Error "Not authenticated to Azure" Connect-AzAccount \\}
Verify permissions¶
$currentUser = Get-AzADUser -UserPrincipalName (Get-AzContext).Account.Id $roleAssignments = Get-AzRoleAssignment -ObjectId $currentUser.Id ```의 경우
모듈 문제¶
```powershell
Check PowerZure installation¶
Get-Module PowerZure -ListAvailable
Update PowerZure¶
Update-Module PowerZure -Force
Reinstall if necessary¶
Uninstall-Module PowerZure Install-Module PowerZure -Force ```에 대하여
제출 문제¶
```powershell
Check current permissions¶
$permissions = Get-AzRoleAssignment -SignInName (Get-AzContext).Account.Id
Test specific permissions¶
try \\{ Get-AzADUser -First 1 Write-Output "User read permission: OK" \\} catch \\{ Write-Output "User read permission: DENIED" \\}
Request additional permissions¶
Write-Output "Required permissions:" Write-Output "- Directory.Read.All" Write-Output "- User.Read.All" Write-Output "- Application.Read.All" ```의 경우
다른 도구와 통합¶
BloodHound 통합¶
카지노사이트
ROADtools 통합¶
카지노사이트
지원하다¶
*이 속임수 시트는 PowerZure를 사용하여 포괄적 인 참조를 제공합니다. 항상 Azure 보안 평가를 수행하기 전에 적절한 권한이 있습니다. *필수