home *** CD-ROM | disk | FTP | other *** search
-
- ┌──────────────────────────────────────────────────────────┐
- │ Heuristic Macro Virus Scanner/cleaner │
- │ (user's manual) │
- │ │
- │ (c) Jan Valky & Lubos Vrtik, Slovakia │
- └──────────────────────────────────────────────────────────┘
-
- Last update: 1-dec-96
-
- Sorry, this is only short version of DOX, because we're lazzy to
- write full DOX :)
-
- Excuse us our english plz, it is not our natural language ;(
-
- IF YOU WANT HELP US TO IMPROVE HMVS, PLZ SEND US ANY COMMENTS OR IDEAS.
- NEW MACRO VIRUSES ARE WELCOMED. SEND US PLZ ALL MACRO VIRUSES HMVS CAN'T
- DETECT BY NAME.
-
- ══════════════════════════════════════════════════════════════════════════
- CONTENTS
-
- 1. HOW TO USE HMVS
- 2. METHODS USED IN HMVS
- 2.1 Available options, when virus was found
- 3. WHAT IS MACRO VIRUS :)
- 4. HEURISTIC FLAGS DISPLAYED BY HMVS
- ══════════════════════════════════════════════════════════════════════════
-
- 1. HOW TO USE HMVS
- ──────────────────────────────────────────────────────────────────────────
-
- Without paramaters will HMVS scan only *.DOC and *.DOT files in
- current directory and all its subdirectories.
-
- Usage: HMVS drive:[\\path] switches
- switches:
- /H,/? - this help
- /ALL - scan all files (*.*)
- /REP - output to log file HMVS.LOG
- /REP=file - output to specified log file
- /NOH - disable heuristics, only scanning
- /NOS - disable scanning, only heuristics
- /MAC - prompt if file contains macros
- /IA - nonstop scanning without prompt
- /CA - automatically clean all infected files
- /RA - automatically rename all infected files
- /NOB - disable user break with ESC key
- /EXT - decrypt execute only macros (reg. version only)
-
- Short description of command line parameters:
-
- /H
- /? Displays help about HMVS using
- /ALL All files will be scanned (*.*)
- Without this parameter only files *.DOC and *.DOT
- will be scanned.
-
- /REP Report will be logged to file HMVS.LOG
-
- /REP=file Report will be logged to user specified file
-
- /NOH Disables heuristic analysis. Only standard scanning
- method will be used.
-
- /NOS Disables standard scanning method. Only heuristics
- will be used.
- You can use both switch (/NOS /NOH) together :)
- This combination can save your time, if you want get
- informations about macros in file (use also /MAC
- or /REP switch)
-
- /MAC If this switch was entered program will stop at each
- file, that contains one or more macros. Otherwise program
- will stop only when file is infected by known virus,
- when file is probably infected or suspected.
-
- /IA With this option program won't stop on any file.
- You will use probably this option together with /REP
- switch.
-
- /CA If you want to automatically clean any infected
- or probably infected files, use this switch.
- Files will be cleaned only if creating of backup copy
- was succesfull.
-
- WARNING: ALL MACROS WILL BE REMOVED FROM INFECTED FILE
-
- After cleaning you should check if cleaned file is OK.
- If something went wrong, you can restore original
- file from backup copy. If HMVS fails plz send us file, that
- couldn't be cleaned.
-
- /RA With this switch HMVS'll automatically rename any infected
- or probably infected files.
-
- /NOB With this option HMVS can't be stopped with ESC key.
- Otherwise you can break program in any time with pressing
- the ESC key.
-
- /EXT This option allow you to decrypt execute only macros.
- (Available only for registered users).
- With this option you will be prompted at each file
- containing execute-only macro(s), if you want to
- decrypt it. If yes, program will first create a backup
- copy of file (*.VI?) and them decrypt all execute-only
- macros.
- This is nice option for AV researcher or experienced
- users.
-
- WARNING: If you use this option, scanning is disabled !
-
- 2. METHODS USED IN HMVS
- ──────────────────────────────────────────────────────────────────────────
-
- When MS Word documents or templates are scanned, HMVS do the following:
- - searches for macros in document or template
- - decrypts each macro (if encrypted)
- - uses standard scan method (only macros are scanned, not whole file !)
- Some antiviral product have problem to detect how and where macros
- are placed, so they must scan whole file :)
- - uses heuristics
- Each macro is analysed and checked for some operations. If heuristics
- found some checked operation, it set flag for it.
-
- After these operations HMVS displays results of scanning and heuristic
- analysis.
-
- HSMV uses two methods to detect macro viruses:
-
- ■ Standard method based on 'identifications strings'
- This is well know method frequently used in most virus scanners.
- Search string method is fast and reliable, but can search only for
- known viruses.
-
- ■ Heuristic analysis
- HMVS uses unique heuristic technology. HMVS uses special semi-emulator
- of word macro commands (something like length disassembler, if you
- know, what is it ...). It trace trough each command in macro,
- step by step, and try to understand it.
-
- Both methods are good. Standard method can detect macro virus exact by
- its name, heuristics can detect known and unknown viruses.
-
- Good antivirus products can use both methods. With large virus databases
- they can reach top hit-rate and they can detect unknown viruses too.
-
- Heuristics may produce false positive alarms in same cases. We'we checked
- HMVS with some files containing antimacros (for example DOCGUARD.DOC).
- Because this file contains macros is doing some operations typical for
- viruses, this file for HMVS seems to be infected by a macro virus.
-
- There is an example of false alarm (file DOCGUARD.DOC)
-
- C:\MACRO\WINWORD\DOCGUARD.DOC
- Stream: WordDocument (MS Word)
- * document contains 7 macros with total length 15065 bytes
- {AutoOpen} {Remove} {Install} {AutoClose} {NormalAutoExec} {NormalAutoOpen}
- {NormalFileOpen}
- ! Copies macros into the template ('MacroCopy') [3 x]
- + Contains execute-only (encrypted) macros
- + Detects if macro is execute-only ('IsExecuteOnly()')
- + Uses the 'FileSaveAs' macro command
- + Enables auto macro processing ('DisableAutoMacro')
- + Detects number of macros in template or document ('CountMacros()')
- + Detects macros names in template or document ('MacroName$()')
- ! Deletes other files ! ('Kill') [2 x]
- + Contains macros but is named *.DOC
- ! Creates or edits macro ('ToolsMacro .Edit')
- Result of heuristics: POLY.CRYPT.COMPANION.MACRO virus
-
- PROBABLY INFECTED WITH A MACRO VIRUS !!!
-
- 2.1 Available options, when virus was found
- ──────────────────────────────────────────────────────────────────────────
-
- If HMVS detect that file is infected, it displays something like
- the following example:
-
- Note: Macros enclosed in [] are unencrypted, macros enclosed in {} are
- encrypted.
-
- Flags used for result of heuristics:
-
- POLY - might be polymorph or self modifying or antiheuristic
- virus
- CRYPT - encrypted virus
- STEALTH - uses 'stealth' method
- COMPANION - companion macro virus (links template with document)
- MACRO - macro virus
-
- C:\MACRO\WINWORD\XENIXOS\XENIXOS.DOC
- Stream: WordDocument (MS Word)
- * document contains 11 macros with total length 31342 bytes
- {Drop} {Dummy} {AutoExec} {AutoOpen} {Datei╓ffnen} {ExtrasMakro}
- {DateiBeenden} {DateiDrucken} {DateiSpeichern} {DateiSpeichernUnter}
- {DateiDruckenStandard}
- ! Copies macros into the template ('MacroCopy') [60 x]
- + Contains execute-only (encrypted) macros
- + Uses the 'FileSaveAs' macro command
- + Disables global template write access warnings
- + Enables auto macro processing ('DisableAutoMacro')
- - Might prevent the ESC key from interrupting a macro ('DisableInput')
- + Detects number of macros in template or document ('CountMacros()')
- + Detects macros names in template or document ('MacroName$()')
- - Gets parameters from WIN.INI or WINWORD6.INI ('GetProfileString$()')
- ! Executes other DOS or Windows programs ! ('Shell') [1 x]
- ! Writes directly to a sequential file ! ('Print #') [381 x]
- + Changes DOS attributes of other files ('SetAttr')
- - Changes current directories ('ChDir')
- - Opens a sequential file for input or output of text ('Open #')
- - Closes an open sequential file ('Close #')
- + Contains macros but is named *.DOC
- Contains virus pattern: <Xenixos>
- Result of heuristics: CRYPT.MACRO virus
-
- INFECTED WITH A MACRO VIRUS !!!
-
- 1-Skip 2-Remove all macros 3-Rename file 4-Ignore all
- 5-Automatically remove all macros 6-Automatically rename all files :
-
- Now program waits for user input ...
-
- Available actions:
-
- 1-Skip
- Program will do nothing. It skips this file and will continue searching
- for the next files
- 2-Remove all macros
- At first backup copy will be created. Then ALL macros from file
- will be removed (each macro will be overwritten with nice text :)
- 3-Rename file
- Renames file to *.VI?
- 4-Ignore all
- Do nothing with all files. Like 1, but for any next file
- 5-Automatically remove all macros
- Like 2, but for any next file
- 6-Automatically rename all files
- Like 3, but for any next file
-
- 3. WHAT ARE MACRO VIRUSES :)
- ──────────────────────────────────────────────────────────────────────────
-
- If you don't know what are macro viruses, you have big chance to be
- a potential victim of macro viruses :)
- Don't worry, HMVS is here to solve your problems (we hope ...)
-
- 4. HEURISTIC FLAGS DISPLAYED BY HMVS
- ──────────────────────────────────────────────────────────────────────────
-
- Current version of HMVS can detect the following flags:
- (Currently we do not plan to add new flags in next version)
-
- ! Copies macros into the template ('MacroCopy')
- + Might copy macros to template with using 'Organizer .Copy'
- ! Copies macros to template with using 'Organizer .Copy'
- ! Adds a template or WLL to the list of global templates ('AddAddIn')
- + Contains execute-only (encrypted) macros
- + Detects if macro is execute-only ('IsExecuteOnly()')
- + Uses the 'FileSaveAs' macro command
- + Disables global template write access warnings
- + Enables the fast save option 'FastSaves'
- - Might enable auto macro processing ('DisableAutoMacro')
- + Enables auto macro processing ('DisableAutoMacro')
- - Might prevent the ESC key from interrupting a macro ('DisableInput')
- + Prevents the ESC key from interrupting a macro ('DisableInput')
- + Detects number of macros in template or document ('CountMacros()')
- + Detects macros names in template or document ('MacroName$()')
- - Sets up a background timer that runs a macro at the specified time ('OnTime')
- - Gets parameters from WIN.INI or WINWORD6.INI ('GetProfileString$()')
- - Sets parameters in WIN.INI or WINWORD6.INI ('SetProfileString$()')
- - Gets parameters from initiating file ('GetPrivateProfileString$()')
- - Sets parameters in initiating file ('SetPrivateProfileString$()')
- + Removes document protection ('LockDocument')
- - Manipulates with protection for form fields
- - Removes protection for form fields
- - Renames menu items ('RenameMenu')
- ! Executes other DOS or Windows programs ! ('Shell')
- ! Deletes other files ! ('Kill')
- ! Writes directly to a sequential file ! ('Write')
- ! Writes directly to a sequential file ! ('Print #')
- + Removes directory ('RmDir')
- + Changes DOS attributes of other files ('SetAttr')
- - Detects number of subdirectories ('CountDirectories')
- - Changes current directories ('ChDir')
- - Opens a sequential file for input or output of text ('Open #')
- - Closes an open sequential file ('Close #')
- + Makes available a routine stored in DLL or WLL 4 use in a macro ('Declare')
- - Detects environment variable ('Environ$')
- + Contains macros but is named *.DOC
- - Detect whether the active document was changed ('IsDocumentDirty()')
- + Converts document to the template ('FileSaveAs .Format = 1')
- + Sets a password for opening the document ('FileSaveAs .Password = ')
- ! Creates or edits macro ('ToolsMacro .Edit')
-
- ! means dangerous operation
- + means warning (suspect)
- - only for your information
-
- Sorry, we haven't time to explain these messages. We thinking for AV
- researchers and experienced users it is sufficient.
-
- We can add detailed descriptions in next release, if we'll get lot of
- requests and questions.
-
- ─────────────────────── that's all ───────────────────────────
-
- BTW, We don't like user's manual writting ...
-