中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-08-28 23:42
47,816 topics / 349,916 posts / today 2 new / 48,265 members
DOS批处理 & 脚本技术(批处理室) » [Help] Help to decrypt a VBS
Printable Version  4,308 / 30
Floor1 w1314ich Posted 2008-01-08 21:57
中级用户 Posts 119 Credits 234
Floor2 chenall Posted 2008-01-08 23:52
银牌会员 Posts 469 Credits 1,276 From 福建泉州
It's not a VB script, right? It looks like JS. For this kind of script, try adding a line at the end to display the content of sts. Since it's not complete, it can't be tested. If you know JS, add a line to display the content of sts and see.
Floor3 fastslz Posted 2008-01-09 00:30
铂金会员 Posts 2,315 Credits 5,493 From 上海
It's a VBS. Finally got another encrypted VBS, same as this post http://www.cn-dos.net/forum/viewthread.php?tid=36414&fpage=1&highlight=lO%3D%22%1C%1B

Floor4 zh159 Posted 2008-01-09 00:35
金牌会员 Posts 1,467 Credits 3,687
It seems like it was encrypted three times, and I didn't understand it at all in the end
Floor5 chenall Posted 2008-01-09 00:46
银牌会员 Posts 469 Credits 1,276 From 福建泉州
It seems that trying this several times should be able to get the final result. Which one is the complete content? Give it a try.
Floor6 godzza Posted 2008-01-11 22:55
新手上路 Posts 6 Credits 12
The rookie me is dazzled.
Floor7 baomaboy Posted 2008-01-14 02:26
银牌会员 Posts 554 Credits 1,513
Not only encrypted three times, but also embedded thirteen times or more. The encryptor is really perverted. Using a large number of random variable replacements makes my head spin. Those interested can continue...


[ Last edited by baomaboy on 2008-1-14 at 02:34 AM ]
Floor8 fastslz Posted 2008-01-14 09:13
铂金会员 Posts 2,315 Credits 5,493 From 上海
Yeah, seeing him encrypt in such a bizarre way, I didn't dare to continue testing. After all, my VBS skills are insufficient, and I don't know the black part after execution.
Floor9 zh159 Posted 2008-01-14 10:54
金牌会员 Posts 1,467 Credits 3,687
I only disassembled three layers and then didn't dare to continue the test. It's really "abnormal"
Floor10 lxmxn Posted 2008-01-14 18:07
版主 Posts 4,938 Credits 11,386
Hehe, everyone has decrypted it three times. I got stuck at the second decryption and don't know what to do next. Sweat.

This script is really tough.
Floor11 uhnmki Posted 2008-01-16 04:24
初级用户 Posts 11 Credits 73
Floor12 uhnmki Posted 2008-01-16 05:42
初级用户 Posts 11 Credits 73
Floor13 uhnmki Posted 2008-01-16 09:49
初级用户 Posts 11 Credits 73
【Continued Part 2】This is the result obtained from the previous decoding, but it's still not plaintext:

execute ""&chr(&h63)&chr(&h3d)&chr(&h76)&chr(&h62)&chr(&h63)&chr(&h72)&chr(&h6C)...&chr(&h75)&chr(&h63)&chr(&h22)&chr(&h29)

It seems that some hexadecimal codes are converted to ASCII codes and then combined into a string. Should plaintext instructions be included next? Since there's execute in front, we need to intercept it and continue using the previous interception process:
Sub Intercept (code)
WScript.Echo code
OutPutFile="decode_4.txt"
Set objFSO=CreateObject("Scripting.FileSystemObject")
Set objTXT=objFSO.CreateTextFile(OutPutFile,True,False)
objTXT.Write code
objTXT.Close
Set objWSH=CreateObject("WScript.Shell")
objWSH.Run OutPutFile
WScript.Quit
End Sub

Replace execute with Intercept, and the source code becomes:

Save this code as Decoding_3rd.vbs. When run, it will intercept the decoded plaintext and write it to the decode_4.txt file. Is it about to be done this time? 【To be continued】

[ Last edited by uhnmki on 2008-1-16 at 10:26 AM ]
Floor14 uhnmki Posted 2008-01-16 10:25
初级用户 Posts 11 Credits 73

c = vbcrlf: d = 127: f = 11: j = 12: h = 14: m = 31: r = 83: k = 1: n = 8: s = 114: u = -5: v = 5
i = "if a = ": t = " then ": e = "elseif a >= ": a = " and a <= ": g = "a = a + ": o = "t&c&g: p = "c&e: q = "c&i
execute(l & "for ii=1 to len(b):a=asc(mid(b,ii,1))" & q & "d" & t & "a=13" & q & "f" & t & "a=10" & q & "j" & t & c & "a=34" & c & e & "h" & a & "m" & o & "r" & p & "k" & a & "n" & o & "s" & p & "53" & a & "57" & o & "u" & p & "48" & a & "52" & o & "v" & c & "end if" & c & " uc=uc+chr(a)" & c & "next" & c & " uc=rn+c+uc")
Analyze first, a series of variables from a to v are created, each assigned a value or string, but it's a bit strange that two bits b and l are missing in the middle, interesting.

If you still remember in the second pot, the first time uc(b) was referenced was like this: uc(lO+qO), which actually implies that b = lO+qO, and at that time we saw that the plaintext instruction in the uc function did not use b, and we were puzzled, but now we understand that it's waiting here, heh. But the other l really isn't seen assigned in the current plaintext, maybe to confuse everyone, deliberately messing around? But this guy is really random, using a to v as variable names one by one, then recombining, but why didn't he name to wxyz, it seems he's not being too random, maybe avoiding something, if you can remember that wxyz appeared in the "second pot" before, you probably get the idea, there must be something. In short, the newly combined variable is uc, note that this is not referencing the uc(b) function, considering the previous series of execute nesting, it should be clear that the program is still in the uc(b) function, so here it is actually assigning a return value to the uc(b) function. Finally, it also creates an unassigned variable rn, let's not worry about it for now, we still use the old trick, intercept, write the procedure:

Sub Intercept(code)
WScript.Echo code
OutPutFile = "decode_5.txt"
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTXT = objFSO.CreateTextFile(OutPutFile, True, False)
objTXT.Write code
objTXT.Close
Set objWSH = CreateObject("WScript.Shell")
objWSH.Run OutPutFile
WScript.Quit
End Sub

Then use Intercept to replace execute, and add that b = lO+qO
Rewrite the source code as follows:


Save the above code as Decoding_4th.vbs, run it, and the intercepted code is saved in the decode_5.txt file. Open it and it's time to get the result?

[ Last edited by uhnmki on 2008-1-17 at 05:27 PM ]
Floor15 voiL Posted 2008-01-16 11:21
中级用户 Posts 189 Credits 384
Brother uhnmki, continue. Although I don't know VBS, I'm happy to see you crack it...
1 2 3  Next
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023