<?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; IOS Cisco</title>
	<atom:link href="http://yurisk.info/category/cisco/ios-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>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>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>
		<item>
		<title>Guarding against brute force attack on VTY in Cisco IOS</title>
		<link>http://yurisk.info/2008/10/10/guarding-against-brute-force-attack-on-vty-in-cisco-ios/</link>
		<comments>http://yurisk.info/2008/10/10/guarding-against-brute-force-attack-on-vty-in-cisco-ios/#comments</comments>
		<pubDate>Fri, 10 Oct 2008 09:24:03 +0000</pubDate>
		<dc:creator>Yuri</dc:creator>
				<category><![CDATA[Cisco]]></category>
		<category><![CDATA[IOS Cisco]]></category>

		<guid isPermaLink="false">http://yurisk.wordpress.com/?p=41</guid>
		<description><![CDATA[Cisco starting IOS 12.3 introduced a simple but powerful feature to guard against brute force password guessing attack on remote access. The usual template followed when configuring VTY access is:
1) Configure ACL containing management IPs to be allowed to access the router through VTY
2) (Optional) Restrict VTY access protocol to ssh only (transport input ssh)
3) [...]]]></description>
			<content:encoded><![CDATA[<p>Cisco starting IOS 12.3 introduced a simple but powerful feature to guard against brute force password guessing attack on remote access. The usual template followed when configuring VTY access is:<br />
1) Configure ACL containing management IPs to be allowed to access the router through VTY<br />
2) (Optional) Restrict VTY access protocol to ssh only (transport input ssh)<br />
3) Apply this ACl to VTY : (config-line)# access-class &lt;ACL&gt;  in<br />
4) (Optional)  SIngle out one VTY line for a special remote access IP to be used if all VTY lines<br />
are currently in use: (config)# line vty 4<br />
Now I enhanced this template with following features:<br />
#Blocks login for 300 seconds after 5 failed logins within  50 seconds time interval</p>
<p><strong>login block-for 300 attempts 5 within 50</strong><br />
#apply specified ACl to VTY line when above event occurs, it is meant to exempt<br />
#your managemnt IP form being blocked. After timed block expires this ACL gets removed<br />
#from VTY and previous ACL that was applied before the event is reapplied back</p>
<p><strong>login quiet-mode access-class anti-DOS</strong></p>
<p>#Logging rate-limitation to prevent cluttering logs with failed attempts<br />
<strong>login on-failure log every 10</strong></p>
<p><strong>ip access-list standard anti-DOS<br />
 permit 193.193.193.33<br />
 remark Deny VTY access to anyone else if brute-force logins take up all VTY lines<br />
</strong> <br />
Another nice feature is delay between login attempts:<br />
<strong>Sacramento(config)#login delay 2</strong><br />
  Delay login is in seconds</p>
<p>Then in logs you will see the following failed attempts:</p>
<p><code><br />
*May  2 02:04:14.105: %SEC_LOGIN-4-LOGIN_FAILED: Login failed [user: ] [Source: 62.141.52.141] [localport: 22] [Reason: Login Authentication Failed] at 05:04:14  Sat May 2 2009<br />
*May  2 02:04:22.112: %SEC_LOGIN-1-QUIET_MODE_ON: Still timeleft for watching failures is 22 secs, [user: ] [Source: 62.141.52.141] [localport: 22] [Reason: Login Authentication Failed] [ACL: anti-DOS] at 05:04:22  Sat May 2 2009<br />
*May  2 02:09:22.091: %SEC_LOGIN-5-QUIET_MODE_OFF: Quiet Mode is OFF, because block period timed out at 05:09:22  Sat May 2 2009<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://yurisk.info/2008/10/10/guarding-against-brute-force-attack-on-vty-in-cisco-ios/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
