home *** CD-ROM | disk | FTP | other *** search
/ Hacks & Cracks / Hacks_and_Cracks.iso / hackersclub / km / library / hack / attack.txt < prev    next >
Text File  |  1998-03-25  |  15KB  |  380 lines

  1. ATTACKING FROM THE OUTSIDE
  2. by http://www.student.tdb.uu.se/~t95hhu/secure/outside.html
  3.  
  4.  
  5. TAKING ADVANTAGE OF FINGER
  6.  
  7. Most fingerd installations support redirections to another host. 
  8.  
  9. Ex:   $finger @system.two.com@system.one.com
  10.  
  11.  
  12. finger will in the example go through system.one.com and on to system.two.com. 
  13. As far as system.two.com knows it is system.one.com who is fingering. So this method can be 
  14. used for hiding, but also for a very dirty denial of service attack. Lock at this: 
  15.  
  16.         $ finger @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@host.we.attack
  17.  
  18.  
  19. All those @ signs will get finger to finger host.we.attack again and again and again... The 
  20. effect on host.we.attack is powerful and the result is high bandwidth, short free memory and a 
  21. hard disk with less free space, due to all child processes. 
  22.  
  23. The solution is to install a fingerd which don't support redirections, for example GNU finger. 
  24. You could also turn the finger service off. 
  25.  
  26. UDP AND SUNOS 4.1.3.
  27.  
  28. SunOS 4.1.3. is known to boot if a packet with incorrect information in the header is sent to
  29. it. This is the cause if the ip_options indicate a wrong size of the packet. 
  30.  
  31. The solution is to install the proper patch. 
  32.  
  33. FREEZING UP X-WINDOWS
  34.  
  35. If a host accepts a telnet session to the X-Windows port (generally somewhere between 6000 and
  36.  6025. In most cases 6000) could that be used to freeze up the X-Windows system. This can be 
  37. made with multiple telnet connections to the port or with a program which sends multiple 
  38. XOpenDisplay() to the port. 
  39.  
  40. The same thing can happen to Motif or Open Windows. 
  41.  
  42. The solution is to deny connections to the X-Windows port. 
  43.  
  44. MALICIOUS USE OF UDP SERVICES
  45.  
  46. It is simple to get UDP services (echo, time, daytime, chargen) to loop, due to trivial 
  47. IP-spoofing. The effect can be high bandwidth that causes the network to become useless. In the
  48.  example the header claim that the packet came from 127.0.0.1 (loopback) and the target is the 
  49. echo port at system.we.attack. As far as system.we.attack knows is 127.0.0.1 system.we.attack 
  50. and the loop has been establish. 
  51.  
  52. Ex:    from-IP=127.0.0.1
  53.  
  54.         to-IP=system.we.attack
  55.  
  56.         Packet type:UDP
  57.  
  58.         from UDP port 7
  59.  
  60.         to UDP port 7
  61.  
  62.  
  63. Note that the name system.we.attack looks like a DNS-name, but the target should always be 
  64. represented by the IP-number. 
  65.  
  66. Quoted from proberts@clark.net (Paul D. Robertson) comment on comp.security.firewalls on matter 
  67. of "Introduction to denial of service" A great deal of systems don't put loopback on the wire, 
  68. and simply emulate it. Therefore, this attack will only effect that machine in some cases. It's 
  69. much better to use the address of a different machine on the same network. Again, the default
  70. services should be disabled in inetd.conf. Other than some hacks for mainframe IP stacks that 
  71. don't support ICMP, the echo service isn't used by many legitimate programs, and TCP echo 
  72. should be used instead of UDP where it is necessary. 
  73.  
  74. ATTACKING WITH LYNX CLIENTS
  75.  
  76. A World Wide Web server will fork an httpd process as a respond to a request from a client, 
  77. typical Netscape or Mosaic. The process lasts for less than one second and the load will 
  78. therefore never show up if someone uses ps. In most causes it is therefore very safe to launch
  79.  a denial of service attack that makes use of multiple W3 clients, typical lynx clients. 
  80. But note that the netstat command can be used to detect the attack (thanks to Paul D. Robertson). 
  81.  
  82. Some httpd:s (for example some http-gw) will have problems besides the normal high bandwidth,
  83.  low memory... And the attack can in those causes get the server to loop. 
  84.  
  85. MALICIOUS USE OF telnet
  86.  
  87. Study this little script: 
  88.  
  89. Ex:     while : ; do
  90.  
  91.         telnet system.we.attack &
  92.  
  93.         done
  94.  
  95.  
  96. An attack using this script might eat some bandwidth, but it is nothing compared to the finger
  97. method or most other methods. Well the point is that some pretty firewalls and httpd:s thinks 
  98. that the attack is a loop and turn them self down, until the administrator sends kill -HUP. 
  99.  
  100. This is a simple high risk vulnerability that should be checked and if present fixed. 
  101.  
  102. MALICIOUS USE OF telnet UNDER SOLARIS 2.4
  103.  
  104. If the attacker makes a telnet connections to the Solaris 2.4 host and quits using: 
  105.  
  106. Ex:     Control-}
  107.  
  108.         quit
  109.  
  110.  
  111. then will inetd keep going "forever". Well a couple of hundred... 
  112.  
  113. The solution is to install the proper patch. 
  114.  
  115. HOW TO DISABLE ACCOUNTS
  116.  
  117. Some systems disable an account after N number of bad logins, or waits N seconds. You can use
  118. this feature to lock out specific users from the system. 
  119.  
  120. LINUX AND TCP TIME, DAYTIME
  121.  
  122. Inetd under Linux is known to crash if to many SYN packets sends to daytime (port 13) 
  123. and/or time (port 37). 
  124.  
  125. The solution is to install the proper patch. 
  126.  
  127. HOW TO DISABLE SERVICES
  128.  
  129. Most Unix systems disable a service after that N sessions have been open in a given time. 
  130. Well most systems have a reasonable default (lets say 800 - 1000), but not some SunOS systems 
  131. that have the default set to 48... 
  132.  
  133. The solutions is to set the number to something reasonable. 
  134.  
  135. PARAGON OS BETA R1.4
  136.  
  137. Paragon is Intels supercomputer platform built for high performance scientific and technical 
  138. computing. If someone redirects an ICMP (Internet Control Message Protocol) packet to a paragon
  139. OS beta R1.4 will the machine freeze up and must be rebooted. An ICMP redirect tells the system 
  140. to override routing tables. Routers use this to tell the host that it is sending to the wrong 
  141. router. 
  142.  
  143. The solution is to install the proper patch. 
  144.  
  145. NOVELLS NETWARE FTP
  146.  
  147. Novells Netware FTP server is known to get short of memory if multiple ftp sessions connects 
  148. to it, causing it to crash. About 5 at a time - 100 sessions total within a short period of 
  149. time, could do the trick. 
  150.  
  151. ICMP ATTACKS
  152.  
  153. Gateways uses ICMP redirect to tell the system to override routing tables, that is telling the
  154. system to take a better way. To be able to misuse ICMP redirection we must know an existing 
  155. connection If we have found a connection we can send a route that loses it connectivity or we 
  156. could send false messages to the host. 
  157.  
  158. One could also send spoofed ICMP Source Quench messages, this could slow down the conncection. 
  159.  
  160.  
  161. Ex: (false messages to send)
  162.  
  163.         DESTINATION UNREACHABLE 
  164.         TIME TO LIVE EXCEEDED
  165.         PARAMETER PROBLEM
  166.         PACKET TOO BIG
  167.  
  168. The effect of such messages is a reset of the connection. 
  169.  
  170. The solution could be to turn ICMP redirects off, not much proper use of the service. 
  171.  
  172. BROADCAST STORMS
  173.  
  174. This is a very popular method in networks there all of the hosts are acting as gateways. 
  175.  
  176. There are many versions of the attack, but the basic method is to send a lot of packets to all 
  177. hosts in the network with a destination that don't exist. Each host will try to forward each 
  178. packet so the packets will bounce around for a long time. And if new packets keep coming the 
  179. network will soon be in trouble. 
  180.  
  181. Services that can be misused as tools in this kind of attack is for example ping, finger and 
  182. sendmail. But most services can be misused in some way or another. 
  183.  
  184. EMAIL BOMBING AND SPAMMING
  185.  
  186. In a email bombing attack the attacker will repeatedly send identical email messages to an 
  187. address. The effect on the target is high bandwidth, a hard disk with less space and so on... 
  188. Email spamming is about sending mail to all (or rather many) of the users of a system. The point
  189. of using spamming instead of bombing is that some users will try to send a replay and 
  190. if the address is false will the mail bounce back. In that cause have one mail transformed to 
  191. three mails. The effect on the bandwidth is obvious. 
  192.  
  193. TIME AND KERBEROS
  194.  
  195. If not the the source and target machine is closely aligned will the ticket be rejected, that
  196. means that if not the protocol that set the time is protected it will be possible to set a
  197. kerberos server off function. 
  198.  
  199. SUNOS KERNEL PANIC
  200.  
  201. Some SunOS systems (running TIS?) will get a kernel panic if a getsockopt() is done after 
  202. that a connection has been reset. 
  203.  
  204. HOSTILE APPLETS
  205.  
  206. A hostile applet is any applet that attempts to use your system in an inappropriate manner. 
  207. The problems in the java language could be sorted in two main groups: 
  208.  
  209.  
  210.  
  211.         1) Problems due to bugs.
  212.  
  213.         2) Problems due to features in the language.
  214.  
  215.  
  216. In group one we have for example the java bytecode verifier bug, which makes is possible for 
  217. an applet to execute any command that the user can execute. 
  218.  
  219. Note that two other bugs could be found in group one, but they are both fixed in Netscape 2.01
  220. and JDK 1.0.1. 
  221.  
  222. Group two are more interesting and one large problem found is the fact that java can connect 
  223. to the ports. Meaning that all the methods described in .C.X. can be performed by an applet. 
  224. More information and examples could be found at address
  225. http://www.math.gatech.edu/~mladue/HostileArticle.html
  226.  
  227. If you need a high level of security you should use some sort of firewall for protection against
  228. java. As a user you could have java disable. 
  229.  
  230. ANONYMOUS FTP ABUSE
  231.  
  232. If an anonymous FTP archive have a writable area it could be misused for a denial of service 
  233. attack similar with with .D.3. That is we can fill up the file system. 
  234.  
  235. Also can a host get temporarily unusable by massive numbers of FTP requests. 
  236.  
  237. SYN FLOODING
  238.  
  239. Both 2600 and Phrack have posted information about the syn flooding attack. 2600 have also 
  240. posted exploit code for the attack. 
  241.  
  242. As we know the syn packet is used in the 3-way handshake. The syn flooding attack is based on 
  243. an incomplete handshake. That is the attacker host will send a flood of syn packet but will not
  244. respond with an ACK packet. The TCP/IP stack will wait a certain amount of time before dropping
  245. the connection, a syn flooding attack will therefore keep the syn_received connection queue of 
  246. the target machine filled. 
  247.  
  248. PING FLOODING
  249.  
  250. The impact of ping flooding is big. Under Unix we could try something like: ping -s host to 
  251. send 64 bytes packets. 
  252.  
  253. If you have Windows 95, click the start button, select RUN, then type in: 
  254. PING -T -L 256 xxx.xxx.xxx.xx. Start about 15 sessions. 
  255.  
  256. In section xxxxxxxxxxxxxxxxxxxxxxxxxxxxx you can find information about a ping-flooding-gun. 
  257.  
  258. Under Unix the -f switch could be of use. 
  259.  
  260. CRASHING SYSTEMS WITH PING FROM WINDOWS 95 MACHINES
  261.  
  262. If someone can ping your machine from a Windows 95 machine he or she might reboot, freeze or 
  263. crash your machine. The attacker simply writes: 
  264.  
  265. ping -l 65510 address.to.the.machine
  266.  
  267.  
  268. And the machine will freeze or reboot. 
  269.  
  270. A very good page about the problem and with a long list of affected systems can be found at 
  271. address http://www.sophist.demon.co.uk/ping/
  272.  
  273. The page is maintained by Mr Mike Bremford. 
  274.  
  275. MALICIOUS USE OF SUBNET MASK REPLY MESSAGE
  276.  
  277. The subnet mask reply message is used under the reboot, but some hosts are known to accept the 
  278. message any time without any check. If so all communication to or from the host can be
  279. turned off.
  280.  
  281. The host should not accept the message any time but under the reboot. 
  282.  
  283. FLEXlm
  284.  
  285. Any host running FLEXlm can get the FLEXlm license manager daemon on any network to shutdown 
  286. using the FLEXlm lmdown command. 
  287.  
  288.  
  289.  
  290. # lmdown -c /etc/licence.dat
  291.  
  292. lmdown - Copyright (C) 1989, 1991 Highland Software, Inc.
  293.  
  294.  
  295.  
  296. Shutting down FLEXlm on nodes: xxx
  297.  
  298. Are you sure? [y/n]: y
  299.  
  300. Shut down node xxx
  301.  
  302. #
  303.  
  304.  
  305. BOOTING WITH TRIVIAL FTP
  306.  
  307. To boot diskless workstations one often use trivial ftp with rarp or bootp. If not protected an
  308. attacker can use tftp to boot the host. 
  309.  
  310. ATTACKING USENET
  311.  
  312. It can be possible to cancel some ones else's article, destroy newsgroups and sending false 
  313. postings to Usenet. Fore more information about this see the FAQ:alt.2600 question 15. 
  314.  
  315. ATTACKING NAME SERVERS
  316.  
  317. The name server is the program that holds the information about the domain and answers 
  318. questions. The part of the domain name space that the name server holds is referred to as 
  319. a zone. 
  320.  
  321. The name server is seldom the only one, it is a to important service. Instead can at least two 
  322. be found, the primary master and the secondary master. However can not to many secondary 
  323. masters exist (10 ?). The secondary master provides a backup to the primary. 
  324.  
  325. Every time the name server makes a request it collects and store information and next time if
  326. another query is made for the information, it already have it in the cache. 
  327.  
  328. An attack at the name server could have a very big impact. Many servers depends heavily on
  329. proper working name servers, for example: rlogin, rsh, rcp, xhost, NFS, smtp, ftp... 
  330.  
  331. To attack the name server could we of course use any method described in this paper, but the 
  332. machine running the name server seldom do anything except DNS-work. The DNS-server is also very
  333. important and have had several security problems that are well known. Because of these reasons 
  334. will the DNS-server most likely be well protected and other services beside DNS will probably 
  335. not exist (although ping flooding could be a threat if not a firewall that filters ping from
  336. the outside exist). The attack that are left is to attack the service it self at port 53.
  337. We could for example: 
  338.  
  339.      Send random garbage to it. 
  340.      Send true queries to it. 
  341.      Use syn flooding. 
  342.  
  343. Alternative two should be the most effective one, because it will do every thing that 
  344. alternative one do and beside that keep the service program it self busy looking up DNS-names. 
  345. Putting together a long random list with DNS-name will also contain mostly addresses outside 
  346. the zone, making the name server to try querying other name servers. 
  347.  
  348. SSH AND PPP
  349.  
  350. If a PPP connection is made via SSH drops, all processes controlled by it can get zombied out. 
  351. The processes can not be killed with a kill -9 -1. To get rid of the zombies kill sshd. 
  352.  
  353. LOGIN VIA SSH
  354.  
  355. Ssh can be used to block login. Force sshd to ask for password during login. Connect to the 
  356. system but do not give the password. Until you have given the password no one else will be
  357. able to login. 
  358.  
  359. This is a matter of configuration. 
  360.  
  361. BIND
  362.  
  363. Telnet to port 53 on a host running BIND-4.9.5-P1. Enter something for example abcdef, but if
  364. that doesn't work just try something else. Hit enter and close the connection. 
  365.  
  366. The server will not now accept any TCP connections and the named-process may consume a lot of 
  367. CPU time. 
  368.  
  369. ping -sv -i 127.0.0.1 224.0.0.1
  370.  
  371.     $ ping -sv -i 127.0.0.1 224.0.0.1
  372.  
  373. Can cause Solaris to reboot or crash. 
  374.  
  375. qmail
  376.  
  377. A machine running qmail can run out ouf memory if someone are sending SMTP commands of 
  378. unlimited length. 
  379.  
  380. Two example programs can be found at address: http://www.student.tdb.uu.se/~t95hhu/programs/qmail.txt