Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dare I Say it, I want to do what a virus does....

Status
Not open for further replies.

x508

Programmer
Jun 26, 2003
396
0
0
ZA
Hi

I have an interest in knowing precisely how a virus does what it does.

I want to make a proggy for protecting certain files that you specify.

I have got it right by using the OLE container control, to embed the file to there and then you have to enter a password to open it from the OLE container. Fair enough, but I have to physically go into VB in order to embed the file.

Is there a way by which I can add my compiled code to a normal everyday file that will execute before the real file actually exexutes?

Thanks in advance

**********************************
May the Code Be With You...
----------
x50-8 (X Fifty Eigt)
 
you can associate your file with the extension of the file you want to protect. This way, everytime the user opens a .doc file, for example, instead of opening a word type app, it opens your app, asks for a password, then goes on to open word.

It is not foolproof, however, because you can use the Open With to bypass this.

if this is the route you want to follow, goto msdn.microsoft.com and search for Q247529

BB
 
Hmmm, what you are suggesting is kinda like the reverse of what I'm looking for....

I want the security check to be embedded into the file, not the OS. The file must be able to run on any number of machines and be distributed. It must not be dependant on the OS. To tell you the truth, I'm working on a licensing system for my Point of Sale software, I want my clients not to be able to slip my software to their friend etc.

Thanks in advance

**********************************
May the Code Be With You...
----------
x50-8 (X Fifty Eigt)
 
i don't think any viruses embed themselves into files and then actually run themselves. Usually if a virus is embedded into a jpeg for instance, there is a secondary program which extracts and runs the virus from the jpeg.

You could try opening your EXE in notepad, copying the entire unicode text into a textbox in visual basic, then when you enter the password in your program, it copies the code out of the textbox into a file which you name with an .exe extension. Not sure if this will work or not, but as long as nothing applies any formatting to the text then i would have thought it would be ok..

Marc
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top