Solved

how to wrap a vbs script

Posted on 2009-07-08
7
193 Views
Last Modified: 2012-05-07
I have a script file (.vbs), in the content it has the domainadministrator user name and domain password.
This script will be run on a remote computer that is connected to our domain through VPN.
I would like to know if there is a way to make the user unable to edit the script and see the content of it.
another thing that I want to know is how to email the use a script in Outlook, usually Outook doesn't accept .vbs files.

Thanks
0
Comment
Question by:jskfan
  • 3
  • 2
  • 2
7 Comments
 
LVL 31

Expert Comment

by:Frosty555
ID: 24809953
You can add a fake extension to the end of the filename, like "myscript.vbs.renameme". Then Outlook will allow it through. Your users have to remember to rename the file back to a .VBS though. You can also ZIP the file up and send the zip file.

You cannot easily encrypt or hide the contents of a VBS file. Certainly not in any way that can't be easily undone. But almost anything you can do in a VBS script you can also do in a regular VB6 application. You can recreate your script in VB6 and then compile it to an EXE, which will be harder to backward engineer.

The real solution, though, is to just not have sensitive information in the file at all. What is this script doing that it requires the domain admin's username and password to be out in the clear? Maybe there is a better way to do it.
0
 

Author Comment

by:jskfan
ID: 24812540
I have Winrar would that cpmpress the file?
0
 
LVL 7

Expert Comment

by:brettkm
ID: 24812966
Yep.

You can also zip a file with winrar so it has a zip extension rather than rar.  This means whoever you email it to doesn't need to have Winrar installed and will more than likely be able to extract the file.
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:jskfan
ID: 24812974
is that just by renaming a file from file.vbs to file.vbs.zip?
0
 
LVL 7

Assisted Solution

by:brettkm
brettkm earned 150 total points
ID: 24813534
No you need to use a compression program.  Winzip and Winrar are the most common ones.

http://www.winzip.com/
http://www.rarlabs.com/
0
 

Author Comment

by:jskfan
ID: 24817510
I rename a file with .zip or .rar and it changed the icon.
so It's up to the end user to extract it.
I don;t think I need to run winzip or winrar to make a zip or rar file.
do you agree?
0
 
LVL 31

Accepted Solution

by:
Frosty555 earned 350 total points
ID: 24818324
No. Like brettkm just said, if you want to compress it, you have to use a compression program.

Windows applies the icon by looking at the extension of the file. Since you manually changed the extension, windows changed the icon, but that doesn't mean the file is a valid compressed ZIP file. Inside it is still just your regular VBS file. You're just confusing windows by forcing a non-zip file to have a zip extension.

Use WinZip, WinRAR to make a ZIP or RAR file. Or you can do it using native windows way by right clicking on the file, and going to Send To->Compressed Folder (ZIP).
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Batch, VBS, and scripts in general are incredibly useful for repetitive tasks.  Some tasks can take a while to complete and it can be annoying to check back only to discover that your script finished 5 minutes ago.  Some scripts may complete nearly …
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now