home *** CD-ROM | disk | FTP | other *** search
/ H4CK3R 14 / hacker14.iso / exploits / cisco / cisco.txt < prev    next >
Encoding:
Text File  |  2002-10-22  |  10.0 KB  |  176 lines

  1.             File Information
  2.  
  3.             Verifying link...
  4.  
  5.             Register Your DAP
  6.  
  7. ################################################################################
  8. # Securing Low-End Cisco Routers                                               #
  9. # (c) spender 2000                                                             #
  10. # ---------------------------------------------------------------------------- #
  11. # greetz to tekneeq, rag, bansh33, ch1ckie (she's soooo cute!!!), boda (gotcha #
  12. # again), negrox (just cuz u asked me), trumpet, v9 (i lub u), everyone from   #
  13. # ACPO, specially tashie..she's soo nice!, mrwhit3, bogey (ur still muh bitch) #
  14. # axtrex (sorry i almost forgot u), sys-edit, and any of the rest of u who     #
  15. # have put up with my crap...special greetz tho those of u who mail me bout    #
  16. # my docs...makes a little boy feel all warm and tingly;)                      #
  17. ################################################################################
  18.                     
  19.  Table of Contents 
  20. --------------------------
  21. I.    Introduction
  22. II.   Local Security
  23. III.  Network Security
  24. IV.   Conclusion
  25. V.    Contact Me
  26.  
  27.  
  28.  I.  Introduction
  29. --------------------------
  30. Ok, welp my 3rd public doc...in case u haven't read the other ones, i'm sure
  31. u can find them on packetstorm.  They've got the names of ipchains.txt and
  32. Sysctl.sh.  I'm kinda bored right now, and a little messed up..i saw that
  33. guy on TV that wrestles crocodiles and grabs snakes by their tail and watches
  34. them spit venom into his eyes...and it was kinda funny.  mebbe i'll see some
  35. of u at the sanitarium tour on july 4th...(mebbe if i can get some federal
  36. agents or something to escort me..that'd be neato;) ) oh, and go see gone in
  37. 60 seconds...it was a good movie imo...lots of blowing up stuff and crashes
  38. and CARS...lots and lots of CARS..and of course angelina jolie...and well i'm
  39. just not gonna go there=P (h0tt!) oh..and while i'm here, since my interview
  40. isn't gonna be out for a while, lemme say that i'm looking for whores..lots of
  41. em (no not real ones).  if ya wanna chat for a little..come find me on EFnet,
  42. under nick spender-, or spender_ (not spender) ;)  so anywayz, back on subject
  43. here...i wrote this doc partially out of my disgust.....errr ok there's no 
  44. way out of this.  Rant time.  It's COMPLETELY ridiculous that for a user such
  45. as myself to update buggy/exploitable software (IOS) currently on my routers,
  46. i haveta pay CISCO a large sum of money (i was told $2000/yr).  This is 
  47. completely preposterous that i have to pay so much money for an "incomplete"
  48. product, and then to update it to a less "incomplete" state, i have to shell
  49. out more money...and then when i got to that point, pay more money in a few
  50. months to update it yet again because of some programmer's mistakes.  Since
  51. when does an error on the part of the company result in ME giving THEM money?
  52. it's ridiculous!  I can see them making ppl pay for hardware upgrades, but
  53. REALLY how much does it cost for them to shell out another software update?
  54. end users have paid out their ears already, and the only reason they pay these
  55. ridiculous prices is because it's their business that's paying for it.  If u
  56. can give the boss pretty pictures showing how this'll help them out, they're
  57. all for it, because the don't know what the heck it all means.  It's pitiful
  58. that these people are so money hungry....*sigh*  </rant>  Anywayz, for
  59. those of us who don't have beaucoup bucks...(i've got a cisco 2514)...we don't
  60. have the money for all the fancy upgrades or newest models...and many isps and
  61. such don't...it's a shame that to protect our networks we have to pay more 
  62. money to update an inadequate system.  The information applied in this document
  63. will apply to virtually any Cisco Router, but is specifically written for ones
  64. with IOS versions less than 11.  But anwayz, there is still some things
  65. you can do with low-end Cisco routers to enhance local security and network
  66. security.  This document aims to accomplish that.  It assumes that you
  67. have some experience in working with routers, ie knowing that the first rule
  68. in a list takes precedence.
  69.  
  70.  II.  Local Security
  71. --------------------------------
  72.  First thing to a secure router is having secure passwords of course.  Make
  73.  em long, and random...i like 32bit hex values for my passes;)  make sure
  74.  that your password is encrypted correctly using MD5 encryption.  the simple
  75.  command "enable secret" should do the trick..it'll set your privileged 
  76.  password and encrypt it.  This however, provides no security against 
  77.  sniffed passwords sent across telnet sessions to the router.  Cisco was
  78.  grateful enough to make routers that didn't have any sort of encrypted
  79.  remote login..such as ssh or kerberized telnet.  so in some cases, unless
  80.  you need it, it may be best to disable telnet access to the router.  This
  81.  can be done with the command "transport input none" done from the
  82.  configuration menu...which is accessed by typing "configure".  While i'm on
  83.  the issue of commands, "show" is helpful in showing the statistics of various
  84.  aspects of your router, and using the character "?" in commands displays help
  85.  for that command, or when done by itself, gives a list of commands that can 
  86.  be entered in the current menu.  enable tcp keepalives on the router with
  87.  the command "service tcp-keep-alives-in" to prevent ghost connections.  keep
  88.  management services such as SNMP disabled unless you really need them.
  89.  Disable any services running that aren't going to be used.  Here's the
  90.  commands i used to disable services on my router:
  91.  no service finger          #gives too much information
  92.  no ntp enable              #not needed
  93.  no cdp running             #gives too much information
  94.  no cdp enable              #gives too much information
  95.  no service tcp-small-servers #disables echo,chargen,discard
  96.  no service udp-small-servers #disables echo,chargen,discard
  97.  some of these are done from the interface configuration menu, while others
  98.  are done through the configuration menu.
  99.  
  100.  III.  Network Security
  101. --------------------------------
  102.  One of the areas to focus on for low-end routers as far as network security
  103.  is setting up ACLs to prevent at least some spoofed attacks. Using the
  104.  access-list command...these can be configured.  for my router, the following
  105.  configuration worked to prevent packets from certain ip ranges.
  106.  (done from the configure menu)
  107.  access-list 100 deny ip 127.0.0.0 0.255.255.255 any
  108.  access-list 100 deny ip 10.0.0.0 0.255.255.255 any
  109.  access-list 100 deny ip 224.0.0.0 31.255.255.255 any
  110.  access-list 100 deny ip host 0.0.0.0 any
  111.  access-list 100 deny ip host 255.255.255.255 any
  112.  access-list 100 deny ip 192.168.0.0 0.0.255.255 any
  113.  access-list 100 deny ip 172.16.0.0 0.0.255.255 any
  114.  access-list 100 deny ip yoursubnethere yoursubnetmaskhere any
  115.  access-list 100 permit ip any any
  116.  then after doing a "interface ethernet 0" or whatever your external ifaces
  117.  are for your router is/are...the following command binds it to the router
  118.  input.
  119.  ip access-group 100 in
  120.  There u go...sucker will be purrin like a kitty.  
  121.  If you want to keep packet kiddies from working off your network, impliment
  122.  a ACL to allow only ip packets out with source addresses of your subnet.  This
  123.  won't stop them from spoofing another host in your network, but it sure 
  124.  stops them from spoofing any other host.  something to the effect of:
  125.  access-list 101 deny ip any any
  126.  access-list 101 permit ip yoursubnethere yoursubnetmaskhere any
  127.  ip access-group 101 out
  128.  should do the trick.
  129.  To keep packets with an unreachable destination from entering your network
  130.  the command:
  131.  ip route 0.0.0.0 0.0.0.0 null 0 255
  132.  should do it.
  133.  Now, while you're here....u can add to your access-list by blocking out
  134.  all incoming IGMP packets...u don't need em anywayz(and fragmented ones
  135.  love being tossed at windows machines) so we add a rule like..
  136.  access-list 100 deny igmp any any
  137.  to our list
  138.  Now, to be protected against smurf attacks....a command like:
  139.  no ip directed-broadcast
  140.  should be done on all external ifaces (on my router, interface ethernet 0)
  141.  and this will keep ppl from using your broadcast as an amplifier.
  142.  While you're at it, disable source routing options on the router, as they're
  143.  never used for any legitimate purpose.  "no ip source-route" should do the
  144.  trick.  Being as ICMP redirect packets aren't used legitimately either, they
  145.  should be denied by the router as well.  This can be done with the following:
  146.  access-list 100 deny icmp any any redirect.
  147.  As far as flooding is concerned, there's not much low-end routers can do.
  148.  Just about the only command that can help here is "fair-queue" which is 
  149.  done at the interface configuration menu.  To prevent the router from dying
  150.  from extreme flooding, the command "scheduler interval 500" should help...
  151.  it makes sure that system tasks are executed at the minimum of once every
  152.  500ms.  And that's about all as far as network security is concerned.
  153.  The newer routers/IOS version have a bunch of new nifty features to help
  154.  in these regards, but that's out of the scope of this document, of course.
  155.  
  156.  IV.  Conclusion
  157. -------------------------------- 
  158.  Hopefully i've helped some of you lazy sysadmins to configure your
  159.  routers properly, because it's your fault that we've got all these problems
  160.  with ip spoofing...smurfs..etc.  And double shame on the ISPs, etc, who
  161.  are notified of these problems and fail to respond... Shit, if a 17 yr old
  162.  kid can figure out how to configure a router in a day, these guys who are
  163.  getting paid all the money shure as hell should know.  I should commend
  164.  cisco at least for providing their users with documents on how to secure
  165.  their routers...so they don't haveta go elsewhere for them.  i found them
  166.  to be inaccurate and incomplete in several areas, so i decided to write this
  167.  doc.  Besides, wouldn't ya rather hear it from a bright young crackah 
  168.  like myself?;)
  169.  
  170.  V.  Contact Me
  171. --------------------------------
  172.  Email: spender@exterminator.net (yes i LOVE email)
  173.  IRC: spender_ or spender-
  174.  
  175.  
  176.