<?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>Community String &#187; Security</title>
	<atom:link href="http://communitystring.com/category/security/feed/" rel="self" type="application/rss+xml" />
	<link>http://communitystring.com</link>
	<description>My personal CCIE study notes for the Routing &#38; Switching track</description>
	<lastBuildDate>Wed, 20 Apr 2011 10:54:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Understanding Zone Based Firewalls</title>
		<link>http://communitystring.com/2010/02/understanding-zone-based-firewalls/</link>
		<comments>http://communitystring.com/2010/02/understanding-zone-based-firewalls/#comments</comments>
		<pubDate>Tue, 09 Feb 2010 12:48:43 +0000</pubDate>
		<dc:creator>Bradley</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Class Map]]></category>
		<category><![CDATA[Policy Map]]></category>
		<category><![CDATA[Zone Based Firewall]]></category>

		<guid isPermaLink="false">http://communitystring.com/?p=506</guid>
		<description><![CDATA[One of the new topics to the blueprint is zone based firewalls, in my head (and possibly not in reality) its like CBAC with some extra bells and whistles but between virtual zones, I wasn&#8217;t particularly hot on the subject but after a review its really not that bad, you have have to follow the [...]]]></description>
			<content:encoded><![CDATA[<p>One of the new topics to the blueprint is zone based firewalls, in my head (and possibly not in reality) its like CBAC with some extra bells and whistles but between virtual zones, I wasn&#8217;t particularly hot on the subject but after a review its really not that bad, you have have to follow the key steps.</p>
<p><strong>1. Define your security zones</strong><br />
Firstly choose what security zones you wish to define, you can choose almost any name you like I have just chosen internal and external for my test, there&#8217;s no reason why you couldn&#8217;t have 3, 4 or more zones if required. There is a default zone called &#8220;local&#8221; which is for traffic originated/sent to the router as opposed to passing through it. So as far as I am aware if you don&#8217;t play around with the local zone it shouldn&#8217;t affect traffic your routing protocol traffic, as it does not pass through it. Define the zones with the following commands;</p>
<pre>Router(config)#zone security internal
Router(config-sec-zone)#exit
Router(config)#zone security external
Router(config-sec-zone)#exit</pre>
<p><strong>2. Assign interfaces to the relevant zones</strong><br />
Under each interface you wish to link to a zone go under the interface and use the following command where the interface is linked to the zone &#8220;internal&#8221;.</p>
<pre>Router(config-if)#zone-member security internal</pre>
<p><strong>3. Define your class maps</strong><br />
Split your traffic up into classes and make sure you use &#8220;type inspect&#8221; option when defining them, the simple one below uses NBAR to classify http packets. I wont explain class or policy maps in much detail as most other candidates should be familiar with them from MQC.</p>
<pre>class-map type inspect match-all http
 match protocol http</pre>
<p><strong>4. Tie up the class maps in a policy map</strong><br />
Now to define the action for each of the classes defined in the class maps, make sure you use the &#8220;inspect&#8221; option if you wish to inspect the traffic to allow return traffic. In the example below I have named the policy zonebasedfw.</p>
<pre>policy-map type inspect zonebasedfw
 class type inspect http
  inspect
 class class-default
  drop</pre>
<p><strong>5. Tie it all together in a zone pair</strong><br />
Finally create a zone pair with your own name I chose &#8220;internal-to-external&#8221;, define your source and destination zones and the pre defined policy.</p>
<pre>zone-pair security internal-to-external source internal destination external
 service-policy type inspect zonebasedfw</pre>
<p><strong>Verification</strong><br />
There are 2 handy verification commands which I am aware of, firstly sh zone security as shown below, this indicates which interfaces are linked to which zone;</p>
<pre>Router#sh zone security
zone self
  Description: System defined zone

zone internal
  Member Interfaces:
    FastEthernet0/0
    FastEthernet1/0

zone external
  Member Interfaces:
    FastEthernet0/1</pre>
<p>And sh zone-pair security which shows the details from the zone pair, notably which policy has been applied in which direction.</p>
<pre>Router#sh zone-pair security
Zone-pair name internal-to-external
    Source-Zone internal  Destination-Zone external
    service-policy zonebasedfw</pre>
]]></content:encoded>
			<wfw:commentRss>http://communitystring.com/2010/02/understanding-zone-based-firewalls/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Understanding uRPF &#8211; Unicast Reverse Path Forwarding</title>
		<link>http://communitystring.com/2010/02/understanding-urpf-unicast-reverse-path-forwarding/</link>
		<comments>http://communitystring.com/2010/02/understanding-urpf-unicast-reverse-path-forwarding/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 19:21:00 +0000</pubDate>
		<dc:creator>Bradley</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[uRPF]]></category>

		<guid isPermaLink="false">http://communitystring.com/?p=498</guid>
		<description><![CDATA[Spoofed packets are a big problem with on the Internet, they are commonly used in DNS amplification attacks, and TCP SYN floods. Unfortunately there is no simple way to totally fix all spoofed packets on the Internet but if service providers implement ingress filtering on their network, it effectively stops such attacks with spoofed source [...]]]></description>
			<content:encoded><![CDATA[<p>Spoofed packets are a big problem with on the Internet, they are commonly used in DNS amplification attacks, and TCP SYN floods. Unfortunately there is no simple way to totally fix all spoofed packets on the Internet but if service providers implement ingress filtering on their network, it effectively stops such attacks with spoofed source addresses coming from their patch.</p>
<p>The process is actually standardised Best Practice in <a href="ftp://ftp.rfc-editor.org/in-notes/rfc2827.txt">BCP 38 &#8220;Network Ingress Filtering&#8221;</a> which all service providers should implement if they have Internet facing services for good karma.</p>
<p>There are a number of ways of implementing ingress filtering, one of the technically simplest is to create ACLs of your customers global address ranges and only allow packets sourced from those ranges to leave your network. Configuration wise Unicast Reverse Path Forwarding (uRPF) is in my opinion the simplest way of managing this and it has a couple of extra features.</p>
<p>uRPF checks incoming unicast packets and validates that a return path exists, there is not much point in forwarding a packet if it doesnt know how to return it right?</p>
<p>There are 2 methods of implementation of uRPF strict and loose. Strict mode is where the source of the packet is reachable via the interface that it came from, this is nice for extra security on the edge of your network but not so good if you have multiple edges towards the Internet eg you peer at multiple IXPs where you might expect asymmetric routing. In such cases loose mode is used which checks that a return route exists in the routing table.</p>
<p><strong>Configuration</strong><br />
The configuration is super simple, after CEF has been enabled just go to the interface you wish to check inbound traffic and use the following command, with the &#8220;rx&#8221; option for strict mode or &#8220;any&#8221; for loose mode.</p>
<pre>Router(config-if)#ip verify unicast source reachable-via ?
  any  Source is reachable via any interface
  rx   Source is reachable via interface on which packet was received</pre>
<p><strong>Verification</strong><br />
Obviously you can check the running config to see if its configured but if your a fan of using other show commands its visible under the sh cef interface and sh ip interface as shown below;</p>
<pre>Router#sh cef  interface fastEthernet 0/0 | i RPF
  IP unicast RPF check is enabled</pre>
<pre>Router# sh ip int fa0/0 | i verify
  IP verify source reachable-via RX</pre>
]]></content:encoded>
			<wfw:commentRss>http://communitystring.com/2010/02/understanding-urpf-unicast-reverse-path-forwarding/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Netflow</title>
		<link>http://communitystring.com/2010/02/netflow/</link>
		<comments>http://communitystring.com/2010/02/netflow/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 11:15:28 +0000</pubDate>
		<dc:creator>Bradley</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Netflow]]></category>

		<guid isPermaLink="false">http://communitystring.com/?p=490</guid>
		<description><![CDATA[Netflow is a great tool developed by Cisco which is commonly used for bandwidth monitoring &#38; traffic analysis. Its used quite heavily where I work for the detecting and dealing with security related incidents (I talk about it at the last UKNOF meeting here). Although originally developed by Cisco other vendors have support for it [...]]]></description>
			<content:encoded><![CDATA[<p>Netflow is a great tool developed by Cisco which is commonly used for bandwidth monitoring &amp; traffic analysis. Its used quite heavily where I work for the detecting and dealing with security related incidents (I talk about it at the <a href="http://media.portfast.net/uknof/uknof15/02-bradley_freeman-janet_csirt.html">last UKNOF meeting here</a>). Although originally developed by Cisco other vendors have support for it under their own product names. And there are standardised versions of it under the name IPFIX.</p>
<p>Like with anything I thoroughly recommend you test this out before rolling it out to your production systems as on high traffic networks it can cause CPU problems in such cases most people change the amount of sampling. If you are worried about this Cisco has produced <a href="http://communitystring.com/media/NetFlowPerformanceAnalysis.pdf">a white paper on working out the resource utilisation of Netflow</a>.</p>
<p><strong>Configuration<br />
</strong><br />
First of all to configure it choose the interfaces you want to monitor and decide if you want to monitor the ingress, egress or both;</p>
<p>Router(config-if)#ip flow ?<br />
egress   Enable outbound NetFlow<br />
ingress  Enable inbound NetFlow</p>
<p>There are plenty of extra global options available, below is an example of the configuration to capture the packet length, TTL and the MAC addresses.</p>
<pre>ip flow-capture packet-length
ip flow-capture ttl
ip flow-capture mac-addresses</pre>
<p>Most implementations of Netflow export the data to a remote server for analysis. There are plenty <a href="http://www.arbornetworks.com/index.php?option=com_content&amp;task=view&amp;id=1465&amp;Itemid=692">of</a> <a href="http://www.solarwinds.com/products/freetools/netflow_analyzer.aspx">Netflow</a> <a href="http://nfsen.sourceforge.net/">analysis</a> <a href="http://nfdump.sourceforge.net/">software</a> <a href="http://www.manageengine.com/products/opmanager/index.html">choices</a>. There are 3 versions supported on Cisco routers at present 1, 5 &amp; 9. Version 1 was designed for classful networks and is almost obsolete, Version 5 is designed for IPv4 Unicast flows, and Version 9 is the newest built and can carry BGP Next Hop information, IPv6, Multicast, and MPLS.</p>
<p>Netflow wont export each packets headers as a single packet but it will collect the packet headers together and report them in a single  UDP packet via export. In my example at the bottom of this 715 flows have been exported in 48 UDP packets.</p>
<pre>ip flow-export version 9
ip flow-export destination 10.10.10.10 555</pre>
<p>Another handy option is configuring logging of the top talkers, this is handy if you have a problem with a remote site where they are complain of problems with this enabled you can see the biggest bandwidth hogs in the period of the cache timeout.</p>
<pre>ip flow-top-talkers
        top 100
        sort-by bytes
        cache-timeout 3600000
        match protocol tcp</pre>
<p><strong>Verification<br />
</strong><br />
Most importantly verification its actually working, show ip flow interface below confirms which interfaces are sampling for netflow</p>
<pre>Router#sh ip flow interface
Dot11Radio0
  ip flow ingress
  ip flow egress
BVI1
  ip flow ingress
  ip flow egress</pre>
<p>If you configured top talkers then show ip flow top-talkers will show you the bandwidth hogs.</p>
<pre>Router#sh ip flow top-talkers

SrcIf         SrcIPaddress    DstIf         DstIPaddress    Pr SrcP DstP Bytes
Di0           74.125.165.145  BV1*          10.10.10.100    06 0050 D89F    92K
BV1           10.10.10.100    Local         10.10.10.1      06 D7DC 0017    19K
BV1           10.10.10.100    Di0           74.125.165.145  06 D89F 0050  7381
BV1           10.10.10.100    Di0           209.85.229.138  06 D89E 0050  1466
Di0           209.85.229.138  BV1*          10.10.10.100    06 0050 D89E  1379
5 of 100 top talkers shown. 5 of 9 flows matched.</pre>
<p>Finally if you configured netflow export verify it with the show ip flow export command.</p>
<pre>Router#sh ip flow export
Flow export v9 is enabled for main cache
  Export source and destination details :
  VRF ID : Default
    Destination(1)  10.10.10.10 (555)
  Version 9 flow records
  715 flows exported in 48 udp datagrams
  0 flows failed due to lack of export packet
  48 export packets were sent up to process level
  0 export packets were dropped due to no fib
  0 export packets were dropped due to adjacency issues
  0 export packets were dropped due to fragmentation failures
  0 export packets were dropped due to encapsulation fixup failures</pre>
]]></content:encoded>
			<wfw:commentRss>http://communitystring.com/2010/02/netflow/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using RSA SecurID 2 Part Authentication for Line Passwords</title>
		<link>http://communitystring.com/2009/10/using-rsa-securid-2-part-authentication-for-line-passwords/</link>
		<comments>http://communitystring.com/2009/10/using-rsa-securid-2-part-authentication-for-line-passwords/#comments</comments>
		<pubDate>Thu, 01 Oct 2009 16:25:11 +0000</pubDate>
		<dc:creator>Bradley</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[aaa]]></category>
		<category><![CDATA[radius]]></category>
		<category><![CDATA[RSA]]></category>
		<category><![CDATA[SecurId]]></category>

		<guid isPermaLink="false">http://communitystring.com/?p=361</guid>
		<description><![CDATA[Recently I have been playing around with RSA SecurID which is commonly used to authenticate VPN users using 2 part authentication, which is great. Although I am way more concerned about using 2 part authentication on admins logging into network devices, luckily its really easy to setup. The RSA authentication is managed by an RSA [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I have been playing around with <a href="http://en.wikipedia.org/wiki/SecurID">RSA SecurID</a> which is commonly used to authenticate VPN users using 2 part authentication, which is great. Although I am way more concerned about using 2 part authentication on admins logging into network devices, luckily its really easy to setup.</p>
<p>The RSA authentication is managed by an RSA application called the RSA Authentication Manager which is currently on version 7.1, this handles replication between servers in a primary to replica&#8217;s fashion. Each Authentication Manager can have the RSA &#8220;Steel Belted RADIUS&#8221; server installed which allows RADIUS clients to authenticate against it. If you are using 2 part authentication you really need to have build in redundancy as if the devices are at a remote site from the RADIUS server they will not be able to perform 2 part authentication in the case of a network or server failure, but we all know that single points of failure are a bad idea?</p>
<p><strong>Authentication Manager Configuration<br />
</strong><br />
I wont go to much into how to install and manage the RSA Authentication Manager as there is loads of documentation from RSA on that matter, but there is not much on getting it to authenticate console or vty line users, but luckily its really simple. For each Cisco device that you wish to authenticate users on add it as a RADIUS client in the Authentication Manager, with the model set to &#8220;IOS11.1 or later&#8221; and then add an associated RSA agent. After this you will need to remember to force replicate the information to the replica RADIUS servers as it does not do this automatically (authentication on the replicas will fail if you don&#8217;t do this!)<br />
<img width="550" height="200" src="http://communitystring.com/media/RSARadiusClients.jpg" alt="RSA RADIUS Clients in the RSA Authentication Manager 7.1 Security Console" /></p>
<p><strong>IOS Configuration<br />
</strong><br />
As like most AAA things make sure the aaa new-model is on</p>
<pre>aaa new-model</pre>
<p>Next we should have sure we have a local user name and password on the system, if the RADIUS servers does not send back a response then we can login using this account. If the response from the RADIUS server comes back as failed from the RADIUS server it will NOT check the local username and password, so this will only be used if the system receive an invalid or no response form the RADIUS server.</p>
<pre>username cisco privilege 15 password 0 cisco</pre>
<p>Now to enable the RADIUS servers group to be used for the authenticating users on login.</p>
<pre>aaa authentication login default group radius line enable local</pre>
<p>Now to configure the RADIUS servers, add a separate line for each additional server. It defaults to the standard ports 1645 for authorisation and 1646 for accounting. If there are multiple RADIUS servers it will do a full set of timeouts and retransmits to each one before moving onto the next server.</p>
<pre>radius-server host 10.0.0.10 auth-port 1645 acct-port 1646 key password</pre>
<p>As I mentioned if anything goes wrong with the RADIUS servers it will fail back to using the locally set username and password, using the default time outs, as waiting for the default timemouts this feels like an eternity so we should change them.</p>
<pre>radius-server retransmit 3
radius-server timeout 10</pre>
<p>Now give it a test, it even happily support next tokencode mode (see the image), this is where the Authentication Manager can ask you to enter your next token if it thinks your token is starting to drift time abit or it just wants to make sure you actually have the token.<br />
<img src="http://communitystring.com/media/RSASecurid.jpg" pre="RSA Securid Next Tokencode mode on Cisco IOS" /></p>
<p><strong>Troubleshooting</strong><br />
#show radius statistics is a good show command to check the response times and make sure everything is singing along well</p>
<pre>DistSwitch#show radius statistics
       Maximum inQ length: 1
     Maximum waitQ length: 1
     Maximum doneQ length: 1
     Total responses seen: 53
   Packets with responses: 53
Packets without responses: 17
   Average response delay: 3336 ms
   Maximum response delay: 35048 ms
Number of Radius timeouts: 73
     Duplicate ID detects: 0

  Elapsed time since counters last cleared: 1w2d6h22m
</pre>
<p>Troubleshooting is pretty simple with #debug radius
<pre>User Access Verification

Username: exampleuser
Password:

1w1d: RADIUS: ustruct sharecount=1
1w1d: RADIUS: Initial Transmit tty0 id 45 10.10.0.10:1645, Access-Request, len 66
1w1d:         Attribute 4 6 0A0A34A0
1w1d:         Attribute 5 6 00000000
1w1d:         Attribute 61 6 00000000
1w1d:         Attribute 1 10 62722164
1w1d:         Attribute 2 18 DC6BDD95
DistSwitch&gt;
1w1d: RADIUS: Received from id 45 10.10.20.158:1645, Access-Accept, len 80
1w1d:         Attribute 25 60 53425232
1w1d: RADIUS: saved authorization data for user 80E96540 at 80E95D30
DistSwitch&gt;
DistSwitch&gt;ena
DistSwitch#</pre>
<p>If that&#8217;s not enough information and your getting alot of timeouts try using Wireshark with a port filter on UDP 1645 will allow you to see the RADIUS rejects, accepts, and challenges.<br />
<img src="http://communitystring.com/media/RSARadiusWireShark.jpg" alt="Wireshark to check for timeouts on RSA RADIUS for Cisco IOS line passwords" /></p>
<p>If the server appears to be rejecting some requests using the real time authentication activity monitor on the RSA Authentication Manager will provide much more detailed information of the reason for the reject or accept.</p>
]]></content:encoded>
			<wfw:commentRss>http://communitystring.com/2009/10/using-rsa-securid-2-part-authentication-for-line-passwords/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configuring dot1x</title>
		<link>http://communitystring.com/2009/09/configuring-dot1x/</link>
		<comments>http://communitystring.com/2009/09/configuring-dot1x/#comments</comments>
		<pubDate>Wed, 23 Sep 2009 19:54:42 +0000</pubDate>
		<dc:creator>Bradley</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[dot1x]]></category>
		<category><![CDATA[radius]]></category>

		<guid isPermaLink="false">http://communitystring.com/?p=350</guid>
		<description><![CDATA[I have been flying though some of the labs and the experience is really humbling there is tonnes of stuff that I have never configured before and it takes me a little bit of time to get used to. One of these items is dot1x authentication so below is a brief command reference/primer for the [...]]]></description>
			<content:encoded><![CDATA[<p>I have been flying though some of the labs and the experience is really humbling there is tonnes of stuff that I have never configured before and it takes me a little bit of time to get used to. One of these items is dot1x authentication so below is a brief command reference/primer for the commands.</p>
<p>Right first off we need to enable the aaa new model</p>
<pre>DistSwitch(config)#aaa new-model</pre>
<p>Then we need to configure dot1x to be used for authentication and as dot1x uses radius define the radius server, pretty standard stuff</p>
<pre>DistSwitch(config)#aaa authentication dot1x default group radius
DistSwitch(config)#radius-server host 10.10.10.100 key secretkey</pre>
<p>To prevent bad things from happening such as locking yourself out use the following command to only use local login for the lines</p>
<pre>DistSwitch(config)#aaa authentication login default line</pre>
<p>Now for the interface configuration, to use dot1x the ports must be access ports so lets sort that out</p>
<pre>interface FastEthernet0/1
 switchport mode access</pre>
<p> <!--dot1x pae authenticator--></p>
<p>This is the most important command and specifies that the port should be either force-authorised where the port is always allowed on the network, force-unauthorised where the port is never allowed on the network, and finally auto where the port is either authorised if dot1x authentication succeeds or unauthorised if it doesnt.</p>
<pre>DistSwitch(config-if)#dot1x port-control ?
  auto                PortState will be set to AUTO
  force-authorized    PortState set to Authorized
  force-unauthorized  PortState will be set to UnAuthorized</pre>
<p>Still on the interface there are are a couple more useful commands, the next command puts the port into the specified vlan if authentication fails</p>
<pre>DistSwitch(config-if)#dot1x auth-fail vlan 666</pre>
<p>And this command puts the port in the specified vlan if the connected host does not support dot1x, handy for guests</p>
<pre>DistSwitch(config-if)#dot1x guest-vlan 90</pre>
<p><!-- DistSwitch(config-if)#dot1x violation-mode protect --></p>
<p>And always there is a couple of show commands that we need to do to check that everything is working correctly. To check the queries and responses sent to each radius server just use;</p>
<pre>DistSwitch#show aaa servers

RADIUS: id 1, priority 1, host 10.10.10.100, auth-port 1645, acct-port 1646
     State: current UP, duration 1743s, previous duration 0s
     Dead: total time 0s, count 0
     Quarantined: No
     Authen: request 0, timeouts 0
             Response: unexpected 0, server error 0, incorrect 0, time 0ms
             Transaction: success 0, failure 0
     Author: request 0, timeouts 0
             Response: unexpected 0, server error 0, incorrect 0, time 0ms
             Transaction: success 0, failure 0
     Account: request 0, timeouts 0
             Response: unexpected 0, server error 0, incorrect 0, time 0ms
             Transaction: success 0, failure 0
     Elapsed time since counters last cleared: 12m</pre>
<p>And to see the dot1x interface specific information the following command provides that information</p>
<pre>DistSwitch#show dot1x interface fa0/1
Dot1x Info for FastEthernet0/1
-----------------------------------
PAE                       = AUTHENTICATOR
PortControl               = AUTO
ControlDirection          = Both
HostMode                  = SINGLE_HOST
Violation Mode            = PROTECT
ReAuthentication          = Disabled
QuietPeriod               = 60
ServerTimeout             = 0
SuppTimeout               = 30
ReAuthPeriod              = 3600 (Locally configured)
ReAuthMax                 = 2
MaxReq                    = 2
TxPeriod                  = 30
RateLimitPeriod           = 0
Auth-Fail-Vlan            = 666
Auth-Fail-Max-attempts    = 3
Guest-Vlan                = 90</pre>
]]></content:encoded>
			<wfw:commentRss>http://communitystring.com/2009/09/configuring-dot1x/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>SNMP &amp; Community Strings</title>
		<link>http://communitystring.com/2009/06/snmp-community-strings/</link>
		<comments>http://communitystring.com/2009/06/snmp-community-strings/#comments</comments>
		<pubDate>Fri, 26 Jun 2009 15:21:47 +0000</pubDate>
		<dc:creator>Bradley</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[written]]></category>
		<category><![CDATA[Community Strings]]></category>
		<category><![CDATA[SNMP]]></category>

		<guid isPermaLink="false">http://communitystring.com/?p=202</guid>
		<description><![CDATA[Due to my domain name and site title I get a fair few visitors who get directed to this site looking for information about community strings, so I thought its about time to write some information on the topic SNMP community strings. Simple Network Management Protocol (SNMP) is a set of standards for managing network [...]]]></description>
			<content:encoded><![CDATA[<p>Due to my domain name and site title I get a fair few visitors who get directed to this site looking for information about community strings, so I thought its about time to write some information on the topic SNMP community strings.</p>
<p>Simple Network Management Protocol (SNMP) is a set of standards for managing network devices, network devices are monitored by a SNMP manager which connects to an SNMP agent on network devices. Data which the SNMP agent can access is stored in a database called Management Information Base (MIB), MIBs are sometimes called MIB trees and small pieces of information (variables) are stored on MIB leaves.</p>
<p>A community string is a password for accessing the SNMP agent and separate community strings are usually used for systems which require read only or read/write access.</p>
<p>There are 4 version of SNMP;</p>
<p><strong>SNMPv1</strong> &#8211; Basic authentication through the use of community strings using SMIv1, the community string is sent in plain text</p>
<p><strong>SNMPv2</strong> &#8211; Does not community strings to authenticate. Mandates the use of SMIv2 and allows the use of a new message GetBulk and Inform</p>
<p><strong>SNMPv2c</strong> &#8211; Uses SNMP version 1 style community strings sent in plain text but operates more similarly to to SNMPv2</p>
<p><strong>SNMPv3</strong> &#8211; Similar to SNMPv2 but improvements made for security and access control.</p>
<p>There aren&#8217;t that many SNMP message types and its useful to know them all, the SNMP message types are;</p>
<p><strong>Get </strong>- Requests a single single variable from a MIB</p>
<p><strong>GetNext </strong>- Requests the next MIB leaf in the MIB tree</p>
<p><strong>GetBulk</strong> &#8211; Requests a sequential list of MIB leaves in a single request, GetBulk is commonly used to extract complex MIB structures</p>
<p><strong>Set </strong>- this message changes the value of a MIB variable</p>
<p><strong>Response </strong>- Sent in response to a set, get or inform type messages</p>
<p><strong>Trap </strong>- This message is sent in an unsolicited fashion and does not require confirmation</p>
<p><strong>Inform </strong>- Sent between SNMP managers to inform each other about MIB data</p>
]]></content:encoded>
			<wfw:commentRss>http://communitystring.com/2009/06/snmp-community-strings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Storm Control</title>
		<link>http://communitystring.com/2008/08/storm-control/</link>
		<comments>http://communitystring.com/2008/08/storm-control/#comments</comments>
		<pubDate>Thu, 21 Aug 2008 13:44:33 +0000</pubDate>
		<dc:creator>Bradley</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[switching]]></category>
		<category><![CDATA[stom contol]]></category>

		<guid isPermaLink="false">http://communitystring.com/?p=117</guid>
		<description><![CDATA[I remember when I first saw Storm Control in a config and thought &#8220;woah, whats that looks really confusing&#8221;, but really its pretty simple stuff. We use storm control to rate limit layer 2 traffic, this helps us prevent a subnet from being flooded with broadcasts, multicasts which would adversely affect the performance of the [...]]]></description>
			<content:encoded><![CDATA[<p>I remember when I first saw Storm Control in a config and thought &#8220;woah, whats that looks really confusing&#8221;, but really its pretty simple stuff.</p>
<p>We use storm control to rate limit layer 2 traffic, this helps us prevent a subnet from being flooded with broadcasts, multicasts which would adversely affect the performance of the entire subnet. Storm Control can only be configured on physical interfaces and will not work on subinterfaces, or an LACP/PAGP interface.</p>
<p><strong>Configuration</strong></p>
<p>The first command shown limits the broadcast to 200pps, and if this limit is reached will not forward any more broadcasts until this is reduced to 150pps<br />
(config-if)#<strong>storm-control broadcast level pps 200 150</strong></p>
<p>Multicast and unicast traffic can also be limited, the maximum level can also be entered as a percentage instead of pps, in the example below multicasts can use up to 5% of the interface bandwidth, and once that limit is reach no more multicasts will be forwarded until it drops to 4.5% of the total interface bandwidth<br />
(config-if)#<strong>storm-control multicast level 5 4.5</strong></p>
<p>In the final example unicast is limited to 80% of the interface bandwidth but a second value is not specified, this causes all unicast to be forwarded up to 80% of the bandwidth and it does not force the traffic to wait until it drops below a second level<br />
(config-if)#<strong>storm-control unicast level 80</strong></p>
<p>The default response for storm control is the drop packets which are over the rate limit, and create a syslog message, we can also generate a SNMP trap with the command<br />
(config-if)#<strong>storm-control action trap</strong></p>
<p>The show commands for this are also really easy, I will paste the output of this when I am home<br />
(config-if)#<strong>show storm-control</strong> <em>port </em>[<strong>unicast</strong>|<strong>broadcast</strong>|<strong>multicast</strong>]</p>
]]></content:encoded>
			<wfw:commentRss>http://communitystring.com/2008/08/storm-control/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dynamic ARP Inspection</title>
		<link>http://communitystring.com/2008/08/dynamic-arp-inspection/</link>
		<comments>http://communitystring.com/2008/08/dynamic-arp-inspection/#comments</comments>
		<pubDate>Wed, 20 Aug 2008 22:59:11 +0000</pubDate>
		<dc:creator>Bradley</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[switching]]></category>
		<category><![CDATA[arp]]></category>
		<category><![CDATA[DAI]]></category>

		<guid isPermaLink="false">http://communitystring.com/?p=111</guid>
		<description><![CDATA[A recent example of a Layer 2 attack happening in the real world was where the popular hacking tool website Metasploit was taken down, the attacker who had a server in the same subnet as the Metasploit web server would send ARP messages saying that the MAC of the metasploit web server was actually on [...]]]></description>
			<content:encoded><![CDATA[<p>A recent example of a Layer 2 attack happening in the real world was where the popular hacking tool website <a href="http://www.metasploit.com/">Metasploit</a> was taken down, the attacker who had a server in the same subnet as the Metasploit web server would send ARP messages saying that the MAC of the metasploit web server was actually on the attackers server. The actual MetaSploit webserver was up and running fine but any user visiting the website would see the attackers &#8220;victory&#8221; message instead of the actual Metasploit website. This attacked was not resolved but Dynamic Arp Inspection but its a cool example of what it can prevent.</p>
<p>There are many other attacks which abuse ARP messages and they commonly result in DOS or man in the middle attacks. Dynamic ARP Inspection (DAI) is a great method of preventing ARP based attacks.</p>
<p>If DAI is deployed on a switch it will examine ARP messages on every untrusted port and discard inappropriate ones, it does not examine ARPs on trusted ports. End stations should be configured as untrusted and connections to other switches &amp; network devices should always be trusted, otherwise possibly valid ARP messages could be discarded.</p>
<p>The following are steps which DAI will decide whether to discard a packet on an untrusted port. Only step 1 is used by default steps 2 to 4 require extra configuration.</p>
<p>1 &#8211; If an ARP message states an IP address which has not been assigned via DHCP to that port the ARP is dropped.</p>
<p>2 &#8211; The ARP is checked against a staic list of IP/MACs and if it doesnt match the ARP is dropped</p>
<p>3 &#8211; An ARP reply should have the source MAC and the MAC in the message the same, if they are different the ARP is dropped. Also the destination MAC and MAC target are compared, if they are different the ARP is dropped</p>
<p>4 &#8211; Unusual IP addresses can be also filtered such as the subnet addresses, broadcast addresses and multicast addresses.</p>
<p><strong>Configuration</strong></p>
<p>DAI is enabled per VLAN with the following command;<br />
<strong>ip arp inspection vlan</strong> <em>vlan-range</em></p>
<p>All ports default to become trusted ports so to start the inspection of ARPs ports must be configured as untrusted with the interface command<br />
<strong>no ip arp inspection trust</strong></p>
<p>Option 2 in the list above where static IP/MAC lists can be checked with the following command<br />
<strong>ip arp inspection filter</strong> <em>arp-acl-name</em> <strong>vlan</strong> <em>vlan-range</em> [<strong>static</strong>]</p>
<p>Steps 3 &amp; 4 in the list above are not checked by default but they can be with the command<br />
<strong>ip arp inspection validate</strong> {[<strong>src-mac</strong>] [<strong>dst-mac</strong>] [<strong>ip</strong>]}</p>
<p>The maximum rate of ARPs can also be limited to prevent DoS attacks with the command<br />
<strong>ip arp inspection limit</strong> {<strong>rate </strong><em>pps </em>[<strong>burst interval</strong> <em>seconds</em>] | <strong>none</strong>}</p>
]]></content:encoded>
			<wfw:commentRss>http://communitystring.com/2008/08/dynamic-arp-inspection/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

