home *** CD-ROM | disk | FTP | other *** search
/ Hacker 2 / HACKER2.mdf / virus / span01.txt < prev    next >
Text File  |  1995-01-03  |  18KB  |  419 lines

  1. =============================================================================
  2. INTRANETWORK MEMORANDUM                               SPAN MANAGEMENT OFFICE
  3. =============================================================================
  4.                                                                   19-OCT-1989
  5.  
  6. TO:     ALL SPAN ROUTING CENTER MANAGERS AND REMOTE-NODE MANAGERS
  7.  
  8. FROM:    RON TENCATI - SPAN SECURITY MANAGER
  9.     GODDARD SPACE FLIGHT CENTER  CODE 630.2
  10.     GREENBELT, MD. 20771
  11.     (301)286-5223
  12.  
  13. SUBJ:   INFORMATION REGARDING THE DECNET WORM AND PROTECTION MEASURES
  14.  
  15.                             ----------
  16. The following information covers several aspects of the "WANK" DECnet worm
  17. which was released into the "DECnet Internet" earlier in the week.
  18.  
  19. Information contained in prior reports written by John McMahon of GSFC and
  20. Kevin Oberman of LLNL was used in preparing report.  The assistance of
  21. Digital Equipment Corporation is also gratefully acknowledged. 
  22.  
  23. Previous messages regarding this worm appearing on various mailing lists 
  24. have indicated that system managers with questions or infected nodes should 
  25. call other organizations.  
  26.  
  27. For clarification, any SPAN-connected system that believes itself to be
  28. infected, or attacked should contact ONLY the SPAN management at Goddard
  29. Space Flight Center, Greenbelt, MD.  The security effort is being
  30. coordinated by this group and all reports should be directed there.  The
  31. contact number is (301)286-7251 or (301)286-5223.  Electronic mail should be 
  32. sent to NSSDCA::TENCATI or NSSDCA::NETMGR only.  Do not send infection 
  33. reports to any other node on SPAN.
  34.  
  35. HEPnet sites should contact FNAL::DEMAR.
  36.  
  37.  
  38. BACKGROUND
  39. ----------
  40.  
  41. The worm's mission is to propagate itself randomly across the network, 
  42. to seek out systems with poor security, and to establish itself in a 
  43. priviliged account whereupon it will modify the system's SYS$ANNOUNCE
  44. banner to the following message:
  45.  
  46.  
  47.   
  48.       W O R M S    A G A I N S T    N U C L E A R    K I L L E R S
  49.     _______________________________________________________________
  50.     \__  ____________  _____    ________    ____  ____   __  _____/
  51.      \ \ \    /\    / /    / /\ \       | \ \  | |    | | / /    /
  52.       \ \ \  /  \  / /    / /__\ \      | |\ \ | |    | |/ /    /
  53.        \ \ \/ /\ \/ /    / ______ \     | | \ \| |    | |\ \   /
  54.         \_\  /__\  /____/ /______\ \____| |__\ | |____| |_\ \_/
  55.          \___________________________________________________/
  56.           \                                                 /
  57.            \    Your System Has Been Officically WANKed    /
  58.             \_____________________________________________/
  59.  
  60.      You talk of times of peace for all, and then prepare for war.
  61.  
  62.                             ---------
  63. We don't currently see that the WORM is destructive, BUT it wastes
  64. resources, and may result in denial of service by locking out priviliged 
  65. users or causing non-infected nodes to consume disk space storing all the
  66. audit records from the failed access attempts.
  67.  
  68. The worm attempts to establish itself onto a system by exploiting various
  69. weaknesses in the DECnet environment.  Some of these weaknesses have been
  70. addressed by previous SPAN directives and guidelines.  Systems that have
  71. implemented these guidelines are not at risk. 
  72.  
  73. A random number generator is used to pick the next node the worm will try
  74. to infect. The worm contains an internal list of 82 canned usernames that
  75. it will try against a system.  
  76.  
  77. In addition, it attempts to copy the file RIGHTSLIST.DAT from the selected
  78. target node.  This file is normally protected W:R. If this file is
  79. successfully copied, a list of usernames specific to the target system will
  80. be generated and some subset of those will be appended to the "canned"
  81. list.  The candidate words the worm uses whether or not it was successful
  82. at accessing RIGHTSLIST.DAT are the following: 
  83.  
  84.       ACCOUNITING   ACCOUNTS     ALLIN1       APPLETALK     ARCHIVE
  85.       BACKUP        CADCAM       COGNOS       CRAYSTN       CUSTOMER
  86.       DDSNET        DEC          DECNET       DEFAULT       DEMO
  87.       DFS$DEFAULT   DIGITAL      DNS$SERVER   DQS$SERVER    ETHERNIM  
  88.       EXOS          FIELD        GAMES        GUEST         HASP
  89.       IBM           INGRES       INVENTORY    ISSYS         IVP
  90.       LIBRARY       LN03_DLAND   LPS$SERVER   MAC           MAIL
  91.       MAILER        MANAGER      MANUALS      MASS11        MBMANAGER
  92.       MIS           MRGATE       MANAGER      NETNONPRIV    NETPRIV
  93.       NEWSMGR       NOTES$SERVER OPER         OPERATOR      ORACLE
  94.       OSI           PCAPP        PCCOMMON     PLUTO         POSTMASTER
  95.       RDBVMS$REM    RHM          SECURITY     SHUTDOWN      SNACSV
  96.       SPEAR         SPM          SRS          STUDENT       SUPPLIES
  97.       SYSINF        SYSTEM       SYSTEST      SYSTEST_CLIG  TAPESYS
  98.       TCP           TELEX        TEMP         TEST          TRAINING
  99.       TRANSFER      USER         USER1        USERP         VAXNET
  100.       VAXSIM        VTX          VXSYS
  101.  
  102. The PASSWORDS tried against the set of accounts MAY be the username
  103. ONLY, OR other passwords may be tried (such as DIGITAL, PSIPAD, MANAGER,
  104. etc) apparently depending on the version of the WORM. A bug in the worm
  105. prevents it from testing the null password as previously suspected. 
  106.  
  107.                           --------------
  108. [The following section provides information relating to the behavior of
  109. the worm. This information was primarily supplied by Kevin Oberman of
  110. LLNL and John McMahon of GSFC]
  111.                           --------------
  112.  
  113. 1. The program assures that it is working in a directory to which the owner
  114.    (itself) has full access (Read, Write,Execute, and Delete).
  115.  
  116. 2. The program checks to see if another copy is still running. It looks for a
  117.    process with the first 5 characters of "NETW_". If such is found, it deletes
  118.    itself (the file) and stops its process.
  119.  
  120.                                NOTE
  121.  
  122.     This check is done using the F$GETJPI system service.  The results
  123.     vary depending on the amount of priviliges the account possesses.
  124.     Non-priviliged accounts which are penetrated will only be able to
  125.     return information about their own UIC, so multiple copies of the
  126.     worm could be running simultaneously under different usernames.
  127.  
  128.  
  129. 3. The program then changes the default DECNET account password to a random
  130.    string of at least 12 characters.
  131.  
  132. 4. Information on the infected node and account/password used to access the
  133.    system is mailed to a central collection point on SPAN. 
  134.  
  135. 5. The process changes its name to "NETW_" followed by a random number.
  136.  
  137. 6. It checks to see if it has SYSNAM priv. If so, it defines the system
  138.    announcement message to be the WANK banner.
  139.  
  140. 7. If it has SYSPRV, it disables mail to the SYSTEM account.
  141.  
  142. 8. Also if it has SYSPRV, it modifies the system login command procedure 
  143.    (SYLOGIN.COM) to APPEAR to delete all of a user's files. (It really does
  144.    nothing.) 
  145.  
  146. 9. The procedure then scans the accounts logical name table for symbols
  147.    which contain directory specifications. Each directory located is searched
  148.    for command procedures within it protected (W:RWED). Any such procedures
  149.    have code inserted at the top which tries to modify the FIELD account to a
  150.    known password with login from any source and all privs. This is a
  151.    primitive virus, but very effective IF the procedure should be executed by
  152.    a priviliged account. 
  153.  
  154. 10. It proceeds to attempt to access other systems by picking node numbers
  155.    at random. It then used PHONE to get a list of active users on the remote
  156.    system. It proceeds to irritate them by causing the PHONE object to send 
  157.    them a one-line "fortune cookie" type message.  The appearance of this 
  158.    message does not indicate a penetration attempt on that node, more 
  159.    appropriately, it indicates an "irritation attempt".
  160.  
  161.                                  NOTE
  162.    If your site receives these PHONE messages the source node
  163.    information can be found in the NETSERVER.LOG files in your DECnet
  164.    default account. 
  165.  
  166. 11. The program tries to access the RIGHTSLIST.DAT file as previously 
  167.    described earlier. 
  168.  
  169. 12. It then steps through the list of usernames it has built and uses FAL 
  170.    to validate the candidate userid/password combination.  If a password is 
  171.    guesses, the worm copies itself over to the target system and starts itself
  172.    via the SUBMIT/REMOTE feature of VMS. 
  173.  
  174. 13. When the worm finishes with a system, it picks another random system and
  175.    repeats (forever).
  176.  
  177.  
  178.  
  179. SECURITY GUIDELINES TO STOP THE SPREAD OF THIS WORM:
  180. ====================================================
  181.  
  182.  
  183. 1. It is IMPERATIVE that all systems protect or remove the DECnet TASK 0
  184.    object to prevent reoccurrance of this worm, OR MORE SERIOUS ATTACKS
  185.    OF THIS KIND IN THE FUTURE! 
  186.  
  187.    The TASK object can be secured by either of the following methods:
  188.  
  189. Method 1):
  190.     Issue the command:    
  191.  
  192.         NCP> CLEAR OBJECT TASK ALL
  193.     
  194.     after the network is started up. This command can also be
  195.     inserted into the procedure SYSTARTUP.COM (SYSTARTUP_V5.COM on V5.x
  196.     systems) after the call to STARTNET.COM.  In addition while the system
  197.     is running, this command must be executed EACH TIME the network is
  198.     restarted. 
  199.  
  200. Method 2):
  201.     Issue the following commands ONCE:
  202.  
  203.     NCP> SET OBJECT TASK USER DECNET PASSWORD <a bunch of garbage>
  204.     NCP> DEFINE OBJECT TASK USER DECNET PASSWORD <a bunch of garbage>
  205.  
  206.     This causes a login failure to be generated whenever the TASK 
  207.     object is accessed.  Once done, this change will be permanent.
  208.  
  209.                     NOTE
  210.           We have received one report that TASK 0 is required 
  211.           for DECwindows.  Read your documentation!
  212.   
  213.  
  214. 2. Under NO circumstances it is acceptable for an account to have a
  215.    password the same as the username.  Passwords (passPHRASES) should be
  216.    created so that they are difficult to guess, multi-word phrases are
  217.    preferable. As a precaution, we recommend that all passwords be changed.
  218.    Additionally, system managers may choose to revalidate ALL accounts. 
  219.  
  220.    If a system had the DECNET TASK 0 protected as above, the DECNET account
  221.    protected against SUBMIT/REMOTE (described below) and no user had their
  222.    userid as their password, it was immune to this WORM.  As a result, the
  223.    number of nodes actually INFECTED by this attack is relatively small. The
  224.    number ATTACKED however, is large. 
  225.  
  226. 3. NETWORK ACCOUNTS
  227.    To protect against the SUBMIT/REMOTE attack, run AUTHORIZE and make sure
  228.    that all network account flags are set to NOBATCH, NODIALUP, NOLOCAL,
  229.    and NOREMOTE.
  230.  
  231. 4. FIELD ACCOUNT
  232.    Make sure the FIELD ACCOUNT does not have the password FIELD. DISUSER the
  233.    account.  You must SEARCH all .COM files for a "field/remote/dialup". If
  234.    the search shows it is in .COM files, They have a trojan horse appended
  235.    to the files. When the .COM file is executed, This Trojan horse will try
  236.    to reset account FIELD to /NODISUSER and password to FIELD.  You should
  237.    either delete the corrupted .COM file and obtain a good one elsewhere, or
  238.    examine the file and remove the affected lines of the command procedure.
  239.  
  240. 5. WORM FILES 
  241.    The WORM source files are W.COM or a single alphabetic character (C or D)
  242.    followed by 4 or 5 numeric characters. (Cnnnnn.COM), ("nnnn" represents a
  243.    random number). The WORM will start a process or processes running. 
  244.    These processes are named in format NETW_nnnn, and should be deleted.
  245.    PHONE_nnnn may also be running as the WORM utilizes the PHONE object in
  246.    an attempt to send a message to a user on another randomly selected node.
  247.  
  248. 6. ALARMS
  249.    Some alarms generated by the WORM are related to PHONE.EXE and FAL.EXE.
  250.    The majority of the alarms are login failures as the WORM attempts to log
  251.    into specific accounts. 
  252.  
  253.    We recommend that alarms be set immediately for logins, logouts, breakin
  254.    attempts, modifications to the system and net UAF's, and to changes to
  255.    user and system passwords. 
  256.  
  257.  
  258. DISCOVERY AND CLEANUP
  259. ----------------------
  260.  
  261.   1.     Log into a "privileged account"
  262.         $ SHOW SYSTEM
  263.        Look for NETW_dddd (dddd represents 4 or 5 random digits)
  264.         IF NETW_dddd is found, note the process ID and do:
  265.        $ STOP PROCESS/ID=NETW_dddd
  266.  
  267.     The command procedure included below can be used by system 
  268.     managers to perform this function in the background.  It is 
  269.     recommended that this procedure be run for the next week or 
  270.     so until the worm is killed-off.
  271.  
  272.    2.     Check the protection on all command procedures.  If any are
  273.     (W:REWD), check for infection.  There should be two versions. The
  274.      older one should be OK unless multiple infection has occurred.
  275.     Generally the oldest version is OK but this is not guaranteed.
  276.  
  277.     An easy method is to execute the command on every disk:
  278.  
  279.         $SEARCH dev:[000000...]*.COM;* PASS=FIELD
  280.     
  281.     Any infected files will contain the line:
  282.  
  283.     $mcr authorize add field/remote/dialup/network/batch/defpriv=all
  284.     /priv=all/flag=(nodisuser,nocaptive,nopwd_expire)/pass=field
  285.  
  286.    3.    Redefine or deassingn the SYS$ANNOUNCE logical name.  Replace
  287.     the correct SYS$ANNOUNCE messages.   (Note the initial value of
  288.     SYS$ANNOUNCE to identify the infected user account and location of
  289.     the false announce message files (on infected systems only).
  290.  
  291.    4.      Clean up SYSLOGIN.COM.  Remove the bogus file deletion routine.
  292.  
  293.    5.      Search all login directories for files named Cddddd.com or
  294.         Dddddd.com.  Dddddd.COM is a dummy file which precedes the actual
  295.     infection. Cddddd.COM is the worm itself (normally both are 
  296.     deleted by the worm).
  297.     
  298.    6.   If your node is attacked or penetrated, please contact the SPAN 
  299.     Management immediately via MAIL or by phone. Send all messages
  300.     to either NSSDCA::TENCATI or NSSDCA::NETMGR. If you do not have
  301.     NSSDCA defined in your database, use the node number 6277::. We
  302.     need to know which nodes have the worm running on them so we can
  303.     coordinate cleanup measures with the appropriate personnel.
  304.  
  305.                      NOTE
  306.       A tell-tale sign that your node was ATTACKED will be multiple
  307.       login failure reports in your operator.log file.
  308.  
  309.  
  310.    7.   DO NOT DELETE ANY OF YOUR LOG FILES OR AUDIT TRAILS.  THIS 
  311.     INFORMATION MAY BE REQUESTED OF YOU LATER IF THIS MATTER IS GOING
  312.     TO BE PROSECUTED. 
  313.  
  314.  
  315. PREVENTION MEASURES
  316. -------------------
  317.  
  318.     1.  Ensure all user accounts have good password management. (No
  319.         "user user" or null passwords.)
  320.  
  321.     2.  No world READ command procedures in user or priviliged 
  322.         accounts.
  323.  
  324.     3.  No TASK objects.
  325.  
  326.     4.  Do not use the the account names as the password on network
  327.         accounts.  (Use the V5.2 approach - separate object userid's)
  328.  
  329.     5.  Ensure all network accounts are set NOBATCH, NOLOCAL, NODIALUP,
  330.         and NOREMOTE and have a PRCLIM of 1.
  331.  
  332.     6.  Audit all changes by AUTHORIZE. Analyze audit trail for changes
  333.         to the FIELD account.
  334.  
  335.     7.  Place an ALARM ACE on SYS$MANAGER:SYLOGIN.COM;* for
  336.         WRITE+DELETE+SUCCESS access. Enable ACL auditing. Analyze the
  337.         audit trail for change to SYLOGIN.COM.
  338.  
  339.     8.  Make sure ACCOUNTING and OPCOM are running and proper alarms
  340.         are set.
  341.  
  342.     9.  Protect RIGHTSLIST.DAT against World access.  Alternatively 
  343.         move or rename it and define the logical symbol RIGHTSLIST 
  344.         to the new file. ($DEF/SYS/EXEC RIGHTSLIST <renamed file>)
  345.         This will limit the ability of the worm to determine 
  346.         actual valid usernames.
  347. ----------------------------------------------------------------------------
  348.  
  349. The following command procedure was written by John McMahon at GSFC.  It 
  350. can be run as a batch job under a priviliged account.  This procedure 
  351. searches all processes on a running system to determine if the worm process 
  352. is present.  If detected, the worm is deleted.
  353.  
  354.  
  355. ---------------------------- ANTIWANK.COM ----------------------------------
  356. $!
  357. $!    Antiwank.Com - This program performs two functions.  It kills any
  358. $!    copy of the worm currently running (any process starting with NETW_
  359. $!    in it's name) and disguises itself as a copy of the worm to help
  360. $!    prevent new copies from being created.
  361. $!
  362. $!    This program should be submitted to a batch queue under the username
  363. $!    SYSTEM.  It requires WORLD priv to check the process names on your
  364. $!    CPU.  It runs continuously, but uses little overhead.
  365. $!
  366. $!    This program uses the process name "NETW_AntiWank".  It should not be
  367. $!    confused as a copy of the worm program itself (which uses 
  368. $!    NETW_randomnumber).
  369. $!
  370. $!    The system manager should add additional userids to the line
  371. $!    beginning with SEND_MAIL_TO.  If the program detects the worm,
  372. $!      it will send a detection message to the userids in SEND_MAIL_TO.  
  373. $!
  374. $!    John McMahon
  375. $!    NASA/GSFC CODE 630.4
  376. $!
  377. $!    18-OCT-1989 16:11:56.21 
  378. $!
  379. $!    SPAN:        SDCDCL::FASTEDDY
  380. $!    Internet:    Fasteddy@Dftnic.Gsfc.Nasa.Gov
  381. $!    Bitnet:        Fasteddy@Dftbit
  382. $!
  383. $!    Phone:    301-286-2045
  384. $!
  385. $ Set NoON
  386. $ AntiWank_Name = "NETW_AntiWank"
  387. $ Process_Name_Prefix = "NETW_"
  388. $ Send_Mail_To = "SYSTEM"
  389. $ Set Process/Priv=(World)
  390. $ Set Process/Name="''AntiWank_Name'"
  391. $ Start:
  392. $ Context = ""
  393. $ Pid_Loop:
  394. $ Check_Pid = F$Pid(Context)
  395. $ If Check_Pid .Eqs. "" Then Goto End_Pid_Loop
  396. $ Check_Prcnam = F$Edit(F$Getjpi(Check_Pid,"PRCNAM"),"TRIM")
  397. $ Write Sys$Output "Process Name: ",Check_Prcnam
  398. $ If Check_Prcnam .Eqs. AntiWank_Name Then Goto Pid_Loop
  399. $ If F$Extract(0,5,Check_Prcnam) .Eqs. Process_Name_Prefix Then -
  400.   Gosub Action_Routine
  401. $ Goto Pid_Loop
  402. $!
  403. $ End_Pid_Loop:
  404. $ Write Sys$Output F$TIME()," ANTIWANK is still working for you"
  405. $ Wait 00:10:00
  406. $ Goto Start
  407. $!
  408. $ Action_Routine:
  409. $ Write Sys$Output "Action Routine"
  410. $ Username = F$Getjpi(Check_Pid,"Username")
  411. $ Stop/Id='Check_Pid'
  412. $ Mail NL: 'Send_Mail_To' -
  413.   /SUBJECT="Worm Terminated ''$Status' ''Check_Prcnam' ''Check_Pid' ''Username'"
  414. YES
  415. $ Return
  416. ---------------------------END OF ANTIWANK.COM-------------------------
  417. 
  418. Downloaded From P-80 International Information Systems 304-744-2253
  419.