1 00:00:04,120 --> 00:00:05,520 You 2 00:00:30,000 --> 00:00:30,620 Beep. 3 00:01:00,000 --> 00:01:00,960 Beep. 4 00:01:31,080 --> 00:01:31,700 Beep. 5 00:01:34,620 --> 00:01:35,240 Beep. 6 00:01:36,520 --> 00:01:37,140 Beep. 7 00:01:37,140 --> 00:01:37,480 Beep. 8 00:01:38,280 --> 00:01:38,900 Beep. 9 00:01:44,220 --> 00:01:44,840 Beep. 10 00:01:47,340 --> 00:01:47,960 Hello. 11 00:01:53,750 --> 00:01:55,960 I'm Raven Alder and I'm here to talk to you guys 12 00:01:55,960 --> 00:01:57,740 about denial of service and distributed 13 00:01:57,740 --> 00:01:59,600 denial of service attacks and a 14 00:02:00,000 --> 00:02:01,920 handy little Perl script that I've 15 00:02:01,920 --> 00:02:03,960 written to track them through major ISP 16 00:02:03,960 --> 00:02:05,420 backbones. Now, 17 00:02:05,580 --> 00:02:07,920 I know most of you are probably pretty familiar with 18 00:02:07,920 --> 00:02:09,780 this, but just a quick background on 19 00:02:09,780 --> 00:02:11,680 denial of service and what we normally see 20 00:02:11,680 --> 00:02:13,840 to let you know what the problem 21 00:02:13,840 --> 00:02:15,980 is with ISPs and why a lot of them 22 00:02:15,980 --> 00:02:17,680 don't slash can't address it. 23 00:02:19,160 --> 00:02:19,880 A lot 24 00:02:19,880 --> 00:02:21,920 of denial of service attacks that we're seeing 25 00:02:21,920 --> 00:02:22,780 are... 26 00:02:22,780 --> 00:02:24,740 Can you hear? 27 00:02:27,020 --> 00:02:27,540 Okay. 28 00:02:28,940 --> 00:02:29,460 Better? 29 00:02:30,480 --> 00:02:31,040 Alright. 30 00:02:32,620 --> 00:02:33,860 There are two major 31 00:02:33,860 --> 00:02:35,740 types of denial of service attacks 32 00:02:35,740 --> 00:02:38,000 that we see at my job. I work for 33 00:02:38,000 --> 00:02:39,860 a major ISP. We'll see 34 00:02:39,860 --> 00:02:41,960 denial of service attacks where they're 35 00:02:41,960 --> 00:02:44,040 just coming from maybe one or two clients 36 00:02:44,040 --> 00:02:45,880 with source IP addresses spoofed 37 00:02:45,880 --> 00:02:48,000 or we'll see denial of service attacks 38 00:02:48,000 --> 00:02:49,660 that are coming from like 200 39 00:02:49,660 --> 00:02:51,960 clients with legitimate IP addresses. 40 00:02:53,580 --> 00:02:56,000 There was actually a script 41 00:02:56,000 --> 00:02:57,900 called DOS Tracker that someone at MCI 42 00:02:57,900 --> 00:02:59,780 wrote a couple of years ago that 43 00:03:00,000 --> 00:03:02,060 tracked the distributed denial of service 44 00:03:02,060 --> 00:03:03,900 attacks, but it only tracked one IP address 45 00:03:03,900 --> 00:03:05,760 at a time, so you'd have to run it repeatedly 46 00:03:05,760 --> 00:03:07,640 in order to get anything 47 00:03:07,640 --> 00:03:09,840 approaching tracking for modern DDoS attacks. 48 00:03:10,600 --> 00:03:11,940 Now, the script that I've 49 00:03:11,940 --> 00:03:14,020 written is called 50 00:03:14,020 --> 00:03:16,040 Eyeball, and you can find it on 51 00:03:16,040 --> 00:03:17,700 SourceForge, sourceforge.net 52 00:03:17,700 --> 00:03:19,640 slash projects slash eyeball, 53 00:03:19,860 --> 00:03:22,000 and it's capable of 54 00:03:22,000 --> 00:03:24,120 tracking many IPs. 55 00:03:24,800 --> 00:03:25,820 It's also capable 56 00:03:25,820 --> 00:03:27,180 of tracking spoofed addresses. 57 00:03:27,980 --> 00:03:29,760 Currently, it only works on 58 00:03:30,000 --> 00:03:32,260 Cisco platforms. It does work okay on GSRs. 59 00:03:32,360 --> 00:03:33,980 We hope to add support for 60 00:03:33,980 --> 00:03:35,900 Juniper and Zebra routers 61 00:03:35,900 --> 00:03:36,540 in the near future. 62 00:03:40,920 --> 00:03:42,540 www.sourceforge.net 63 00:03:42,540 --> 00:03:42,700 www.sourceforge.net 64 00:03:42,700 --> 00:03:43,200 www.sourceforge.net 65 00:03:43,200 --> 00:03:45,460 slash projects slash eyeball 66 00:03:45,460 --> 00:03:45,760 slash projects slash eyeball 67 00:03:48,740 --> 00:03:50,180 The script, as you can 68 00:03:50,180 --> 00:03:51,760 happily see, is open source, 69 00:03:52,040 --> 00:03:53,960 so you're totally free to take the source 70 00:03:53,960 --> 00:03:55,860 code, modify it, change it. If you find 71 00:03:55,860 --> 00:03:57,680 any bugs or problems, please let me know. 72 00:03:58,540 --> 00:03:58,980 If you find any bugs or problems, please let me know. 73 00:04:01,940 --> 00:04:02,980 If you find any bugs or problems, please let me know. 74 00:04:02,980 --> 00:04:04,080 You can also send email 75 00:04:04,080 --> 00:04:04,840 to me at 76 00:04:04,840 --> 00:04:05,560 ravengeek 77 00:04:05,560 --> 00:04:08,340 at users.sourceforge.net 78 00:04:09,700 --> 00:04:12,240 Now, the problem that most ISPs 79 00:04:12,240 --> 00:04:13,780 have in dealing with denial of service 80 00:04:13,780 --> 00:04:15,880 attacks is that actually tracking down 81 00:04:15,880 --> 00:04:17,540 anything with a spoofed address takes 82 00:04:17,540 --> 00:04:19,980 absolute ages. You have to log into 83 00:04:19,980 --> 00:04:21,900 each router in the path, so you usually 84 00:04:21,900 --> 00:04:23,640 start at the router closest to the customer 85 00:04:23,640 --> 00:04:25,900 being attacked. You can log in, 86 00:04:25,980 --> 00:04:27,720 throw an access list on there on the 87 00:04:27,720 --> 00:04:29,840 Cisco platform with the login 88 00:04:30,000 --> 00:04:32,000 input keyword, which will log 89 00:04:32,000 --> 00:04:33,820 where the actual source interface is 90 00:04:33,820 --> 00:04:35,840 of the traffic coming into the router, and 91 00:04:35,840 --> 00:04:37,720 then track it back. Most 92 00:04:37,720 --> 00:04:39,960 links are point to point, so you 93 00:04:39,960 --> 00:04:41,880 don't really have a lot of problems figuring out 94 00:04:41,880 --> 00:04:43,180 what's on the other side of that link. 95 00:04:44,580 --> 00:04:45,100 Now, 96 00:04:47,100 --> 00:04:47,840 doing this 97 00:04:47,840 --> 00:04:49,100 manually takes hours. 98 00:04:49,680 --> 00:04:51,560 Doing this manually when you have 99 00:04:51,560 --> 00:04:53,740 200 source addresses, most 100 00:04:53,740 --> 00:04:55,720 ISPs won't even bother. And 101 00:04:55,720 --> 00:04:57,820 this script obviously is not going to 102 00:04:57,820 --> 00:04:59,920 change that. What it can do 103 00:05:00,000 --> 00:05:02,060 is automate the process and give you 104 00:05:02,060 --> 00:05:03,960 a list of, here are the IPs at which 105 00:05:03,960 --> 00:05:05,900 this attack traffic entered your network. 106 00:05:12,460 --> 00:05:13,820 Licensing for the script we covered 107 00:05:13,820 --> 00:05:15,660 already. It's GPL. Have at it. 108 00:05:18,040 --> 00:05:19,820 Also, a quick thank you to 109 00:05:19,820 --> 00:05:21,760 Ben Stern, Tiffany Mork, Steve Ains, 110 00:05:21,800 --> 00:05:23,640 and most of all, my husband Raven Black 111 00:05:23,640 --> 00:05:25,900 for much help getting this up 112 00:05:25,900 --> 00:05:27,040 and running and tested and all that. 113 00:05:28,400 --> 00:05:29,900 In order to run this script, 114 00:05:30,000 --> 00:05:31,880 it's a Perl script. You obviously need a Perl 115 00:05:31,880 --> 00:05:33,280 environment wherever you're set up. 116 00:05:33,460 --> 00:05:35,560 You will have to set up little access files 117 00:05:35,560 --> 00:05:37,640 with your username and passwords. On 118 00:05:37,640 --> 00:05:39,860 Cisco's, you will usually require 119 00:05:39,860 --> 00:05:41,700 a regular password 120 00:05:41,700 --> 00:05:43,760 to just log on via Telnet, your 121 00:05:43,760 --> 00:05:45,580 VTY passwords, and 122 00:05:45,580 --> 00:05:47,660 an enable password, or enable 123 00:05:47,660 --> 00:05:49,820 secret. The file that you'll 124 00:05:49,820 --> 00:05:51,520 set up can handle 125 00:05:51,520 --> 00:05:53,860 TACACs or things where you have an actual username, 126 00:05:54,080 --> 00:05:55,860 whether it's just TACACs for the 127 00:05:55,860 --> 00:05:57,480 login and then regular 128 00:05:57,880 --> 00:05:59,980 local database passwords for the enable, or 129 00:06:00,000 --> 00:06:01,440 whether it's TACACs the whole way. 130 00:06:01,660 --> 00:06:03,960 If you have your router set up so that you 131 00:06:03,960 --> 00:06:05,740 can have more than one authentication method, 132 00:06:05,900 --> 00:06:07,900 i.e. a TACAC server and then fall back to 133 00:06:07,900 --> 00:06:10,080 local bases, you just run the little script 134 00:06:10,080 --> 00:06:11,580 to set up your file twice 135 00:06:11,580 --> 00:06:13,780 and then append the second onto there. 136 00:06:15,460 --> 00:06:16,080 Bundled with 137 00:06:16,080 --> 00:06:18,080 the package, which you can get on SourceForge, 138 00:06:18,220 --> 00:06:19,900 is a script called 139 00:06:21,220 --> 00:06:21,700 RouterAccessEncode. 140 00:06:22,580 --> 00:06:23,600 You invoke that 141 00:06:23,600 --> 00:06:25,960 with output, the little angle 142 00:06:25,960 --> 00:06:28,020 bracket output, towards a file 143 00:06:28,020 --> 00:06:29,780 called RouterAccess- 144 00:06:30,000 --> 00:06:30,460 default. 145 00:06:30,700 --> 00:06:34,080 It will prompt you for 146 00:06:34,080 --> 00:06:36,060 your username, your login 147 00:06:36,060 --> 00:06:37,780 password, and your enable password. 148 00:06:39,080 --> 00:06:40,040 This uses the 149 00:06:40,040 --> 00:06:41,960 Telnet Cisco module in Perl, 150 00:06:42,020 --> 00:06:43,680 which will intelligently handle 151 00:06:43,680 --> 00:06:45,900 logins, so if you give it a username 152 00:06:45,900 --> 00:06:47,780 and the router happens to be configured to 153 00:06:47,780 --> 00:06:50,000 only authenticate from a local database and doesn't 154 00:06:50,000 --> 00:06:52,100 use usernames, then it won't return 155 00:06:52,100 --> 00:06:53,960 the username for the password or anything like that. 156 00:06:54,080 --> 00:06:55,960 It should work just fine. If you have a 157 00:06:55,960 --> 00:06:57,900 backup method, run the script twice, 158 00:06:57,900 --> 00:06:59,960 but the second time, append the output 159 00:07:00,000 --> 00:07:02,180 to RouterAccess- 160 00:07:02,180 --> 00:07:03,900 default, and that will 161 00:07:03,900 --> 00:07:05,780 put in, if it fails on the first 162 00:07:05,780 --> 00:07:07,580 authentication, try again with the second set of 163 00:07:07,580 --> 00:07:08,360 username and passwords. 164 00:07:09,780 --> 00:07:12,020 This should handle RADIUS, I haven't tried 165 00:07:12,020 --> 00:07:13,620 it with that, but it works okay on 166 00:07:13,620 --> 00:07:14,780 TACACS and local passwords. 167 00:07:16,700 --> 00:07:17,740 Alright, now 168 00:07:17,740 --> 00:07:19,820 once you've set up this script 169 00:07:19,820 --> 00:07:21,980 there, the .routeraccess 170 00:07:21,980 --> 00:07:23,660 default file has to be located 171 00:07:23,660 --> 00:07:25,740 in your home directory to actually work. 172 00:07:26,280 --> 00:07:27,620 All these files that 173 00:07:27,620 --> 00:07:29,980 Eyeball uses should be located in the 174 00:07:30,000 --> 00:07:31,740 same directory, but that doesn't matter 175 00:07:31,740 --> 00:07:33,880 whether it's your home directory or not. The only thing that has to be 176 00:07:33,880 --> 00:07:35,880 in your home directory is the .routeraccess-default. 177 00:07:37,080 --> 00:07:37,600 Also, 178 00:07:37,700 --> 00:07:39,880 the encryption that's done on 179 00:07:39,880 --> 00:07:41,640 the .routeraccess-default is 180 00:07:41,640 --> 00:07:43,940 really, really weak. It's almost 181 00:07:43,940 --> 00:07:45,620 like the, you know, 182 00:07:45,620 --> 00:07:47,960 ROT13 or something. So it's only there 183 00:07:47,960 --> 00:07:50,000 to prevent a casual observer who happens 184 00:07:50,000 --> 00:07:51,320 to look at your console 185 00:07:51,880 --> 00:07:53,480 or something from knowing your passwords. 186 00:07:53,820 --> 00:07:55,800 Do not store this with permission 187 00:07:55,800 --> 00:07:57,860 so that anyone else can read it because 188 00:07:57,860 --> 00:07:59,520 they can decrypt it with a 189 00:08:00,260 --> 00:08:01,120 napkin and a pen. 190 00:08:04,860 --> 00:08:05,820 Alright, so 191 00:08:05,820 --> 00:08:07,800 after you have created the proper 192 00:08:08,900 --> 00:08:09,860 .routeraccess-default 193 00:08:09,860 --> 00:08:11,760 file, you will also 194 00:08:11,760 --> 00:08:14,040 have to set an environment 195 00:08:14,040 --> 00:08:15,760 variable for the 196 00:08:15,760 --> 00:08:17,800 Eyeball access list. Now 197 00:08:17,800 --> 00:08:19,800 the way that this script works is it will 198 00:08:19,800 --> 00:08:21,800 go into each router in your network and create 199 00:08:21,800 --> 00:08:23,320 an access list with the same number. 200 00:08:23,560 --> 00:08:26,000 The way that Cisco does access lists, they have 201 00:08:26,000 --> 00:08:27,740 their access list grouped by number 202 00:08:27,740 --> 00:08:29,980 and the number represents the type of access list it is 203 00:08:30,000 --> 00:08:31,960 so anything between 101 and 204 00:08:31,960 --> 00:08:33,840 199 is going to be an extended IP 205 00:08:33,840 --> 00:08:35,340 access list. That's what you want to use. 206 00:08:35,540 --> 00:08:37,900 You have to make sure that this access list is 207 00:08:37,900 --> 00:08:40,080 not used on any other router in your network. 208 00:08:40,500 --> 00:08:41,900 Otherwise, when the script logs 209 00:08:41,900 --> 00:08:43,460 in and tries to create the access list, 210 00:08:43,660 --> 00:08:45,960 depending on the version of iOS and the bugs therein, 211 00:08:46,080 --> 00:08:48,140 it may overwrite, it may change, 212 00:08:48,260 --> 00:08:50,060 it may just totally delete your other access list 213 00:08:50,060 --> 00:08:51,320 and screw up your routing otherwise. 214 00:08:51,600 --> 00:08:53,580 So, bad idea. The script, 215 00:08:53,740 --> 00:08:55,800 if you do not have this set, will 216 00:08:55,800 --> 00:08:57,600 actually kick up an error message and say 217 00:08:57,600 --> 00:08:59,860 you need to set an environment variable for 218 00:09:00,000 --> 00:09:00,900 our eyeball access list. 219 00:09:01,960 --> 00:09:03,960 So, just find an unused number between 101 220 00:09:03,960 --> 00:09:05,800 and 199, you're all set. 221 00:09:08,800 --> 00:09:09,920 Also, one of the 222 00:09:09,920 --> 00:09:11,940 things that was originally 223 00:09:11,940 --> 00:09:13,240 somewhat challenging is 224 00:09:13,780 --> 00:09:15,720 the router needs to know what is on 225 00:09:15,720 --> 00:09:17,680 your network. Assuming that you're 226 00:09:17,680 --> 00:09:19,900 an ISP or a provider otherwise, 227 00:09:20,060 --> 00:09:21,820 you don't want the script attempting to log into 228 00:09:21,820 --> 00:09:23,980 the routers of your peers, etc. 229 00:09:24,140 --> 00:09:25,900 So, just crawling through the network and 230 00:09:25,900 --> 00:09:27,800 going interface by interface until your passwords 231 00:09:27,800 --> 00:09:29,340 fail is not really a good idea. 232 00:09:30,000 --> 00:09:30,880 It tends to annoy people. 233 00:09:31,360 --> 00:09:34,280 So, you have to create a list of IP addresses 234 00:09:34,280 --> 00:09:35,620 or of host names 235 00:09:35,620 --> 00:09:37,260 that you own, essentially, 236 00:09:37,520 --> 00:09:39,660 that the script is allowed to attempt to log into. 237 00:09:40,200 --> 00:09:41,980 And we've also included here 238 00:09:43,360 --> 00:09:44,240 a script 239 00:09:44,240 --> 00:09:45,720 that will create that list for you. 240 00:09:46,360 --> 00:09:47,800 Most ISPs that I know 241 00:09:47,800 --> 00:09:49,940 have a list of their routers, 242 00:09:49,980 --> 00:09:51,960 so that when they want to make some sort of policy change 243 00:09:51,960 --> 00:09:53,580 they can just go through a script to change 244 00:09:53,580 --> 00:09:54,220 to all the routers. 245 00:09:55,000 --> 00:09:57,720 So, the eyeball make interface list 246 00:09:57,720 --> 00:09:58,740 .pl script 247 00:10:00,000 --> 00:10:00,640 will take care of that for you. 248 00:10:00,700 --> 00:10:03,020 It takes the list of your routers as input 249 00:10:03,020 --> 00:10:05,680 and you have to direct the output 250 00:10:05,680 --> 00:10:07,300 to a file called 251 00:10:07,300 --> 00:10:09,320 eyeball-valid-routers.txt 252 00:10:10,580 --> 00:10:11,720 If you are 253 00:10:11,720 --> 00:10:13,720 constantly adding things to your network 254 00:10:13,720 --> 00:10:14,880 and removing things from your network, 255 00:10:14,980 --> 00:10:16,940 you may want to cron the script so you run it 256 00:10:17,640 --> 00:10:19,360 once a day, at night, 257 00:10:19,400 --> 00:10:20,840 during your off-peak hours, whenever. 258 00:10:21,520 --> 00:10:23,760 So that you always have a current list of IP addresses 259 00:10:23,760 --> 00:10:26,260 that the script can log into 260 00:10:26,260 --> 00:10:26,980 for your routers. 261 00:10:28,480 --> 00:10:29,880 mile-of-router-list.txt 262 00:10:30,000 --> 00:10:31,540 There's just whatever you call your 263 00:10:31,540 --> 00:10:32,640 input list. 264 00:10:33,940 --> 00:10:36,080 Alright, so once you've run these two scripts 265 00:10:36,080 --> 00:10:37,720 you'll have everything to 266 00:10:37,720 --> 00:10:39,840 set the environment 267 00:10:39,840 --> 00:10:41,300 variable for eyeball access list. 268 00:10:41,740 --> 00:10:43,920 Oh, one other thing that should 269 00:10:43,920 --> 00:10:44,700 be set. 270 00:10:45,500 --> 00:10:47,540 The eyeball wait time variable. 271 00:10:48,380 --> 00:10:49,920 It's set to default to 10 272 00:10:49,920 --> 00:10:51,880 seconds and it's just how long that access 273 00:10:51,880 --> 00:10:53,360 list will remain on the router 274 00:10:53,360 --> 00:10:54,780 before being pulled off. 275 00:10:55,040 --> 00:10:57,820 So how long it will be there trying to log the attack packets. 276 00:10:59,220 --> 00:10:59,980 10 seconds 277 00:11:00,000 --> 00:11:01,440 is the default, but 278 00:11:01,440 --> 00:11:03,980 if your routers run any sort of fast switching 279 00:11:03,980 --> 00:11:06,040 Cisco express forwarding and things like that 280 00:11:06,040 --> 00:11:07,780 we have seen problems with 281 00:11:07,780 --> 00:11:09,320 Cisco's implementation because 282 00:11:09,320 --> 00:11:11,780 fast switch packets do not get written into the 283 00:11:11,780 --> 00:11:12,280 system log. 284 00:11:14,160 --> 00:11:16,060 So if you're dealing with an attack 285 00:11:16,060 --> 00:11:17,900 where it's like one packet a minute or something 286 00:11:17,900 --> 00:11:19,860 then you'll want to expand the 287 00:11:19,860 --> 00:11:21,380 eyeball wait time variable 288 00:11:21,380 --> 00:11:23,720 to leave the list on there for maybe two minutes 289 00:11:23,720 --> 00:11:24,920 or something to catch each packet. 290 00:11:25,100 --> 00:11:27,320 Now, this is going to slow down the run of the script 291 00:11:27,920 --> 00:11:29,600 because every router you log into 292 00:11:30,000 --> 00:11:31,740 you have to wait that much time for it to catch 293 00:11:31,740 --> 00:11:33,880 the packets as well as all the logging in 294 00:11:33,880 --> 00:11:35,600 chewing through the output time, etc. 295 00:11:38,400 --> 00:11:39,840 There are two 296 00:11:39,840 --> 00:11:41,860 more debug variables that 297 00:11:41,860 --> 00:11:43,740 you can set if you want to actually see 298 00:11:43,740 --> 00:11:44,000 output. 299 00:11:45,680 --> 00:11:47,840 Eyeball ultra debug and eyeball 300 00:11:47,840 --> 00:11:49,620 insane debug. Eyeball ultra 301 00:11:49,620 --> 00:11:51,800 debug, if you just set it to one 302 00:11:51,800 --> 00:11:53,940 it will turn on debugging output so that you can 303 00:11:53,940 --> 00:11:55,840 see what the commands you put 304 00:11:55,840 --> 00:11:56,840 into each router are. 305 00:11:57,500 --> 00:11:59,900 You can also see some helpful comments that I've thrown in the 306 00:12:00,000 --> 00:12:00,100 script. 307 00:12:00,460 --> 00:12:03,880 Eyeball insane debug will turn on what the router sends back 308 00:12:03,880 --> 00:12:05,420 to you. That's a whole lot of output. 309 00:12:05,700 --> 00:12:07,920 It's like a show log of each 310 00:12:07,920 --> 00:12:09,920 router that you go through. You'll see the 311 00:12:09,920 --> 00:12:10,680 show ints in the 312 00:12:10,680 --> 00:12:13,320 show frame of the map, etc. 313 00:12:13,600 --> 00:12:14,760 Lots and lots of stuff. 314 00:12:18,660 --> 00:12:20,020 So that pretty much covers 315 00:12:20,020 --> 00:12:21,920 the prerequisites. Oh, also 316 00:12:21,920 --> 00:12:23,800 on your routers for this to work. Most people 317 00:12:23,800 --> 00:12:25,540 do, but you will have to have 318 00:12:25,540 --> 00:12:27,620 logging buffered debugging or logging 319 00:12:27,620 --> 00:12:29,920 buffered informational turned on so that there is 320 00:12:30,000 --> 00:12:31,900 a local syslog on the router for the script 321 00:12:31,900 --> 00:12:33,820 to write to. If there isn't, 322 00:12:33,860 --> 00:12:35,860 it does not go out to your syslog daemon 323 00:12:35,860 --> 00:12:37,480 and parse through the logs or any such things. 324 00:12:42,320 --> 00:12:43,840 Using the script itself, 325 00:12:44,940 --> 00:12:45,940 it takes as 326 00:12:45,940 --> 00:12:47,980 command line arguments the router that you want 327 00:12:47,980 --> 00:12:49,980 to start tracking on, which will almost always be 328 00:12:49,980 --> 00:12:51,840 the router right next to the customer 329 00:12:51,840 --> 00:12:53,900 being attacked. The IP address 330 00:12:53,900 --> 00:12:55,920 that is being attacked. Currently the script only 331 00:12:55,920 --> 00:12:57,640 supports one IP address 332 00:12:57,640 --> 00:12:59,120 being attacked at a time. 333 00:13:00,000 --> 00:13:01,140 Could expand that in the future. 334 00:13:01,520 --> 00:13:03,820 And you can also specify the type of 335 00:13:03,820 --> 00:13:06,060 traffic. IP, TCP, ICMP, 336 00:13:06,360 --> 00:13:07,460 UDP, what have you. 337 00:13:08,760 --> 00:13:09,780 We will probably 338 00:13:09,780 --> 00:13:11,820 be including, specifying the 339 00:13:11,820 --> 00:13:13,800 port numbers in future, but the script 340 00:13:13,800 --> 00:13:14,840 doesn't do that at the moment. 341 00:13:18,660 --> 00:13:19,860 IP is the 342 00:13:19,860 --> 00:13:21,820 default type of attack traffic if you do not 343 00:13:21,820 --> 00:13:23,860 specify this. This 344 00:13:23,860 --> 00:13:25,900 has caused problems in some implementations 345 00:13:25,900 --> 00:13:27,620 if the customer is being ping flooded 346 00:13:27,620 --> 00:13:29,880 and you just look for IP traffic 347 00:13:30,000 --> 00:13:30,720 Thank you. 348 00:13:34,020 --> 00:13:35,580 So if it is a ping flood attack 349 00:13:35,580 --> 00:13:37,000 make sure you set it to ICMP. 350 00:13:38,300 --> 00:13:39,900 While the script is running, you should 351 00:13:39,900 --> 00:13:41,900 be seeing messages printed to your display 352 00:13:41,900 --> 00:13:43,760 letting you know which routers that 353 00:13:43,760 --> 00:13:45,840 the script is logging into, what it is 354 00:13:45,840 --> 00:13:47,640 seeing in the output, whether it found 355 00:13:47,640 --> 00:13:50,020 packets or not, and what the routers that it is going through. 356 00:13:50,120 --> 00:13:51,320 The script is multi-threaded, so 357 00:13:51,320 --> 00:13:53,920 if you are coming in through several 358 00:13:53,920 --> 00:13:55,720 different places off of one router, it will 359 00:13:55,720 --> 00:13:57,700 branch at that router and start 360 00:13:58,180 --> 00:13:59,200 running the script. 361 00:14:00,000 --> 00:14:01,260 Or rather, start logging into 362 00:14:01,260 --> 00:14:04,020 the several routers from each individual point. 363 00:14:08,640 --> 00:14:09,900 Blame for this is mine, 364 00:14:10,080 --> 00:14:11,720 so comments, questions, suggestions, 365 00:14:12,040 --> 00:14:13,900 bug reports, etc. send to 366 00:14:13,900 --> 00:14:15,940 ravengeek at usersourceforge.net 367 00:14:24,820 --> 00:14:26,060 Alright, let's get to 368 00:14:26,060 --> 00:14:26,340 the script. 369 00:14:28,640 --> 00:14:30,800 It uses a module called 370 00:14:30,800 --> 00:14:32,300 router access which is included 371 00:14:32,300 --> 00:14:33,720 with the distribution of the script 372 00:14:33,720 --> 00:14:36,140 and all that router access does is 373 00:14:36,140 --> 00:14:38,180 throws the login functions on there 374 00:14:39,780 --> 00:14:40,720 you'll see them called 375 00:14:40,720 --> 00:14:41,220 a bit later. 376 00:14:44,600 --> 00:14:46,140 It will take the router, the 377 00:14:46,140 --> 00:14:47,720 attacked address, and the packet type as arguments 378 00:14:48,280 --> 00:14:50,140 and you can specify the wait time 379 00:14:50,140 --> 00:14:52,220 as an environment variable. It does not check that 380 00:14:52,220 --> 00:14:53,000 from the command line. 381 00:14:53,480 --> 00:14:55,120 You'll get an error message there. 382 00:14:56,340 --> 00:14:58,040 You don't have eyeball access list set 383 00:14:58,040 --> 00:14:59,060 as an environment variable. 384 00:15:03,120 --> 00:15:04,340 You can see we have 385 00:15:04,340 --> 00:15:05,500 a function here to actually 386 00:15:05,500 --> 00:15:06,980 throw on the 387 00:15:08,160 --> 00:15:10,260 access lists on the router 388 00:15:10,260 --> 00:15:11,300 and to remove it. 389 00:15:11,740 --> 00:15:13,820 Simple Cisco commands that you guys are probably 390 00:15:13,820 --> 00:15:16,020 really familiar with. You'll notice the host 391 00:15:16,020 --> 00:15:18,140 keyword in the access list. This is because 392 00:15:18,140 --> 00:15:19,660 it only goes through one 393 00:15:20,200 --> 00:15:21,900 attacked IP address at a time. 394 00:15:23,540 --> 00:15:24,220 If you 395 00:15:24,220 --> 00:15:25,860 have several addresses being attacked, 396 00:15:26,340 --> 00:15:27,680 then I would suggest running it 397 00:15:27,680 --> 00:15:30,200 at least until we put support in for that 398 00:15:30,200 --> 00:15:32,180 running it once for each IP being attacked. 399 00:15:32,460 --> 00:15:33,880 The script will output 400 00:15:33,880 --> 00:15:36,380 to eyeballoutput.txt in the directory 401 00:15:36,380 --> 00:15:38,160 that you have invoked it from with all your 402 00:15:38,160 --> 00:15:40,320 eyeball stuff in it. I would move 403 00:15:40,320 --> 00:15:42,280 that after I have done each 404 00:15:42,280 --> 00:15:44,300 individual address being attacked so it 405 00:15:44,300 --> 00:15:46,320 doesn't overwrite append any such thing. 406 00:15:53,800 --> 00:15:55,440 We also see the 407 00:15:56,340 --> 00:15:58,240 array here to actually take commands off 408 00:15:58,240 --> 00:15:58,540 the router. 409 00:16:03,100 --> 00:16:04,120 Now when it first 410 00:16:04,120 --> 00:16:06,080 tries to log into a router, it will 411 00:16:06,080 --> 00:16:08,000 print an error message to the console if it 412 00:16:08,000 --> 00:16:09,800 actually can't log into the router, otherwise 413 00:16:09,800 --> 00:16:12,220 we'll give you, I've logged in, it took 414 00:16:12,220 --> 00:16:14,300 this many seconds to this particular router. 415 00:16:15,360 --> 00:16:16,180 It uses 416 00:16:16,180 --> 00:16:18,080 the shover command to distinguish 417 00:16:18,080 --> 00:16:20,100 between a regular Cisco router 418 00:16:20,100 --> 00:16:21,620 and a Cisco gig switch router 419 00:16:21,620 --> 00:16:24,260 because the logging format and a couple of other 420 00:16:24,260 --> 00:16:26,120 things are different on the gig switch routers. 421 00:16:26,340 --> 00:16:28,200 If you actually look at the show log 422 00:16:28,200 --> 00:16:29,860 on the output for a gig switch router, 423 00:16:30,100 --> 00:16:32,140 you will see at the beginning of the line 424 00:16:32,140 --> 00:16:34,120 slot 7 and then later on 425 00:16:34,120 --> 00:16:36,320 pos 0 for pos 7 0 426 00:16:36,320 --> 00:16:37,180 on a line card. 427 00:16:40,520 --> 00:16:41,780 So shover identifies 428 00:16:42,160 --> 00:16:43,600 the difference between a gig switch router 429 00:16:43,600 --> 00:16:46,240 and a regular one. I believe 430 00:16:46,240 --> 00:16:48,440 that, I'm not real savvy with junipers 431 00:16:48,440 --> 00:16:50,220 but I've been told that shover will also work on 432 00:16:50,220 --> 00:16:52,400 a juniper so when we start including those in 433 00:16:52,400 --> 00:16:53,840 we'll probably also differentiate 434 00:16:53,840 --> 00:16:55,160 via junipers that way. 435 00:16:58,040 --> 00:16:58,560 So, 436 00:16:59,340 --> 00:17:00,780 now in order to determine 437 00:17:00,780 --> 00:17:01,880 which way the 438 00:17:01,880 --> 00:17:04,580 which interface the attack traffic is going out 439 00:17:04,580 --> 00:17:06,220 it will do a show ip 440 00:17:06,220 --> 00:17:08,460 route on the address 441 00:17:08,460 --> 00:17:09,300 that's being attacked. 442 00:17:09,660 --> 00:17:11,800 If this is not something directly connected 443 00:17:12,240 --> 00:17:14,200 then it will just do a show ip route on the next 444 00:17:14,200 --> 00:17:16,280 hop repeatedly until it gets to something that 445 00:17:16,280 --> 00:17:18,200 is directly connected. This is because 446 00:17:18,200 --> 00:17:20,260 when we put the access list on the interface 447 00:17:20,260 --> 00:17:22,260 we're going to apply the access list 448 00:17:22,260 --> 00:17:24,440 outbound on the interface that is 449 00:17:24,440 --> 00:17:26,320 facing the router being attacked. 450 00:17:26,340 --> 00:17:28,360 We can use the log 451 00:17:28,360 --> 00:17:30,340 input command on there to log 452 00:17:30,340 --> 00:17:32,280 where it's coming in from. This gives you 453 00:17:32,280 --> 00:17:34,560 a relatively foolproof way of tracing spoofed 454 00:17:34,560 --> 00:17:36,100 packets. The script does 455 00:17:36,100 --> 00:17:38,260 treat every packet that it looks for 456 00:17:38,260 --> 00:17:40,520 as a spoofed packet. So it doesn't attempt 457 00:17:40,520 --> 00:17:42,280 to determine whether the packet header 458 00:17:42,280 --> 00:17:44,000 is spoofed or not. It'll just 459 00:17:44,000 --> 00:17:46,340 do a show ip route and log 460 00:17:46,340 --> 00:17:47,800 input on that interface regardless. 461 00:17:59,360 --> 00:17:59,840 Alright. 462 00:17:59,940 --> 00:18:02,200 Here we see the access 463 00:18:02,200 --> 00:18:03,620 list actually being applied. 464 00:18:03,840 --> 00:18:06,100 IP access group, the access list number 465 00:18:06,100 --> 00:18:08,100 to the interface. It will sleep for 466 00:18:08,100 --> 00:18:10,160 whatever the wait time is set to which is 467 00:18:10,160 --> 00:18:11,760 whatever you set your eyeball wait time 468 00:18:11,760 --> 00:18:14,100 environment variable to. Defaults to 10 otherwise. 469 00:18:17,240 --> 00:18:18,240 One thing that 470 00:18:18,240 --> 00:18:19,220 you may want to 471 00:18:20,200 --> 00:18:22,260 look at if you do not have 472 00:18:22,260 --> 00:18:23,140 fast switching available 473 00:18:24,100 --> 00:18:26,120 if you have a packet sniffer anywhere 474 00:18:26,340 --> 00:18:28,180 near the guy being attacked, or you can 475 00:18:28,180 --> 00:18:30,060 just throw an access list that permits IP 476 00:18:30,060 --> 00:18:32,100 any any or permits ICMP any any 477 00:18:32,100 --> 00:18:34,020 and logs. Try and diagnose 478 00:18:34,020 --> 00:18:36,140 before you actually run eyeball the type 479 00:18:36,140 --> 00:18:38,060 of traffic that's coming through and how often 480 00:18:38,060 --> 00:18:40,160 you're seeing it. It won't really help 481 00:18:40,160 --> 00:18:42,160 you very much to use the 482 00:18:42,160 --> 00:18:44,120 default wait time of 10 seconds if you're 483 00:18:44,120 --> 00:18:45,660 only getting a packet a minute. You've got 484 00:18:45,660 --> 00:18:47,860 a 1 in 6 chance of your 10 seconds being 485 00:18:47,860 --> 00:18:48,980 that 10 seconds. 486 00:18:52,160 --> 00:18:54,080 One bug that we have encountered. 487 00:18:54,360 --> 00:18:56,100 What you should be seeing in the 488 00:18:56,340 --> 00:18:58,420 show log of your router after you've 489 00:18:58,420 --> 00:19:00,020 run the script in each router that the script 490 00:19:00,020 --> 00:19:02,060 passes through, you will see three 491 00:19:02,060 --> 00:19:03,200 configured from 492 00:19:03,200 --> 00:19:06,060 whatever interface you've come in on whether it's 493 00:19:06,060 --> 00:19:07,920 console or VTY or what have you 494 00:19:07,920 --> 00:19:09,760 by username if you have 495 00:19:09,760 --> 00:19:12,120 or anything with the username enabled. Three 496 00:19:12,120 --> 00:19:14,200 separate times. Now the way that 497 00:19:14,200 --> 00:19:16,220 the script works is it will log into 498 00:19:16,220 --> 00:19:18,020 the router, create the access list, 499 00:19:18,300 --> 00:19:20,220 get out of global config mode, go back into 500 00:19:20,220 --> 00:19:22,060 global config mode, apply the 501 00:19:22,060 --> 00:19:24,240 access list to the interface with access 502 00:19:24,240 --> 00:19:25,400 group whatever out. 503 00:19:26,340 --> 00:19:28,060 Wait for the eyeball wait time, 504 00:19:28,240 --> 00:19:30,320 remove the access list, get out of global 505 00:19:30,320 --> 00:19:32,340 config mode, and then later gets back 506 00:19:32,340 --> 00:19:34,320 into global config mode to remove 507 00:19:34,320 --> 00:19:36,080 the access list from the router entirely 508 00:19:36,080 --> 00:19:38,280 and then gets out again. So you should see three 509 00:19:38,280 --> 00:19:40,060 configured from 510 00:19:40,060 --> 00:19:42,240 console by Raven, etc. 511 00:19:42,460 --> 00:19:43,960 And the packets that are logged 512 00:19:43,960 --> 00:19:45,880 should be after the second 513 00:19:46,460 --> 00:19:47,460 iteration of that. 514 00:19:48,800 --> 00:19:50,120 There seems to be some 515 00:19:50,120 --> 00:19:52,000 problem with the timing of this 516 00:19:52,000 --> 00:19:54,240 by Cisco and I've talked 517 00:19:54,240 --> 00:19:55,720 to their attack about this, but 518 00:19:56,340 --> 00:19:58,240 there are a good number of times where you'll see 519 00:19:58,240 --> 00:20:00,220 configured from console, configured from console, configured 520 00:20:00,220 --> 00:20:02,280 from console, anything that happens for the 521 00:20:02,280 --> 00:20:04,220 next minute or so, and then all the 522 00:20:04,220 --> 00:20:04,660 logged packets. 523 00:20:06,920 --> 00:20:08,280 So it appears that the 524 00:20:08,280 --> 00:20:09,960 packets are being logged after the 525 00:20:09,960 --> 00:20:12,280 access list has not only been removed from 526 00:20:12,280 --> 00:20:14,220 the interface but has been removed from 527 00:20:14,220 --> 00:20:15,700 the router entirely. It's kind of strange. 528 00:20:16,820 --> 00:20:18,180 So we put an extra 529 00:20:18,180 --> 00:20:20,160 little sleep function in there so 530 00:20:20,160 --> 00:20:22,000 that if the access list is 531 00:20:22,600 --> 00:20:24,360 removed you still wait a bit before 532 00:20:24,360 --> 00:20:26,060 you actually check the logs to see if anything 533 00:20:26,340 --> 00:20:27,480 happens. If you have this problem 534 00:20:27,480 --> 00:20:30,180 occurring, then check 535 00:20:30,180 --> 00:20:31,620 your version of IOS. 536 00:20:31,940 --> 00:20:33,440 It was happening a good bit in 537 00:20:33,440 --> 00:20:35,980 12.0.16s but seems to be fixed in 538 00:20:35,980 --> 00:20:38,300 12.0.16st. You may also 539 00:20:38,300 --> 00:20:39,860 want to talk to Cisco about it. 540 00:20:39,920 --> 00:20:41,540 They are aware that the script exists. 541 00:20:48,580 --> 00:20:49,920 Alright, here's the 542 00:20:49,920 --> 00:20:51,800 log parsing bit. The 543 00:20:51,800 --> 00:20:54,060 Sec6 IP access you should see 544 00:20:54,060 --> 00:20:56,200 in anything that is reporting 545 00:20:56,340 --> 00:20:57,320 the logged packets. 546 00:20:58,220 --> 00:21:00,040 You'll see the access list number there 547 00:21:00,040 --> 00:21:02,280 and the interface that it came in on. 548 00:21:10,960 --> 00:21:12,240 You will also 549 00:21:12,240 --> 00:21:14,040 see the interface info 550 00:21:14,040 --> 00:21:14,540 on there. 551 00:21:15,920 --> 00:21:18,020 If you have an ATM 552 00:21:18,020 --> 00:21:19,900 interface, then you may see 553 00:21:19,900 --> 00:21:22,060 VPI, VCI information. If you have a frame 554 00:21:22,060 --> 00:21:23,860 relay interface, you'll see DILCs, things like that. 555 00:21:23,960 --> 00:21:25,420 All that gets pulled by the script. 556 00:21:28,060 --> 00:21:29,020 The dreaded 557 00:21:29,020 --> 00:21:30,300 error message that you see 558 00:21:30,300 --> 00:21:32,140 all too often if you have fast switching 559 00:21:32,140 --> 00:21:34,040 and so all packets are not being logged. 560 00:21:34,420 --> 00:21:35,720 No packets seen in router. 561 00:21:36,560 --> 00:21:38,300 If this happens, the script will 562 00:21:38,300 --> 00:21:40,280 just stop at that router and not attempt to search 563 00:21:40,280 --> 00:21:42,120 anything further upstream. It wouldn't know 564 00:21:42,120 --> 00:21:44,200 where to look. The only 565 00:21:44,200 --> 00:21:45,700 fix that I have found so far 566 00:21:46,120 --> 00:21:48,120 for that, if the fast switching is 567 00:21:48,120 --> 00:21:50,000 enabled and so all packets aren't being logged, 568 00:21:50,100 --> 00:21:51,300 is you can try and run the script again 569 00:21:51,300 --> 00:21:52,800 or you can 570 00:21:54,340 --> 00:21:56,320 increase the wait time. Sometimes that helps. 571 00:22:00,020 --> 00:22:01,040 It will then 572 00:22:01,040 --> 00:22:01,720 do a 573 00:22:02,340 --> 00:22:04,160 look up in the correspondence between 574 00:22:04,160 --> 00:22:06,260 the IP address and 575 00:22:06,260 --> 00:22:08,340 the ATM or frame relay address is there. 576 00:22:08,540 --> 00:22:10,240 It defaults to getting 577 00:22:10,240 --> 00:22:12,140 all sorts of layer 2 information 578 00:22:12,140 --> 00:22:14,140 regardless of what 579 00:22:14,140 --> 00:22:16,160 is actually on the router. It's a lot easier 580 00:22:16,160 --> 00:22:18,260 than actually trying to determine, okay this is 581 00:22:18,260 --> 00:22:20,340 an ATM interface, we'll treat it like that. It just gets all the 582 00:22:20,340 --> 00:22:22,480 information. So if you see lines in your output 583 00:22:22,480 --> 00:22:24,260 of show ATM map 584 00:22:24,260 --> 00:22:26,180 and there's an erroneous command because 585 00:22:26,340 --> 00:22:28,060 you haven't got any ATM interfaces on that 586 00:22:28,060 --> 00:22:29,820 particular router, that's okay. 587 00:22:29,960 --> 00:22:31,560 It's in the script. That's supposed to happen. 588 00:22:35,760 --> 00:22:37,980 And it will then log out of the router 589 00:22:38,920 --> 00:22:40,140 and move on to 590 00:22:40,140 --> 00:22:40,620 the next one. 591 00:22:42,300 --> 00:22:44,160 Now I've done some testing of this 592 00:22:44,160 --> 00:22:45,300 script and 593 00:22:46,060 --> 00:22:47,920 it seems to work fairly well 594 00:22:47,920 --> 00:22:50,120 but fast switching is the 595 00:22:50,120 --> 00:22:51,240 biggest problem that we have. 596 00:22:51,760 --> 00:22:54,320 It has to be run by someone with 597 00:22:54,320 --> 00:22:55,980 enable access to the backbone 598 00:22:55,980 --> 00:22:57,760 obviously because you need the enable 599 00:22:57,760 --> 00:22:59,360 scripts to be put into the input file. 600 00:23:00,860 --> 00:23:02,260 This means that end users 601 00:23:02,260 --> 00:23:03,400 cannot run this script. 602 00:23:03,740 --> 00:23:06,180 Pretty much only ISPs are capable of doing 603 00:23:06,180 --> 00:23:06,420 that. 604 00:23:08,420 --> 00:23:09,960 If any of you feel 605 00:23:09,960 --> 00:23:11,820 like giving it a try, please 606 00:23:11,820 --> 00:23:14,100 let me know how it works, what happens, etc. 607 00:23:15,840 --> 00:23:18,080 I have tested this on Linux 608 00:23:18,080 --> 00:23:19,860 platforms and on Solaris platforms. 609 00:23:20,640 --> 00:23:22,100 Everything works okay on 610 00:23:22,100 --> 00:23:23,640 both of those as long as you have the proper 611 00:23:24,320 --> 00:23:26,040 cables installed. I haven't tried it under 612 00:23:26,040 --> 00:23:28,180 the Windows implementation of Perl. I'm not much of a 613 00:23:28,180 --> 00:23:29,460 Windows chick, but 614 00:23:29,980 --> 00:23:31,460 it should in theory work. 615 00:23:36,460 --> 00:23:37,260 Any questions? 616 00:23:41,740 --> 00:23:42,240 Yeah? 617 00:23:54,320 --> 00:23:55,920 You mean if your customer is multi-homed 618 00:23:55,920 --> 00:23:57,320 from one particular router? 619 00:24:06,580 --> 00:24:07,060 Yeah. 620 00:24:08,220 --> 00:24:10,220 If the customer has multiple links 621 00:24:10,220 --> 00:24:12,060 into your core, then you should run 622 00:24:12,060 --> 00:24:13,500 iBall twice or 623 00:24:14,120 --> 00:24:16,040 for as many times as each link they have starting at 624 00:24:16,040 --> 00:24:18,280 each router that they have a link to you 625 00:24:18,280 --> 00:24:19,560 on. So if they have 626 00:24:19,560 --> 00:24:22,060 two T1s out of one router in 627 00:24:22,060 --> 00:24:24,200 you can start it on that one router and it 628 00:24:24,320 --> 00:24:26,280 will be fine. If they have two T1s 629 00:24:26,280 --> 00:24:28,100 into different routers, run it once starting 630 00:24:28,100 --> 00:24:30,240 at each of those different routers and it should pick 631 00:24:30,240 --> 00:24:30,700 up everything. 632 00:24:36,780 --> 00:24:37,180 Okay. 633 00:24:55,140 --> 00:24:56,340 Well, the output 634 00:24:56,340 --> 00:24:58,320 in the log will tell you that packets 635 00:24:58,320 --> 00:25:00,220 are going to the customer's IP 636 00:25:00,220 --> 00:25:02,320 address. You don't give it the customer's 637 00:25:02,920 --> 00:25:04,460 MAC address or anything like that. 638 00:25:04,680 --> 00:25:06,300 So if you have multiple routes 639 00:25:06,300 --> 00:25:08,240 to the customer from your one particular 640 00:25:08,240 --> 00:25:09,820 network, it doesn't matter 641 00:25:09,820 --> 00:25:12,140 which one. It will just do show IP route 642 00:25:12,140 --> 00:25:14,420 and determine the interface there. 643 00:25:15,000 --> 00:25:16,420 BGP gets kind of strange 644 00:25:16,420 --> 00:25:18,180 there because if you're using BGP, which 645 00:25:18,180 --> 00:25:19,860 like most everyone on the internet is, 646 00:25:20,020 --> 00:25:21,860 then BGP will only see one 647 00:25:21,860 --> 00:25:24,300 quote-unquote best path and it will see 648 00:25:24,320 --> 00:25:26,280 but that's the path that the traffic would be taking. 649 00:25:26,520 --> 00:25:28,340 So I don't think it's 650 00:25:28,340 --> 00:25:29,120 a huge problem there. 651 00:25:32,400 --> 00:25:33,560 Any other questions? 652 00:25:34,720 --> 00:25:35,280 Yes. 653 00:25:39,060 --> 00:25:46,000 Well, having the 654 00:25:46,000 --> 00:25:48,140 enabled passwords, obviously you shouldn't have 655 00:25:48,140 --> 00:25:50,160 this sitting around on your home machine 656 00:25:50,160 --> 00:25:52,180 sending things via 657 00:25:52,180 --> 00:25:54,280 totally unencrypted telnet over the 658 00:25:54,320 --> 00:25:56,180 internet. Cisco, unfortunately, doesn't support 659 00:25:56,180 --> 00:25:58,360 secure shell yet, but it's very important 660 00:25:58,360 --> 00:26:00,240 to protect the file that 661 00:26:00,240 --> 00:26:00,840 has your 662 00:26:02,240 --> 00:26:04,080 the router access default, etc. 663 00:26:04,160 --> 00:26:06,180 You should set it so that its permissions, if you're 664 00:26:06,180 --> 00:26:08,240 on a Unix system, are only readable to 665 00:26:08,240 --> 00:26:09,960 you. It is a 666 00:26:09,960 --> 00:26:11,080 concern of mine, yeah. 667 00:26:13,140 --> 00:26:14,180 As far as the 668 00:26:14,820 --> 00:26:16,140 entire network topology 669 00:26:16,140 --> 00:26:18,040 is not actually saved in the eyeball 670 00:26:18,040 --> 00:26:20,140 valid routers, it's just a list of IP 671 00:26:20,140 --> 00:26:22,180 addresses. It doesn't tell you what connects to what. 672 00:26:22,360 --> 00:26:24,120 It just says, these are the IP 673 00:26:24,320 --> 00:26:26,400 addresses that I am allowed to try and connect to. 674 00:26:30,980 --> 00:26:31,460 Yes? 675 00:26:35,900 --> 00:26:41,820 No, I haven't 676 00:26:41,820 --> 00:26:44,120 had that come up. The question was, have you 677 00:26:44,120 --> 00:26:46,080 run into problems where you are unable to remove 678 00:26:46,080 --> 00:26:47,900 the access list in the same telnet session? 679 00:26:48,280 --> 00:26:50,240 It may be an iOS specific thing, 680 00:26:50,320 --> 00:26:52,080 but it seems like 681 00:26:52,080 --> 00:26:54,100 if it actually manages to 682 00:26:54,320 --> 00:26:55,880 log into the router, it can 683 00:26:55,880 --> 00:26:58,360 throw on the access list, look for traffic. 684 00:26:58,480 --> 00:27:00,080 The biggest problem I've seen is when it doesn't 685 00:27:00,080 --> 00:27:02,140 actually log any packets because of the fast switching 686 00:27:02,140 --> 00:27:04,280 stuff, but I've never actually had it die 687 00:27:04,280 --> 00:27:05,160 like mid-session. 688 00:27:05,800 --> 00:27:08,080 If it does, though, one of the 689 00:27:08,080 --> 00:27:10,220 things that would be fairly helpful is with the 690 00:27:10,220 --> 00:27:12,120 output that it puts to the screen, you can see which 691 00:27:12,120 --> 00:27:13,960 routers it's logging into, and 692 00:27:13,960 --> 00:27:16,200 you will have one particular access 693 00:27:16,200 --> 00:27:18,220 list that you would only use for this. That's why it 694 00:27:18,220 --> 00:27:19,620 needs the eyeball access list variable. 695 00:27:20,520 --> 00:27:22,320 So, you could, worst comes to 696 00:27:22,320 --> 00:27:24,200 worst, go back through the routers that it's out 697 00:27:24,320 --> 00:27:25,760 and put on the screen and make sure that those 698 00:27:26,300 --> 00:27:28,160 IP access lists have been removed from the 699 00:27:28,160 --> 00:27:28,480 routers. 700 00:27:38,680 --> 00:27:40,280 No, I haven't seen that. 701 00:27:40,340 --> 00:27:41,560 The output... 702 00:27:47,000 --> 00:27:52,340 This is console on the 703 00:27:52,340 --> 00:27:54,060 Cisco or console on your Unix box? 704 00:27:54,320 --> 00:27:56,180 On the Cisco? Because the script is 705 00:27:56,180 --> 00:27:57,800 run from a Unix box and just does the 706 00:27:57,800 --> 00:28:00,180 telling it into each, so it doesn't display 707 00:28:00,180 --> 00:28:02,240 the entire output on your 708 00:28:02,240 --> 00:28:04,260 console. Hopefully, all it 709 00:28:04,260 --> 00:28:05,920 would do is... If you have a 710 00:28:05,920 --> 00:28:08,000 particular length of your 711 00:28:08,000 --> 00:28:10,160 log buffer on the router, then it 712 00:28:10,160 --> 00:28:12,060 can just... It would... Worst comes to worst, 713 00:28:12,160 --> 00:28:13,240 it gets wrapped. 714 00:28:14,300 --> 00:28:16,040 Does that... Is that what you're saying 715 00:28:16,040 --> 00:28:17,200 freezes up your TTY? 716 00:28:20,040 --> 00:28:21,820 No, no terminal monitoring at all. 717 00:28:21,880 --> 00:28:24,280 You just do the show log, you parse whatever's in the 718 00:28:24,320 --> 00:28:26,040 log, so if it's overwritten its log buffer 719 00:28:26,040 --> 00:28:28,180 18 times, you're only going to get that last 720 00:28:28,180 --> 00:28:30,400 screen of information. So in case 721 00:28:30,400 --> 00:28:32,160 of like a truly massive DDoS attack 722 00:28:32,160 --> 00:28:34,040 or something like that, then you probably 723 00:28:34,040 --> 00:28:36,200 have to take that list that you 724 00:28:36,200 --> 00:28:37,600 got of the attacking addresses, 725 00:28:38,060 --> 00:28:40,260 try and deal with those, whether calling up your 726 00:28:40,260 --> 00:28:42,340 ISPs and your peering ISPs 727 00:28:42,340 --> 00:28:44,280 and telling them about them, shutting off those that are your 728 00:28:44,280 --> 00:28:45,960 customers if you are the ISP, etc., 729 00:28:45,960 --> 00:28:48,020 and then running the script again to get the next 730 00:28:48,020 --> 00:28:50,220 lump of them, because it's only going to pull what's in the 731 00:28:50,220 --> 00:28:51,940 syslog, or rather what's in the 732 00:28:51,940 --> 00:28:52,580 buffered log. 733 00:29:00,220 --> 00:29:00,740 Yeah. 734 00:29:02,160 --> 00:29:04,380 Yeah, if it gets to the point that it's 735 00:29:04,380 --> 00:29:06,180 killing your router, then the script 736 00:29:06,180 --> 00:29:08,460 will probably aid in your router's 737 00:29:08,460 --> 00:29:09,560 death slightly, but 738 00:29:09,560 --> 00:29:10,880 you're already killed. 739 00:29:13,280 --> 00:29:14,080 We did 740 00:29:14,080 --> 00:29:16,100 try running it on some routers that were 741 00:29:16,100 --> 00:29:18,180 short on memory, and indeed in 742 00:29:18,180 --> 00:29:20,160 one of the initial sketches out 743 00:29:20,160 --> 00:29:21,880 for the layout of the script, 744 00:29:22,040 --> 00:29:23,860 I was going to have it do like 745 00:29:24,320 --> 00:29:26,220 a couple of show runs, pull out secondary 746 00:29:26,220 --> 00:29:28,360 IP addresses for the interfaces so that if you 747 00:29:28,360 --> 00:29:30,220 had an Ethernet interface with two IPs assigned 748 00:29:30,220 --> 00:29:32,280 to it, it would include both of those in 749 00:29:32,280 --> 00:29:33,980 the allowed list. 750 00:29:34,080 --> 00:29:36,020 As it is now, it will only include whatever 751 00:29:36,020 --> 00:29:37,800 is in a show IP interface brief. 752 00:29:38,400 --> 00:29:40,120 So that's only the primary IP address 753 00:29:40,120 --> 00:29:42,320 on any interface, but it will get IPs 754 00:29:42,320 --> 00:29:43,320 of sub-interfaces and such. 755 00:29:44,880 --> 00:29:45,280 But 756 00:29:45,940 --> 00:29:48,140 we have a couple of routers in the network that I was 757 00:29:48,140 --> 00:29:50,100 testing on that are very short on memory, 758 00:29:50,240 --> 00:29:52,040 and so avoiding doing a show run 759 00:29:52,040 --> 00:29:54,040 was generally a good idea. 760 00:29:54,320 --> 00:29:55,960 So as to avoid causing malloc failures. 761 00:30:01,020 --> 00:30:01,460 Yes? 762 00:30:12,240 --> 00:30:14,020 It does do the ARP addresses. 763 00:30:15,160 --> 00:30:16,200 That's why it pulls the 764 00:30:16,200 --> 00:30:18,280 show frame relay map, etc., etc., to get the ARP, 765 00:30:18,360 --> 00:30:20,280 and then when it goes through the logging, 766 00:30:20,440 --> 00:30:22,240 it pulls both the 767 00:30:22,240 --> 00:30:23,940 interface number and the 768 00:30:24,320 --> 00:30:25,500 interface type, so it'll get DILSI, 769 00:30:25,680 --> 00:30:26,980 VPI, VCI, what have you. 770 00:30:32,140 --> 00:30:33,940 I haven't actually tried it on 771 00:30:33,940 --> 00:30:35,260 any multipoint links. 772 00:30:35,600 --> 00:30:37,460 It works fine pulling the information. 773 00:30:37,740 --> 00:30:39,760 I get the information there, but the network 774 00:30:39,760 --> 00:30:41,640 that I tested it on only has 775 00:30:41,640 --> 00:30:42,960 point-to-points in its core. 776 00:30:43,640 --> 00:30:45,820 So if anyone has multipoint links, 777 00:30:45,920 --> 00:30:47,700 you know, some sort of funky ATM setup 778 00:30:47,700 --> 00:30:49,940 or what have you, I would love to hear how it works. 779 00:30:50,620 --> 00:30:51,020 Yes? 780 00:30:51,020 --> 00:30:52,060 . 781 00:30:55,480 --> 00:30:57,040 I don't have it with me, 782 00:30:57,100 --> 00:30:58,340 but it's really simple looking. 783 00:30:58,500 --> 00:31:00,540 It's just a list of IP addresses 784 00:31:00,540 --> 00:31:02,620 and the interface on your router 785 00:31:02,620 --> 00:31:03,220 where it came from. 786 00:31:04,020 --> 00:31:06,280 So new line separated text file. 787 00:31:06,760 --> 00:31:07,280 Yes? 788 00:31:08,020 --> 00:31:08,540 . 789 00:31:08,540 --> 00:31:09,320 . 790 00:31:09,320 --> 00:31:09,420 . 791 00:31:09,960 --> 00:31:10,480 . 792 00:31:10,480 --> 00:31:10,600 . 793 00:31:10,600 --> 00:31:12,600 . 794 00:31:17,900 --> 00:31:18,600 . 795 00:31:19,300 --> 00:31:19,920 . 796 00:31:19,920 --> 00:31:19,980 . 797 00:31:19,980 --> 00:31:20,040 . 798 00:31:20,040 --> 00:31:21,500 . 799 00:31:21,500 --> 00:31:23,360 . 800 00:31:37,120 --> 00:31:38,520 . 801 00:31:38,520 --> 00:31:39,040 . 802 00:31:41,860 --> 00:31:42,460 . 803 00:31:46,080 --> 00:31:46,680 . 804 00:31:46,680 --> 00:31:46,760 . 805 00:31:46,760 --> 00:31:46,820 . 806 00:31:47,500 --> 00:31:48,100 . 807 00:31:48,100 --> 00:31:48,120 . 808 00:31:48,120 --> 00:31:48,140 . 809 00:31:48,140 --> 00:31:48,960 . 810 00:31:48,960 --> 00:31:49,020 . 811 00:31:49,980 --> 00:31:50,580 . 812 00:31:50,580 --> 00:31:50,600 . 813 00:31:50,600 --> 00:31:50,660 . 814 00:31:54,560 --> 00:31:55,160 . 815 00:32:08,520 --> 00:32:08,640 . 816 00:32:08,640 --> 00:32:08,820 . 817 00:32:16,560 --> 00:32:17,040 . 818 00:32:17,520 --> 00:32:18,000 . 819 00:32:18,000 --> 00:32:18,240 . 820 00:32:18,240 --> 00:32:18,980 . 821 00:32:18,980 --> 00:32:19,040 . 822 00:32:19,700 --> 00:32:20,180 . 823 00:32:23,580 --> 00:32:24,060 . 824 00:32:24,060 --> 00:32:24,240 . 825 00:32:24,800 --> 00:32:25,280 . 826 00:32:25,280 --> 00:32:25,300 . 827 00:32:25,300 --> 00:32:25,320 . 828 00:32:38,520 --> 00:32:40,800 It hasn't been extensively tested yet, so. 829 00:32:51,640 --> 00:32:51,960 Okay. 830 00:33:08,520 --> 00:33:08,780 Yeah. 831 00:33:23,720 --> 00:33:24,160 Okay. 832 00:33:25,480 --> 00:33:28,640 So, if the router is one of our routers, 833 00:33:29,160 --> 00:33:32,980 then it will open up a temp file. 834 00:33:33,620 --> 00:33:34,900 If it can't open the temp file, 835 00:33:35,000 --> 00:33:36,020 it dies with an error message, 836 00:33:36,220 --> 00:33:36,500 and 837 00:33:36,500 --> 00:33:39,060 it will go through, 838 00:33:40,160 --> 00:33:43,640 it will fork and create children processes for each, 839 00:33:43,760 --> 00:33:44,180 bless you, 840 00:33:44,960 --> 00:33:45,800 individual router, 841 00:33:46,680 --> 00:33:47,280 and 842 00:33:58,740 --> 00:34:01,900 and it will just create a separate little session 843 00:34:01,900 --> 00:34:02,880 for each one of those. 844 00:34:03,040 --> 00:34:06,060 It will wait to actually close out the whole process 845 00:34:06,060 --> 00:34:08,360 it counts how many children processes it has 846 00:34:08,360 --> 00:34:09,120 at any given point. 847 00:34:09,760 --> 00:34:12,160 And it will wait for that to close out the whole thing, 848 00:34:12,320 --> 00:34:15,180 but essentially, I am not the queen of multithreading 849 00:34:15,180 --> 00:34:17,600 this is essentially the only way that I know how to do it. 850 00:34:17,620 --> 00:34:19,360 I know more about routers than I do about Pearl. 851 00:34:19,660 --> 00:34:22,600 So, if you have a suggestion to improve efficiency 852 00:34:23,200 --> 00:34:24,400 or technical performance, 853 00:34:24,660 --> 00:34:26,500 then send it to me an email. 854 00:34:30,740 --> 00:34:31,480 Anyone else? 855 00:34:35,640 --> 00:34:36,040 Yes? 856 00:34:36,060 --> 00:34:36,220 Yes? 857 00:34:45,600 --> 00:34:49,320 Well, I've tested it on routers that have interfaces 858 00:34:49,320 --> 00:34:51,640 up to OC48 speeds that were at about, 859 00:34:51,860 --> 00:34:53,780 the OC48s were on 20% utilization, 860 00:34:53,940 --> 00:34:56,500 but on the same routers we also had OC3s 861 00:34:56,500 --> 00:34:58,140 that were at like 80 or 90% utilization, 862 00:34:58,480 --> 00:35:01,080 and it didn't seem to cause a noticeable performance lag 863 00:35:01,080 --> 00:35:02,420 on the routers or anything. 864 00:35:02,740 --> 00:35:03,460 Thank you. 865 00:35:05,020 --> 00:35:07,020 As far as attack traffic volumes, 866 00:35:07,800 --> 00:35:10,180 I haven't seen anything above about, 867 00:35:11,360 --> 00:35:14,160 let's see, I didn't test it with high level traffic volumes 868 00:35:14,160 --> 00:35:16,640 with more than about 200 attacking addresses 869 00:35:17,260 --> 00:35:19,540 in the last couple of versions of the script, 870 00:35:19,620 --> 00:35:21,320 simply because the ISP that I work for 871 00:35:21,320 --> 00:35:23,820 has not had an attack of that level going through it 872 00:35:23,820 --> 00:35:25,440 in the later versions of the script. 873 00:35:25,820 --> 00:35:28,240 It seemed to work all right in earlier versions, 874 00:35:28,400 --> 00:35:30,620 but a good number of things have been changed. 875 00:35:30,820 --> 00:35:32,160 I've gone up to about 876 00:35:32,160 --> 00:35:35,980 10, 15 attacking hosts sending about 877 00:35:36,840 --> 00:35:39,360 100 megs of traffic or so to the 878 00:35:40,800 --> 00:35:43,480 attacked address, and the script handled that okay. 879 00:35:50,380 --> 00:35:51,400 Other questions? 880 00:35:53,880 --> 00:35:55,340 All right, we're down early. 881 00:35:56,840 --> 00:35:57,560 . 882 00:36:02,160 --> 00:36:02,700 Thank you.