<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>yurisk.info &#187; Cisco</title>
	<atom:link href="http://yurisk.info/category/cisco/feed/" rel="self" type="application/rss+xml" />
	<link>http://yurisk.info</link>
	<description>Technical Blog about IT Security and Networking</description>
	<lastBuildDate>Thu, 29 Jul 2010 11:25:45 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>MAC finder script</title>
		<link>http://yurisk.info/2010/07/02/mac-finder-script/</link>
		<comments>http://yurisk.info/2010/07/02/mac-finder-script/#comments</comments>
		<pubDate>Fri, 02 Jul 2010 05:35:37 +0000</pubDate>
		<dc:creator>Yuri</dc:creator>
				<category><![CDATA[Checkpoint NG/NGX]]></category>
		<category><![CDATA[Cisco]]></category>
		<category><![CDATA[Esafe]]></category>
		<category><![CDATA[Fortigate]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Solaris]]></category>
		<category><![CDATA[Checkpoint]]></category>

		<guid isPermaLink="false">http://yurisk.info/?p=959</guid>
		<description><![CDATA[While I don&#8217;t like going down to Layer 2 , recently I had to do it &#8211; I didn&#8217;t know IP address of the Cisco router I wanted to connect to but I had access to the Cisco router sitting in the same network. That would be pretty easy to do #show arp on this [...]]]></description>
			<content:encoded><![CDATA[<p>While I don&#8217;t like going down to Layer 2 , recently I had to do it &#8211; I didn&#8217;t know IP address of the Cisco router I wanted to connect to but I had access to the Cisco router sitting in the same network. That would be pretty easy to do #show arp on this router and then search on Google to whom belongs each MAC  if it wasn&#8217;t the subnet mask of /26. Copy pasting each entry of the ARP table into Google didn&#8217;t look like a lot of fun. So I wrote a python script that reads MAC addresses in bulk from command line and using downloaded beforehand database of MAC-vendor translations prints vendor for each MAC address. It works for &#35;show arp on CIsco,&#35;show mac-address-table on CIsco switches, &#35;arp -en  on Linux (means including Checkpoint), &#35;arp -a on Freebsd ,&#35;show arp of Junos from Juniper, &#35;get sys arp on Fortigate.<br />
Below is the script.<br />
Here&#58;<br />
<strong>mac-database.txt</strong> &#8211; file containing MAC-vendor translation in format &lt;MAC 6 hex digits as a sequence&gt; &lt;VENDOR&gt;, I used <a href="http://standards.ieee.org/regauth/oui/oui.txt"> standards.ieee.org/regauth/oui/oui.txt </a> as the source with a bit of sed, but if you want ready to use file I recommend <strong>nmap-mac-prefixes</strong> from nmap source-code distribution <a href="http://nmap.org/svn/nmap-mac-prefixes">http://nmap.org/svn/nmap-mac-prefixes</a><br />
Download script (to make sure formatting is preserved, an important thing for Python)<br />
<a href="http://yurisk.info/scripts/mac-finder.py">http://yurisk.info/scripts/mac-finder.py</a><br />Script AND mac database from nmap project &#8211; <a href="http://yurisk.info/scripts/mac.tar.gz"> http://yurisk.info/scripts/mac.tar.gz</a></p>
<div class="cmdout">
<pre>
&#35;!/usr/bin/python
&#35;This script accepts MAC addresses from the command line and
&#35;prints vendor for each mac address
&#35; Author&#58;Yuri, yurisk@yurisk.info,06.2010
import sys
import re
&#35;This function removes from MACs colon or dot and returns MAC as a sequence of HEX chars
def dotreplace(matchobj):
&nbsp;&nbsp;       if matchobj.group(0) == &#39;.&#39;&#58;
&nbsp;&nbsp;&nbsp;&nbsp;            return &#39;&#39;
&nbsp;&nbsp;       elif  matchobj.group(0) == &#39;&#58;&#39;&#58;
&nbsp;&nbsp;&nbsp;&nbsp;            return &#39;&#39;
&#35;open file with MAC addresses and vendors database,it has form xxxx &lt;Vendor&gt;
macs=open(&#39;mac-database.txt&#39;,&#39;r&#39;)
macs_lines=macs.readlines()
&#35;Read from stdinput
data = sys.stdin.readlines()
for ppp in data:
       popa=re.search(&#39;.*([a-f0-9]{4}\.[a-f0-9]{4}\.[a-f0-9]{4}).*&#39;,ppp,re.IGNORECASE)
       if popa:
             newpopa=re.sub(&#39;\.&#39;, dotreplace,popa.group(1))[0:6]
             newpopa_re=re.compile(newpopa,re.IGNORECASE)
             for mac_db in macs_lines:
                 vendor=re.search(newpopa_re,mac_db)
                 if vendor:
                    print ppp.strip(),mac_db[7:]
       popalinux = re.search(&#39;.*([a-f0-9]{2}&#58;[a-f0-9]{2}&#58;[a-f0-9]{2}&#58;[a-f0-9]{2}&#58;[a-f0-9]{2}&#58;[a-f0-9]{2}).*&#39;,ppp,re.IGNORECASE)
       if popalinux&#58;
             newpopalinux=re.sub(&#39;&#58;&#39;,dotreplace,popalinux.group(1))[0&#58;6]
             newpopalinux_re=re.compile(newpopalinux,re.IGNORECASE)
             for mac_db in macs_lines&#58;
                 vendor=re.search(newpopalinux_re,mac_db)
                 if vendor&#58;
                    print ppp.strip(),mac_db[7&#58;]

       popadash = re.search('.*([a-f0-9]{2}-[a-f0-9]{2}-[a-f0-9]{2}-[a-f0-9]{2}-[a-f0-9]{2}-[a-f0-9]{2}).*',ppp,re.IGNORECASE)
       if popadash:
             newpopadash=re.sub('-',dotreplace,popadash.group(1))[0:6]
             newpopadash_re=re.compile(newpopadash,re.IGNORECASE)
             for mac_db in macs_lines:
                 vendor=re.search(newpopadash_re,mac_db)
                 if vendor:
                    print ppp.strip(),mac_db[7:]
</pre>
</div>
<p>Running it:</p>
<div class="cmd">
[root@darkstar ]# ./mac-finder.py</div>
<div class="cmdout">
&lt;now I copy paste output from arp -a in BSD&gt;<br />$ arp -a<br />
(10.99.99.150) at 00:50:56:95:74:72 on em0 [ethernet]<br />
 (10.99.99.254) at 00:09:0f:31:c8:24  on em0 [ethernet]<br /> &lt;Hit CTRL+D to signal the end of input&gt;<br />
 (10.99.99.150) at 00:50:56:95:74:72 on em0 [ethernet] VMware, Inc.<br />
 (10.99.99.254) at 00:09:0f:31:c8:24 on em0 [ethernet] Fortinet Inc.</div>
]]></content:encoded>
			<wfw:commentRss>http://yurisk.info/2010/07/02/mac-finder-script/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Visio stencils for Cisco, Juniper, Fortinet, Checkpoint, Avaya</title>
		<link>http://yurisk.info/2010/06/26/visio-stencils-for-cisco-juniper-fortinet-checkpoint-avaya/</link>
		<comments>http://yurisk.info/2010/06/26/visio-stencils-for-cisco-juniper-fortinet-checkpoint-avaya/#comments</comments>
		<pubDate>Sat, 26 Jun 2010 12:43:25 +0000</pubDate>
		<dc:creator>Yuri</dc:creator>
				<category><![CDATA[Checkpoint NG/NGX]]></category>
		<category><![CDATA[Cisco]]></category>
		<category><![CDATA[Fortigate]]></category>

		<guid isPermaLink="false">http://yurisk.info/?p=942</guid>
		<description><![CDATA[Some links to download Visio stencils of the few most popular vendors.
Juniper
Cisco
Avaya
BlueCoat
 Fortinet
DellCheckpoint happen not to have official stencils set, only Nokia appliances stuff can be found. So someone volunteered and using icons/press releases/PowerPoint presentations done by the Checkpoint turned it into the Visio stencils&#58;
fireverse.orgIf nothing  else helps here you  can find the [...]]]></description>
			<content:encoded><![CDATA[<p>Some links to download Visio stencils of the few most popular vendors.<br />
<a href="http://www.juniper.net/us/en/products-services/icons-stencils/">Juniper</a><br />
<a href="http://www.cisco.com/en/US/products/prod_visio_icon_list.html">Cisco</a><br />
<a href="http://support.avaya.com/css/appmanager/public/support?_nfpb=true&#038;_pageLabel=WNContent_Public&#038;contentid=C20097681410857094">Avaya</a><br />
<a href="http://www.bluecoat.com/resources/productimageslogos">BlueCoat</a><br />
<a href="http://kb.fortinet.com/kb/microsites/search.do?cmd=displayKC&#038;docType=kc&#038;externalId=11091&#038;sliceId=1&#038;docTypeID=DT_KCARTICLE_1_1&#038;dialogID=7440262&#038;stateId=0%200%207442231"> Fortinet</a><br />
<a href="http://www.dell.com/content/topics/topic.aspx/global/products/pvaul/topics/en/visio?c=us&#038;l=en&#038;s=gen">Dell</a><br />Checkpoint happen not to have official stencils set, only Nokia appliances stuff can be found. So someone volunteered and using icons/press releases/PowerPoint presentations done by the Checkpoint turned it into the Visio stencils&#58;<br />
<a href="http://fireverse.org/?page_id=14">fireverse.org</a><br />If nothing  else helps here you  can find the rest&#58;<br />
<a href="http://nag.ru/projects/visio/">nag.ru/projects/visio</a></p>
]]></content:encoded>
			<wfw:commentRss>http://yurisk.info/2010/06/26/visio-stencils-for-cisco-juniper-fortinet-checkpoint-avaya/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SMTP inspection with policy-map in ASA</title>
		<link>http://yurisk.info/2010/05/26/smtp-inspection-with-policy-map-in-asa/</link>
		<comments>http://yurisk.info/2010/05/26/smtp-inspection-with-policy-map-in-asa/#comments</comments>
		<pubDate>Wed, 26 May 2010 18:14:26 +0000</pubDate>
		<dc:creator>Yuri</dc:creator>
				<category><![CDATA[ASA/PIX Cisco]]></category>
		<category><![CDATA[Cisco]]></category>

		<guid isPermaLink="false">http://yurisk.info/?p=823</guid>
		<description><![CDATA[This is the first time I was disappointed by the cisco.com or Checkopint:ASA 1&#58;0. I have had a simple task at hand – configure SMTP inspection in ASA 8.0(3) and cisco.com documentation didn’t help me at all. But first the task&#58;Secure internal mail server by preventing it from sending spam outbound. It comes to mind [...]]]></description>
			<content:encoded><![CDATA[<p>This is the first time I was disappointed by the cisco.com or Checkopint:ASA 1&#58;0. I have had a simple task at hand – configure SMTP inspection in ASA 8.0(3) and cisco.com documentation didn’t help me at all. But first the task&#58;Secure internal mail server by preventing it from sending spam outbound. It comes to mind two very simple but largely effective measures – block mails with From: field set to any domain but ours, and block attempts to relay Through the internal mail server mails destined to any domain but ours. In Checkpoint I can do it quite simply with SMTP Resource. Unfortunately in ASA it is not the case. Let’s look at final SMTP inspection I configured in ASA.<br />
Input &#58;<br />
Internal server having outside IP address of 199.202.2.3 serves two domains <strong>apple.com</strong> and <strong>microsoft.com</strong><br />
Task&#58; <br />
- block mails with From: field set to any domain but apple.com or microsoft.com<br />
- block mail relying for any domain but microsoft.com or apple.com<br />
NOTE. Here I did this config on the production client so had no room for experimenting with all “what ifs” Identify mails direction from inside server outbound. I did it as didn’t find reliable info about sender-address match condition – does it match in any direction if applied globally on all traffic ? I mean , if it just looks at Mail from: field and acts on mails in both directions then it would block mails coming in from any domain but client’s own.<br />
To prevent even checking this on client I did this ACL that will apply this SMTP inspection to outgoing mails<br />
anyway.</p>
<div class="cmd">BigInJapan(config)#access-list Mail-server permit tcp host 199.202.2.3 any eq 25</div>
<p>To block mails with From filed other than client’s domains I use regex that matches client’s domains and the use negation with NOT.</p>
<div class="cmd">BigInJapan(config)# regex PermittedSenders &#8220;@microsoft.com|@apple.com &#8220;</div>
<p>Create policy-map where all the tweaked parameters are set (as of ASA 8.2 there is still no class-map type inspect esmtp) .</p>
<div class="cmd">BigInJapan (config)# policy-map type inspect esmtp NoSpamOutside</div>
<p>Match all mails that Mail from field is anything but *@microsoft.com  or  *@apple.com. Action is reset and log.<br />
It is more secure I guess to drop instead of reset as in drop malware would have to wait until some timeout, but I didn’t care here anyway.</p>
<div class="cmd">BigInJapan(config-pmap)# match not sender-address regex PermittedSenders<br />
BigInJapan(config-pmap-c)# reset log<br />
BigInJapan(config-pmap-c)# exit</div>
<p>Various parameters. Here you set internal domain the mail server is serving, so trying to deliver mails to any other domain would be seen as illegal relaying and dropped. But also I was surprised to know here that policy-map mail-relay parameter can be used only once, leaving you without this protection if you have multiple domains served from the same server. So below is theoretical configuration if my client had just one domain on his server. </p>
<div class="cmd">BigInJapan(config-pmap)# parameters<br />
BigInJapan(config-pmap-p)# mail-relay apple.com action drop-connection log<br />
BigInJapan(config-pmap-p)# exit<br />
BigInJapan(config-pmap)# exit</div>
<p>Now create general policy-map to tie it all together.</p>
<div class="cmd">BigInJapan(config)# policy-map NoSpamFromUs<br />
BigInJapan(config-pmap)# class Mail-server<br />
BigInJapan(config-pmap-c)# inspect esmtp NoSpamOutside<br />
BigInJapan(config-pmap-c)# exit<br />
BigInJapan(config-pmap)# exit</div>
<p>And apply it on some interface.</p>
<div class="portant"><strong>Important&#58;</strong>  according to Hucaby’s ASA handbook application protocol inspection is applied AFTER the NAT rules are done, so you need to use in your class-map/ACL IPs that are after the translation. Internal IP of the mail server is 192.168.3.3 that is statically NATed to 199.202.2.3, so I used 199.202.2.3 in class-map’s ACL. </div>
<p>On which interface to apply the policy-map I guess doesn’t matter but to be sure I did it on the outside.</p>
<div class="cmd">BigInJapan(config)# service-policy NoSpamFromUs interface outside </div>
<p>Link to Inspection page in ASA 8.<br />
<a href="http://www.cisco.com/en/US/docs/security/asa/asa80/configuration/guide/inspect.html"> Applying Application Layer Protocol Inspection </a></p>
]]></content:encoded>
			<wfw:commentRss>http://yurisk.info/2010/05/26/smtp-inspection-with-policy-map-in-asa/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Difference between ebgp-multihop and ttl-security.</title>
		<link>http://yurisk.info/2010/02/26/difference-between-ebgp-multihop-and-ttl-security/</link>
		<comments>http://yurisk.info/2010/02/26/difference-between-ebgp-multihop-and-ttl-security/#comments</comments>
		<pubDate>Fri, 26 Feb 2010 18:39:12 +0000</pubDate>
		<dc:creator>Yuri</dc:creator>
				<category><![CDATA[Cisco]]></category>
		<category><![CDATA[Fortigate]]></category>
		<category><![CDATA[IOS Cisco]]></category>

		<guid isPermaLink="false">http://yurisk.info/?p=512</guid>
		<description><![CDATA[Once upon a time reading some CCIE paper at work I asked myself a question : “Why would someone bother to invent ttl-security and even write RFC http://tools.ietf.org/html/rfc5082 on it when multi-hop EBGP feature provides the same end result ?” .
The results of my busy/doing-nothing activity I present here.First some background. For some (unknown to [...]]]></description>
			<content:encoded><![CDATA[<p>Once upon a time reading some CCIE paper at work I asked myself a question : “Why would someone bother to invent ttl-security and even write RFC http://tools.ietf.org/html/rfc5082 on it when multi-hop EBGP feature provides the same end result ?” .<br />
The results of my busy/doing-nothing activity I present here.<br />First some background. For some (unknown to me) reasons BGP peering was envisioned as TCP connection between directly connected routers, by default. To proceed with this design (worth checking BGP RFCs if it was actually an obligation)  vendors (Cisco,Juniper and even Fortinet) implemented all BGP protocol communication using  TTL=1 in TCP packets being exchanged. As the logical consequence of this if a router was placed more than 1 hop away from its peer  BGP session could  not be established. To provide for such set ups when peers are many hops away the ebgp-multihop term was coined – on configuration level you can specify that BGP peer is that hops far away . <br />What happens in fact is that when you specify such multi-hop BGP peer the router starts sending BGP packets with TTL being equal to the number of hops you set . That means if I set peer to be 3 hops away and some attacker tries to spoof legit peer’s IP but is 4 hops away – such attack won’t succeed cause my router will receive spoofed BGP packets ok but will send replies with TTL of 3 which will expire just 1 hop away from the attacker.<br />
Questionable , but security .  So why ttl security?<br />
This feature indeed enforces that BGP peer is no more than given hops away . And here comes the difference – it enforces it inbound . It works this way – after you enable ttl security on the BGP peer session and specify how many hops away this peer is allowed to be, your router<br />
checks incoming TCP packets from this peer and does this simple calculation &#59; configured value &lt;= 255 – hops-away-to-peer , if it holds true your router goes on with establishing BGP session , if not – session is shut down. Regarding outgoing TTL values – may be it is Cisco-only thing, may be not , but the moment you enable ttl security for some BGP peer on Cisco the router itself starts sending BGP-related packets to this peer with initial ttl being equal to 255. I guess it is logical that if you enforce on your side ttl security the peering side will want to do the same.<br />
<br />When ttl rule is broken we see in the debug session:<br />
Dec 27 19:08:04.103: %BGP-4-INCORRECT_TTL: Discarded message with TTL 1 from 124.2.11.15<br />
And neighbor status is:<br />
Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd<br />
124.2.11.15   4 13462      33      63        0    0    0 00:04:31 Idle</p>
<p>#sh ip bgp neighbors 124.2.11.15<br />
BGP neighbor is 124.2.11.15,  remote AS 13462, external link<br />
  BGP version 4, remote router ID 0.0.0.0<br />
  BGP state = Closing</p>
]]></content:encoded>
			<wfw:commentRss>http://yurisk.info/2010/02/26/difference-between-ebgp-multihop-and-ttl-security/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Capture packets at IOS Cisco router or finally we have a sniffer</title>
		<link>http://yurisk.info/2010/02/01/capture-packets-at-ios-cisco-router-or-finally-we-have-a-sniffer/</link>
		<comments>http://yurisk.info/2010/02/01/capture-packets-at-ios-cisco-router-or-finally-we-have-a-sniffer/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 07:33:06 +0000</pubDate>
		<dc:creator>Yuri</dc:creator>
				<category><![CDATA[Cisco]]></category>
		<category><![CDATA[IOS Cisco]]></category>

		<guid isPermaLink="false">http://yurisk.info/?p=466</guid>
		<description><![CDATA[Finally it is here – built-in sniffer on the Cisco IOS platform ! Starting IOS 12.4(20) release Cisco introduces  brand new feature
called Embedded Packet Capture (EPC) that allows us to capture raw packets on the Cisco router and then later analyze it offline.
It can capture any traffic passing through the router, destined to it, [...]]]></description>
			<content:encoded><![CDATA[<p>Finally it is here – built-in sniffer on the Cisco IOS platform ! Starting IOS 12.4(20) release Cisco introduces  brand new feature<br />
called <strong>Embedded Packet Capture (EPC)</strong> that allows us to capture raw packets on the Cisco router and then later analyze it offline.<br />
It can capture any traffic passing through the router, destined to it, or originated from it . The captured packets are stored in DRAM<br />
of the router from where you can upload the capture file using HTTP/SCP/HTTPS/TFTP/FTP anywhere and then dissect it. The capture<br />
is stored using PCAP format , so any protocol dissector will understand this file, including the favorite one WIreshark/Ethereal.<br />
Now some limitations:<br />
 &#8211; CEF has to be enabled on the router;<br />
 &#8211; The capture is stored in the DRAM , so you’d better have enough of it;<br />
 &#8211; While no maximum capture buffer or packet size is stated I guess it depends on the platform (see tests below);<br />
 &#8211; IOS has to be 12.4(20) or higher.<br />
Let&#8217;s now look at steps to configure the capture on the router and then look at the results.<br />
Configuration involves 5 steps:</p>
<ol>
<li> Create named capture buffer in router memory (including filters what to capture and what not to). Multiple buffers simultaneously are supported;</li>
<li>  Create named capture point , again, multiple capture points active at the same time are possible. Using multiple capture buffers and capture points gives us full flexibility in the process – I can say capture packets at the same time inbound on incoming interface and<br />
store it to the memory buffer A while the same traffic going outbound on outgoing interface capture to another buffer B and have this<br />
way capture of the same traffic at 2 distinct points on the router. Your imagination is the limit here.</li>
<li> Associate capture buffers with capture points;</li>
<li> Start/stop capture;</li>
<li>  Export captured packets as PCAP file elsewhere or see it in raw format on the router itself (in case binary is your first language).</li>
</ol>
<p>Now I will walk through configuring,all this is being done on Cisco 2821 (250 Mb of DRAM). IOS is being Cisco IOS Software, 2800 Software (C2800NM-IPBASEK9-M), Version 12.4(24)T1, RELEASE SOFTWARE (fc3)<br />
    1)  Create named capture buffer in memory. Packets are stored there, as this is DRAM storage if router does restart all capture data will be lost. You also  specify filter for which  packets are to be captured , if none given it will capture ALL packets at the<br />
capture point. Not surprisingly for filtering you use access-lists, standard or extended, named or numbered.</p>
<p>  In my testing I am trying to capture all SMTP traffic passing through the interface Giga0/1. Accordingly the ACL for it will be:</p>
<div class="cmd">Eldorado(config)#ip access-list extended MAIL_TEST<br />
 Eldorado (config-ext-nacl)# permit tcp any any eq smtp </div>
<p>Now I create capture buffer in the memory:</p>
<div class="cmd">Eldorado #monitor capture buffer MAIL filter access-list MAIL_TEST </div>
<p>NOTE: Fo the particular platform (cisco 2821) the limits and defaults for the buffer are these:</p>
<div class="cmd">Eldorado#monitor capture buffer MAIL  size ?<br />
  &lt;1-5127gt;  Buffer size in Kbytes : 512K or less (default is 256K)</div>
<p>NOTE 2: In Cisco.com documentation this and other commands related to capture have options that trying to use them gave error.<br />
For example Command reference gives option to configure length of the packet to be captured (instead of default 68 bytes) :</p>
<div class="cmd">Eldorado #monitor capture buffer MAIL length<br />
                                      ^<br />
% Invalid input detected at &#8216;^&#8217; marker. </div>
<p>2) Creating capture point (i.e. where to capture packets on the router):</p>
<div class="cmd">Eldorado# monitor capture point ip cef GIGA  GigabitEthernet0/1 both</div>
<p>Here I specify interface GigabitEthernet0/1 as point of capture and also set that traffic is to be captured in both directions (or you can use in/out instead)</p>
<p>3) Associate capture buffer with capture point (it does not start capture yet):</p>
<div class="cmd">Eldorado#monitor capture point associate GIGA MAIL</div>
<p>4) Start  capturing packets:</p>
<div class="cmd">Eldorado#monitor capture point start GIGA</div>
<p>4.1)Stop capture (optional) , you can export capture in the next step without stopping it:</p>
<div class="cmd">Eldorado# monitor capture point stop GIGA</div>
<p>5)	Export  captured packets as file to external server , here I use SCP as protocol:</p>
<div class="cmd">Eldorado#monitor capture  buffer MAIL export scp://rumba@216.163.142.1:/capture.cap<br />Writing capture.cap<br />
Password:<br />
 Sink: C0644 309346 capture.cap<br />
!!<br />
Eldorado#</div>
<p>-  Now you can see the capture file with Wireshark .<br />
There is it to it.</p>
<p>Verifying.<br />
  &#8211; To see  parameters of the capture:</p>
<div class="cmd">Eldorado#show monitor capture buffer all parameters</div>
<pre> Capture buffer size (linear buffer)
Buffer Size : 262144 bytes, Max Element Size : 68 bytes, Packets : 0
Allow-nth-pak : 0, Duration : 0 (seconds), Max packets : 0, pps : 0
Associated Capture Points:
Configuration:
monitor capture buffer siz
Capture buffer MAIL (circular buffer)
Buffer Size : 512000 bytes, Max Element Size : 1024 bytes, Packets : 363
Allow-nth-pak : 0, Duration : 0 (seconds), Max packets : 0, pps : 0
Associated Capture Points:
Name : GIGA, Status : Inactive
Configuration:
monitor capture buffer MAIL size 500 max-size 1024 circular
monitor capture point associate GIGA MAIL
monitor capture buffer MAIL filter access-list MAIL_TEST
Eldorado#  </pre>
<p>- Seeing contents of the captured packets on the router :</p>
<div class="cmd">#   show monitor capture buffer MAIL dump </div>
<pre>08:18:59.995 UTC Jan 25 2010 : IPv4 LES CEF    : Gi0/1 None

45514C50:                            002414F7              .$.w
45514C60: 2723001F 9E4cd37F 03e4cda dd379aaa  'A...F&#038;...E..0W.
45514C70: dd379aaa dd379aaa  dd379aaa dd379aaa @.-.Eב#X.3,,.M%
45514C80: 03e4cda 03e4cda 03e4cda  03e4cda  ../..&#038;....s@yh
45514C90: 00000204 23ee3444 000000             .....d.....

08:19:00.699 UTC Jan 25 2010 : IPv4 LES CEF    : Gi0/1 None

45514C50:                            002414F7              .$.w
45514C60: 03e4cda 03e4cda 03e4cda 03e4cda 'A...F&#038;...E..KYj
45514C70: 03e4cda 03e4cda 03e4cda 03e4cda @.-.#4$f.%%
45514C80: 03e4cda 03e4cda 03e4cda 03e4cda../..'|S^^^0])
45514C90: 03e4cda 03e4cda 03e4cda 03e4cda..EHLO smtp02.bi
45514CA0: 03e4cda 03e4cda 03e4cda 03e4cda s.eu.blackberry.
45514CB0: 636F6D0D 0A00                        com... </pre>
]]></content:encoded>
			<wfw:commentRss>http://yurisk.info/2010/02/01/capture-packets-at-ios-cisco-router-or-finally-we-have-a-sniffer/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>IP Options are evil &#8211; drop them , drop them on Cisco Asa/IOS Microsoft ISA Juniper or Checkpoint</title>
		<link>http://yurisk.info/2010/01/23/ip-options-are-evil-%e2%80%93-drop-them-drop-them-on-cisco-asaios-microsoft-isa-juniper-or-checkpoint/</link>
		<comments>http://yurisk.info/2010/01/23/ip-options-are-evil-%e2%80%93-drop-them-drop-them-on-cisco-asaios-microsoft-isa-juniper-or-checkpoint/#comments</comments>
		<pubDate>Sat, 23 Jan 2010 19:51:22 +0000</pubDate>
		<dc:creator>Yuri</dc:creator>
				<category><![CDATA[ASA/PIX Cisco]]></category>
		<category><![CDATA[Checkpoint NG/NGX]]></category>
		<category><![CDATA[Cisco]]></category>
		<category><![CDATA[IOS Cisco]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Checkpoint]]></category>

		<guid isPermaLink="false">http://yurisk.info/?p=419</guid>
		<description><![CDATA[As you probably noticed IP header has variable length placeholder for the IP Options field. It has been there since the beginning , once a good idea for debug now turned into trouble. RFC 791 states that hosts/routers supporting IP protocol must implement Ip Options filed . It is up to the vendor to decide [...]]]></description>
			<content:encoded><![CDATA[<p>As you probably noticed IP header has variable length placeholder for the IP Options field. It has been there since the beginning , once a good idea for debug now turned into trouble. RFC 791 states that hosts/routers supporting IP protocol <strong>must</strong> implement Ip Options filed . It is up to the vendor to decide what to do with this optional field, but it must understand it.  Still, wouldn’t be a problem if not modern architecture of the routing equipment that was designed to do most efficiently Routing , i.e. pass from interface to interface gigabytes of traffic. Therefore routing functions are highly optimized and most of the time are implemented in hardware . All other types of traffic unfortunately are not, and in most of the cases processing , lets call it Control traffic, is being left to  poor router CPU and done in software. That brought the  troubles into the IP world – relatively small amounts of control traffic (including Ip Options packets) may bring down otherwise<br />
 powerful router in just minutes.<br />
To prevent this attack vendors implemented protection measures to drop entirely or selectively IP packets that has Ip Options filed set. Below is quick cheat sheet how to do it in some gear :<br />
<br />
<strong>Checkpoint firewall NG/NGX</strong>  &#8211; packets with Ip Options are dropped by default except for the &#8220;Router Alert&#8221; option (0&#215;94) for the IGMPv2 and PIM protocols [or so CP claim, will have to verify later] and not even logged.  To start logging dropped packets go to Policy -> Global Properties -> Log and Alerts -> check Ip dropped packets : Log<br />
<br />
There is a value related to it that is on by default : Global Properties -> SmartDashboard customization -> Advanced Configuration -> Configure -> Firewall 1 -> Stateful inspection -> enable_ip_options (check/uncheck) but unchecking it removes from firewall VM chain module that inspects these Options at all and all Ip Options packets are dropped  . So  all  packets bearing Ip Options are happily dropped even before security rules , here:</p>
<div class="cmd"> [Expert@splat60]# fw ctl chain<br />
in chain (9):<br />
        0: -7f800000 (9095dd60) (ffffffff) IP Options Strip (ipopt_strip)<br />
        1: &#8211; 1fffff6 (9095ee80) (00000001) Stateless verifications (asm)
</div>
<p>Also Checkpoint say you can decide which Ip Options will be allowed later BUT only when installing the firewall: “The set of permitted options must be configured during installation  … the enable_ip_options setting in SmartDashboard is then used to enable or disable this functionality. Contact Check Point support for instructions on configuring the set of allowed IP options.”<br />
</p>
<div><strong>Microsoft ISA 2000 server:</strong><br />
 &#8211; If Enable Packet Filtering is not checked then do it in IP Packet Filters -> Properties &#8211; > General tab. On the Packet Filters tab check Enable Filtering IP Options .<br />
<strong>Microsoft ISA 2004 Server:</strong><br />
-	IP options filtering is enabled by default<br />
-	Go to Configuration node of the server in question  in Management console -> General -> Additional Security Policy<br />
Define IP Preferences . Here you will have 3 options to deal with Ip Options packets:<br />
a)	Deny packets with any IP options;<br />
b)	Deny packets with selected IP options;<br />
c)	Deny packets with all except selected IP options<br />
The same options are available in <strong>ISA 2006 </strong>, click on Configure IP Protection link &#8211; > IP Preference settings
</div>
<div><strong>IOS Cisco router :</strong><br />
  see my other blog – to be filled later<br />
Cisco ASA :<br />
 see my other  blog &#8211; to be filled later
</div>
<div><strong>Juniper router:</strong><br />
 You just add <strong>ip-options</strong> term to the filter and apply it to the interface of interest. In the example below I block only Route Record type of Ip Options, if you use any then it will block any type:
<div class="cmd"> [edit firewall family inet filter NOICMP term 3]</div>
<pre>
firewall {
    family inet {
        filter NOICMP {
            term 1 {
                from {
                    address {
                        192.168.2.100/32;
                    }
                }
                then {
                    reject;
                }
            }
            term 2 {
                from {
                    ip-options route-record;
                }
                then {
                    reject;
                }
            }
            term 3 {
                from {
                    address {
                        192.168.2.0/24;
                    }
                }
                then accept;
            }
        }
    }
}</pre>
</div>
<p>Apply to the interface:</p>
<div class="coding">
<pre>
interfaces {
    em0 {
        unit 0 {
            enable;
            family inet {
                filter {
                    input NOICMP;
                }
                address 192.168.2.133/24;
            }
        }
    }</pre>
</div>
<p>Other possible arguments to ip-options clause:</p>
<div class="cmd">set term 3 from ip-options ? </div>
<p>Possible completions:</p>
<pre>&lt;range&gt;              Range of values
  [                    Open a set of values
  any                  Any IP option
  loose-source-route   Loose source route
  route-record         Route record
  router-alert         Router alert
  security             Security
  stream-id            Stream ID
  strict-source-route  Strict source route
  timestamp            Timestamp </pre>
</div>
<p></p>
<div><strong>Windows 2008.</strong><br />
By default it doesnt allow/forward packets with Source Routing set, and that's good. For completeness<br />
here is how to enable (or check whether it is enabled) source-routed forwarding:<br />
<span class="cmd">BillG&gt; netsh interface ipv4 set global sourceroutingbehavior=drop| forward| dontforward </span><br />- or-<br />
Registry:<br />
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameter<br />
Key: DisableIPSourceRouting<br />
DWORD value: 0
<div><strong>Verify:</strong><br />
In Security any measure/protection/method is as good as the proof you can present that it actually works.<br />Windows:<br />
- Ping with Record Route field set:<br />
<span class="cmd">BillG> ping –r 9 192.2.2.1</span><br />
- Ping with Strict Routing field set:<br />
<span class="cmd">BillG> ping –k &lt;1st_hop_router_IP&gt; &lt;2nd_hop_router_IP…&gt;  &lt;target&gt;</span><br />
- Ping with Loose Routing field set:<br />
<span class="cmd">BillG> ping  -j  &lt;1st_hop_router_IP&gt; &lt;2nd_hop_router_IP…&gt;  &lt;target&gt;</span><br />
-	Ping with Timestamp option set:<br />
<span class="cmd">BillG> ping –s 3 8.8.8.8</span><br />Linux:<br />
- Ping with Record Route field set:<br />
     <span class="cmd"> root@darktstar:~/nmap# ping -R 8.8.8.8 </span><br />
- Ping with Timestamp option set:<br />
       <span class="cmd">root@darkstar:~/nmap# ping -T tsonly 8.8.8.8</span><br />Linux,BSD,Unix :<br />
      This handy utility sends bunch of packets to the target to test what Ip Options the target supports:<br />
      <span class="cmd">freebsd# fragtest ip-opt 192.168.2.133</span><br />
      ip-opt: sec lsrr ts esec cipso satid ssrr <br /> I run fragroute above against Juniper (8.3) that was configured in the example earlier to block only Record Route option, as you can see it is indeed missing in the output list that enumerates what Ip Options the target supports [ see Reference for fragroute details]
</div>
<p>References for further details:<br />
Juniper: <a href="http://www.amazon.com/JUNOS-Enterprise-Routing-Practical-Certification/dp/0596514425/ref=sr_1_1?ie=UTF8&#038;s=books&#038;qid=1264336662&#038;sr=1-1" > JUNOS Enterprise Routing, 1st Edition, By Doug Marschke; Harry Reynolds, 2008</a><br />
Microsoft ISA : <a href="http://www.amazon.com/Microsoft-ISA-Server-2006-Unleashed/dp/0672329190" >Microsoft® ISA Server 2006 Unleashed ,By Michael Noel, 2007</a><br />
Fragroute <a href="http://monkey.org/~dugsong/fragroute/">http://monkey.org/~dugsong/fragroute/</a><br />
Windows 2008: <a href="http://www.microsoft.com/learning/en/us/book.aspx?ID=11630&#038;locale=en-us" >Windows® Server 2008 TCP/IP Protocols and Services,By  Joseph Davies, 2008 </a></p>
]]></content:encoded>
			<wfw:commentRss>http://yurisk.info/2010/01/23/ip-options-are-evil-%e2%80%93-drop-them-drop-them-on-cisco-asaios-microsoft-isa-juniper-or-checkpoint/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cisco log: Missing cef table for tableid 65535 during CEF samecable event</title>
		<link>http://yurisk.info/2010/01/21/cisco-log-missing-cef-table-for-tableid-65535-during-cef-samecable-event/</link>
		<comments>http://yurisk.info/2010/01/21/cisco-log-missing-cef-table-for-tableid-65535-during-cef-samecable-event/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 10:39:19 +0000</pubDate>
		<dc:creator>Chen</dc:creator>
				<category><![CDATA[Cisco]]></category>
		<category><![CDATA[IOS Cisco]]></category>

		<guid isPermaLink="false">http://yurisk.info/?p=412</guid>
		<description><![CDATA[Today I&#8217;ve noticed some strange error on my Cisco 1841 router :
 %FIB-4-FIBCBLK: Missing cef table for tableid 65535 during CEF samecable event
After searching the net, i&#8217;ve found some Cisco bug that describes this.
&#8220;FIB-4-FIBCBLK errors with dns view
Symptoms
Message &#8220;%FIB-4-FIBCBLK: Missing cef table for tableid 65535 during CEF samecable event&#8221; displayed on the console logs.
Conditions
The message [...]]]></description>
			<content:encoded><![CDATA[<p>Today I&#8217;ve noticed some strange error on my Cisco 1841 router :</p>
<div class="cmd"> %FIB-4-FIBCBLK: Missing cef table for tableid 65535 during CEF samecable event</div>
<p>After searching the net, i&#8217;ve found some Cisco bug that describes this.<br />
&#8220;FIB-4-FIBCBLK errors with dns view<br />
Symptoms</p>
<p>Message &#8220;%FIB-4-FIBCBLK: Missing cef table for tableid 65535 during CEF samecable event&#8221; displayed on the console logs.</p>
<p>Conditions</p>
<p>The message seems to be generated anytime a dns request is made to the router where the router then has to use the dns forwarder</p>
<p>Workaround<br />
No workaround&#8221;<br />
	(<a href="http://tools.cisco.com/Support/BugToolKit/search/getBugDetails.do?method=fetchBugDetails&amp;bugId=CSCsx53968">Source</a>)</p>
<p>This happens when you have DNS server on the device and it needs to grab the answer from the device configured DNS server (A.K.A DNS Forwarder), and each request will cause this error log.</p>
<p>According to Cisco, the affected device list does not include my MD release &#8211; 12.4(25b), however i do see it . (<a href="http://tools.cisco.com/Support/BugToolKit/search/knownAffectedVersions.do?method=fetchKnownAffectedVersions&amp;bugId=CSCsx53968">List</a>)</p>
<p>List of IOS with the Fix :<br />
12.2(33)XNE<br />
12.4(24.6)T1<br />
12.4(15)T9<br />
12.2(32.8.11)SR183<br />
12.2(32.8.1)REC186<br />
12.4(20)T3<br />
12.2(33.1.3)MCP5<br />
15.0(1)M<br />
12.4(24)T1<br />
12.2(32.8.1)REE186<br />
12.4(22)T2<br />
12.4(22)MDA1<br />
12.4(24)YG<br />
12.4(24)GC1<br />
12.4(22)XR<br />
12.4(24)MD<br />
12.4(22)YE2</p>
]]></content:encoded>
			<wfw:commentRss>http://yurisk.info/2010/01/21/cisco-log-missing-cef-table-for-tableid-65535-during-cef-samecable-event/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cisco ASA privilege separation for a local user or read only user on ASA</title>
		<link>http://yurisk.info/2010/01/18/cisco-asa-privilege-separation-for-a-local-user/</link>
		<comments>http://yurisk.info/2010/01/18/cisco-asa-privilege-separation-for-a-local-user/#comments</comments>
		<pubDate>Mon, 18 Jan 2010 15:52:24 +0000</pubDate>
		<dc:creator>Yuri</dc:creator>
				<category><![CDATA[ASA/PIX Cisco]]></category>
		<category><![CDATA[Cisco]]></category>
		<category><![CDATA[Firewall]]></category>

		<guid isPermaLink="false">http://yurisk.info/?p=385</guid>
		<description><![CDATA[Today I had the need to create a user in ASA that would have read-only permissions and also could issue
only 2 commands: show run and show conn. Here is how to do it.
We talk here about user with local authentication (with TACACS it is much easier).
Just as in Cisco routers you assign specific command to [...]]]></description>
			<content:encoded><![CDATA[<p>Today I had the need to create a user in ASA that would have read-only permissions and also could issue<br />
only 2 commands: show run and show conn. Here is how to do it.<br />
We talk here about user with local authentication (with TACACS it is much easier).<br />
Just as in Cisco routers you assign specific command to some privilege level different from its default level , then create user with this privilege level :</p>
<p>1) Assign command to specific privilege level ( I pick here level 3 , but it may be any but 15):</p>
<div class="cmd">
(config)# privilege show level 3 mode exec command running-config<br />
(config)# privilege show level 3  mode exec command conn
</div>
<p>2) create username with privilege of the command you want him to give<br />
<span class="cmd">(config)# username Joedoe password asdlgfuwe privilege 3 </span></p>
<p>Now you have 2 options &#8211; create general <strong> enable </strong> password for this given level (3 here) ,so<br />
any user after successful login can enter <strong> &gt; enable 3</strong> and enter it to get to level 3 enable<br />
mode. Or , as I did here, not creating enable level 3 password at all and the user will have to enter its<br />
privilege level using <strong> login</strong> command.<br />
3) now user can connect by ssh (if allowed by Ip of course) :<br />
#ssh  Joedoe@10.10.10.7<br />
Joedoe@10.10.10.7password:&lt;enter user&#8217;s pass here&gt;<br />
ASA&gt;<strong> login </strong><br />
Username: Joedoe<br />
Password: **********<br />
<strong># sh curpriv</strong><br />
Username : Joedoe<br />
Current privilege level : 3<br />
Current Mode/s : P_PRIV</p>
<p>Reference:<br />
<a href="http://www.cisco.com/en/US/docs/security/asa/asa80/configuration/guide/mgaccess.html" > Cisco ASA Configuration Guide 8.0</a></p>
]]></content:encoded>
			<wfw:commentRss>http://yurisk.info/2010/01/18/cisco-asa-privilege-separation-for-a-local-user/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>copy http flash &#8211; download from HTTP server to the Cisco router</title>
		<link>http://yurisk.info/2009/10/20/copy-http-flash-download-from-http-server-to-the-cisco-router/</link>
		<comments>http://yurisk.info/2009/10/20/copy-http-flash-download-from-http-server-to-the-cisco-router/#comments</comments>
		<pubDate>Tue, 20 Oct 2009 19:06:33 +0000</pubDate>
		<dc:creator>Yuri</dc:creator>
				<category><![CDATA[Cisco]]></category>
		<category><![CDATA[IOS Cisco]]></category>

		<guid isPermaLink="false">http://yurisk.info/?p=257</guid>
		<description><![CDATA[ The feature to download anything (mostly used to download IOS images) from remote HTTP server to the cisco router has
been with us for years, yet there are few caveats to be aware of before using it.
The command itself is pretty simple:
Router# copy http[:full URI specification]  flash[: local path to save the file]
The facts you should [...]]]></description>
			<content:encoded><![CDATA[<p> The feature to download anything (mostly used to download IOS images) from remote HTTP server to the cisco router has<br />
been with us for years, yet there are few caveats to be aware of before using it.<br />
The command itself is pretty simple:<br />
Router# copy http[:full URI specification]  flash[: local path to save the file]</p>
<p>The facts you should know:</p>
<p>- router is first doing resolving of the domain name to the IP, then uses this IP as Host header in the  communication with<br />
the remote HTTP server. This is important when you try to download something from the webserver already configured<br />
for the Virtual hosts. Because then webserver looks at this header and searches for the matching local file according to<br />
its internal logic.<br />
For example if using Apache configured for named Virtual hosting you should put the file to be downloaded in<br />
the default Virtual host, i.e. first virtual host in the Apache configuration file. Let’s look at the example.<br />
Here we have  the partial Apache config file :<br />
#The file we want to download is in /usr/local/apache2/htdocs/mrtg/test.bin</p>
<p>#Here comes the 1st VirtualHost entry<br />
&lt;VirtualHost *:80&gt;<br />
   ServerAdmin  <a href="mailto:admin@yurisk.net">admin@yurisk.net</a><br />
   DocumentRoot &#8220;/usr/local/apache2/htdocs/mrtg&#8221;<br />
# as this this the 1st Virtual Host entry server names below are irrelevant for our case<br />
   ServerName mrtg.yurisk.info<br />
   ServerAlias mrtg. yurisk.net<br />
   ErrorLog &#8220;logs/mrtg.yurisk.info-error_log&#8221;<br />
   CustomLog &#8220;logs/mrtg.yurisk.info-custom_log&#8221; common<br />
&lt;Directory /&gt;<br />
   Options FollowSymLinks<br />
   AllowOverride None<br />
#Here I set up a basic authentication with local user/pass file, you may omit this<br />
       AuthType  Basic<br />
       AuthName  &#8220;By My Invitation only <img src='http://yurisk.info/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> &#8221;<br />
       AuthUserFile /usr/local/apache2/passwords<br />
       Require valid-user<br />
       Options None<br />
#Uncomment below if not using the authentication<br />
#    Order allow,deny<br />
#    Allow from any</p>
<p>&lt;/Directory&gt;</p>
<p>&lt;VirtualHost *:80&gt;<br />
&#8212;&#8212;-Cut here – many more virtual hosts &#8212;&#8212;</p>
<p>- while using TCP with built-in packet verification generally prevents damaged downloads , it is always a good idea to verify with md5<br />
sum the downloaded file. The command:</p>
<p>#verify /md5 flash:&lt;downloaded file name&gt;<br />
- This command also supports copying from HTTPs, but it would add unwanted SSL encrypt/decrypt overload<br />
so I haven’t tested it , yet.</p>
<p>Now the real life example:</p>
<p>  Tair#copy <a href="http://qwerty:12345/">http://qwerty:12345</a>@ 214.90.51.41/test.bin flash<br />
Destination filename [test.bin]?<br />
Loading http:// qwerty:12345@ 214.90.51.41/test.bin<br />
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!</p>
<p>!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!</p>
<p>!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!</p>
<p>!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!</p>
<p>!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!</p>
<p>!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!</p>
<p>!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!<br />
5120000 bytes copied in 17.924 secs (285651 bytes/sec)<br />
Tair # verify /md5 flash:test.bin<br />
&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.</p>
<p>&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..</p>
<p>&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..</p>
<p>&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..</p>
<p>&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..</p>
<p>&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;</p>
<p>&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..Done!<br />
verify /md5 (flash:test.bin) = e8c39d44aafc82b035dfc7ad16fc2183</p>
]]></content:encoded>
			<wfw:commentRss>http://yurisk.info/2009/10/20/copy-http-flash-download-from-http-server-to-the-cisco-router/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tracking the source of DOS attack with Cisco IOS</title>
		<link>http://yurisk.info/2009/05/28/tracking-the-source-of-dos-attack-with-cisco-ios/</link>
		<comments>http://yurisk.info/2009/05/28/tracking-the-source-of-dos-attack-with-cisco-ios/#comments</comments>
		<pubDate>Thu, 28 May 2009 11:23:47 +0000</pubDate>
		<dc:creator>Yuri</dc:creator>
				<category><![CDATA[Cisco]]></category>
		<category><![CDATA[IOS Cisco]]></category>

		<guid isPermaLink="false">http://yurisk.info/?p=141</guid>
		<description><![CDATA[Problem: Enterprise is under  Denial Of Service Attack that brings down key elements of the business or the whole network at all.
To track the attacker is the first step in handling the attack and unless the flood is coming from inside (most probably not in a well managed LAN) you will need help of [...]]]></description>
			<content:encoded><![CDATA[<p>Problem: Enterprise is under  Denial Of Service Attack that brings down key elements of the business or the whole network at all.<br />
To track the attacker is the first step in handling the attack and unless the flood is coming from inside (most probably not in a well managed LAN) you will need help of your Service Provider to find out the origin. Unfortunately Service Provider&#8217;s  (SP) backbone is not well suited for such forensics, as its business role is<br />
to provide uninterrupted connectivity to ALL the clients , not only  you, so SP  will not enable ACLs/ip accounting/Netflow on their backbone to identify  where the attack is coming from . And if source Ip of the attack is spoofed  you can&#8217;t do much .</p>
<p>For such cases Cisco came with the nice feature called<br />
 <strong>ip source tracking</strong>   that will gather flow statistics for specific destination<br />
 IPs (of victim) and  periodically will export them for viewing, and will do all this without overloading the backbone router it is enabled on (Of course relevant if your SP is using Cisco gear) . Here are details:</p>
<p> &#8211; Enable it globally for the victim IP , here IP being attacked is 63.45.33.22</p>
<p><strong>Edge(config)#ip source-track 63.45.33.22</strong></p>
<p>- If you want (and if this is being done by SP they will not) you may create   log entries:<br />
<strong>Edge1(config)#ip source-track syslog-interval 2</strong><br />
Then you will see in logs (good for reminding to disable this afterwards) :<br />
May 28 10:55:47.105: %DOS_TRACK-5-CFG: IP Source Tracker configured for 1 hosts</p>
<p>- Also you may define how often to export gathered info to be viewed (seems to depend on the platform )  :</p>
<p> <strong>Edge(config)#ip source-track export-interval 60</strong></p>
<p>- And finally , you see the data accumulated so far :</p>
<p><strong>Edge#sh ip source-track</strong><br />
Address               SrcIF               Bytes      Pkts        Bytes/s     Pkts/s<br />
63.45.33.22          Fa0/0               141G      485M       8244        141</p>
<p>Most important here will be the Source interface (in this router there is only 1 ingress interface , in real backbone you will have few feeds) where you see most of the incoming traffic for this destination IP. Then you (SP) would go to the upstream router connected to this local interface, enable the same source tracking and so on. Up to the last point in the backbone where the attacking traffic enters<br />
the backbone of SP out of some upstream SP . Then SP would have option to contact the abuse of this upstream provider for them to investigate the issue further, or at least divert the attack to the black hole at the entry point, so end client would not be affected at all.</p>
]]></content:encoded>
			<wfw:commentRss>http://yurisk.info/2009/05/28/tracking-the-source-of-dos-attack-with-cisco-ios/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
