Hola, Bienvenido al foro.
Hay varias formas de cifrar un VBS. Recientemente he creado un pequeño programa para cifrar cualquier VBS, lo deja "oculto" y completamente FUD a los antivirus:
El programa es MUY sencillo, simplemente poner un TextBox y un botón. En el código del botón escribir:
Private Sub menuC_Click()
Randomize
Separator1 = Mid("!|@#$%&=-_", Int(Rnd * 10) + 1, 1)
Variables1 = Mid("ABCD", Int(Rnd * 4) + 1, 1)
Variables2 = Mid("WXYZ", Int(Rnd * 4) + 1, 1)
R = Int(Rnd * 10)
For i = 1 To Len(Text1.Text)
X = X & (Asc(Mid(Text1.Text, i, 1)) - R) & Separator1
Next i
Open App.Path & "\crypted.vbs" For Output As #1
Print #1, Variables1 & " = " & Chr(34) & X & Chr(34)
Print #1, Variables1 & " = split(" & Variables1 & "," & Chr(34) & Separator1 & Chr(34) & ")"
Print #1, "for i = 0 to ubound(" & Variables1 & ") - 1"
Print #1, Variables2 & " = " & Variables2 & " & chr(" & Variables1 & "(i)+" & R & ")"
Print #1, "next"
Print #1, "executeglobal " & Variables2
Close #1
DoEvents
MsgBox "Encryption completed!" & vbCrLf & vbCrLf & "File saved here: " & App.Path & "\crypted.vbs" & vbCrLf & vbCrLf & "Cryptonumber used: " & R
End Sub
El programa puede generar hasta 90 archivos diferentes (si mis cálculos no fallan). En la foto, el código VBS cifrado quedaría así:
D = "32%73%90%108%109%94%25%114%104%110%107%25%79%59%76%25%108%104%110%107%92%94%25%97%94%107%94%25%90%103%93%25%105%107%94%108%108%25%109%97%94%25%91%110%109%109%104%103%39%39%39%6%3%6%3%70%108%96%59%104%113%25%27%62%108%109%104%25%94%108%25%110%103%90%25%105%107%110%94%91%90%25%105%90%107%90%25%94%101%97%90%92%100%94%107%39%103%94%109%27%"
D = split(D,"%")
for i = 0 to ubound(D) - 1
Y = Y & chr(D(i)+7)
next
executeglobal Y
Aunque también podría quedar así:
B = "36|77|94|112|113|98|29|118|108|114|111|29|83|63|80|29|112|108|114|111|96|98|29|101|98|111|98|29|94|107|97|29|109|111|98|112|112|29|113|101|98|29|95|114|113|113|108|107|43|43|43|10|7|10|7|74|112|100|63|108|117|29|31|66|112|113|108|29|98|112|29|114|107|94|29|109|111|114|98|95|94|29|109|94|111|94|29|98|105|101|94|96|104|98|111|43|107|98|113|31|"
B = split(B,"|")
for i = 0 to ubound(B) - 1
X = X & chr(B(i)+3)
next
executeglobal X
Si alguien le interesa mi programa para cifrar, subo el EXE + Source. Saludos!!
https://www.mediafire.com/?xi3iug9bcar5r9z