Benign powershell Download

EguibarIT 1.85.143

PowerShell adds privileged group membershipPowerShell removes privileged group membership

Evidence

Hardcoded Windows root path (C:\, D:\, etc.) New-LapsObject.ps1 · lines 44–51
44:8 - Tier-specific configurations
45
46 Default value: 'C:\PsScripts\Config.xml'
47
48 Validation:
49 - Must exist and be accessible
50 - Must contain valid XML structure
51
Operating system fingerprinting New-LapsObject.ps1 · lines 51–58
51:56nts
52
53 .EXAMPLE
54 New-LAPSobject -ConfigXMLFile 'C:\Config\Enterprise.xml' -Verbose
55
56 Description:
57 Configures LAPS using production configuration file:
58 1. Validates X
Uses PowerShell to add group membership New-LapsObject.ps1 · lines 314–326
314:20 Proceeding to configure it by extending the Schema.'
315
316 # Temporarily add to Schema Admins if needed
317 $isSchemaAdmin = (Get-ADUser $env:UserName -Properties memberof).memberof -like 'CN=Schema Admins*'
318 if (-not $isSchemaAdmin) {
319 Write-Verbose -Message 'Member is not a Schema Admin... adding it.'
320 Add-ADGroupMember -Identity 'Schema Admins' -Members $env:username
321 }#end if
322
4 lines
Uses PowerShell to remove group membership New-LapsObject.ps1 · lines 337–346
337:64rom Schema Admin
338 if (-not $isSchemaAdmin) {
339 Remove-ADGroupMember -Identity 'Schema Admins' -Members $env:username -Confirm:$false
340 }
341 } #end Try-Catch-Finally
5 lines
References a privileged domain group New-Tier0GpoRestriction.ps1 · lines 296–302
296:17tch {
297 Write-Debug -Message ('Failed to retrieve Domain Admins group: {0}' -f $_.Exception.Message)
298 $null
299 }
300 }
301
302 $EnterpriseAdmins = Get-SafeVariabl

Showing the top 5 files — 7 more files (74 regions) not shown.

No evidence locations were recorded for this file. Raw result

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.