home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 14 Text / 14-Text.zip / sshfaq.zip / dos.txt next >
Text File  |  2000-04-27  |  46KB  |  1,417 lines

  1.           
  2. ===================================                    
  3. =INTRODUCTION TO DENIAL OF SERVICE=
  4. ===================================
  5.  
  6. Hans Husman
  7. t95hhu@student.tdb.uu.se
  8. Last updated: Mon Oct 28 14:56:31 MET 1996
  9.  
  10. .0. FOREWORD
  11.  
  12. .A. INTRODUCTION
  13.     .A.1. WHAT IS A DENIAL OF SERVICE ATTACK?
  14.     .A.2. WHY WOULD SOMEONE CRASH A SYSTEM?
  15.         .A.2.1. INTRODUCTION
  16.         .A.2.2. SUB-CULTURAL STATUS
  17.         .A.2.3. TO GAIN ACCESS
  18.         .A.2.4. REVENGE
  19.         .A.2.5. POLITICAL REASONS
  20.         .A.2.6. ECONOMICAL REASONS
  21.         .A.2.7. NASTINESS
  22.     .A.3. ARE SOME OPERATING SYSTEMS MORE SECURE?
  23.  
  24. .B. SOME BASIC TARGETS FOR AN ATTACK
  25.     .B.1. SWAP SPACE
  26.     .B.2. BANDWIDTH
  27.     .B.3. KERNEL TABLES
  28.     .B.4. RAM
  29.     .B.5. DISKS
  30.     .B.6. CACHES
  31.     .B.7. INETD
  32.  
  33. .C. ATTACKING FROM THE OUTSIDE
  34.     .C.1. TAKING ADVANTAGE OF FINGER
  35.     .C.2. UDP AND SUNOS 4.1.3.
  36.     .C.3. FREEZING UP X-WINDOWS
  37.     .C.4. MALICIOUS USE OF UDP SERVICES
  38.         .C.5. ATTACKING WITH LYNX CLIENTS
  39.     .C.6. MALICIOUS USE OF telnet
  40.     .C.7. MALICIOUS USE OF telnet UNDER SOLARIS 2.4
  41.     .C.8. HOW TO DISABLE ACCOUNTS
  42.     .C.9. LINUX AND TCP TIME, DAYTIME
  43.     .C.10. HOW TO DISABLE SERVICES
  44.     .C.11. PARAGON OS BETA R1.4
  45.     .C.12. NOVELLS NETWARE FTP
  46.     .C.13. ICMP REDIRECT ATTACKS
  47.     .C.14. BROADCAST STORMS
  48.     .C.15. EMAIL BOMBING AND SPAMMING
  49.     .C.16. TIME AND KERBEROS
  50.     .C.17. THE DOT DOT BUG
  51.     .C.18. SUNOS KERNEL PANIC
  52.     .C.19. HOSTILE APPLETS
  53.     .C.20. VIRUS
  54.     .C.21. ANONYMOUS FTP ABUSE
  55.     .C.22. SYN FLOODING
  56.     .C.23. PING FLOODING
  57.     .C.24. CRASHING SYSTEMS WITH PING FROM WINDOWS 95 MACHINES
  58.     .C.25. MALICIOUS USE OF SUBNET MASK REPLY MESSAGE
  59.     .C.26. FLEXlm
  60.     .C.27. BOOTING WITH TRIVIAL FTP
  61.  
  62. .D. ATTACKING FROM THE INSIDE
  63.     .D.1. KERNEL PANIC UNDER SOLARIS 2.3
  64.     .D.2. CRASHING THE X-SERVER
  65.     .D.3. FILLING UP THE HARD DISK
  66.     .D.4. MALICIOUS USE OF eval
  67.     .D.5. MALICIOUS USE OF fork()
  68.     .D.6. CREATING FILES THAT IS HARD TO REMOVE
  69.     .D.7. DIRECTORY NAME LOOKUPCACHE
  70.     .D.8. CSH ATTACK
  71.     .D.9. CREATING FILES IN /tmp
  72.     .D.10. USING RESOLV_HOST_CONF
  73.     .D.11. SUN 4.X AND BACKGROUND JOBS    
  74.     .D.12. CRASHING DG/UX WITH ULIMIT 
  75.     .D.13. NETTUNE AND HP-UX
  76.     .D.14. SOLARIS 2.X AND NFS
  77.     .D.15. SYSTEM STABILITY COMPROMISE VIA MOUNT_UNION
  78.     .D.16. trap_mon CAUSES KERNEL PANIC UNDER SUNOS 4.1.X
  79.  
  80. .E. DUMPING CORE
  81.     .E.1. SHORT COMMENT
  82.     .E.2. MALICIOUS USE OF NETSCAPE
  83.     .E.3. CORE DUMPED UNDER WUFTPD
  84.     .E.4. ld UNDER SOLARIS/X86
  85.  
  86. .F. HOW DO I PROTECT A SYSTEM AGAINST DENIAL OF SERVICE ATTACKS?
  87.     .F.1. BASIC SECURITY PROTECTION
  88.         .F.1.1. INTRODUCTION
  89.         .F.1.2. PORT SCANNING
  90.         .F.1.3. CHECK THE OUTSIDE ATTACKS DESCRIBED IN THIS PAPER
  91.         .F.1.4. CHECK THE INSIDE ATTACKS DESCRIBED IN THIS PAPER
  92.         .F.1.5. EXTRA SECURITY SYSTEMS
  93.         .F.1.6. MONITORING SECURITY
  94.         .F.1.7. KEEPING UP TO DATE
  95.         .F.1.8. READ SOMETHING BETTER
  96.     .F.2. MONITORING PERFORMANCE
  97.         .F.2.1. INTRODUCTION
  98.         .F.2.2. COMMANDS AND SERVICES                      
  99.         .F.2.3. PROGRAMS
  100.         .F.2.4. ACCOUNTING
  101.  
  102. .G. SUGGESTED READING
  103.     .G.1. INFORMATION FOR DEEPER KNOWLEDGE
  104.     .G.2. KEEPING UP TO DATE INFORMATION
  105.     .G.3. BASIC INFORMATION
  106.  
  107. .H. COPYRIGHT
  108.  
  109. .I. DISCLAIMER
  110.  
  111. .0. FOREWORD
  112. ------------
  113.  
  114. In this paper I have tried to answer the following questions:
  115.  
  116.     - What is a denial of service attack?
  117.     - Why would someone crash a system?
  118.     - How can someone crash a system.
  119.     - How do I protect a system against denial of service attacks?
  120.     
  121. I also have a section called SUGGESTED READING were you can find
  122. information about good free information that can give you a deeper
  123. understanding about something.
  124.  
  125. Note that I have a very limited experience with Macintosh, OS/2 and
  126. Windows and most of the material are therefore for Unix use. 
  127.  
  128. You can always find the latest version at the following address:
  129. http://www.student.tdb.uu.se/~t95hhu/secure/denial/DENIAL.TXT
  130.  
  131. Feel free to send comments, tips and so on to address:
  132. t95hhu@student.tdb.uu.se
  133.  
  134. .A. INTRODUCTION
  135. ~~~~~~~~~~~~~~~~
  136.  
  137. .A.1. WHAT IS A DENIAL OF SERVICE ATTACK?
  138. -----------------------------------------
  139.  
  140. Denial of service is about without permission knocking off
  141. services, for example through crashing the whole system. This
  142. kind of attacks are easy to launch and it is hard to protect
  143. a system against them. The basic problem is that Unix
  144. assumes that users on the system or on other systems will be
  145. well behaved. 
  146.  
  147. .A.2. WHY WOULD SOMEONE CRASH A SYSTEM?
  148. ---------------------------------------
  149.  
  150. .A.2.1. INTRODUCTION
  151. --------------------
  152.  
  153. Why would someone crash a system? I can think of several reasons
  154. that I have presentated more precisely in a section for each reason,
  155. but for short:
  156.  
  157.     .1. Sub-cultural status.
  158.     .2. To gain access.
  159.     .3. Revenge.
  160.     .4. Political reasons.
  161.     .5. Economical reasons.
  162.     .6. Nastiness.
  163.  
  164. I think that number one and six are the more common today, but that
  165. number four and five will be the more common ones in the future.
  166.  
  167. .A.2.2. SUB-CULTURAL STATUS
  168. ---------------------------
  169.  
  170. After all information about syn flooding a bunch of such attacks
  171. were launched around Sweden. The very most of these attacks were
  172. not a part of a IP-spoof attack, it was "only" a denial of service
  173. attack. Why? 
  174.  
  175. I think that hackers attack systems as a sub-cultural pseudo career
  176. and I think that many denial of service attacks, and here in the
  177. example syn flooding, were performed for these reasons. I also think
  178. that many hackers begin their carrer with denial of service attacks.
  179.  
  180. .A.2.3. TO GAIN ACCESS
  181. ----------------------
  182.  
  183. Sometimes could a denial of service attack be a part of an attack to
  184. gain access at a system. At the moment I can think of these reasons
  185. and specific holes:
  186.  
  187.     .1. Some older X-lock versions could be crashed with a 
  188.     method from the denial of service family leaving the system
  189.     open. Physical access was needed to use the work space after.
  190.  
  191.     .2. Syn flooding could be a part of a IP-spoof attack method.
  192.  
  193.     .3. Some program systems could have holes under the startup, 
  194.     that could be used to gain root, for example SSH (secure shell).
  195.  
  196.     .4. Under an attack it could be usable to crash other machines
  197.     in the network or to deny certain persons the ability to access 
  198.     the system.      
  199.  
  200.     .5. Also could a system being booted sometimes be subverted,
  201.     especially rarp-boots. If we know which port the machine listen
  202.     to (69 could be a good guess) under the boot we can send false
  203.     packets to it and almost totally control the boot.
  204.  
  205. .A.2.4. REVENGE
  206. ---------------
  207.  
  208. A denial of service attack could be a part of a revenge against a user
  209. or an administrator.
  210.  
  211. .A.2.5. POLITICAL REASONS
  212. -------------------------
  213.  
  214. Sooner or later will new or old organizations understand the potential
  215. of destroying computer systems and find tools to do it.
  216.  
  217. For example imaginate the Bank A loaning company B money to build a
  218. factory threating the environment. The organization C therefor crash A:s
  219. computer system, maybe with help from an employee. The attack could cost
  220. A a great deal of money if the timing is right.
  221.  
  222. .A.2.6. ECONOMICAL REASONS
  223. --------------------------
  224.  
  225. Imaginate the small company A moving into a business totally dominated by
  226. company B. A and B customers make the orders by computers and depends
  227. heavily on that the order is done in a specific time (A and B could be
  228. stock trading companies). If A and B can't perform the order the customers
  229. lose money and change company.
  230.  
  231. As a part of a business strategy A pays a computer expert a sum of money to
  232. get him to crash B:s computer systems a number of times. A year later A
  233. is the dominating company.
  234.  
  235. .A.2.7. NASTINESS
  236. -----------------
  237.  
  238. I know a person that found a workstation where the user had forgotten to
  239. logout. He sat down and wrote a program that made a kill -9 -1 at a
  240. random time at least 30 minutes after the login time and placed a call to
  241. the program from the profile file. That is nastiness.
  242.  
  243. .A.3. ARE SOME OPERATING SYSTEMS MORE SECURE?
  244. ---------------------------------------------
  245.  
  246. This is a hard question to answer and I don't think that it will
  247. give anything to compare different Unix platforms. You can't say that
  248. one Unix is more secure against denial of service, it is all up to the
  249. administrator.
  250.  
  251. A comparison between Windows 95 and NT on one side and Unix on the
  252. other could however be interesting.
  253.  
  254. Unix systems are much more complex and have hundreds of built in programs,
  255. services... This always open up many ways to crash the system from
  256. the inside.
  257.  
  258. In the normal Windows NT and 95 network were is few ways to crash
  259. the system. Although were is methods that always will work.
  260.  
  261. That gives us that no big different between Microsoft and Unix can
  262. be seen regardning the inside attacks. But there is a couple of
  263. points left:
  264.  
  265.     - Unix have much more tools and programs to discover an
  266.     attack and monitoring the users. To watch what another user
  267.     is up to under windows is very hard.
  268.  
  269.     - The average Unix administrator probably also have much more
  270.     experience than the average Microsoft administrator.
  271.  
  272. The two last points gives that Unix is more secure against inside
  273. denial of service attacks.
  274.  
  275. A comparison between Microsoft and Unix regarding outside attacks
  276. are much more difficult. However I would like to say that the average
  277. Microsoft system on the Internet are more secure against outside
  278. attacks, because they normally have much less services.
  279.  
  280. .B. SOME BASIC TARGETS FOR AN ATTACK
  281. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  282.  
  283. .B.1. SWAP SPACE
  284. ----------------
  285.  
  286. Most systems have several hundred Mbytes of swap space to 
  287. service client requests. The swap space is typical used
  288. for forked child processes which have a short life time.
  289. The swap space will therefore almost never in a normal
  290. cause be used heavily. A denial of service could be based 
  291. on a method that tries to fill up the swap space.
  292.  
  293. .B.2. BANDWIDTH
  294. ---------------
  295.  
  296. If the bandwidth is to high the network will be useless. Most
  297. denial of service attack influence the bandwidth in some way.
  298.  
  299. .B.3. KERNEL TABLES
  300. -------------------
  301.  
  302. It is trivial to overflow the kernel tables which will cause
  303. serious problems on the system. Systems with write through
  304. caches and small write buffers is especially sensitive.
  305.  
  306. Kernel memory allocation is also a target that is sensitive.
  307. The kernel have a kernelmap limit, if the system reach this
  308. limit it can not allocate more kernel memory and must be rebooted.
  309. The kernel memory is not only used for RAM, CPU:s, screens and so
  310. on, it it also used for ordinaries processes. Meaning that any system
  311. can be crashed and with a mean (or in some sense good) algorithm pretty
  312. fast.
  313.  
  314. For Solaris 2.X it is measured and reported with the sar command
  315. how much kernel memory the system is using, but for SunOS 4.X there
  316. is no such command. Meaning that under SunOS 4.X you don't even can
  317. get a warning. If you do use Solaris you should write sar -k 1 to
  318. get the information. netstat -k can also be used and shows how much
  319. memory the kernel have allocated in the subpaging.
  320.  
  321. .B.4. RAM
  322. ---------
  323.  
  324. A denial of service attack that allocates a large amount of RAM
  325. can make a great deal of problems. NFS and mail servers are 
  326. actually extremely sensitive because they do not need much
  327. RAM and therefore often don't have much RAM. An attack at 
  328. a NFS server is trivial. The normal NFS client will do a 
  329. great deal of caching, but a NFS client can be anything 
  330. including the program you wrote yourself...
  331.  
  332. .B.5. DISKS
  333. -----------
  334.  
  335. A classic attack is to fill up the hard disk, but an attack at
  336. the disks can be so much more. For example can an overloaded disk
  337. be misused in many ways.
  338.  
  339. .B.6. CACHES
  340. -------------
  341.  
  342. A denial of service attack involving caches can be based on a method
  343. to block the cache or to avoid the cache.
  344.  
  345. These caches are found on Solaris 2.X:
  346.  
  347. Directory name lookup cache: Associates the name of a file with a vnode.
  348.  
  349. Inode cache: Cache information read from disk in case it is needed
  350. again.
  351.  
  352. Rnode cache: Holds information about the NFS filesystem.
  353.  
  354. Buffer cache: Cache inode indirect blocks and cylinders to realed disk
  355. I/O.
  356.  
  357. .B.7. INETD
  358. -----------
  359.  
  360. Well once inetd crashed all other services running through inetd no
  361. longer will work.
  362.  
  363.  
  364. .C. ATTACKING FROM THE OUTSIDE
  365. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  366.  
  367.  
  368. .C.1. TAKING ADVANTAGE OF FINGER
  369. --------------------------------
  370.  
  371. Most fingerd installations support redirections to an other host.
  372.  
  373. Ex:
  374.  
  375.     $finger @system.two.com@system.one.com
  376.  
  377. finger will in the example go through system.one.com and on to
  378. system.two.com. As far as system.two.com knows it is system.one.com
  379. who is fingering. So this method can be used for hiding, but also
  380. for a very dirty denial of service attack. Lock at this:
  381.  
  382.     $ finger @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@host.we.attack
  383.  
  384. All those @ signs will get finger to finger host.we.attack again and
  385. again and again... The effect on host.we.attack is powerful and
  386. the result is high bandwidth, short free memory and a hard disk with
  387. less free space, due to all child processes (compare with .D.5.).
  388.  
  389. The solution is to install a fingerd which don't support redirections,
  390. for example GNU finger. You could also turn the finger service off,
  391. but I think that is just a bit to much.
  392.  
  393. .C.2. UDP AND SUNOS 4.1.3.
  394. --------------------------
  395.  
  396. SunOS 4.1.3. is known to boot if a packet with incorrect information
  397. in the header is sent to it. This is the cause if the ip_options
  398. indicate a wrong size of the packet.
  399.  
  400. The solution is to install the proper patch.
  401.  
  402. .C.3. FREEZING UP X-WINDOWS
  403. ---------------------------
  404.  
  405. If a host accepts a telnet session to the X-Windows port (generally
  406. somewhere between 6000 and 6025. In most cases 6000) could that
  407. be used to freeze up the X-Windows system. This can be made with
  408. multiple telnet connections to the port or with a program which
  409. sends multiple XOpenDisplay() to the port.
  410.  
  411. The same thing can happen to Motif or Open Windows.
  412.  
  413. The solution is to deny connections to the X-Windows port.
  414.  
  415. .C.4. MALICIOUS USE OF UDP SERVICES
  416. -----------------------------------
  417.  
  418. It is simple to get UDP services (echo, time, daytime, chargen) to 
  419. loop, due to trivial IP-spoofing. The effect can be high bandwidth 
  420. that causes the network to become useless. In the example the header 
  421. claim that the packet came from 127.0.0.1 (loopback) and the target 
  422. is the echo port at system.we.attack. As far as system.we.attack knows 
  423. is 127.0.0.1 system.we.attack and the loop has been establish. 
  424.  
  425. Ex:
  426.  
  427.     from-IP=127.0.0.1
  428.     to-IP=system.we.attack
  429.     Packet type:UDP
  430.     from UDP port 7
  431.     to UDP port 7
  432.  
  433. Note that the name system.we.attack looks like a DNS-name, but the
  434. target should always be represented by the IP-number.
  435.  
  436. Quoted from proberts@clark.net (Paul D. Robertson) comment on
  437. comp.security.firewalls on matter of "Introduction to denial of service"
  438.  
  439.     " A great deal of systems don't put loopback on the wire, and simply
  440.     emulate it.  Therefore, this attack will only effect that machine 
  441.     in some cases.  It's much better to use the address of a different 
  442.     machine on the same network.  Again, the default services should 
  443.     be disabled in inetd.conf.  Other than some hacks for mainframe IP 
  444.     stacks that don't support ICMP, the echo service isn't used by many 
  445.     legitimate programs, and TCP echo should be used instead of UDP 
  446.     where it is necessary. "
  447.  
  448. .C.5. ATTACKING WITH LYNX CLIENTS
  449. ---------------------------------
  450.  
  451. A World Wide Web server will fork an httpd process as a respond
  452. to a request from a client, typical Netscape or Mosaic. The process
  453. lasts for less than one second and the load will therefore never
  454. show up if someone uses ps. In most causes it is therefore very
  455. safe to launch a denial of service attack that makes use of 
  456. multiple W3 clients, typical lynx clients. But note that the netstat
  457. command could be used to detect the attack (thanks to Paul D. Robertson).
  458.  
  459. Some httpd:s (for example http-gw) will have problems besides the normal
  460. high bandwidth, low memory... And the attack can in those causes get
  461. the server to loop (compare with .C.6.)
  462.  
  463. .C.6. MALICIOUS USE OF telnet
  464. -----------------------------
  465.  
  466. Study this little script:
  467.  
  468. Ex:
  469.  
  470.     while : ; do
  471.     telnet system.we.attack &
  472.     done
  473.  
  474. An attack using this script might eat some bandwidth, but it is
  475. nothing compared to the finger method or most other methods. Well
  476. the point is that some pretty common firewalls and httpd:s thinks
  477. that the attack is a loop and turn them self down, until the
  478. administrator sends kill -HUP. 
  479.  
  480. This is a simple high risk vulnerability that should be checked
  481. and if present fixed.
  482.  
  483. .C.7. MALICIOUS USE OF telnet UNDER SOLARIS 2.4
  484. -----------------------------------------------
  485.  
  486. If the attacker makes a telnet connections to the Solaris 2.4 host and
  487. quits using:
  488.  
  489. Ex:
  490.  
  491.     Control-}
  492.     quit
  493.  
  494. then will inetd keep going "forever". Well a couple of hundred...
  495.  
  496. The solution is to install the proper patch.
  497.  
  498. .C.8. HOW TO DISABLE ACCOUNTS
  499. -----------------------------
  500.  
  501. Some systems disable an account after N number of bad logins, or waits
  502. N seconds. You can use this feature to lock out specific users from
  503. the system.
  504.  
  505. .C.9. LINUX AND TCP TIME, DAYTIME
  506. ----------------------------------
  507.  
  508. Inetd under Linux is known to crash if to many SYN packets sends to
  509. daytime (port 13) and/or time (port 37).
  510.  
  511. The solution is to install the proper patch.
  512.  
  513. .C.10. HOW TO DISABLE SERVICES
  514. ------------------------------
  515.  
  516. Most Unix systems disable a service after N sessions have been
  517. open in a given time. Well most systems have a reasonable default
  518. (lets say 800 - 1000), but not some SunOS systems that have the
  519. default set to 48...
  520.  
  521. The solutions is to set the number to something reasonable.
  522.  
  523. .C.11. PARAGON OS BETA R1.4
  524. ---------------------------
  525.  
  526. If someone redirects an ICMP (Internet Control Message Protocol) packet
  527. to a paragon OS beta R1.4 will the machine freeze up and must be
  528. rebooted. An ICMP redirect tells the system to override routing
  529. tables. Routers use this to tell the host that it is sending
  530. to the wrong router. 
  531.  
  532. The solution is to install the proper patch.
  533.  
  534. .C.12. NOVELLS NETWARE FTP
  535. --------------------------
  536.  
  537. Novells Netware FTP server is known to get short of memory if multiple
  538. ftp sessions connects to it.
  539.  
  540. .C.13. ICMP REDIRECT ATTACKS
  541. ----------------------------
  542.  
  543. Gateways uses ICMP redirect to tell the system to override routing
  544. tables, that is telling the system to take a better way. To be able
  545. to misuse ICMP redirection we must know an existing connection
  546. (well we could make one for ourself, but there is not much use for that). 
  547. If we have found a connection we can send a route that
  548. loses it connectivity or we could send false messages to the host
  549. if the connection we have found don't use cryptation.  
  550.  
  551. Ex: (false messages to send)
  552.  
  553.     DESTINATION UNREACHABLE 
  554.     TIME TO LIVE EXCEEDED
  555.     PARAMETER PROBLEM
  556.     PACKET TOO BIG
  557.  
  558. The effect of such messages is a reset of the connection.
  559.  
  560. The solution could be to turn ICMP redirects off, not much proper use
  561. of the service.
  562.  
  563. .C.14. BROADCAST STORMS
  564. -----------------------
  565.  
  566. This is a very popular method in networks there all of the hosts are
  567. acting as gateways. 
  568.  
  569. There are many versions of the attack, but the basic method is to 
  570. send a lot of packets to all hosts in the network with a destination 
  571. that don't exist. Each host will try to forward each packet so 
  572. the packets will bounce around for a long time. And if new packets 
  573. keep coming the network will soon be in trouble.
  574.  
  575. Services that can be misused as tools in this kind of attack is for
  576. example ping, finger and sendmail. But most services can be misused
  577. in some way or another.
  578.  
  579. .C.15. EMAIL BOMBING AND SPAMMING
  580. ---------------------------------
  581.  
  582. In a email bombing attack the attacker will repeatedly send identical
  583. email messages to an address. The effect on the target is high bandwidth,
  584. a hard disk with less space and so on... Email spamming is about sending
  585. mail to all (or rather many) of the users of a system. The point of
  586. using spamming instead of bombing is that some users will try to
  587. send a replay and if the address is false will the mail bounce back. In
  588. that cause have one mail transformed to three mails. The effect on the
  589. bandwidth is obvious.
  590.  
  591. There is no way to prevent email bombing or spamming. However have
  592. a look at CERT:s paper "Email bombing and spamming".
  593.  
  594. .C.16. TIME AND KERBEROS
  595. ------------------------
  596.  
  597. If not the the source and target machine is closely aligned will the
  598. ticket be rejected, that means that if not the protocol that set the 
  599. time is protected it will be possible to set a kerberos server of
  600. function.
  601.  
  602. .C.17. THE DOT DOT BUG
  603. ----------------------
  604.  
  605. Windows NT file sharing system is vulnerable to the under Windows 95
  606. famous dot dot bug (dot dot like ..). Meaning that anyone can crash
  607. the system. If someone sends a "DIR ..\" to the workstation will a
  608. STOP messages appear on the screen on the Windows NT computer. Note that
  609. it applies to version 3.50 and 3.51 for both workstation and server
  610. version.
  611.  
  612. The solution is to install the proper patch.
  613.  
  614. .C.18. SUNOS KERNEL PANIC
  615. -------------------------
  616.  
  617. Some SunOS systems (running TIS?) will get a kernel panic if a
  618. getsockopt() is done after that a connection has been reset.
  619.  
  620. The solution could be to install Sun patch 100804.
  621.  
  622. .C.19. HOSTILE APPLETS
  623. ----------------------
  624.  
  625. A hostile applet is any applet that attempts to use your system
  626. in an inappropriate manner. The problems in the java language
  627. could be sorted in two main groups:
  628.  
  629.     1) Problems due to bugs.
  630.     2) Problems due to features in the language.
  631.  
  632. In group one we have for example the java bytecode verifier bug, which
  633. makes is possible for an applet to execute any command that the user
  634. can execute. Meaning that all the attack methods described in .D.X. 
  635. could be executed through an applet. The java bytecode verifier bug
  636. was discovered in late March 1996 and no patch have yet been available
  637. (correct me if I'am wrong!!!).
  638.  
  639. Note that two other bugs could be found in group one, but they
  640. are both fixed in Netscape 2.01 and JDK 1.0.1.
  641.  
  642. Group two are more interesting and one large problem found is the
  643. fact that java can connect to the ports. Meaning that all the methods
  644. described in .C.X. can be performed by an applet. More information
  645. and examples could be found at address:
  646.     
  647.     http://www.math.gatech.edu/~mladue/HostileArticle.html
  648.  
  649. If you need a high level of security you should use some sort of
  650. firewall for protection against java. As a user you could have
  651. java disable. 
  652.  
  653. .C.20. VIRUS
  654. ------------
  655.  
  656. Computer virus is written for the purpose of spreading and
  657. destroying systems. Virus is still the most common and famous
  658. denial of service attack method.
  659.  
  660. It is a misunderstanding that virus writing is hard. If you know
  661. assembly language and have source code for a couple of virus it
  662. is easy. Several automatic toolkits for virus construction could
  663. also be found, for example:
  664.     
  665.     * Genvir.
  666.     * VCS (Virus Construction Set).
  667.     * VCL (Virus Construction Laboratory).
  668.     * PS-MPC (Phalcon/Skism - Mass Produced Code Generator).
  669.     * IVP (Instant Virus Production Kit).
  670.     * G2 (G Squared).
  671.  
  672. PS-MPC and VCL is known to be the best and can help the novice programmer
  673. to learn how to write virus.
  674.  
  675. An automatic tool called MtE could also be found. MtE will transform
  676. virus to a polymorphic virus. The polymorphic engine of MtE is well
  677. known and should easily be catch by any scanner.
  678.  
  679. .C.21. ANONYMOUS FTP ABUSE
  680. --------------------------
  681.  
  682. If an anonymous FTP archive have a writable area it could be misused
  683. for a denial of service attack similar with with .D.3. That is we can
  684. fill up the hard disk.
  685.  
  686. Also can a host get temporarily unusable by massive numbers of
  687. FTP requests.
  688.  
  689. For more information on how to protect an anonymous FTP site could
  690. CERT:s "Anonymous FTP Abuses" be a good start.
  691.  
  692. .C.22. SYN FLOODING
  693. -------------------
  694.  
  695. Both 2600 and Phrack have posted information about the syn flooding attack.
  696. 2600 have also posted exploit code for the attack. 
  697.  
  698. As we know the syn packet is used in the 3-way handshake. The syn flooding
  699. attack is based on an incomplete handshake. That is the attacker host
  700. will send a flood of syn packet but will not respond with an ACK packet.
  701. The TCP/IP stack will wait a certain amount of time before dropping
  702. the connection, a syn flooding attack will therefore keep the syn_received 
  703. connection queue of the target machine filled.
  704.  
  705. The syn flooding attack is very hot and it is easy to find more information
  706. about it, for example:
  707.  
  708.     [.1.] http://www.eecs.nwu.edu/~jmyers/bugtraq/1354.html
  709.     Article by Christopher Klaus, including a "solution". 
  710.     
  711.     [.2.] http://jya.com/floodd.txt
  712.     2600, Summer, 1996, pp. 6-11. FLOOD WARNING by Jason Fairlane
  713.  
  714.     [.3.] http://www.fc.net/phrack/files/p48/p48-14.html
  715.     IP-spoofing Demystified by daemon9 / route / infinity
  716.          for Phrack Magazine
  717.  
  718. .C.23. PING FLOODING
  719. --------------------
  720.  
  721. I haven't tested how big the impact of a ping flooding attack is, but
  722. it might be quite big.
  723.  
  724. Under Unix we could try something like: ping -s host
  725. to send 64 bytes packets. 
  726.  
  727. If you have Windows 95, click the start button, select RUN, then type
  728. in: PING -T -L 256 xxx.xxx.xxx.xx. Start about 15 sessions.
  729.  
  730. .C.24. CRASHING SYSTEMS WITH PING FROM WINDOWS 95 MACHINES
  731. ----------------------------------------------------------
  732.  
  733. If someone can ping your machine from a Windows 95 machine he or she might
  734. reboot or freeze your machine. The attacker simply writes:
  735.  
  736. ping -l 65510 address.to.the.machine
  737.  
  738. And the machine will freeze or reboot.
  739.  
  740. Works for kernel 2.0.7 up to version 2.0.20. and 2.1.1. for Linux (crash).
  741. AIX4, OSF, HPUX 10.1, DUnix 4.0 (crash).
  742. OSF/1, 3.2C, Solaris 2.4 x86 (reboot).
  743.  
  744. .C.25. MALICIOUS USE OF SUBNET MASK REPLY MESSAGE
  745. --------------------------------------------------
  746.  
  747. The subnet mask reply message is used under the reboot, but some
  748. hosts are known to accept the message any time without any check.
  749. If so all communication to or from the host us turned off, it's dead.
  750.  
  751. The host should not accept the message any time but under the reboot.
  752.  
  753. .C.26. FLEXlm
  754. -------------
  755.  
  756. Any host running FLEXlm can get the FLEXlm license manager daemon
  757. on any network to shutdown using the FLEXlm lmdown command.
  758.  
  759. # lmdown -c /etc/licence.dat
  760. lmdown - Copyright (C) 1989, 1991 Highland Software, Inc.
  761.  
  762. Shutting down FLEXlm on nodes: xxx
  763. Are you sure? [y/n]: y
  764. Shut down node xxx
  765. #
  766.  
  767. .C.27. BOOTING WITH TRIVIAL FTP
  768. -------------------------------
  769.  
  770. To boot diskless workstations one often use trivial ftp with rarp or
  771. bootp. If not protected an attacker can use tftp to boot the host.
  772.  
  773.  
  774. .D. ATTACKING FROM THE INSIDE
  775. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  776.  
  777. .D.1. KERNEL PANIC UNDER SOLARIS 2.3
  778. ------------------------------------
  779.  
  780. Solaris 2.3 will get a kernel panic if this
  781. is executed:
  782.  
  783. EX:
  784.     
  785.     $ndd /dev/udp udp_status
  786.  
  787. The solution is to install the proper patch.
  788.  
  789. .D.2. CRASHING THE X-SERVER
  790. ---------------------------
  791.  
  792. If stickybit is not set in /tmp then can the file /tmp/.x11-unix/x0
  793. be removed and the x-server will crash.
  794.  
  795. Ex:
  796.  
  797.     $ rm /tmp/.x11-unix/x0
  798.  
  799. .D.3. FILLING UP THE HARD DISK
  800. -----------------------------
  801.  
  802. If your hard disk space is not limited by a quota or if you can use
  803. /tmp then it`s possible for you to fill up the file system.
  804.  
  805. Ex:
  806.  
  807.     while : ;
  808.     mkdir .xxx
  809.     cd .xxx
  810.     done
  811.  
  812. .D.4. MALICIOUS USE OF eval
  813. ---------------------------
  814.  
  815. Some older systems will crash if eval '\!\!' is executed in the
  816. C-shell.
  817.  
  818. Ex:
  819.  
  820.     % eval '\!\!'
  821.     
  822. .D.5. MALICIOUS USE OF fork() 
  823. -----------------------------
  824.  
  825. If someone executes this C++ program the result will result in a crash
  826. on most systems.
  827.  
  828. Ex:
  829.     
  830.     #include <sys/types.h>
  831.     #include <unistd.h>
  832.     #include <iostream.h>
  833.     
  834.     main()
  835.     {
  836.         int x;
  837.         while(x=0;x<1000000;x++)
  838.             {
  839.                 system("uptime");
  840.                 fork();
  841.             }
  842.     }
  843.  
  844. You can use any command you want, but uptime is nice
  845. because it shows the workload.
  846.  
  847. To get a bigger and very ugly attack you should however replace uptime
  848. (or fork them both) with sync. This is very bad.
  849.  
  850. If you are real mean you could also fork a child process for
  851. every child process and we will get an exponential increase of
  852. workload. 
  853.  
  854. There is no good way to stop this attack and
  855. similar attacks. A solution could be to place a limit
  856. on time of execution and size of processes.
  857.  
  858. .D.6. CREATING FILES THAT IS HARD TO REMOVE
  859. -------------------------------------------
  860.  
  861. Well all files can be removed, but here is some ideas:
  862.  
  863. Ex.I.
  864.  
  865.     $ cat > -xxx
  866.     ^C
  867.     $ ls
  868.     -xxx
  869.     $ rm -xxx
  870.     rm: illegal option -- x
  871.     rm: illegal option -- x
  872.     rm: illegal option -- x
  873.     usage: rm [-fiRr] file ...
  874.     $
  875.  
  876. Ex.II.
  877.  
  878.     $ touch xxx!
  879.     $ rm xxx!
  880.     rm: remove xxx! (yes/no)? y
  881.     $ touch xxxxxxxxx!
  882.     $ rm xxxxxxxxx!
  883.     bash: !": event not found
  884.     $
  885.  
  886.     (You see the size do count!)
  887.  
  888. Other well know methods is files with odd characters or spaces
  889. in the name. 
  890.  
  891. These methods could be used in combination with ".D.3 FILLING UP THE
  892. HARDDISK". If you do want to remove these files you must use some sort
  893. of script or a graphical interface like OpenWindow:s File
  894. Manager. You can also try to use: rm ./<filename>. It should work for
  895. the first example if you have a shell.
  896.  
  897. .D.7. DIRECTORY NAME LOOKUPCACHE
  898. --------------------------------
  899.  
  900. Directory name lookupcache (DNLC) is used whenever a file is opened.
  901. DNLC associates the name of the file to a vnode. But DNLC can only
  902. operate on files with names that has less than N characters (for SunOS 4.x
  903. up to 14 character, for Solaris 2.x up 30 characters). This means
  904. that it's dead easy to launch a pretty discreet denial of service attack.
  905.  
  906. Create lets say 20 directories (for a start) and put 10 empty files in
  907. every directory. Let every name have over 30 characters and execute a
  908. script that makes a lot of ls -al on the directories.
  909.  
  910. If the impact is not big enough you should create more files or launch
  911. more processes.
  912.  
  913. .D.8. CSH ATTACK
  914. ----------------
  915.  
  916. Just start this under /bin/csh (after proper modification) 
  917. and the load level will get very high (that is 100% of the cpu time) 
  918. in a very short time. 
  919.  
  920. Ex:
  921.  
  922.     |I /bin/csh
  923.     nodename : **************b
  924.  
  925. .D.9. CREATING FILES IN /tmp
  926. ----------------------------
  927.  
  928. Many programs creates files in /tmp, but are unable to deal with the problem
  929. if the file already exist. In some cases this could be used for a
  930. denial of service attack.
  931.  
  932. .D.10. USING RESOLV_HOST_CONF
  933. -----------------------------
  934.  
  935. Some systems have a little security hole in the way they use the
  936. RESOLV_HOST_CONF variable. That is we can put things in it and
  937. through ping access confidential data like /etc/shadow or
  938. crash the system. Most systems will crash if /proc/kcore is 
  939. read in the variable and access through ping.
  940.  
  941. Ex:
  942.     
  943.     $ export RESOLV_HOST_CONF="/proc/kcore" ; ping asdf
  944.  
  945. .D.11. SUN 4.X AND BACKGROUND JOBS    
  946. ----------------------------------
  947.  
  948. Thanks to Mr David Honig <honig@amada.net> for the following:
  949.  
  950. " Put the string "a&" in a file called "a" and perform "chmod +x a".
  951. Running "a" will quickly disable a Sun 4.x machine, even disallowing
  952. (counter to specs) root login as the kernel process table fills."
  953.  
  954. " The cute thing is the size of the 
  955. script, and how few keystrokes it takes to bring down a Sun
  956. as a regular user."
  957.  
  958. .D.12. CRASHING DG/UX WITH ULIMIT 
  959. ---------------------------------
  960.  
  961. ulimit is used to set a limit on the system resources available to the 
  962. shell. If ulimit 0 is called before /etc/passwd, under DG/UX, will the 
  963. passwd file be set to zero.
  964.  
  965. .D.13. NETTUNE AND HP-UX
  966. ------------------------
  967.  
  968. /usr/contrib/bin/nettune is SETUID root on HP-UX meaning
  969. that any user can reset all ICMP, IP and TCP kernel
  970. parameters, for example the following parameters:
  971.  
  972.     - arp_killcomplete 
  973.     - arp_killincomplete
  974.     - arp_unicast 
  975.     - arp_rebroadcast
  976.     - icmp_mask_agent
  977.     - ip_defaultttl
  978.     - ip_forwarding
  979.     - ip_intrqmax
  980.     - pmtu_defaulttime
  981.     - tcp_localsubnets
  982.     - tcp_receive
  983.     - tcp_send
  984.     - tcp_defaultttl
  985.     - tcp_keepstart 
  986.     - tcp_keepfreq
  987.     - tcp_keepstop
  988.     - tcp_maxretrans
  989.     - tcp_urgent_data_ptr
  990.     - udp_cksum
  991.     - udp_defaultttl 
  992.     - udp_newbcastenable 
  993.     - udp_pmtu
  994.     - tcp_pmtu
  995.     - tcp_random_seq
  996.  
  997. The solution could be to set the proper permission on 
  998. /sbin/mount_union:
  999.  
  1000. #chmod u-s /sbin/mount_union
  1001.  
  1002. .D.14. SOLARIS 2.X AND NFS
  1003. --------------------------
  1004.  
  1005. If a process is writing over NFS and the user goes over the disk
  1006. quota will the process go into an infinite loop.
  1007.  
  1008. .D.15. SYSTEM STABILITY COMPROMISE VIA MOUNT_UNION
  1009. --------------------------------------------------
  1010.  
  1011. By executing a sequence of mount_union commands any user
  1012. can cause a system reload on all FreeBSD version 2.X before
  1013. 1996-05-18.
  1014.  
  1015. $ mkdir a
  1016. $ mkdir b
  1017. $ mount_union ~/a ~/b
  1018. $ mount_union -b ~/a ~/b
  1019.  
  1020. The solution could be to set the proper permission on 
  1021. /sbin/mount_union:
  1022.  
  1023. #chmod u-s /sbin/mount_union
  1024.  
  1025. .D.16. trap_mon CAUSES KERNEL PANIC UNDER SUNOS 4.1.X
  1026. ----------------------------------------------------
  1027.  
  1028. Executing the trap_mon instruction from user mode can cause
  1029. a kernel panic or a window underflow watchdog reset under
  1030. SunOS 4.1.x, sun4c architecture.
  1031.  
  1032.  
  1033. .E. DUMPING CORE
  1034. ~~~~~~~~~~~~~~~~
  1035.  
  1036. .E.1. SHORT COMMENT
  1037. -------------------
  1038.  
  1039. The core dumps things don't really belongs in this paper but I have
  1040. put them here anyway.
  1041.  
  1042. .E.2. MALICIOUS USE OF NETSCAPE
  1043. -------------------------------
  1044.  
  1045. Under Netscape 1.1N this link will result in a segmentation fault and a
  1046. core dump.
  1047.  
  1048. Ex:
  1049.  
  1050.     <a name="http://xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.
  1051.     xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxxxxx.xxx.xxx.
  1052.     xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxxxxx.xxx.xxx.xxx.xxx.xxx.
  1053.     xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxxxxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.
  1054.     xxx.xxx.xxx.xxx.xxxxxx.xxx.xxx.xxx.xxx.xxx...>
  1055.  
  1056. .E.3. CORE DUMPED UNDER WUFTPD
  1057. ------------------------------
  1058.  
  1059. A core dumped could be created under wuftp with two different
  1060. methods:
  1061.  
  1062.     (1) Then pasv is given (user not logged in (ftp -n)). Almost all
  1063.     versions of BSD:s ftpd.
  1064.     (2) More than 100 arguments is given with any executable
  1065.     command. Presents in all versions of BSD:sd ftpd.
  1066.  
  1067. .E.4. ld UNDER SOLARIS/X86
  1068. --------------------------
  1069.  
  1070. Under Solaris 2.4/X86 ld dumps core if given with the -s option.
  1071.  
  1072.  
  1073. .F. HOW DO I PROTECT A SYSTEM AGAINST DENIAL OF SERVICE ATTACKS?
  1074. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1075.  
  1076. .F.1. BASIC SECURITY PROTECTION
  1077. -------------------------------
  1078.  
  1079. .F.1.1. INTRODUCTION
  1080. --------------------
  1081.  
  1082. You can not make your system totally secured against denial of service
  1083. attacks but for attacks from the outside you can do a lot. I put this
  1084. work list together and hope that it can be of some use. 
  1085.  
  1086. .F.1.2. SECURITY PATCHES
  1087. ------------------------
  1088.  
  1089. Always install the proper security patches. As for patch numbers
  1090. I don't want to put them out, but that doesn't matter because you
  1091. anyway want to check that you have all security patches installed,
  1092. so get a list and check! Also note that patches change over time and
  1093. that a solution suggested in security bulletins (i.e. CERT) often
  1094. is somewhat temporary.
  1095.  
  1096. .F.1.3. PORT SCANNING
  1097. ---------------------
  1098.  
  1099. Check which services you have. Don't check with the manual
  1100. or some configuration file, instead scan the ports with sprobe
  1101. or some other port scanner. Actual you should do this regualy to see
  1102. that anyone don't have installed a service that you don't want on
  1103. the system (could for example be service used for a pirate site).
  1104.  
  1105. Disable every service that you don't need, could for example be rexd,
  1106. fingerd, systat, netstat, rusersd, sprayd, pop3, uucpd, echo, chargen,
  1107. tftp, exec, ufs, daytime, time... Any combination of echo, time, daytime
  1108. and chargen is possible to get to loop. There is however no need
  1109. to turn discard off. The discard service will just read a packet
  1110. and discard it, so if you turn off it you will get more sensitive to
  1111. denial of service and not the opposite.
  1112.  
  1113. Actual can services be found on many systems that can be used for
  1114. denial of service and brute force hacking without any logging. For
  1115. example Stock rexec never logs anything. Most popd:s also don't log 
  1116. anything
  1117.  
  1118. .F.1.4. CHECK THE OUTSIDE ATTACKS DESCRIBED IN THIS PAPER
  1119. ---------------------------------------------------------
  1120.  
  1121. Check that attacks described in this paper and look at the
  1122. solution. Some attacks you should perform yourself to see if they
  1123. apply to your system, for example:
  1124.  
  1125.     - Freezing up X-Windows.
  1126.     - Malicious use of telnet.
  1127.     - How to disable services.
  1128.     - SunOS kernel panic.
  1129.     - Attacking with lynx clients.
  1130.     - Crashing systems with ping from Windows 95 machines.
  1131.     
  1132. That is stress test your system with several services and look at
  1133. the effect.
  1134.  
  1135. Note that Solaris 2.4 and later have a limit on the number of ICMP
  1136. error messages (1 per 500 ms I think) that can cause problems then
  1137. you test your system for some of the holes described in this paper.
  1138. But you can easy solve this problem by executing this line:
  1139.  
  1140. $ /usr/sbin/ndd -set /dev/ip ip_icmp_err_interval 0
  1141.                                                             
  1142. .F.1.5. CHECK THE INSIDE ATTACKS DESCRIBED IN THIS PAPER
  1143. --------------------------------------------------------
  1144.  
  1145. Check the inside attacks, although it is always possibly to crash
  1146. the system from the inside you don't want it to be to easy. Also
  1147. have several of the attacks applications besides denial of service,
  1148. for example:
  1149.  
  1150.     - Crashing the X-Server:     If stickybit is not set in /tmp
  1151.                     a number of attacks to gain
  1152.                     access can be performed.
  1153.  
  1154.     - Using resolv_host_conf:    Could be used to expose
  1155.                     confidential data like
  1156.                     /etc/shadow.
  1157.  
  1158.     - Core dumped under wuftpd:    Could be used to extract
  1159.                     password-strings.
  1160.  
  1161. If I don't have put out a solution I might have recommended son other paper.
  1162. If not I don't know of a paper with a solution I feel that I can recommend.
  1163. You should in these causes check with your company.
  1164.  
  1165. .F.1.6. EXTRA SECURITY SYSTEMS
  1166. ------------------------------
  1167.  
  1168. Also think about if you should install some extra security systems.
  1169. The basic that you always should install is a logdaemon  and a wrapper.
  1170. A firewall could also be very good, but expensive. Free tools that can
  1171. be found on the Internet is for example:
  1172.  
  1173. TYPE:        NAME:        URL:
  1174.  
  1175. LOGDAEMON    NETLOG        ftp://net.tamu.edu/pub/security/TAMU
  1176. WRAPPER        TCP WRAPPERS    ftp://cert.org/pub/tools/tcp_wrappers
  1177. FIREWALL    TIS         ftp://ftp.tis.com/pub/firewalls/toolkit
  1178.  
  1179. Note that you should be very careful if building your own firewall with
  1180. TIS or you might open up new and very bad security holes, but it is a very
  1181. good security packer if you have some basic knowledge.
  1182.  
  1183. It is also very good to replace services that you need, for example telnet,
  1184. rlogin, rsh or whatever, with a tool like ssh. Ssh is free and can be
  1185. found at URL: 
  1186.  
  1187.     ftp://ftp.cs.hut.fi/pub/ssh
  1188.  
  1189. The addresses I have put out are the central sites for distributing
  1190. and I don't think that you should use any other except for CERT.
  1191.  
  1192. For a long list on free general security tools I recommend:
  1193. "FAQ: Computer Security Frequently Asked Questions".
  1194.  
  1195. .F.1.7. MONITORING SECURITY
  1196. ---------------------------
  1197.  
  1198. Also monitor security regular, for example through examining system log
  1199. files, history files... Even in a system without any extra security systems
  1200. could several tools be found for monitoring, for example: 
  1201.  
  1202.     - uptime
  1203.     - showmount
  1204.     - ps
  1205.     - netstat
  1206.     - finger
  1207.  
  1208. (see the man text for more information).
  1209.  
  1210. .F.1.8. KEEPING UP TO DATE
  1211. --------------------------
  1212.  
  1213. It is very important to keep up to date with security problems. Also 
  1214. understand that then, for example CERT, warns for something it has often
  1215. been dark-side public for sometime, so don't wait. The following resources
  1216. that helps you keeping up to date can for example be found on the Internet:
  1217.  
  1218.     - CERT mailing list. Send an e-mail to cert@cert.org to be placed
  1219.     on the list.
  1220.     
  1221.     - Bugtraq mailing list. Send an e-mail to bugtraq-request@fc.net.
  1222.  
  1223.     - WWW-security mailing list. Send an e-mail to 
  1224.     www-security@ns2.rutgers.edu.
  1225.  
  1226. .F.1.9. READ SOMETHING BIGGER AND BETTER
  1227. ----------------------------------------
  1228.  
  1229. Let's start with papers on the Internet. I am sorry to say that it is not
  1230. very many good free papers that can be found, but here is a small collection
  1231. and I am sorry if have have over looked a paper.
  1232.  
  1233. (1) The Rainbow books is a long series of free books on computer security.
  1234. US citizens can get the books from:
  1235.  
  1236.     INFOSEC AWARENESS OFFICE
  1237.     National Computer Security Center
  1238.     9800 Savage Road
  1239.     Fort George G. Meader, MD 20755-600
  1240.  
  1241. We other just have to read the papers on the World Wide Web. Every
  1242. paper can not however be found on the Internet.
  1243.  
  1244. (2) "Improving the security of your Unix system" by Curry  is also very
  1245. nice if you need the very basic things. If you don't now anything about
  1246. computer security you can't find a better start. 
  1247.  
  1248. (3) "The WWW security FAQ" by Stein is although it deal with W3-security
  1249. the very best better on the Internet about computer security.
  1250.  
  1251. (4) CERT have aklso published several good papers, for example:
  1252.  
  1253.     - Anonymous FTP Abuses.
  1254.     - Email Bombing and Spamming.
  1255.     - Spoofed/Forged Email.
  1256.     - Protecting yourself from password file attacks.
  1257.  
  1258. I think however that the last paper have overlooked several things.
  1259.  
  1260. (5) For a long list on papers I can recommend:
  1261. "FAQ: Computer Security Frequently Asked Questions".
  1262.  
  1263. (6) Also see section ".G. SUGGESTED READING"
  1264.  
  1265. You should also get some big good commercial book, but I don't want
  1266. to recommend any.
  1267.  
  1268. .F.2. MONITORING PERFORMANCE
  1269. ----------------------------
  1270.  
  1271. .F.2.1. INTRODUCTION
  1272. --------------------
  1273.  
  1274. There is several commands and services that can be used for
  1275. monitoring performance. And at least two good free programs can
  1276. be found on Internet.
  1277.  
  1278. .F.2.2. COMMANDS AND SERVICES
  1279. -----------------------------
  1280.  
  1281. For more information read the man text.
  1282.  
  1283. netstat        Show network status.
  1284. nfsstat        Show NFS statistics.
  1285. sar        System activity reporter.
  1286. vmstat        Report virtual memory statistics.
  1287. timex        Time a command, report process data and system
  1288.         activity.
  1289. time         Time a simple command.
  1290. truss        Trace system calls and signals.
  1291. uptime        Show how long the system has been up.
  1292.  
  1293. Note that if a public netstat server can be found you might be able
  1294. to use netstat from the outside. netstat can also give information
  1295. like tcp sequence numbers and much more.
  1296.  
  1297. .F.2.3. PROGRAMS
  1298. ----------------
  1299.  
  1300. Proctool: Proctool is a freely available tool for Solaris that monitors
  1301. and controls processes.
  1302.     ftp://opcom.sun.ca/pub/binaries/
  1303.     
  1304. Top: Top might be a more simple program than Proctool, but is
  1305. good enough.
  1306.  
  1307. .F.2.4. ACCOUNTING
  1308. ------------------
  1309.  
  1310. To monitor performance you have to collect information over a long 
  1311. period of time. All Unix systems have some sort of accounting logs
  1312. to identify how much CPU time, memory each program uses. You should
  1313. check your manual to see how to set this up.
  1314.  
  1315. You could also invent your own account system by using crontab and
  1316. a script with the commands you want to run. Let crontab run the script
  1317. every day and compare the information once a week. You could for
  1318. example let the script run the following commands:
  1319.  
  1320.     - netstat
  1321.     - iostat -D
  1322.     - vmstat
  1323.  
  1324.  
  1325. .G. SUGGESTED READING
  1326. ~~~~~~~~~~~~~~~~~~~~~
  1327.  
  1328. .F.1. INFORMATION FOR DEEPER KNOWLEDGE
  1329. -------------------------------------
  1330.  
  1331. (1) Hedrick, C. Routing Information Protocol. RFC 1058, 1988.
  1332. (2) Mills, D.L. Exterior Gateway Protocol Formal Specification. RFC 904, 1984.
  1333. (3) Postel, J. Internet Control Message Protocol. RFC 792, 1981.
  1334. (4) Harrenstien, K. NAME/FINGER Protocol, RFC 742, 1977.
  1335. (5) Sollins, K.R. The TFTP Protocol, RFC 783, 1981.
  1336. (6) Croft, W.J. Bootstrap Protocol, RFC 951, 1985.
  1337.  
  1338. Many of the papers in this category was RFC-papers. A RFC-paper
  1339. is a paper that describes a protocol. The letters RCS stands for
  1340. Request For Comment. Hosts on the Internet are expected to understand
  1341. at least the common ones. If you want to learn more about a protocol
  1342. it is always good to read the proper RFC. You can find a nice sRFC 
  1343. index search form at URL:
  1344.  
  1345.     http://pubweb.nexor.co.uk/public/rfc/index/rfc.html
  1346.  
  1347. .F.2. KEEPING UP TO DATE INFORMATION
  1348. ------------------------------------
  1349.  
  1350. (1) CERT mailing list. Send an e-mail to cert@cert.org to be placed
  1351. on the list.
  1352. (2) Bugtraq mailinglist. Send an e-mail to bugtraq-request@fc.net.
  1353. (3) WWW-security mailinglist. Send an e-mail to www-security@ns2.rutgers.edu.
  1354. (4) Sun Microsystems Security Bulletins.
  1355. (5) Various articles from:         - comp.security.announce
  1356.                     - comp.security.unix
  1357.                     - comp.security.firewalls
  1358. (6) Varius 40Hex Issues.
  1359.  
  1360. .F.3. BASIC INFORMATION
  1361. -----------------------
  1362.  
  1363. (1) Husman, H. INTRODUKTION TILL DATAS─KERHET UNDER X-WINDOWS, 1995.
  1364. (2) Husman, H. INTRODUKTION TILL IP-SPOOFING, 1995.
  1365. (3) The following rainbow books:    - Teal Green Book (Glossary of
  1366.                     Computer Security Terms).
  1367.                     - Bright Orange Book( A Guide
  1368.                     to Understanding Security Testing
  1369.                     and Test Documentation in Trusted
  1370.                     Systems).
  1371.                     - C1 Technical Report-001 
  1372.                     (Computer Viruses: Preventation,
  1373.                     Detection, and Treatment).
  1374. (4) Ranum, Marcus. Firewalls, 1993.
  1375. (5) Sun Microsystems, OpenWindows V3.0.1. User Commands, 1992.
  1376. (6) Husman, H. ATT SP┼RA ODOKUMENTERADE S─KERHETSLUCKOR, 1996.
  1377. (7) Dark OverLord, Unix Cracking Tips, 1989.
  1378. (8) Shooting Shark, Unix Nasties, 1988.
  1379. (9) LaDue, Mark.D. Hostile Applets on the Horizone, 1996.
  1380. (10) Curry, D.A. Improving the security of your unix system, 1990.
  1381. (11) Stein, L.D. The World Wide Web security FAQ, 1995.
  1382. (12) Bellovin, S.M. Security Problems in the TCP/IP Protocol, 1989.
  1383.  
  1384. .H. COPYRIHT
  1385. ------------
  1386.  
  1387. This paper is Copyright (c) 1996 by Hans Husman.
  1388.  
  1389. Permission is hereby granted to give away free copies electronically. You
  1390. may distribute, transfer, or spread this paper electronically. You may not
  1391. pretend that you wrote it. This copyright notice must be maintained in any
  1392. copy made. If you wish to reprint the whole or any part of this paper in any
  1393. other medium excluding electronic medium, please ask the author for
  1394. permission.
  1395.  
  1396. .I. DISCLAIMER
  1397. --------------
  1398.  
  1399. The information within this paper may change without notice. Use of this
  1400. information constitutes acceptance for use in an AS IS condition. There are
  1401. NO warranties with regard to this information. In no event shall the author
  1402. be liable for any damages whatsoever arising out of or in connection with
  1403. the use or spread of this information. Any use of this information is at the
  1404. user's own risk.
  1405.  
  1406.  
  1407.  
  1408.  
  1409.  
  1410.  
  1411.  
  1412.     
  1413.  
  1414.  
  1415.  
  1416.  
  1417.