Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Free VBscript obfuscator

Hi all
I have a reasonably large (2k lines) vbScript file which i need to obfuscate. It is a customised QTP function library so must be distributed with the product. Is there any free VBscript obfuscators out there that do a decent job?
Thanks!

EDIT:
Encryption is not suitable for use with QTP so Windows Scripting Encryption tools will not work, QTP has to be able to understand the output. I'm not trying to make the output hacker proof, just so the casual programmer cant be bothered to put the effort in to de-obfuscate it

like image 422
TerrorAustralis Avatar asked Dec 29 '22 04:12

TerrorAustralis


1 Answers

Here's a Little script i whipped up for you that will obfuscate any vbs file....

The obfuscation is pretty simple, so anyone familiar with vbs can prolly de-obfuscate it in 1 min.

If you want higher level of obfuscation, well you need to pay me... :) but for this i'll take your votes! :D

The resulting script obfuscated.vbs will remain a valid vbs file.

I could've made a self decrypting vbs, but chances are that will cause a red-flag with an antivirus...and if your anti-virus is any good, it should flag this as suspicious.

Please note, Standard disclaimer applies...I'm not responsible for any damage that maybe occur due to the script, use at own risk. I don't guarantee it'll work all the time

'VBS Obfuscator by st0le

Randomize
set fso = CreateObject("Scripting.FileSystemObject")
fileName = Inputbox("Enter Path of the File to scramble : ")
set src = fso.OpenTextfile(fileName,1)
body = src.readall
set rep  = fso.createtextfile("Obfuscated.vbs",true)
rep.writeline "Execute(" & Obfuscate(body) & " ) "

Function Obfuscate(txt)
enc = ""
for i = 1 to len(txt)
enc = enc & "chr( " & form( asc(mid(txt,i,1)) ) & " ) & "
next
Obfuscate = enc & " vbcrlf "
End Function


Function form(n)

r = int(rnd * 10000)
k = int(rnd * 3)
if( k = 0) then ret = (r+n) & "-" & r
if( k = 1) then ret = (n-r) & "+" & r
if( k = 2) then ret = (n*r) & "/" & r
form = ret
End Function
like image 88
st0le Avatar answered Jan 13 '23 13:01

st0le