<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>Stephen Reese</title><link href="https://www.rsreese.com/" rel="alternate"></link><link href="https://www.rsreese.com/feeds/all.atom.xml" rel="self"></link><id>https://www.rsreese.com/</id><updated>2018-01-15T12:00:00-05:00</updated><entry><title>Network Traffic Capture in Virtual Enviroments</title><link href="https://www.rsreese.com/network-traffic-capture-in-virtual-enviroments/" rel="alternate"></link><published>2018-01-15T12:00:00-05:00</published><updated>2018-01-15T12:00:00-05:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2018-01-15:/network-traffic-capture-in-virtual-enviroments/</id><summary type="html">This post demonstrates how you mirror interfaces on a virtual private server (VPS) in a cloud environment, e.g. virtual machine (VM) on a hypervisor where you do not have access to network or virtualization infrastructure where a network TAP or SPAN port would be available. This technique is used …</summary><content type="html">&lt;p&gt;This post demonstrates how you mirror interfaces on a virtual private server (&lt;span class="caps"&gt;VPS&lt;/span&gt;) in a cloud environment, e.g. virtual machine (&lt;span class="caps"&gt;VM&lt;/span&gt;) on a hypervisor where you do not have access to network or virtualization infrastructure where a network &lt;span class="caps"&gt;TAP&lt;/span&gt; or &lt;span class="caps"&gt;SPAN&lt;/span&gt; port would be available. This technique is used to forward packets to a collection point for aggregation and/or analysis. A scenario may be monitoring network traffic for security threats with a central security stack running tools such a Snort, Suricata and/or Bro &lt;span class="caps"&gt;IDS&lt;/span&gt;. Example cloud providers are Linode, Digital Ocean and &lt;span class="caps"&gt;AWS&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;While a single network interface will work and is used in our examples, the client node being monitored should have two network interfaces, one for production traffic and the second interface for sending traffic to your collection node, e.g. your cloud based security stack or where you want to store the packet captures. This is for performance reasons as you are essentially doubling the traffic on a single interface. You will need to be cognizant of the amount of data you are sending to your aggregation point (collection node) as it may become saturated as well if you send traffic from too many client nodes that exceed the collection node interface capacity. Sending traffic from 20 client nodes with 1Gbs interfaces to one capture node that has a 10Gbs will obviously drop packets depending on how much traffic is being forwarding from clients. Note that many providers do provide greater bandwidth internally, e.g. support 1Gbs public interfaces but 10+Gbs internally. Another mitigation would be shape the traffic using &lt;code&gt;tc&lt;/code&gt; or something similar in order minimize this from the client nodes. You must also consider either encrypting the tunnel using IPSec or using a trusted transport network. We do not address the security or performance implications in this post but instead its&amp;nbsp;implementation.&lt;/p&gt;
&lt;p&gt;We will provide three examples using IPTables and two using tc (Traffic Control) over both &lt;span class="caps"&gt;VXLAN&lt;/span&gt; and &lt;span class="caps"&gt;GRE&lt;/span&gt; tunnels. The examples are performed on Ubuntu 16.04 hosts in &lt;span class="caps"&gt;AWS&lt;/span&gt;. From my experiments, I found &lt;span class="caps"&gt;VXLAN&lt;/span&gt; (example four) to be quite useful in that I did not have to specify remote endpoints on the collection node. This allows multiple clients to forward traffic over a multiple tunnels to one collection node interface which allows for easy capture and analysis. &lt;span class="caps"&gt;GRE&lt;/span&gt; tunnels are point-to-point which make capture and aggregation a difficult task for many client nodes which result in an interface per tunnel. If you are aware of a workaround for this, please let me&amp;nbsp;know.&lt;/p&gt;
&lt;p&gt;The first example is the easiest to configure but has a caveat that &lt;span class="caps"&gt;MAC&lt;/span&gt; addresses will appear from the client tunnel interface verse the actual source interface due to IPTables. This may be okay for one off usage but if using for a large deployment you will likely want the hardware address for performing analysis and traceability from the interface traffic is traversing verse having to track which virtual interface is associated with which client&amp;nbsp;node.&lt;/p&gt;
&lt;p&gt;Create &lt;span class="caps"&gt;VXLAN&lt;/span&gt; tunnel on collection node. &lt;span class="caps"&gt;VXLAN&lt;/span&gt; is used in this example but we will provide a second IPTables example where &lt;span class="caps"&gt;GRE&lt;/span&gt; is&amp;nbsp;used&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;ip link add name vxlan42 type vxlan id 42 dev eth0 local 172.31.108.76 dstport 4789
ip address add 172.20.100.10/24 dev vxlan42
ip link set up vxlan42
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Create &lt;span class="caps"&gt;VXLAN&lt;/span&gt; tunnel on client to collection&amp;nbsp;node&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;ip link add name vxlan42 type vxlan id 42 dev eth0 local 172.31.102.153 remote 172.31.108.76 dstport 4789
ip address add 172.20.100.1/24 dev vxlan42
ip link set up vxlan42
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Use IPTables on client node to forward traffic over tunnel to the collection&amp;nbsp;node&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;iptables -I PREROUTING -t mangle -j TEE --gateway 172.20.100.10
iptables -I POSTROUTING -t mangle -j TEE --gateway 172.20.100.10
iptables -A POSTROUTING -t mangle -p tcp --tcp-flags SYN,RST SYN -o tun0 -j TCPMSS --clamp-mss-to-pmtu
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;On the collection node you will now see all the traffic traversing eth0 on the client node using a tool such as tcpdump, e.g. &lt;code&gt;tcpdump -i tun0 -en&lt;/code&gt;. You can filter using IPTables on the client node in order to reduce traffic sent to collection node, e.g. only send traffic you care about storing or&amp;nbsp;analyzing.&lt;/p&gt;
&lt;p&gt;The second example uses &lt;code&gt;gretap&lt;/code&gt; &lt;span class="caps"&gt;GRE&lt;/span&gt; tunnel but we have to establish a point-to-point link which requires multiple interfaces on the collection node if we want to support multiple client nodes. As you can imagine, if you had ten client nodes you were trying to capture from, you need to listen to ten interfaces, not a great solution for security monitoring. This solution allows us to maintain the &lt;span class="caps"&gt;MAC&lt;/span&gt; header over a &lt;span class="caps"&gt;GRE&lt;/span&gt; tunnel but in this example, we are still using IPTables to forward traffic over the tunnel therefore the &lt;span class="caps"&gt;MAC&lt;/span&gt; header is still associated with the tunnel verse actual interface as discussed in the first&amp;nbsp;example.&lt;/p&gt;
&lt;p&gt;Create &lt;span class="caps"&gt;GRE&lt;/span&gt; tunnel on collection&amp;nbsp;node&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;ip link add tun0 type gretap local 172.31.108.76 remote 172.31.102.153
ip link set tun0 up
ip addr add 172.20.100.10/24 dev tun0
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Create tunnel on client to collection&amp;nbsp;node&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;ip link add tun0 type gretap local 172.31.102.153 remote 172.31.108.76
ip link set tun0 up
ip addr add 172.20.100.2/24 dev tun0
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Use IPTables on client node to forward traffic over tunnel to the collection&amp;nbsp;node&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;iptables -I PREROUTING -t mangle -j TEE --gateway 172.20.100.10
iptables -I POSTROUTING -t mangle -j TEE --gateway 172.20.100.10
iptables -A POSTROUTING -t mangle -p tcp --tcp-flags SYN,RST SYN -o tun0 -j TCPMSS --clamp-mss-to-pmtu
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;The third example uses an &lt;code&gt;ip tunnel&lt;/code&gt; &lt;span class="caps"&gt;GRE&lt;/span&gt; point-to-point link which requires multiple interfaces on the collection node if we want to support multiple client nodes just as the case in the above &lt;code&gt;gretap&lt;/code&gt; example. I am including this as some folks may not care about including the &lt;span class="caps"&gt;MAC&lt;/span&gt; header and the lack of it may provide a small performance improvement as the overall packet size is&amp;nbsp;reduced.&lt;/p&gt;
&lt;p&gt;Create &lt;span class="caps"&gt;GRE&lt;/span&gt; tunnel on collection&amp;nbsp;node&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;modprobe ip_gre
lsmod | grep ip_gre
ip tunnel add tun0 mode gre local 172.31.108.76 remote 172.31.102.153 ttl 255
ip link set tun0 up
ip addr add 172.20.100.10/24 dev tun0
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Create tunnel on client to collection&amp;nbsp;node&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;modprobe ip_gre
lsmod | grep ip_gre
ip tunnel add tun0 mode gre local 172.31.102.153 remote 172.31.108.76 ttl 255
ip link set tun0 up
ip addr add 172.20.100.2/24 dev tun0
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Use IPTables on client node to forward traffic over tunnel to the collection&amp;nbsp;node&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;iptables -I PREROUTING -t mangle -j TEE --gateway 172.20.100.10
iptables -I POSTROUTING -t mangle -j TEE --gateway 172.20.100.10
iptables -A POSTROUTING -t mangle -p tcp --tcp-flags SYN,RST SYN -o tun0 -j TCPMSS --clamp-mss-to-pmtu
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;The fourth example uses &lt;code&gt;tc&lt;/code&gt; in order to capture and forward traffic. &lt;code&gt;tc&lt;/code&gt; offers a very rich set of tools for managing and manipulating the transmission of packets. We can forward packets or flows of our choice over the tunnel to the analysis node. In researching how to setup remote sensors in cloud computing environments, I learned that &lt;code&gt;tc&lt;/code&gt; will not readily forward egress traffic over a tunnel interface. The solution is to forward the traffic we care about to our loopback adapter, then forward the ingress loopback traffic flow to the tunnel so we are then able to see the ingress and egress packets on our collection node. The use of &lt;code&gt;tc&lt;/code&gt; allows us to maintain our original &lt;span class="caps"&gt;MAC&lt;/span&gt; header where as IPTables did not. For this example we start again using &lt;span class="caps"&gt;VXLAN&lt;/span&gt; which allows us to send multiple client tunnels to one interface on our collection node. A win for easily aggregating and analyzing traffic from multiple client nodes on one collection&amp;nbsp;node.&lt;/p&gt;
&lt;p&gt;Capture&amp;nbsp;node&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;ip link add name vxlan42 type vxlan id 42 dev eth0 local 172.31.108.76 dstport 4789
ip address add 172.20.100.10/24 dev vxlan42
ip link set up vxlan42
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Sending&amp;nbsp;node&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;ip link add name vxlan42 type vxlan id 42 dev eth0 local 172.31.102.153 remote 172.31.108.76 dstport 4789
ip address add 172.20.100.2/24 dev vxlan42
ip link set up vxlan42
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Send ingress traffic to&amp;nbsp;tunnel&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;tc qdisc add dev eth0 ingress
tc filter add dev eth0 parent ffff: \
    protocol all \
    u32 match u8 0 0 \
    action mirred egress mirror dev vxlan42
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Since loops are not hard to create in the egress qdiscs, we push to loopback and then the&amp;nbsp;tunnel&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;tc qdisc add dev eth0 handle 1: root prio
tc filter add dev eth0 parent 1: \
    protocol all \
    u32 match u8 0 0 \
    action mirred egress mirror dev lo
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Select all&amp;nbsp;traffic  &lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;tc qdisc add dev lo ingress
tc filter add dev lo parent ffff: \
    protocol all u32 \
    match u8 0 0 \
    action mirred egress mirror dev vxlan42
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Then drop &lt;span class="caps"&gt;VXLAN&lt;/span&gt; traffic so we do not see it again on the collection&amp;nbsp;node&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;tc filter add dev lo parent ffff: \
   protocol ip u32 \
   match ip dst 172.31.108.76/32 \
   match ip dport 4789 0xffff \
   action drop
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;The fifth and last example uses &lt;code&gt;gretap&lt;/code&gt; along with &lt;code&gt;tc&lt;/code&gt;. This allows us to maintain the &lt;span class="caps"&gt;MAC&lt;/span&gt; header over a &lt;span class="caps"&gt;GRE&lt;/span&gt; tunnel but in this example, remember we are still using IPTables therefore the &lt;span class="caps"&gt;MAC&lt;/span&gt; header is still associated with the tunnel verse actual&amp;nbsp;interface.&lt;/p&gt;
&lt;p&gt;Create &lt;span class="caps"&gt;GRE&lt;/span&gt; tunnel on collection&amp;nbsp;node&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;ip link add tun0 type gretap local 172.31.108.76 remote 172.31.102.153
ip link set tun0 up
ip addr add 172.20.100.10/24 dev tun0
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Create tunnel on client to collection&amp;nbsp;node&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;ip link add tun0 type gretap local 172.31.102.153 remote 172.31.108.76
ip link set tun0 up
ip addr add 172.20.100.2/24 dev tun0
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Send ingress traffic to&amp;nbsp;tunnel&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;tc qdisc add dev eth0 ingress
tc filter add dev eth0 parent ffff: \
    protocol all \
    u32 match u8 0 0 \
    action mirred egress mirror dev tun0
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Since loops are not hard to create in the egress qdiscs, we push to loopback and then the&amp;nbsp;tunnel&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;tc qdisc add dev eth0 handle 1: root prio
tc filter add dev eth0 parent 1: \
    protocol all \
    u32 match u8 0 0 \
    action mirred egress mirror dev lo
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Select all&amp;nbsp;traffic  &lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;tc qdisc add dev lo ingress
tc filter add dev lo parent ffff: \
    protocol all u32 \
    match u8 0 0 \
    action mirred egress mirror dev tun0
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Then drop &lt;span class="caps"&gt;GRE&lt;/span&gt; traffic so we do not see it again on the collection&amp;nbsp;node&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt; tc filter add dev lo parent ffff: \
    protocol ip u32 \
    match ip dst 172.31.108.76/32 \
    match ip protocol 0x2f 0xff \
    action drop
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;There you have it. Please leave a comment if you have any&amp;nbsp;questions.&lt;/p&gt;</content><category term="traffic capture"></category><category term="security"></category></entry><entry><title>Network Traffic Capture on Linux using OpenvSwitch</title><link href="https://www.rsreese.com/network-traffic-capture-on-linux-using-openvswitch/" rel="alternate"></link><published>2017-10-25T12:00:00-04:00</published><updated>2017-10-25T12:00:00-04:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2017-10-25:/network-traffic-capture-on-linux-using-openvswitch/</id><summary type="html">This post demonstrates how you can mirror interfaces on a Linux server in an environment where you may not have physical network taps or SPAN ports. We can use OpenvSwitch in order to forward traffic between nodes, even if we are not using virtualization. Each node being monitored needs two …</summary><content type="html">&lt;p&gt;This post demonstrates how you can mirror interfaces on a Linux server in an environment where you may not have physical network taps or &lt;span class="caps"&gt;SPAN&lt;/span&gt; ports. We can use &lt;a href="http://docs.openvswitch.org/en/latest/howto/tunneling/"&gt;OpenvSwitch&lt;/a&gt; in order to forward traffic between nodes, even if we are not using virtualization. Each node being monitored needs two interfaces, one for production traffic and the other being an internal or mirrored interface where you send traffic to be aggregated and analyzed by your cloud based security stack. You will need to be cognizant of the amount of data you are sending to your aggregation point as it may become saturated if you send traffic from multiple nodes that exceeds the receiving nodes&amp;nbsp;capacity.&lt;/p&gt;
&lt;p&gt;On &lt;span class="caps"&gt;VM&lt;/span&gt; to have a monitored&amp;nbsp;interface:&lt;/p&gt;
&lt;p&gt;Ensure the host has two network interfaces and determine which one is production verse management. The management interface will be used to send traffic to your aggregation or collection node as previously described above. For this example, eth0 and eth1 are production and management&amp;nbsp;respectively.&lt;/p&gt;
&lt;p&gt;Install&amp;nbsp;OpenvSwitch:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ sudo apt-get install openvswitch-switch
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Bring up the secondary interface, we will use this as the bridge interface, i.e. the interface that sends mirrored eth0&amp;nbsp;traffic:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ sudo ifconfig eth1 &lt;span class="m"&gt;172&lt;/span&gt;.31.3.110 netmask &lt;span class="m"&gt;255&lt;/span&gt;.255.240.0
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Configure bridge and set remote &lt;span class="caps"&gt;IP&lt;/span&gt; to your collection node which is a different network (interface) then that which is being&amp;nbsp;mirrored:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ sudo ovs-vsctl add-br br0
$ sudo ovs-vsctl add-port br0 eth1
$ sudo ovs-vsctl add-port br0 gre0 -- &lt;span class="nb"&gt;set&lt;/span&gt; interface gre0 &lt;span class="nv"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;gre options:remote_ip&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;172&lt;/span&gt;.31.10.151 -- --id&lt;span class="o"&gt;=&lt;/span&gt;@p get port gre0 -- --id&lt;span class="o"&gt;=&lt;/span&gt;@m create mirror &lt;span class="nv"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;m0 &lt;span class="k"&gt;select&lt;/span&gt;-all&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;true&lt;/span&gt; output-port&lt;span class="o"&gt;=&lt;/span&gt;@p -- &lt;span class="nb"&gt;set&lt;/span&gt; bridge br0 &lt;span class="nv"&gt;mirrors&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;@m
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;The following steps will disconnect you from eth0 so may be ideal to connect to eth1 at this point or respectively your bridge interface. Null the network address to be mirrored and set the &lt;span class="caps"&gt;IP&lt;/span&gt; to that of the bridge interface as well as updating the gateway. We also assign the bridge interface to the &lt;span class="caps"&gt;MAC&lt;/span&gt; address of eth0 as some environments may not allow traffic to/from interfaces hardware addresses they do not know&amp;nbsp;about.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ sudo ifconfig br0 &lt;span class="m"&gt;172&lt;/span&gt;.31.11.64 netmask &lt;span class="m"&gt;255&lt;/span&gt;.255.240.0 
$ sudo ifconfig eth0 &lt;span class="m"&gt;0&lt;/span&gt;
$ sudo ifconfig br0 hw ether 0a:74:0c:89:fb:70
$ sudo route add default gw &lt;span class="m"&gt;172&lt;/span&gt;.31.0.1 br0
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;We can now view the mirrored traffic on the host defined at the remote &lt;span class="caps"&gt;IP&lt;/span&gt;, packets are encapsulated but you may see protocol unreachable &lt;span class="caps"&gt;ICMP&lt;/span&gt; messages. This is because br0 drops responses. The next step fixes this by completing/terminating the tunnel on the remote host which will unencapsulate the &lt;span class="caps"&gt;GRE&lt;/span&gt; tunnel. Here, we again use eth0 and eth1 as production and management networks but we do not have to. We could just have one interface that accepts traffic from the clients forwarding us their network traffic but if it becomes saturated it may be difficult to connect to the&amp;nbsp;host.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ sudo ifconfig eth1 &lt;span class="m"&gt;172&lt;/span&gt;.20.1.7 netmask &lt;span class="m"&gt;255&lt;/span&gt;.255.255.240
$ sudo modprobe ip_gre
$ sudo lsmod &lt;span class="p"&gt;|&lt;/span&gt; grep ip_gre
$ sudo ip tunnel add mon0 mode gre &lt;span class="nb"&gt;local&lt;/span&gt; &lt;span class="m"&gt;172&lt;/span&gt;.20.1.7 remote 
$ sudo ip addr add &lt;span class="m"&gt;1&lt;/span&gt;.1.1.1/30 dev mon0
$ sudo ip link &lt;span class="nb"&gt;set&lt;/span&gt; mon0 up
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Now you can monitor interface mon0 using tools like tcpdump or simply capture network traffic for retroactive&amp;nbsp;analysis.&lt;/p&gt;
&lt;p&gt;If you need to, remove the bridge and port using the following&amp;nbsp;commands:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ sudo ovs-vsctl clear bridge br0 mirrors
$ sudo ovs-vsctl del-port br0 gre0
&lt;/pre&gt;&lt;/div&gt;</content><category term="ids"></category><category term="network tap"></category><category term="virtualization"></category></entry><entry><title>Benchmarking Websites with ab and tsung</title><link href="https://www.rsreese.com/benchmarking-websites-with-ab-and-tsung/" rel="alternate"></link><published>2017-10-10T12:00:00-04:00</published><updated>2017-10-10T12:00:00-04:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2017-10-10:/benchmarking-websites-with-ab-and-tsung/</id><summary type="html">Everyone enjoys responsive websites and being that I host a few, look for ways to improve their speed. Previously, I was interested in, HTTP, HTTPS, and HTTP/WAF, I now primarily focus on HTTPS. Browsers and third-party online services may be used in order to benchmark page performance but began …</summary><content type="html">&lt;p&gt;Everyone enjoys responsive websites and being that I host a few, look for ways to improve their speed. Previously, I was interested in, &lt;span class="caps"&gt;HTTP&lt;/span&gt;, &lt;span class="caps"&gt;HTTPS&lt;/span&gt;, and &lt;span class="caps"&gt;HTTP&lt;/span&gt;/&lt;span class="caps"&gt;WAF&lt;/span&gt;, I now primarily focus on &lt;span class="caps"&gt;HTTPS&lt;/span&gt;. Browsers and third-party online services may be used in order to benchmark page performance but began to look at other solutions. Two online services are &lt;a href="http://tools.pingdom.com/fpt/"&gt;Pingdom Website Speed Test&lt;/a&gt; and &lt;a href="https://developers.google.com/speed/pagespeed/insights/"&gt;PageSpeed Insights&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The first tool I leveraged was Apache Bench, commonly known as &lt;code&gt;ab&lt;/code&gt;. This allows me to run a quick test in order to determine the max requests per second (req/s). While fun, it is not a practical metric as there a a number of factors that must be considered when benchmarking a web-service and understanding where weaknesses may present&amp;nbsp;themselves.&lt;/p&gt;
&lt;p&gt;&lt;span class="caps"&gt;HTTPS&lt;/span&gt; requests with keep-alives, connection reuse provides significant&amp;nbsp;speedup:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ ab -k -n &lt;span class="m"&gt;60000&lt;/span&gt; -c &lt;span class="m"&gt;100&lt;/span&gt; -f TLS1.2 -H &lt;span class="s2"&gt;&amp;quot;Accept-Encoding: gzip,deflate&amp;quot;&lt;/span&gt; https://www.rsreese.com/web-stack/
This is ApacheBench, Version &lt;span class="m"&gt;2&lt;/span&gt;.3 &amp;lt;&lt;span class="nv"&gt;$Revision&lt;/span&gt;: &lt;span class="m"&gt;1757674&lt;/span&gt; $&amp;gt;
Copyright &lt;span class="m"&gt;1996&lt;/span&gt; Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Server Software:        nginx
Server Hostname:        www.rsreese.com
Server Port:            &lt;span class="m"&gt;443&lt;/span&gt;
SSL/TLS Protocol:       TLSv1.2,ECDHE-RSA-AES256-GCM-SHA384,2048,256
TLS Server Name:        www.rsreese.com

Document Path:          /web-stack/
Document Length:        &lt;span class="m"&gt;2575&lt;/span&gt; bytes

Concurrency Level:      &lt;span class="m"&gt;100&lt;/span&gt;
Time taken &lt;span class="k"&gt;for&lt;/span&gt; tests:   &lt;span class="m"&gt;7&lt;/span&gt;.124 seconds
Complete requests:      &lt;span class="m"&gt;60000&lt;/span&gt;
Failed requests:        &lt;span class="m"&gt;0&lt;/span&gt;
Keep-Alive requests:    &lt;span class="m"&gt;59447&lt;/span&gt;
Total transferred:      &lt;span class="m"&gt;220557235&lt;/span&gt; bytes
HTML transferred:       &lt;span class="m"&gt;154500000&lt;/span&gt; bytes
Requests per second:    &lt;span class="m"&gt;8422&lt;/span&gt;.57 &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="c1"&gt;#/sec] (mean)&lt;/span&gt;
Time per request:       &lt;span class="m"&gt;11&lt;/span&gt;.873 &lt;span class="o"&gt;[&lt;/span&gt;ms&lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;mean&lt;span class="o"&gt;)&lt;/span&gt;
Time per request:       &lt;span class="m"&gt;0&lt;/span&gt;.119 &lt;span class="o"&gt;[&lt;/span&gt;ms&lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;mean, across all concurrent requests&lt;span class="o"&gt;)&lt;/span&gt;
Transfer rate:          &lt;span class="m"&gt;30235&lt;/span&gt;.32 &lt;span class="o"&gt;[&lt;/span&gt;Kbytes/sec&lt;span class="o"&gt;]&lt;/span&gt; received

Connection Times &lt;span class="o"&gt;(&lt;/span&gt;ms&lt;span class="o"&gt;)&lt;/span&gt;
              min  mean&lt;span class="o"&gt;[&lt;/span&gt;+/-sd&lt;span class="o"&gt;]&lt;/span&gt; median   max
Connect:        &lt;span class="m"&gt;0&lt;/span&gt;    &lt;span class="m"&gt;1&lt;/span&gt;   &lt;span class="m"&gt;8&lt;/span&gt;.0      &lt;span class="m"&gt;0&lt;/span&gt;     &lt;span class="m"&gt;172&lt;/span&gt;
Processing:     &lt;span class="m"&gt;0&lt;/span&gt;   &lt;span class="m"&gt;11&lt;/span&gt;   &lt;span class="m"&gt;5&lt;/span&gt;.5     &lt;span class="m"&gt;11&lt;/span&gt;      &lt;span class="m"&gt;55&lt;/span&gt;
Waiting:        &lt;span class="m"&gt;0&lt;/span&gt;   &lt;span class="m"&gt;11&lt;/span&gt;   &lt;span class="m"&gt;5&lt;/span&gt;.4     &lt;span class="m"&gt;10&lt;/span&gt;      &lt;span class="m"&gt;45&lt;/span&gt;
Total:          &lt;span class="m"&gt;0&lt;/span&gt;   &lt;span class="m"&gt;12&lt;/span&gt;  &lt;span class="m"&gt;10&lt;/span&gt;.5     &lt;span class="m"&gt;11&lt;/span&gt;     &lt;span class="m"&gt;203&lt;/span&gt;

Percentage of the requests served within a certain &lt;span class="nb"&gt;time&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;ms&lt;span class="o"&gt;)&lt;/span&gt;
  &lt;span class="m"&gt;50&lt;/span&gt;%     &lt;span class="m"&gt;11&lt;/span&gt;
  &lt;span class="m"&gt;66&lt;/span&gt;%     &lt;span class="m"&gt;13&lt;/span&gt;
  &lt;span class="m"&gt;75&lt;/span&gt;%     &lt;span class="m"&gt;15&lt;/span&gt;
  &lt;span class="m"&gt;80&lt;/span&gt;%     &lt;span class="m"&gt;16&lt;/span&gt;
  &lt;span class="m"&gt;90&lt;/span&gt;%     &lt;span class="m"&gt;18&lt;/span&gt;
  &lt;span class="m"&gt;95&lt;/span&gt;%     &lt;span class="m"&gt;21&lt;/span&gt;
  &lt;span class="m"&gt;98&lt;/span&gt;%     &lt;span class="m"&gt;26&lt;/span&gt;
  &lt;span class="m"&gt;99&lt;/span&gt;%     &lt;span class="m"&gt;28&lt;/span&gt;
 &lt;span class="m"&gt;100&lt;/span&gt;%    &lt;span class="m"&gt;203&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;longest request&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;While Apache Bench provides a quick analysis of some of our page speed, &lt;code&gt;tsung&lt;/code&gt; is benchmark tool that can provide additional performance insights through its advanced configuration options. The configuration states that we are running &lt;code&gt;tsung&lt;/code&gt; locally, the target host, the interval for this phase (yes, you can have more), user agent in which we have two with a ratio defined, and finally the session, which in this case will cause &lt;code&gt;tsung&lt;/code&gt; to send as many requests as it can. Again, this is not realistic, just&amp;nbsp;fun.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="cp"&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;tsung&lt;/span&gt; &lt;span class="na"&gt;loglevel=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;notice&amp;quot;&lt;/span&gt; &lt;span class="na"&gt;version=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;1.0&amp;quot;&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;clients&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;client&lt;/span&gt; &lt;span class="na"&gt;host=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;localhost&amp;quot;&lt;/span&gt; &lt;span class="na"&gt;use_controller_vm=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;true&amp;quot;&lt;/span&gt; &lt;span class="na"&gt;maxusers=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;10000&amp;quot;&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/clients&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;servers&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;server&lt;/span&gt; &lt;span class="na"&gt;host=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;www.rsreese.com&amp;quot;&lt;/span&gt; &lt;span class="na"&gt;port=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;443&amp;quot;&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;ssl&amp;quot;&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/servers&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;load&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;arrivalphase&lt;/span&gt; &lt;span class="na"&gt;phase=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;1&amp;quot;&lt;/span&gt; &lt;span class="na"&gt;duration=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;1&amp;quot;&lt;/span&gt; &lt;span class="na"&gt;unit=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;minute&amp;quot;&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
     &lt;span class="nt"&gt;&amp;lt;users&lt;/span&gt; &lt;span class="na"&gt;maxnumber=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;10000&amp;quot;&lt;/span&gt; &lt;span class="na"&gt;interarrival=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;0.05&amp;quot;&lt;/span&gt; &lt;span class="na"&gt;unit=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;second&amp;quot;&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
   &lt;span class="nt"&gt;&amp;lt;/arrivalphase&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/load&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;options&amp;gt;&lt;/span&gt;
   &lt;span class="nt"&gt;&amp;lt;option&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;ts_http&amp;quot;&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;user_agent&amp;quot;&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;user_agent&lt;/span&gt; &lt;span class="na"&gt;probability=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;80&amp;quot;&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Mozilla/5.0 (Windows NT 6.1; rv:34.0) Gecko/20100101 Firefox/34.0&lt;span class="nt"&gt;&amp;lt;/user_agent&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;user_agent&lt;/span&gt; &lt;span class="na"&gt;probability=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;20&amp;quot;&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36&lt;span class="nt"&gt;&amp;lt;/user_agent&amp;gt;&lt;/span&gt;
   &lt;span class="nt"&gt;&amp;lt;/option&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/options&amp;gt;&lt;/span&gt;
 &lt;span class="nt"&gt;&amp;lt;sessions&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;session&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;web-stack&amp;quot;&lt;/span&gt; &lt;span class="na"&gt;probability=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;100&amp;quot;&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;ts_http&amp;quot;&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
   &lt;span class="nt"&gt;&amp;lt;for&lt;/span&gt; &lt;span class="na"&gt;from=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;1&amp;quot;&lt;/span&gt; &lt;span class="na"&gt;to=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;10000&amp;quot;&lt;/span&gt; &lt;span class="na"&gt;var=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;i&amp;quot;&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;request&amp;gt;&amp;lt;http&lt;/span&gt; &lt;span class="na"&gt;url=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;/web-stack/&amp;quot;&lt;/span&gt; &lt;span class="na"&gt;version=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;1.1&amp;quot;&lt;/span&gt; &lt;span class="na"&gt;method=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;GET&amp;quot;&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&amp;lt;/request&amp;gt;&lt;/span&gt;
   &lt;span class="nt"&gt;&amp;lt;/for&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/session&amp;gt;&lt;/span&gt;
 &lt;span class="nt"&gt;&amp;lt;/sessions&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/tsung&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Run &lt;code&gt;tsung&lt;/code&gt; and generate the reports. Optionaly, multiple reports can be combined. You may have to sudo depending your systems&amp;nbsp;permissions.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ tsung -f origin.xml start
$ &lt;span class="nb"&gt;cd&lt;/span&gt; results-directory
$ /usr/lib/tsung/bin/tsung_stats.pl
$ tsplot &lt;span class="s2"&gt;&amp;quot;HTTP&amp;quot;&lt;/span&gt; &lt;span class="m"&gt;20150418&lt;/span&gt;-1658/tsung.log &lt;span class="s2"&gt;&amp;quot;HTTPS&amp;quot;&lt;/span&gt; &lt;span class="m"&gt;20150418&lt;/span&gt;-1712/tsung.log -d combine2/
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;&lt;code&gt;tsung&lt;/code&gt; provides useful reports and graphics. For the sake of brivety, I will not include the report but just a few&amp;nbsp;charts.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.rsreese.com/assets/request_count.png"&gt;&lt;img alt="Request Count" src="https://www.rsreese.com/assets/request_count.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.rsreese.com/assets/request_mean.png"&gt;&lt;img alt="Request Mean" src="https://www.rsreese.com/assets/request_mean.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.rsreese.com/assets/size_rcv.png"&gt;&lt;img alt="Received Size" src="https://www.rsreese.com/assets/size_rcv.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.rsreese.com/assets/size_sent.png"&gt;&lt;img alt="Sent Size" src="https://www.rsreese.com/assets/size_sent.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;With this baseline, you can tailor the &lt;code&gt;tsung&lt;/code&gt; configuration to include phases of increasing user load along with multiple pages and actions. See the &lt;code&gt;tsung&lt;/code&gt; &lt;a href="http://tsung.erlang-projects.org/user_manual/"&gt;documention&lt;/a&gt; for details and leave a comment below if you have any questions about this&amp;nbsp;post.&lt;/p&gt;</content><category term="apache bench"></category><category term="tsung"></category><category term="benchmark"></category></entry><entry><title>Detecting Tor traffic with Bro network traffic analyzer</title><link href="https://www.rsreese.com/detecting-tor-traffic-with-bro-network-traffic-analyzer/" rel="alternate"></link><published>2016-01-16T12:00:00-05:00</published><updated>2016-01-16T12:00:00-05:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2016-01-16:/detecting-tor-traffic-with-bro-network-traffic-analyzer/</id><summary type="html">This entry is a post in a series in order to identify Tor (the onion router) network traffic and usage using Bro Network Security Monitor. To learn more about both projects, please visit the aforementioned links. This post is not to argue the merits of allowing Tor to run on …</summary><content type="html">&lt;p&gt;This entry is a post in a &lt;a href="http://www.rsreese.com/tag/tor/"&gt;series&lt;/a&gt; in order to identify &lt;a href="https://www.torproject.org/about/overview.html.en"&gt;Tor&lt;/a&gt; (the onion router) network traffic and usage using &lt;a href="https://www.bro.org/sphinx/intro/index.html"&gt;Bro Network Security Monitor&lt;/a&gt;. To learn more about both projects, please visit the aforementioned links. This post is not to argue the merits of allowing Tor to run on a network. Due to malware variants taking advantage of Tor for its &lt;a href="http://threatpost.com/huge-botnet-found-using-tor-network-for-communications/102179"&gt;botnet&lt;/a&gt; command and control (C2), I wanted to be able to effectively identify Tor usage in hopes of identifying hosts that may be using Tor for C2&amp;nbsp;purposes.&lt;/p&gt;
&lt;p&gt;A method folks often use to identify communication with Tor relays is to compare the current list of known Tor &lt;a href="https://www.dan.me.uk/torlist/"&gt;servers&lt;/a&gt; with the traffic from their network. While this does work, some relays may host other legitimate services which could introduce false-positives. The goal was to find a method to augment the parsing network traffic for Tor server matches which is sometimes done&amp;nbsp;retrospectively.&lt;/p&gt;
&lt;p&gt;If we take a look at the Tor certificates, we see an interesting pattern for the Issuer and Subject &lt;span class="caps"&gt;ID&lt;/span&gt; form a&amp;nbsp;pattern.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.rsreese.com/assets/tor-wireshark.png"&gt;&lt;img alt="Screen Shot" src="https://www.rsreese.com/assets/tor-wireshark-thumb.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Using tshark, it the Issuer and Subject &lt;span class="caps"&gt;ID&lt;/span&gt; patterns are a little more&amp;nbsp;apparent.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ tshark -r tor.pcap -T fields -R &lt;span class="s2"&gt;&amp;quot;ssl.handshake.certificate&amp;quot;&lt;/span&gt; -e x509af.utcTime -e x509sat.uTF8String 
&lt;span class="m"&gt;13&lt;/span&gt;-10-15 &lt;span class="m"&gt;00&lt;/span&gt;:00:00 &lt;span class="o"&gt;(&lt;/span&gt;UTC&lt;span class="o"&gt;)&lt;/span&gt;,14-02-11 &lt;span class="m"&gt;23&lt;/span&gt;:59:59 &lt;span class="o"&gt;(&lt;/span&gt;UTC&lt;span class="o"&gt;)&lt;/span&gt; www.axslhtfqq.com,www.hkkch64skp7am.net
&lt;span class="m"&gt;13&lt;/span&gt;-12-30 &lt;span class="m"&gt;18&lt;/span&gt;:32:48 &lt;span class="o"&gt;(&lt;/span&gt;UTC&lt;span class="o"&gt;)&lt;/span&gt;,14-12-30 &lt;span class="m"&gt;18&lt;/span&gt;:32:48 &lt;span class="o"&gt;(&lt;/span&gt;UTC&lt;span class="o"&gt;)&lt;/span&gt; www.igdpzct5tauwgyqs.com,www.4tdznzbrfuv.net
&lt;span class="m"&gt;13&lt;/span&gt;-10-04 &lt;span class="m"&gt;00&lt;/span&gt;:00:00 &lt;span class="o"&gt;(&lt;/span&gt;UTC&lt;span class="o"&gt;)&lt;/span&gt;,14-04-22 &lt;span class="m"&gt;00&lt;/span&gt;:00:00 &lt;span class="o"&gt;(&lt;/span&gt;UTC&lt;span class="o"&gt;)&lt;/span&gt; www.3pxivyds.com,www.nolspqtib3ix.net
&lt;span class="m"&gt;13&lt;/span&gt;-11-17 &lt;span class="m"&gt;00&lt;/span&gt;:00:00 &lt;span class="o"&gt;(&lt;/span&gt;UTC&lt;span class="o"&gt;)&lt;/span&gt;,14-06-22 &lt;span class="m"&gt;00&lt;/span&gt;:00:00 &lt;span class="o"&gt;(&lt;/span&gt;UTC&lt;span class="o"&gt;)&lt;/span&gt; www.3pzqe4en5.com,www.glk3fwiz6.net
&lt;span class="m"&gt;13&lt;/span&gt;-06-19 &lt;span class="m"&gt;00&lt;/span&gt;:00:00 &lt;span class="o"&gt;(&lt;/span&gt;UTC&lt;span class="o"&gt;)&lt;/span&gt;,14-04-20 &lt;span class="m"&gt;00&lt;/span&gt;:00:00 &lt;span class="o"&gt;(&lt;/span&gt;UTC&lt;span class="o"&gt;)&lt;/span&gt; www.5orbut4ufhohm5rlj47.com,www.orutxjqwf.net
&lt;span class="m"&gt;13&lt;/span&gt;-06-15 &lt;span class="m"&gt;00&lt;/span&gt;:00:00 &lt;span class="o"&gt;(&lt;/span&gt;UTC&lt;span class="o"&gt;)&lt;/span&gt;,14-02-04 &lt;span class="m"&gt;00&lt;/span&gt;:00:00 &lt;span class="o"&gt;(&lt;/span&gt;UTC&lt;span class="o"&gt;)&lt;/span&gt; www.7wdf4rkj5mew.com,www.sd5mkmsmo.net
&lt;span class="m"&gt;13&lt;/span&gt;-11-19 &lt;span class="m"&gt;00&lt;/span&gt;:00:00 &lt;span class="o"&gt;(&lt;/span&gt;UTC&lt;span class="o"&gt;)&lt;/span&gt;,14-02-05 &lt;span class="m"&gt;23&lt;/span&gt;:59:59 &lt;span class="o"&gt;(&lt;/span&gt;UTC&lt;span class="o"&gt;)&lt;/span&gt; www.75ba5lymxpbhw3a2kb.com,www.rnspic4yus5crf6w.net
&lt;span class="m"&gt;13&lt;/span&gt;-12-30 &lt;span class="m"&gt;19&lt;/span&gt;:54:02 &lt;span class="o"&gt;(&lt;/span&gt;UTC&lt;span class="o"&gt;)&lt;/span&gt;,14-12-30 &lt;span class="m"&gt;19&lt;/span&gt;:54:02 &lt;span class="o"&gt;(&lt;/span&gt;UTC&lt;span class="o"&gt;)&lt;/span&gt; www.s5rc22gpzrwt4e.com,www.qzsg2ioaoplbs2gaha5.net
&lt;span class="m"&gt;13&lt;/span&gt;-08-12 &lt;span class="m"&gt;00&lt;/span&gt;:00:00 &lt;span class="o"&gt;(&lt;/span&gt;UTC&lt;span class="o"&gt;)&lt;/span&gt;,14-04-16 &lt;span class="m"&gt;23&lt;/span&gt;:59:59 &lt;span class="o"&gt;(&lt;/span&gt;UTC&lt;span class="o"&gt;)&lt;/span&gt; www.2fwld67ac2.com,www.6suxdq3miwwewq4.net
&lt;span class="m"&gt;13&lt;/span&gt;-12-18 &lt;span class="m"&gt;00&lt;/span&gt;:00:00 &lt;span class="o"&gt;(&lt;/span&gt;UTC&lt;span class="o"&gt;)&lt;/span&gt;,14-02-14 &lt;span class="m"&gt;23&lt;/span&gt;:59:59 &lt;span class="o"&gt;(&lt;/span&gt;UTC&lt;span class="o"&gt;)&lt;/span&gt; www.npmxal2ohuefme26yf.com,www.c7kriuquvh.net
&lt;span class="m"&gt;13&lt;/span&gt;-10-18 &lt;span class="m"&gt;00&lt;/span&gt;:00:00 &lt;span class="o"&gt;(&lt;/span&gt;UTC&lt;span class="o"&gt;)&lt;/span&gt;,14-06-16 &lt;span class="m"&gt;00&lt;/span&gt;:00:00 &lt;span class="o"&gt;(&lt;/span&gt;UTC&lt;span class="o"&gt;)&lt;/span&gt; www.s426lumoi7.com,www.ouzbot23a6lw3vvmszx.net
&lt;span class="m"&gt;13&lt;/span&gt;-12-31 &lt;span class="m"&gt;00&lt;/span&gt;:00:00 &lt;span class="o"&gt;(&lt;/span&gt;UTC&lt;span class="o"&gt;)&lt;/span&gt;,14-02-01 &lt;span class="m"&gt;23&lt;/span&gt;:59:59 &lt;span class="o"&gt;(&lt;/span&gt;UTC&lt;span class="o"&gt;)&lt;/span&gt; www.vywbff5wkza6npkd5l.com,www.ugdrrog5ro5wdfddj.net
&lt;span class="m"&gt;13&lt;/span&gt;-11-27 &lt;span class="m"&gt;00&lt;/span&gt;:00:00 &lt;span class="o"&gt;(&lt;/span&gt;UTC&lt;span class="o"&gt;)&lt;/span&gt;,14-08-13 &lt;span class="m"&gt;00&lt;/span&gt;:00:00 &lt;span class="o"&gt;(&lt;/span&gt;UTC&lt;span class="o"&gt;)&lt;/span&gt; www.ozsx22b4nda.com,www.lr7s5k3n6ber.net
&lt;span class="m"&gt;13&lt;/span&gt;-03-31 &lt;span class="m"&gt;00&lt;/span&gt;:00:00 &lt;span class="o"&gt;(&lt;/span&gt;UTC&lt;span class="o"&gt;)&lt;/span&gt;,14-01-06 &lt;span class="m"&gt;23&lt;/span&gt;:59:59 &lt;span class="o"&gt;(&lt;/span&gt;UTC&lt;span class="o"&gt;)&lt;/span&gt; www.plgx26wgyroot37x3ysj.com,www.xwx5gpj5t2msq3.net
&lt;span class="m"&gt;13&lt;/span&gt;-12-18 &lt;span class="m"&gt;00&lt;/span&gt;:00:00 &lt;span class="o"&gt;(&lt;/span&gt;UTC&lt;span class="o"&gt;)&lt;/span&gt;,14-02-20 &lt;span class="m"&gt;00&lt;/span&gt;:00:00 &lt;span class="o"&gt;(&lt;/span&gt;UTC&lt;span class="o"&gt;)&lt;/span&gt; www.gempmzrnwnk.com,www.6lrz7wtwprz.net
&lt;span class="m"&gt;13&lt;/span&gt;-08-16 &lt;span class="m"&gt;00&lt;/span&gt;:00:00 &lt;span class="o"&gt;(&lt;/span&gt;UTC&lt;span class="o"&gt;)&lt;/span&gt;,14-01-26 &lt;span class="m"&gt;23&lt;/span&gt;:59:59 &lt;span class="o"&gt;(&lt;/span&gt;UTC&lt;span class="o"&gt;)&lt;/span&gt; www.rxy4jiw4wk.com,www.g66mipkcyhjwumywk4h.net
&lt;span class="m"&gt;13&lt;/span&gt;-12-30 &lt;span class="m"&gt;19&lt;/span&gt;:07:41 &lt;span class="o"&gt;(&lt;/span&gt;UTC&lt;span class="o"&gt;)&lt;/span&gt;,14-12-30 &lt;span class="m"&gt;19&lt;/span&gt;:07:41 &lt;span class="o"&gt;(&lt;/span&gt;UTC&lt;span class="o"&gt;)&lt;/span&gt; www.o5qzqtbs.com,www.bnymkm3nk7jtz3.net
&lt;span class="m"&gt;13&lt;/span&gt;-07-27 &lt;span class="m"&gt;00&lt;/span&gt;:00:00 &lt;span class="o"&gt;(&lt;/span&gt;UTC&lt;span class="o"&gt;)&lt;/span&gt;,14-01-18 &lt;span class="m"&gt;00&lt;/span&gt;:00:00 &lt;span class="o"&gt;(&lt;/span&gt;UTC&lt;span class="o"&gt;)&lt;/span&gt; www.rtqtkopfct767ai.com,www.facp2b2y5wjffbo5ioy.net
&lt;span class="m"&gt;13&lt;/span&gt;-09-09 &lt;span class="m"&gt;00&lt;/span&gt;:00:00 &lt;span class="o"&gt;(&lt;/span&gt;UTC&lt;span class="o"&gt;)&lt;/span&gt;,14-02-26 &lt;span class="m"&gt;00&lt;/span&gt;:00:00 &lt;span class="o"&gt;(&lt;/span&gt;UTC&lt;span class="o"&gt;)&lt;/span&gt; www.lvv4l6sx3qafei2s5u.com,www.vznlngjz7a2fpg.net
&lt;span class="m"&gt;13&lt;/span&gt;-12-21 &lt;span class="m"&gt;00&lt;/span&gt;:00:00 &lt;span class="o"&gt;(&lt;/span&gt;UTC&lt;span class="o"&gt;)&lt;/span&gt;,14-02-08 &lt;span class="m"&gt;00&lt;/span&gt;:00:00 &lt;span class="o"&gt;(&lt;/span&gt;UTC&lt;span class="o"&gt;)&lt;/span&gt; www.mbrdx4tz2ob5wlvazlr.com,www.shxl35n3zt.net
&lt;span class="m"&gt;13&lt;/span&gt;-12-12 &lt;span class="m"&gt;00&lt;/span&gt;:00:00 &lt;span class="o"&gt;(&lt;/span&gt;UTC&lt;span class="o"&gt;)&lt;/span&gt;,14-01-15 &lt;span class="m"&gt;00&lt;/span&gt;:00:00 &lt;span class="o"&gt;(&lt;/span&gt;UTC&lt;span class="o"&gt;)&lt;/span&gt; www.4jvdpoo5wcklhd3usu.com,www.f4uxyorx2h.net
&lt;span class="m"&gt;13&lt;/span&gt;-10-17 &lt;span class="m"&gt;00&lt;/span&gt;:00:00 &lt;span class="o"&gt;(&lt;/span&gt;UTC&lt;span class="o"&gt;)&lt;/span&gt;,14-05-05 &lt;span class="m"&gt;00&lt;/span&gt;:00:00 &lt;span class="o"&gt;(&lt;/span&gt;UTC&lt;span class="o"&gt;)&lt;/span&gt; www.zcgg5yiwzajal4.com,www.55a4kx5jrqxezvk.net
&lt;span class="m"&gt;13&lt;/span&gt;-05-18 &lt;span class="m"&gt;00&lt;/span&gt;:00:00 &lt;span class="o"&gt;(&lt;/span&gt;UTC&lt;span class="o"&gt;)&lt;/span&gt;,14-04-07 &lt;span class="m"&gt;23&lt;/span&gt;:59:59 &lt;span class="o"&gt;(&lt;/span&gt;UTC&lt;span class="o"&gt;)&lt;/span&gt; www.3eexfeaw.com,www.iedhzej4tie4egm.net
&lt;span class="m"&gt;13&lt;/span&gt;-12-23 &lt;span class="m"&gt;00&lt;/span&gt;:00:00 &lt;span class="o"&gt;(&lt;/span&gt;UTC&lt;span class="o"&gt;)&lt;/span&gt;,14-01-22 &lt;span class="m"&gt;23&lt;/span&gt;:59:59 &lt;span class="o"&gt;(&lt;/span&gt;UTC&lt;span class="o"&gt;)&lt;/span&gt; www.5m6ywj2w7zs.com,www.iolbr3jbfs.net
&lt;span class="m"&gt;13&lt;/span&gt;-03-09 &lt;span class="m"&gt;00&lt;/span&gt;:00:00 &lt;span class="o"&gt;(&lt;/span&gt;UTC&lt;span class="o"&gt;)&lt;/span&gt;,14-01-01 &lt;span class="m"&gt;23&lt;/span&gt;:59:59 &lt;span class="o"&gt;(&lt;/span&gt;UTC&lt;span class="o"&gt;)&lt;/span&gt; www.hbwpqbx4zimtptui.com,www.77wneeix55t.net
&lt;span class="m"&gt;13&lt;/span&gt;-12-26 &lt;span class="m"&gt;00&lt;/span&gt;:00:00 &lt;span class="o"&gt;(&lt;/span&gt;UTC&lt;span class="o"&gt;)&lt;/span&gt;,14-04-19 &lt;span class="m"&gt;00&lt;/span&gt;:00:00 &lt;span class="o"&gt;(&lt;/span&gt;UTC&lt;span class="o"&gt;)&lt;/span&gt; www.pxznjv3t75.com,www.wuqq77l634eogfm.net
&lt;span class="m"&gt;13&lt;/span&gt;-12-07 &lt;span class="m"&gt;00&lt;/span&gt;:00:00 &lt;span class="o"&gt;(&lt;/span&gt;UTC&lt;span class="o"&gt;)&lt;/span&gt;,14-03-17 &lt;span class="m"&gt;23&lt;/span&gt;:59:59 &lt;span class="o"&gt;(&lt;/span&gt;UTC&lt;span class="o"&gt;)&lt;/span&gt; www.6pp7bfbdywvcaicqmfq.com,www.g6oa3qdobmdgl5tprm.net
&lt;span class="m"&gt;13&lt;/span&gt;-12-30 &lt;span class="m"&gt;19&lt;/span&gt;:42:49 &lt;span class="o"&gt;(&lt;/span&gt;UTC&lt;span class="o"&gt;)&lt;/span&gt;,14-12-30 &lt;span class="m"&gt;19&lt;/span&gt;:42:49 &lt;span class="o"&gt;(&lt;/span&gt;UTC&lt;span class="o"&gt;)&lt;/span&gt; www.twngp3xrqgo4p.com,www.znskvp5k5pns22y2.net
&lt;span class="m"&gt;13&lt;/span&gt;-02-14 &lt;span class="m"&gt;00&lt;/span&gt;:00:00 &lt;span class="o"&gt;(&lt;/span&gt;UTC&lt;span class="o"&gt;)&lt;/span&gt;,14-01-14 &lt;span class="m"&gt;00&lt;/span&gt;:00:00 &lt;span class="o"&gt;(&lt;/span&gt;UTC&lt;span class="o"&gt;)&lt;/span&gt; www.spx5a4e5eyhkdtpt2xj.com,www.6phyovjhggkfm.net
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;So with this knowledge I started looking to see if there were any current methods of identifying the anomalous certificate identifiers. Lucky for Bro users, &lt;a href="https://github.com/sethhall/"&gt;Seth Hall&lt;/a&gt; created a &lt;a href="https://raw.github.com/sethhall/bro-junk-drawer/master/detect-tor.bro"&gt;detect-tor.bro&lt;/a&gt; script to do just that. I &lt;a href="http://www.bro.org/download/"&gt;downloaded&lt;/a&gt; the latest Bro 2.4 source package and built it on my Ubuntu &lt;span class="caps"&gt;VM&lt;/span&gt;. I also pulled down the aforementioned detect-tor.bro script. I was greeted with a warning and did not see the expected&amp;nbsp;logs:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ sudo /usr/local/bro/bin/bro -r tor.pcap detect-tor.bro
warning in /usr/local/bro/share/bro/base/misc/find-checksum-offloading.bro, line &lt;span class="m"&gt;54&lt;/span&gt;: Your trace file likely has invalid TCP checksums, most likely from NIC checksum offloading.  By default, packets with invalid checksums are discarded by Bro unless using the -C command-line option or toggling the &lt;span class="s1"&gt;&amp;#39;ignore_checksums&amp;#39;&lt;/span&gt; variable.  Alternatively, disable checksum offloading by the network adapter to ensure Bro analyzes the actual checksums that are transmitted.
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;This was quickly fixed by including the &lt;code&gt;-C&lt;/code&gt; toggle in order to ignore&amp;nbsp;checksums.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ sudo /usr/local/bro/bin/bro -C -r tor.pcap detect-tor.bro
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;After parsing the Tor traffic collected via Wireshark or tcpdump, Bro should have generated some logs. At first glace, we see an alert from the detect-tor.bro script. While the event is pretty self explanatory, note the destination &lt;span class="caps"&gt;IP&lt;/span&gt; addresses are not included because Tor will usually have multiple servers, i.e. destination &lt;span class="caps"&gt;IP&lt;/span&gt;&amp;nbsp;addresses.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ more notice.log
&lt;span class="c1"&gt;#separator \x09&lt;/span&gt;
&lt;span class="c1"&gt;#set_separator  ,&lt;/span&gt;
&lt;span class="c1"&gt;#empty_field    (empty)&lt;/span&gt;
&lt;span class="c1"&gt;#unset_field    -&lt;/span&gt;
&lt;span class="c1"&gt;#path   notice&lt;/span&gt;
&lt;span class="c1"&gt;#open   2014-01-03-14-12-05&lt;/span&gt;
&lt;span class="c1"&gt;#fields ts      uid     id.orig_h       id.orig_p       id.resp_h       id.resp_p       fuid    file_mime_type  file_desc       proto   note    msg     sub     src  dst      p       n       peer_descr      actions suppress_for    dropped remote_location.country_code    remote_location.region  remote_location.city    remote_locatio&lt;/span&gt;
n.latitude      remote_location.longitude
&lt;span class="c1"&gt;#types  time    string  addr    port    addr    port    string  string  string  enum    enum    string  string  addr    addr    port    count   string  table[enum]  interval bool    string  string  string  double  double&lt;/span&gt;
&lt;span class="m"&gt;1388434821&lt;/span&gt;.597322       -       -       -       -       -       -       -       -       -       DetectTor::Found        &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126 was found using Tor by connecting t
o servers with at least &lt;span class="m"&gt;10&lt;/span&gt; unique weird certs   -       &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126      -       -       -       bro     Notice::ACTION_LOG      &lt;span class="m"&gt;3600&lt;/span&gt;.000000     F       -       -    --       -
&lt;span class="c1"&gt;#close  2014-01-03-14-12-05&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;We can cut down column noise by specifying only what we want to&amp;nbsp;see:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ cat notice.log&lt;span class="p"&gt;|&lt;/span&gt;/usr/local/bro/bin/bro-cut -c -d note msg src dst actions suppress_for dropped
&lt;span class="c1"&gt;#separator \x09&lt;/span&gt;
&lt;span class="c1"&gt;#set_separator  ,&lt;/span&gt;
&lt;span class="c1"&gt;#empty_field    (empty)&lt;/span&gt;
&lt;span class="c1"&gt;#unset_field    -&lt;/span&gt;
&lt;span class="c1"&gt;#path   notice&lt;/span&gt;
&lt;span class="c1"&gt;#open   2014-01-03-14-12-05&lt;/span&gt;
&lt;span class="c1"&gt;#fields note    msg     src     dst     actions suppress_for    dropped&lt;/span&gt;
&lt;span class="c1"&gt;#types  string  string  addr    addr    table[enum]     interval        bool&lt;/span&gt;
DetectTor::Found        &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126 was found using Tor by connecting to servers with at least &lt;span class="m"&gt;10&lt;/span&gt; unique weird certs     &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126      -       Notice::ACTION_LOG   &lt;span class="m"&gt;3600&lt;/span&gt;.000000      F
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;After seeing the alert in the &lt;code&gt;notice.log&lt;/code&gt;, we look in the &lt;code&gt;ssl.log&lt;/code&gt; file as well in order to determine what traffic caused the alert to&amp;nbsp;fire.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ more ssl.log
&lt;span class="c1"&gt;#separator \x09&lt;/span&gt;
&lt;span class="c1"&gt;#set_separator  ,&lt;/span&gt;
&lt;span class="c1"&gt;#empty_field    (empty)&lt;/span&gt;
&lt;span class="c1"&gt;#unset_field    -&lt;/span&gt;
&lt;span class="c1"&gt;#path   ssl&lt;/span&gt;
&lt;span class="c1"&gt;#open   2014-01-03-14-12-05&lt;/span&gt;
&lt;span class="c1"&gt;#fields ts      uid     id.orig_h       id.orig_p       id.resp_h       id.resp_p       version cipher  server_name     session_id      subject issuer_subject  not_va&lt;/span&gt;
lid_before      not_valid_after last_alert      client_subject  client_issuer_subject
&lt;span class="c1"&gt;#types  time    string  addr    port    addr    port    string  string  string  string  string  string  time    time    string  string  string&lt;/span&gt;
&lt;span class="m"&gt;1388434821&lt;/span&gt;.514935       CwRHlF31djcMrO7Z98      &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126      &lt;span class="m"&gt;51191&lt;/span&gt;   &lt;span class="m"&gt;199&lt;/span&gt;.36.221.196  &lt;span class="m"&gt;9001&lt;/span&gt;    TLSv10  TLS_DHE_RSA_WITH_AES_256_CBC_SHA        www.wplgkqpnteb.com  -CN&lt;span class="o"&gt;=&lt;/span&gt;www.ri6ufvqioii5se5tzbgt.net &lt;span class="nv"&gt;CN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;www.dyyp6enzivlm46.com       &lt;span class="m"&gt;1388447336&lt;/span&gt;.000000       &lt;span class="m"&gt;1419983336&lt;/span&gt;.000000       -       -       -
&lt;span class="m"&gt;1388434821&lt;/span&gt;.482053       Ck1Mgy4ubChMFyneFc      &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126      &lt;span class="m"&gt;38946&lt;/span&gt;   &lt;span class="m"&gt;198&lt;/span&gt;.27.97.223   &lt;span class="m"&gt;443&lt;/span&gt;     TLSv10  TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA      www.p65b.com    -    &lt;span class="nv"&gt;CN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;www.hkkch64skp7am.net &lt;span class="nv"&gt;CN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;www.axslhtfqq.com    &lt;span class="m"&gt;1381809600&lt;/span&gt;.000000       &lt;span class="m"&gt;1392181199&lt;/span&gt;.000000       -       -       -
&lt;span class="m"&gt;1388434821&lt;/span&gt;.533291       CZOEio3mxlQgpmVD2i      &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126      &lt;span class="m"&gt;36715&lt;/span&gt;   &lt;span class="m"&gt;149&lt;/span&gt;.9.0.60      &lt;span class="m"&gt;9001&lt;/span&gt;    TLSv10  TLS_DHE_RSA_WITH_AES_256_CBC_SHA        www.dpvdl3n6yzwv.com -CN&lt;span class="o"&gt;=&lt;/span&gt;www.anojueopqlpgsj.net       &lt;span class="nv"&gt;CN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;www.u2rsltgpogir6t.com       &lt;span class="m"&gt;1384405200&lt;/span&gt;.000000       &lt;span class="m"&gt;1398830399&lt;/span&gt;.000000       -       -       -
&lt;span class="m"&gt;1388434821&lt;/span&gt;.484476       CnU0VyJcJHaeCaxh8       &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126      &lt;span class="m"&gt;49341&lt;/span&gt;   &lt;span class="m"&gt;66&lt;/span&gt;.18.12.197    &lt;span class="m"&gt;443&lt;/span&gt;     TLSv10  TLS_DHE_RSA_WITH_AES_256_CBC_SHA        www.6kyx72vjlrwxcmxnj4
we7n.com        -       &lt;span class="nv"&gt;CN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;www.4tdznzbrfuv.net  &lt;span class="nv"&gt;CN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;www.igdpzct5tauwgyqs.com     &lt;span class="m"&gt;1388446368&lt;/span&gt;.000000       &lt;span class="m"&gt;1419982368&lt;/span&gt;.000000       -       -       -
&lt;span class="m"&gt;1388434821&lt;/span&gt;.484255       Cc00yR3kKWb2GstwXf      &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126      &lt;span class="m"&gt;40742&lt;/span&gt;   &lt;span class="m"&gt;64&lt;/span&gt;.62.249.222   &lt;span class="m"&gt;443&lt;/span&gt;     TLSv10  TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA      www.de5v2whiex3xxy.com
        -       &lt;span class="nv"&gt;CN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;www.glk3fwiz6.net    &lt;span class="nv"&gt;CN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;www.3pzqe4en5.com    &lt;span class="m"&gt;1384664400&lt;/span&gt;.000000       &lt;span class="m"&gt;1403409600&lt;/span&gt;.000000       -       -       -
&lt;span class="m"&gt;1388434821&lt;/span&gt;.583284       CuVFNK14saFKjGVhfh      &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126      &lt;span class="m"&gt;54393&lt;/span&gt;   &lt;span class="m"&gt;50&lt;/span&gt;.115.122.68   &lt;span class="m"&gt;9001&lt;/span&gt;    TLSv10  TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA      www.ojj4rbje7z7.com  -CN&lt;span class="o"&gt;=&lt;/span&gt;www.qexiojanju56.net &lt;span class="nv"&gt;CN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;www.nnfslkrseh.com   &lt;span class="m"&gt;1387342800&lt;/span&gt;.000000       &lt;span class="m"&gt;1390280400&lt;/span&gt;.000000       -       -       -
&lt;span class="m"&gt;1388434821&lt;/span&gt;.482585       CROLl5Vd0jUzvvwn        &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126      &lt;span class="m"&gt;46797&lt;/span&gt;   &lt;span class="m"&gt;212&lt;/span&gt;.83.140.45   &lt;span class="m"&gt;443&lt;/span&gt;     TLSv10  TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA      www.esd7jqvwpbwebf.com
        -       &lt;span class="nv"&gt;CN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;www.nolspqtib3ix.net &lt;span class="nv"&gt;CN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;www.3pxivyds.com     &lt;span class="m"&gt;1380859200&lt;/span&gt;.000000       &lt;span class="m"&gt;1398139200&lt;/span&gt;.000000       -       -       -
&lt;span class="m"&gt;1388434821&lt;/span&gt;.597288       CXemGQ4G0PFf5DvUf       &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126      &lt;span class="m"&gt;34887&lt;/span&gt;   &lt;span class="m"&gt;72&lt;/span&gt;.52.91.30     &lt;span class="m"&gt;5901&lt;/span&gt;    TLSv10  TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA      www.igyewbs5.com     -CN&lt;span class="o"&gt;=&lt;/span&gt;www.bnlln35al.net    &lt;span class="nv"&gt;CN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;www.henq76fjat2ozl2537.com   &lt;span class="m"&gt;1376020800&lt;/span&gt;.000000       &lt;span class="m"&gt;1403841600&lt;/span&gt;.000000       -       -       -
&lt;span class="m"&gt;1388434821&lt;/span&gt;.597322       CFrNiH22BOLl917zjl      &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126      &lt;span class="m"&gt;56135&lt;/span&gt;   &lt;span class="m"&gt;144&lt;/span&gt;.76.109.178  &lt;span class="m"&gt;9081&lt;/span&gt;    TLSv10  TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA      www.57xl.com    -    &lt;span class="nv"&gt;CN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;www.3rvuayihf4t35h.net        &lt;span class="nv"&gt;CN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;www.viw7rvktu36ov.com        &lt;span class="m"&gt;1386651600&lt;/span&gt;.000000       &lt;span class="m"&gt;1388811600&lt;/span&gt;.000000       -       -       -
&lt;span class="m"&gt;1388434821&lt;/span&gt;.489984       CxEp7Xmn9AOlkxn0e       &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126      &lt;span class="m"&gt;44997&lt;/span&gt;   &lt;span class="m"&gt;31&lt;/span&gt;.7.186.228    &lt;span class="m"&gt;443&lt;/span&gt;     TLSv10  TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA      www.ewrk2xtmr.com    -CN&lt;span class="o"&gt;=&lt;/span&gt;www.orutxjqwf.net    &lt;span class="nv"&gt;CN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;www.5orbut4ufhohm5rlj47.com  &lt;span class="m"&gt;1371614400&lt;/span&gt;.000000       &lt;span class="m"&gt;1397966400&lt;/span&gt;.000000       -       -       -
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Again, we can select the fields we want to see in order to minimize&amp;nbsp;output.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ cat ssl.log&lt;span class="p"&gt;|&lt;/span&gt;/usr/local/bro/bin/bro-cut -c -d ts uid id.orig_h id.orig_p id.resp_h id.resp_p version cipher server_name subject issuer_subject not_valid_before not_valid_after
&lt;span class="c1"&gt;#separator \x09&lt;/span&gt;
&lt;span class="c1"&gt;#set_separator  ,&lt;/span&gt;
&lt;span class="c1"&gt;#empty_field    (empty)&lt;/span&gt;
&lt;span class="c1"&gt;#unset_field    -&lt;/span&gt;
&lt;span class="c1"&gt;#path   ssl&lt;/span&gt;
&lt;span class="c1"&gt;#open   2014-01-03-14-12-05&lt;/span&gt;
&lt;span class="c1"&gt;#fields ts      uid     id.orig_h       id.orig_p       id.resp_h       id.resp_p       version cipher  server_name     subject issuer_subject  not_valid_before     not_valid_after&lt;/span&gt;
&lt;span class="c1"&gt;#types  string  string  addr    port    addr    port    string  string  string  string  string  time    string&lt;/span&gt;
&lt;span class="m"&gt;2013&lt;/span&gt;-12-30T15:20:21-0500        CwRHlF31djcMrO7Z98      &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126      &lt;span class="m"&gt;51191&lt;/span&gt;   &lt;span class="m"&gt;199&lt;/span&gt;.36.221.196  &lt;span class="m"&gt;9001&lt;/span&gt;    TLSv10  TLS_DHE_RSA_WITH_AES_256_CBC_SHA        www.wplgkqpnteb.com   &lt;span class="nv"&gt;CN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;www.ri6ufvqioii5se5tzbgt.net &lt;span class="nv"&gt;CN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;www.dyyp6enzivlm46.com       &lt;span class="m"&gt;2013&lt;/span&gt;-12-30T18:48:56-0500        &lt;span class="m"&gt;2014&lt;/span&gt;-12-30T18:48:56-0500
&lt;span class="m"&gt;2013&lt;/span&gt;-12-30T15:20:21-0500        Ck1Mgy4ubChMFyneFc      &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126      &lt;span class="m"&gt;38946&lt;/span&gt;   &lt;span class="m"&gt;198&lt;/span&gt;.27.97.223   &lt;span class="m"&gt;443&lt;/span&gt;     TLSv10  TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA      www.p65b.com &lt;span class="nv"&gt;CN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;www.hkkch64skp7am.net &lt;span class="nv"&gt;CN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;www.axslhtfqq.com    &lt;span class="m"&gt;2013&lt;/span&gt;-10-15T00:00:00-0400        &lt;span class="m"&gt;2014&lt;/span&gt;-02-11T23:59:59-0500
&lt;span class="m"&gt;2013&lt;/span&gt;-12-30T15:20:21-0500        CZOEio3mxlQgpmVD2i      &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126      &lt;span class="m"&gt;36715&lt;/span&gt;   &lt;span class="m"&gt;149&lt;/span&gt;.9.0.60      &lt;span class="m"&gt;9001&lt;/span&gt;    TLSv10  TLS_DHE_RSA_WITH_AES_256_CBC_SHA        www.dpvdl3n6yzwv.com  &lt;span class="nv"&gt;CN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;www.anojueopqlpgsj.net       &lt;span class="nv"&gt;CN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;www.u2rsltgpogir6t.com       &lt;span class="m"&gt;2013&lt;/span&gt;-11-14T00:00:00-0500        &lt;span class="m"&gt;2014&lt;/span&gt;-04-29T23:59:59-0400
&lt;span class="m"&gt;2013&lt;/span&gt;-12-30T15:20:21-0500        CnU0VyJcJHaeCaxh8       &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126      &lt;span class="m"&gt;49341&lt;/span&gt;   &lt;span class="m"&gt;66&lt;/span&gt;.18.12.197    &lt;span class="m"&gt;443&lt;/span&gt;     TLSv10  TLS_DHE_RSA_WITH_AES_256_CBC_SHA        www.6kyx72vjlrwxcmxnj4we7n.com        &lt;span class="nv"&gt;CN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;www.4tdznzbrfuv.net  &lt;span class="nv"&gt;CN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;www.igdpzct5tauwgyqs.com     &lt;span class="m"&gt;2013&lt;/span&gt;-12-30T18:32:48-0500        &lt;span class="m"&gt;2014&lt;/span&gt;-12-30T18:32:48-0500
&lt;span class="m"&gt;2013&lt;/span&gt;-12-30T15:20:21-0500        Cc00yR3kKWb2GstwXf      &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126      &lt;span class="m"&gt;40742&lt;/span&gt;   &lt;span class="m"&gt;64&lt;/span&gt;.62.249.222   &lt;span class="m"&gt;443&lt;/span&gt;     TLSv10  TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA      www.de5v2whiex3xxy.com        &lt;span class="nv"&gt;CN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;www.glk3fwiz6.net    &lt;span class="nv"&gt;CN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;www.3pzqe4en5.com    &lt;span class="m"&gt;2013&lt;/span&gt;-11-17T00:00:00-0500        &lt;span class="m"&gt;2014&lt;/span&gt;-06-22T00:00:00-0400
&lt;span class="m"&gt;2013&lt;/span&gt;-12-30T15:20:21-0500        CuVFNK14saFKjGVhfh      &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126      &lt;span class="m"&gt;54393&lt;/span&gt;   &lt;span class="m"&gt;50&lt;/span&gt;.115.122.68   &lt;span class="m"&gt;9001&lt;/span&gt;    TLSv10  TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA      www.ojj4rbje7z7.com   &lt;span class="nv"&gt;CN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;www.qexiojanju56.net &lt;span class="nv"&gt;CN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;www.nnfslkrseh.com   &lt;span class="m"&gt;2013&lt;/span&gt;-12-18T00:00:00-0500        &lt;span class="m"&gt;2014&lt;/span&gt;-01-21T00:00:00-0500
&lt;span class="m"&gt;2013&lt;/span&gt;-12-30T15:20:21-0500        CROLl5Vd0jUzvvwn        &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126      &lt;span class="m"&gt;46797&lt;/span&gt;   &lt;span class="m"&gt;212&lt;/span&gt;.83.140.45   &lt;span class="m"&gt;443&lt;/span&gt;     TLSv10  TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA      www.esd7jqvwpbwebf.com        &lt;span class="nv"&gt;CN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;www.nolspqtib3ix.net &lt;span class="nv"&gt;CN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;www.3pxivyds.com     &lt;span class="m"&gt;2013&lt;/span&gt;-10-04T00:00:00-0400        &lt;span class="m"&gt;2014&lt;/span&gt;-04-22T00:00:00-0400
&lt;span class="m"&gt;2013&lt;/span&gt;-12-30T15:20:21-0500        CXemGQ4G0PFf5DvUf       &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126      &lt;span class="m"&gt;34887&lt;/span&gt;   &lt;span class="m"&gt;72&lt;/span&gt;.52.91.30     &lt;span class="m"&gt;5901&lt;/span&gt;    TLSv10  TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA      www.igyewbs5.com      &lt;span class="nv"&gt;CN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;www.bnlln35al.net    &lt;span class="nv"&gt;CN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;www.henq76fjat2ozl2537.com   &lt;span class="m"&gt;2013&lt;/span&gt;-08-09T00:00:00-0400        &lt;span class="m"&gt;2014&lt;/span&gt;-06-27T00:00:00-0400
&lt;span class="m"&gt;2013&lt;/span&gt;-12-30T15:20:21-0500        CFrNiH22BOLl917zjl      &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126      &lt;span class="m"&gt;56135&lt;/span&gt;   &lt;span class="m"&gt;144&lt;/span&gt;.76.109.178  &lt;span class="m"&gt;9081&lt;/span&gt;    TLSv10  TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA      www.57xl.com &lt;span class="nv"&gt;CN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;www.3rvuayihf4t35h.net        &lt;span class="nv"&gt;CN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;www.viw7rvktu36ov.com        &lt;span class="m"&gt;2013&lt;/span&gt;-12-10T00:00:00-0500        &lt;span class="m"&gt;2014&lt;/span&gt;-01-04T00:00:00-0500
&lt;span class="m"&gt;2013&lt;/span&gt;-12-30T15:20:21-0500        CxEp7Xmn9AOlkxn0e       &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126      &lt;span class="m"&gt;44997&lt;/span&gt;   &lt;span class="m"&gt;31&lt;/span&gt;.7.186.228    &lt;span class="m"&gt;443&lt;/span&gt;     TLSv10  TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA      www.ewrk2xtmr.com     &lt;span class="nv"&gt;CN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;www.orutxjqwf.net    &lt;span class="nv"&gt;CN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;www.5orbut4ufhohm5rlj47.com  &lt;span class="m"&gt;2013&lt;/span&gt;-06-19T00:00:00-0400        &lt;span class="m"&gt;2014&lt;/span&gt;-04-20T00:00:00-0400
&lt;span class="m"&gt;2013&lt;/span&gt;-12-30T15:20:21-0500        CwzpD92UikR0USUErj      &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126      &lt;span class="m"&gt;58912&lt;/span&gt;   &lt;span class="m"&gt;91&lt;/span&gt;.121.113.70   &lt;span class="m"&gt;9001&lt;/span&gt;    TLSv10  TLS_DHE_RSA_WITH_AES_256_CBC_SHA        www.dv2nzruzkuf2ncqzpxh5vpg.com       &lt;span class="nv"&gt;CN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;www.an2nldahkafrkz6qx.net    &lt;span class="nv"&gt;CN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;www.ejybbncghc3qjraztwpr.com &lt;span class="m"&gt;2013&lt;/span&gt;-12-30T19:35:37-0500        &lt;span class="m"&gt;2014&lt;/span&gt;-12-30T19:35:37-0500
&lt;span class="m"&gt;2013&lt;/span&gt;-12-30T15:20:21-0500        CqAdrg1JryZY3kTrZ5      &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126      &lt;span class="m"&gt;46649&lt;/span&gt;   &lt;span class="m"&gt;5&lt;/span&gt;.135.187.167   &lt;span class="m"&gt;9001&lt;/span&gt;    TLSv10  TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA      www.3h2eyn3jwsjkggg3.com      &lt;span class="nv"&gt;CN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;www.mt5unawhy.net    &lt;span class="nv"&gt;CN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;www.nexscb2bdms.com  &lt;span class="m"&gt;2013&lt;/span&gt;-12-16T00:00:00-0500        &lt;span class="m"&gt;2014&lt;/span&gt;-01-10T23:59:59-0500
&lt;span class="m"&gt;2013&lt;/span&gt;-12-30T15:20:21-0500        CWYgR82bEI9IjcHp7a      &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126      &lt;span class="m"&gt;37960&lt;/span&gt;   &lt;span class="m"&gt;212&lt;/span&gt;.83.158.5    &lt;span class="m"&gt;443&lt;/span&gt;     TLSv10  TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA      www.w5wtl.comCN&lt;span class="o"&gt;=&lt;/span&gt;www.6suxdq3miwwewq4.net       &lt;span class="nv"&gt;CN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;www.2fwld67ac2.com   &lt;span class="m"&gt;2013&lt;/span&gt;-08-12T00:00:00-0400        &lt;span class="m"&gt;2014&lt;/span&gt;-04-16T23:59:59-0400
&lt;span class="m"&gt;2013&lt;/span&gt;-12-30T15:20:21-0500        CpGUEo3d5jBpzI6L04      &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126      &lt;span class="m"&gt;50935&lt;/span&gt;   &lt;span class="m"&gt;212&lt;/span&gt;.83.158.50   &lt;span class="m"&gt;443&lt;/span&gt;     TLSv10  TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA      www.lm6zdbm5w2jd5wxtmsfpkn.com        &lt;span class="nv"&gt;CN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;www.ouzbot23a6lw3vvmszx.net  &lt;span class="nv"&gt;CN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;www.s426lumoi7.com   &lt;span class="m"&gt;2013&lt;/span&gt;-10-18T00:00:00-0400        &lt;span class="m"&gt;2014&lt;/span&gt;-06-16T00:00:00-0400
&lt;span class="m"&gt;2013&lt;/span&gt;-12-30T15:20:21-0500        CYocU22O3RREM4dfnl      &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126      &lt;span class="m"&gt;49609&lt;/span&gt;   &lt;span class="m"&gt;88&lt;/span&gt;.159.20.120   &lt;span class="m"&gt;443&lt;/span&gt;     TLSv10  TLS_DHE_RSA_WITH_AES_256_CBC_SHA        www.exr2poqlv774jn4ddyvf5vvv.com      &lt;span class="nv"&gt;CN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;www.qzsg2ioaoplbs2gaha5.net  &lt;span class="nv"&gt;CN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;www.s5rc22gpzrwt4e.com       &lt;span class="m"&gt;2013&lt;/span&gt;-12-30T19:54:02-0500        &lt;span class="m"&gt;2014&lt;/span&gt;-12-30T19:54:02-0500
&lt;span class="m"&gt;2013&lt;/span&gt;-12-30T15:20:21-0500        CxG1gw2N7G5uvDpiD2      &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126      &lt;span class="m"&gt;57656&lt;/span&gt;   &lt;span class="m"&gt;95&lt;/span&gt;.211.225.167  &lt;span class="m"&gt;443&lt;/span&gt;     TLSv10  TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA      www.mwqdszwnojnepwmw4souyw.com        &lt;span class="nv"&gt;CN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;www.rnspic4yus5crf6w.net     &lt;span class="nv"&gt;CN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;www.75ba5lymxpbhw3a2kb.com   &lt;span class="m"&gt;2013&lt;/span&gt;-11-19T00:00:00-0500        &lt;span class="m"&gt;2014&lt;/span&gt;-02-05T23:59:59-0500
&lt;span class="m"&gt;2013&lt;/span&gt;-12-30T15:20:21-0500        CcVZHF3a5TkT9byG2e      &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126      &lt;span class="m"&gt;60680&lt;/span&gt;   &lt;span class="m"&gt;80&lt;/span&gt;.100.45.156   &lt;span class="m"&gt;443&lt;/span&gt;     TLSv10  TLS_DHE_RSA_WITH_AES_128_CBC_SHA        www.emqfcc55o7a4u4ecq3w63.com &lt;span class="nv"&gt;CN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;www.c7kriuquvh.net   &lt;span class="nv"&gt;CN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;www.npmxal2ohuefme26yf.com   &lt;span class="m"&gt;2013&lt;/span&gt;-12-18T00:00:00-0500        &lt;span class="m"&gt;2014&lt;/span&gt;-02-14T23:59:59-0500
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Pretty straight forward process to identify Tor usage on a network. This could be coupled with matching the destination addresses with the Tor server list available &lt;a href="https://www.dan.me.uk/torlist/"&gt;servers&lt;/a&gt; or &lt;a href="https://exonerator.torproject.org"&gt;here&lt;/a&gt; in order to provide further validation of Tor&amp;nbsp;traffic.&lt;/p&gt;</content><category term="analysis"></category><category term="bro"></category><category term="tor"></category></entry><entry><title>SiLK Network Traffic Analysis Visualization with R and Rayon</title><link href="https://www.rsreese.com/silk-network-traffic-analysis-visualization-with-r-and-rayon/" rel="alternate"></link><published>2015-11-07T12:00:00-05:00</published><updated>2015-11-07T12:00:00-05:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2015-11-07:/silk-network-traffic-analysis-visualization-with-r-and-rayon/</id><summary type="html">In this post, the process for retroactively identifying and graphing a HTTPS DDoS of service condition is described. Why do we care about graphing, because it can be a great way to describe data to folks that may not be interested in looking at it in a tabular form, e …</summary><content type="html">&lt;p&gt;In this post, the process for retroactively identifying and graphing a &lt;span class="caps"&gt;HTTPS&lt;/span&gt; DDoS of service condition is described. Why do we care about graphing, because it can be a great way to describe data to folks that may not be interested in looking at it in a tabular form, e.g. leadership. The specific example will use data collected from the server this blog is hosted on. If you are following along, this post assumes you have SiLK deployed in some manner and are collecting &lt;span class="caps"&gt;HTTP&lt;/span&gt; or similar traffic. Technically a DDoS condition did not occur (only two hosts were making a large number of requests) but blitz.io was used to exceed the network traffic this website typically experiences for sake of example. If a true DoS condition occurred, it would appear differently as the sensor is hosted on the same node therefore it would not record the surge in traffic. In order to record a true DoS, the sensor would ideally be placed upstream in the carrier or somewhere that exceeds the devices being monitored capacity. I would like to thank network defense analyst &lt;a href="https://www.linkedin.com/profile/view?id=ADEAAADy7VgB1LVykcDh0APWz0yz_ROaSvn-V4A"&gt;Geoffrey Sanders&lt;/a&gt; for providing R langauge as well as statistical recommendations in order to improve data analysis and graphical&amp;nbsp;representations.&lt;/p&gt;
&lt;p&gt;If we would like to retroactively search for anomaly in traffic volume, we can query a number of days and look for unusual&amp;nbsp;spikes:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;for DAY in {1..31}; do
    if [ &lt;span class="cp"&gt;${&lt;/span&gt;&lt;span class="n"&gt;DAY&lt;/span&gt;&lt;span class="cp"&gt;}&lt;/span&gt; -le 9 ]; then
        DAY=0&lt;span class="cp"&gt;${&lt;/span&gt;&lt;span class="n"&gt;DAY&lt;/span&gt;&lt;span class="cp"&gt;}&lt;/span&gt;
    fi

    RESULT=$(rwfilter --start-date=2015/07/&lt;span class="cp"&gt;${&lt;/span&gt;&lt;span class="n"&gt;DAY&lt;/span&gt;&lt;span class="cp"&gt;}&lt;/span&gt; --end-date=2015/07/&lt;span class="cp"&gt;${&lt;/span&gt;&lt;span class="n"&gt;DAY&lt;/span&gt;&lt;span class="cp"&gt;}&lt;/span&gt; --dport=443 --pass=stdout --type=all|rwuniq --fields=dport,proto -
-values=records --no-col --no-final-del --no-title --packets=20-)

    echo &amp;quot;2015/07/&lt;span class="cp"&gt;${&lt;/span&gt;&lt;span class="n"&gt;DAY&lt;/span&gt;&lt;span class="cp"&gt;}&lt;/span&gt;|&lt;span class="cp"&gt;${&lt;/span&gt;&lt;span class="n"&gt;RESULT&lt;/span&gt;&lt;span class="cp"&gt;}&lt;/span&gt;&amp;quot; &amp;gt;&amp;gt; http.out

done
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;On the 21st, we see a large number of requests that significantly exceed other&amp;nbsp;days:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;2015/07/01|443|6|1443|33287
2015/07/02|443|6|1271|30583
2015/07/03|443|6|1776|32622
2015/07/04|443|6|1498|28316
2015/07/05|443|6|1124|34428
2015/07/06|443|6|1672|36113
2015/07/07|443|6|1298|31087
2015/07/08|443|6|1629|40990
2015/07/09|443|6|42005|750922
2015/07/10|443|6|1656|54450
2015/07/11|443|6|1464|40205
2015/07/12|443|6|1279|22251
2015/07/13|443|6|1884|40887
2015/07/14|443|6|1724|49821
2015/07/15|443|6|1635|37133
2015/07/16|443|6|1653|33433
2015/07/17|443|6|1695|37580
2015/07/18|443|6|1301|24899
2015/07/19|443|6|1445|29230
2015/07/20|443|6|1314|40543
2015/07/21|443|6|70533|817855
2015/07/22|443|6|1909|42257
2015/07/23|443|6|1462|47961
2015/07/24|443|6|1705|37581
2015/07/25|443|6|1150|27093
2015/07/26|443|6|1208|21267
2015/07/27|443|6|1597|32414
2015/07/28|443|6|1714|45208
2015/07/29|443|6|1702|35607
2015/07/30|443|6|1710|46748
2015/07/31|443|6|1514|47915
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;We can use a similar query broken down by hour for the questionable&amp;nbsp;day:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;for HOUR in {0..23}; do if [ &lt;span class="cp"&gt;${&lt;/span&gt;&lt;span class="n"&gt;HOUR&lt;/span&gt;&lt;span class="cp"&gt;}&lt;/span&gt; -le 9 ]; then
        HOUR=0&lt;span class="cp"&gt;${&lt;/span&gt;&lt;span class="n"&gt;HOUR&lt;/span&gt;&lt;span class="cp"&gt;}&lt;/span&gt;
    fi

    RESULT=$(rwfilter --start-date=2015/07/21:&lt;span class="cp"&gt;${&lt;/span&gt;&lt;span class="n"&gt;HOUR&lt;/span&gt;&lt;span class="cp"&gt;}&lt;/span&gt; --end-date=2015/07/21:&lt;span class="cp"&gt;${&lt;/span&gt;&lt;span class="n"&gt;HOUR&lt;/span&gt;&lt;span class="cp"&gt;}&lt;/span&gt; --dport=443 --pass=stdout --type=all|rwuniq --fields=dport
,proto --values=records --no-col --no-final-del --no-title --packets=20-)

    echo &amp;quot;&lt;span class="cp"&gt;${&lt;/span&gt;&lt;span class="n"&gt;HOUR&lt;/span&gt;&lt;span class="cp"&gt;}&lt;/span&gt;|&lt;span class="cp"&gt;${&lt;/span&gt;&lt;span class="n"&gt;RESULT&lt;/span&gt;&lt;span class="cp"&gt;}&lt;/span&gt;&amp;quot; &amp;gt;&amp;gt; http-hour.out

done
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;The results from the hourly query clearly depict when the surge of &lt;span class="caps"&gt;HTTPS&lt;/span&gt; traffic volume occurred. From here, an analyst may run more specific queries to determine if it is indeed a distributed attack or sourced from only a few&amp;nbsp;nodes.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;00|443|6|72|1392
01|443|6|48|3203
02|443|6|151|2605
03|443|6|173|1612
04|443|6|125|2318
05|443|6|149|2622
06|443|6|72|1450
07|443|6|71|1294
08|443|6|73|1524
09|443|6|76|1881
10|443|6|67|1412
11|443|6|823|6720
12|443|6|60|1639
13|443|6|65|1511
14|443|6|72|2987
15|443|6|121|2061
16|443|6|69|2135
17|443|6|67562|722727
18|443|6|203|3222
19|443|6|112|4004
20|443|6|99|1526
21|443|6|122|44746
22|443|6|94|2129
23|443|6|54|1135
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;We can represent the tabular data from the daily and hourly queries using &lt;a href="http://www.r-project.org"&gt;R Project&lt;/a&gt; and ggplot2. For the daily plot example, add a header &lt;code&gt;day|dPort|protocol|Records|Packets&lt;/code&gt; to the dataset and run &lt;code&gt;Rscript filename.r dataset.dat&lt;/code&gt; replacing the command directives with the script below and your&amp;nbsp;dataset:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="kn"&gt;library&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;ggplot2&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="kn"&gt;library&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;reshape2&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="kp"&gt;options&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;scipen&amp;quot;&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;100&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;&amp;quot;digits&amp;quot;&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;4&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
fname &lt;span class="o"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="kp"&gt;commandArgs&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;trailingOnly &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;TRUE&lt;/span&gt;&lt;span class="p"&gt;)[&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
flowrecs &lt;span class="o"&gt;&amp;lt;-&lt;/span&gt; read.table&lt;span class="p"&gt;(&lt;/span&gt;fname&lt;span class="p"&gt;,&lt;/span&gt; header &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;TRUE&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; sep &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;&amp;quot;|&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
flowrecs&lt;span class="o"&gt;$&lt;/span&gt;day &lt;span class="o"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="kp"&gt;as.Date&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;flowrecs&lt;span class="o"&gt;$&lt;/span&gt;day&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;&amp;quot;%Y/%m/%d&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
test_data_long &lt;span class="o"&gt;&amp;lt;-&lt;/span&gt; melt&lt;span class="p"&gt;(&lt;/span&gt;flowrecs&lt;span class="p"&gt;,&lt;/span&gt; id.vars&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kt"&gt;c&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;day&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;&amp;quot;dPort&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;&amp;quot;protocol&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;

flow.plot &lt;span class="o"&gt;&amp;lt;-&lt;/span&gt; ggplot&lt;span class="p"&gt;(&lt;/span&gt;data&lt;span class="o"&gt;=&lt;/span&gt;test_data_long&lt;span class="p"&gt;,&lt;/span&gt;
    aes&lt;span class="p"&gt;(&lt;/span&gt;x&lt;span class="o"&gt;=&lt;/span&gt;day&lt;span class="p"&gt;,&lt;/span&gt; y&lt;span class="o"&gt;=&lt;/span&gt;value&lt;span class="p"&gt;,&lt;/span&gt; colour&lt;span class="o"&gt;=&lt;/span&gt;variable&lt;span class="p"&gt;))&lt;/span&gt; 
    geom_line&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; geom_point&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; xlab&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;Day&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; ylab&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;Flow Records with 20+ Packets&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; 
    ggtitle&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kp"&gt;paste&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;Flow Records by Destination Port&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;

png&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;plot.png&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; width&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;1200&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; height&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;400&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
plot&lt;span class="p"&gt;(&lt;/span&gt;flow.plot&lt;span class="p"&gt;)&lt;/span&gt;
dev.off&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Which should provide a graphical representation similar&amp;nbsp;to:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.rsreese.com/assets/daily-https-plot.png"&gt;&lt;img alt="daily-https-plot" src="https://www.rsreese.com/assets/daily-https-plot.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Similarly, we can do the same thing with the hourly plot by specifying the correct header of &lt;code&gt;hour|dPort|protocol|Records|Packets&lt;/code&gt; and rerunning &lt;code&gt;Rscript&lt;/code&gt; in the same manner as the daily&amp;nbsp;plot.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="kn"&gt;library&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;ggplot2&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="kn"&gt;library&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;reshape2&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="kp"&gt;options&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;scipen&amp;quot;&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;100&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;&amp;quot;digits&amp;quot;&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;4&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
fname &lt;span class="o"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="kp"&gt;commandArgs&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;trailingOnly &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;TRUE&lt;/span&gt;&lt;span class="p"&gt;)[&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
flowrecs &lt;span class="o"&gt;&amp;lt;-&lt;/span&gt; read.table&lt;span class="p"&gt;(&lt;/span&gt;fname&lt;span class="p"&gt;,&lt;/span&gt; header &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;TRUE&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; sep &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;&amp;quot;|&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
flowrecs&lt;span class="o"&gt;$&lt;/span&gt;hour &lt;span class="o"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="kp"&gt;factor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;flowrecs&lt;span class="o"&gt;$&lt;/span&gt;hour&lt;span class="p"&gt;,&lt;/span&gt; levels&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kp"&gt;unique&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;flowrecs&lt;span class="o"&gt;$&lt;/span&gt;hour&lt;span class="p"&gt;))&lt;/span&gt;
test_data_long &lt;span class="o"&gt;&amp;lt;-&lt;/span&gt; melt&lt;span class="p"&gt;(&lt;/span&gt;flowrecs&lt;span class="p"&gt;,&lt;/span&gt; id.var&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kt"&gt;c&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;hour&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;&amp;quot;dPort&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;&amp;quot;protocol&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;

flow.plot &lt;span class="o"&gt;&amp;lt;-&lt;/span&gt; ggplot&lt;span class="p"&gt;(&lt;/span&gt;data&lt;span class="o"&gt;=&lt;/span&gt;test_data_long&lt;span class="p"&gt;,&lt;/span&gt;
    aes&lt;span class="p"&gt;(&lt;/span&gt;x&lt;span class="o"&gt;=&lt;/span&gt;hour&lt;span class="p"&gt;,&lt;/span&gt; y&lt;span class="o"&gt;=&lt;/span&gt;value&lt;span class="p"&gt;,&lt;/span&gt; colour&lt;span class="o"&gt;=&lt;/span&gt;variable&lt;span class="p"&gt;,&lt;/span&gt; group&lt;span class="o"&gt;=&lt;/span&gt;variable&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; 
    geom_line&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; geom_point&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; xlab&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;Hour&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; ylab&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;Flow Records with 20+ Packets&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; 
    ggtitle&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kp"&gt;paste&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;Flow Records by Destination Port&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;

png&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;plot.png&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; width&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;1200&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; height&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;400&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
plot&lt;span class="p"&gt;(&lt;/span&gt;flow.plot&lt;span class="p"&gt;)&lt;/span&gt;
dev.off&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;This depicts the two large sets of requests we had in the single&amp;nbsp;day:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.rsreese.com/assets/hourly-https-plot.png"&gt;&lt;img alt="hourly-https-plot" src="https://www.rsreese.com/assets/hourly-https-plot.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;We can use &lt;code&gt;rwstats&lt;/code&gt; in order to take a look at our top talkers if we are aware of congestion or other signs that the uniformity of visitors has changed. This query is a little artificial though. It is very possible that the source attacks may come from hundreds or even thousands of bots or some reflection mechanism depending on the service. If that is the case, we may have to look at other tuples or the actual request in order to determine a similarity between the distributed attack&amp;nbsp;sources.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ rwfilter --start-date&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;2015&lt;/span&gt;/7/21 --end-date&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;2015&lt;/span&gt;/7/21 --dport&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;443&lt;/span&gt; --pass&lt;span class="o"&gt;=&lt;/span&gt;stdout --type&lt;span class="o"&gt;=&lt;/span&gt;all&lt;span class="p"&gt;|&lt;/span&gt;rwstats --fields&lt;span class="o"&gt;=&lt;/span&gt;sip --count&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;10&lt;/span&gt; --no-col --no-final-del
INPUT: &lt;span class="m"&gt;70533&lt;/span&gt; Records &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="m"&gt;551&lt;/span&gt; Bins and &lt;span class="m"&gt;70533&lt;/span&gt; Total Records
OUTPUT: Top &lt;span class="m"&gt;10&lt;/span&gt; Bins by Records
sIP&lt;span class="p"&gt;|&lt;/span&gt;Records&lt;span class="p"&gt;|&lt;/span&gt;%Records&lt;span class="p"&gt;|&lt;/span&gt;cumul_%
&lt;span class="m"&gt;54&lt;/span&gt;.173.173.209&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;33704&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;47&lt;/span&gt;.784725&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;47&lt;/span&gt;.784725
&lt;span class="m"&gt;54&lt;/span&gt;.86.98.210&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;33698&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;47&lt;/span&gt;.776218&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;95&lt;/span&gt;.560943
&lt;span class="m"&gt;162&lt;/span&gt;.243.196.54&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;742&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;.051990&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;96&lt;/span&gt;.612933
&lt;span class="m"&gt;180&lt;/span&gt;.76.15.142&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;97&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;.137524&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;96&lt;/span&gt;.750457
&lt;span class="m"&gt;68&lt;/span&gt;.180.230.230&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;75&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;.106333&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;96&lt;/span&gt;.856790
&lt;span class="m"&gt;180&lt;/span&gt;.76.15.140&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;37&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;.052458&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;96&lt;/span&gt;.909248
&lt;span class="m"&gt;72&lt;/span&gt;.80.60.139&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;31&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;.043951&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;96&lt;/span&gt;.953199
&lt;span class="m"&gt;66&lt;/span&gt;.249.67.118&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;31&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;.043951&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;96&lt;/span&gt;.997150
&lt;span class="m"&gt;180&lt;/span&gt;.76.15.136&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;24&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;.034027&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;97&lt;/span&gt;.031177
&lt;span class="m"&gt;63&lt;/span&gt;.254.26.10&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;23&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;.032609&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;97&lt;/span&gt;.063786
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;We can append &lt;code&gt;rwresolve&lt;/code&gt; in order resolve a specific &lt;span class="caps"&gt;IP&lt;/span&gt; field. We see two Amazon hosts whom are likely the Blitz.io bots as they comprise 96% of the traffic for the defined time&amp;nbsp;threshold:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ rwfilter --start-date&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;2015&lt;/span&gt;/7/21 --end-date&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;2015&lt;/span&gt;/7/21 --dport&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;443&lt;/span&gt; --pass&lt;span class="o"&gt;=&lt;/span&gt;stdout --type&lt;span class="o"&gt;=&lt;/span&gt;all&lt;span class="p"&gt;|&lt;/span&gt;rwstats --fields&lt;span class="o"&gt;=&lt;/span&gt;sip --count&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;10&lt;/span&gt; --no-col --no-final-del&lt;span class="p"&gt;|&lt;/span&gt;rwresolve --ip-fields&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;
INPUT: &lt;span class="m"&gt;70533&lt;/span&gt; Records &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="m"&gt;551&lt;/span&gt; Bins and &lt;span class="m"&gt;70533&lt;/span&gt; Total Records
OUTPUT: Top &lt;span class="m"&gt;10&lt;/span&gt; Bins by Records
sIP&lt;span class="p"&gt;|&lt;/span&gt;Records&lt;span class="p"&gt;|&lt;/span&gt;%Records&lt;span class="p"&gt;|&lt;/span&gt;cumul_%
ec2-54-173-173-209.compute-1.amazonaws.com&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;33704&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;47&lt;/span&gt;.784725&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;47&lt;/span&gt;.784725
ec2-54-86-98-210.compute-1.amazonaws.com&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;33698&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;47&lt;/span&gt;.776218&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;95&lt;/span&gt;.560943
&lt;span class="m"&gt;162&lt;/span&gt;.243.196.54&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;742&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;.051990&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;96&lt;/span&gt;.612933
baiduspider-180-76-15-142.crawl.baidu.com&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;97&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;.137524&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;96&lt;/span&gt;.750457
b115504.yse.yahoo.net&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;75&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;.106333&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;96&lt;/span&gt;.856790
baiduspider-180-76-15-140.crawl.baidu.com&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;37&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;.052458&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;96&lt;/span&gt;.909248
pool-72-80-60-139.nycmny.fios.verizon.net&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;31&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;.043951&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;96&lt;/span&gt;.953199
crawl-66-249-67-118.googlebot.com&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;31&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;.043951&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;96&lt;/span&gt;.997150
baiduspider-180-76-15-136.crawl.baidu.com&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;24&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;.034027&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;97&lt;/span&gt;.031177
mail.oswaldcompanies.com&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;23&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;.032609&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;97&lt;/span&gt;.063786
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Both of the graphs above describe the anomalous traffic but our normal traffic is no longer clear. One way we can provide a more clarification is to use statistics in order to more effectively describe the data because of the significant outliers. In order to achieve this, we will first use a &lt;code&gt;log&lt;/code&gt; function in order to describe the data volumes. We use the same scripts as earlier, but change &lt;code&gt;y=value&lt;/code&gt; to &lt;code&gt;y=log(value)&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.rsreese.com/assets/daily-https-logplot.png"&gt;&lt;img alt="daily-https-logplot" src="https://www.rsreese.com/assets/daily-https-logplot.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.rsreese.com/assets/hourly-https-logplot.png"&gt;&lt;img alt="hourly-https-logplot" src="https://www.rsreese.com/assets/hourly-https-logplot.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;While using a &lt;code&gt;log&lt;/code&gt; function provided an improvement, it may not provide an accurate representation of volume data types. Next, we will take a look at percentiles with R. Our data frame is composed of three days. The middle being the 21st which contains our fictitious DoS&amp;nbsp;attack.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&amp;gt; mydata
      [,1]   [,2] [,3]
 [1,] 1252   1392 1551
 [2,] 1347   3203 1969
 [3,]  749   2605 1642
 [4,] 2232   1612 1432
 [5,]  707   2318 1531
 [6,]  552   2622 1175
 [7,] 1072   1450 1981
 [8,]  487   1294 1606
 [9,] 1448   1524  959
[10,]  867   1881 1763
[11,]  903   1412 1283
[12,]  911   6720 3055
[13,] 1125   1639 3609
[14,] 1511   1511 1977
[15,] 1792   2987 2476
[16,]  912   2061 1722
[17,] 1114   2135  655
[18,]  424 722727 1338
[19,] 3888   3222 4038
[20,] 3646   4004 1765
[21,] 9281   1526 1650
[22,] 1590  44746 1190
[23,] 1131   2129 1190
[24,] 1602   1135  700
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Here is how we get to our graph in the R&amp;nbsp;console:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;mydata &lt;span class="o"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="kt"&gt;matrix&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;ncol&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;24&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; nrow&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;3&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
mydata &lt;span class="o"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="kt"&gt;matrix&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;df&lt;span class="o"&gt;$&lt;/span&gt;Packets&lt;span class="p"&gt;,&lt;/span&gt; ncol&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; nrow&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;24&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
dataout &lt;span class="o"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="kp"&gt;apply&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;mydata&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; quantile&lt;span class="p"&gt;,&lt;/span&gt; probs&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kt"&gt;c&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;0.05&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0.5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0.90&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
ylim&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kp"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;500&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;5000&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
plot&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kp"&gt;seq&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kp"&gt;ncol&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;dataout&lt;span class="p"&gt;)),&lt;/span&gt; dataout&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,],&lt;/span&gt; t&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;l&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; lty&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; ylim&lt;span class="o"&gt;=&lt;/span&gt;ylim&lt;span class="p"&gt;,&lt;/span&gt; main&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;Flow Percentiles&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; xlab&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;Hour&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
ylab&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;Packets&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;#5%&lt;/span&gt;
lines&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kp"&gt;seq&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kp"&gt;ncol&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;dataout&lt;span class="p"&gt;)),&lt;/span&gt; dataout&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,],&lt;/span&gt; lty&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; lwd&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;#50%&lt;/span&gt;
lines&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kp"&gt;seq&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kp"&gt;ncol&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;dataout&lt;span class="p"&gt;)),&lt;/span&gt; dataout&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="m"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,],&lt;/span&gt; lty&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; col&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="c1"&gt;#90%&lt;/span&gt;
legend&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;topleft&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; legend&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kp"&gt;rev&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kp"&gt;rownames&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;dataout&lt;span class="p"&gt;)),&lt;/span&gt; lwd&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kt"&gt;c&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; col&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kt"&gt;c&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; lty&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kt"&gt;c&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;&lt;a href="https://www.rsreese.com/assets/hourly-https-quantileplot.png"&gt;&lt;img alt="hourly-https-quantileplot" src="https://www.rsreese.com/assets/hourly-https-quantileplot.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The 90th percentile really stands out here but having to use &lt;code&gt;y&lt;/code&gt; limit to see our lower percentiles prevents us from seeing the whole picture. Let us graph both again but splitting our lower and upper&amp;nbsp;bounds.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;mydata &lt;span class="o"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="kt"&gt;matrix&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;ncol&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;24&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; nrow&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;3&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
mydata &lt;span class="o"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="kt"&gt;matrix&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;df&lt;span class="o"&gt;$&lt;/span&gt;Packets&lt;span class="p"&gt;,&lt;/span&gt; ncol&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; nrow&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;24&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
dataout &lt;span class="o"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="kp"&gt;apply&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;mydata&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; quantile&lt;span class="p"&gt;,&lt;/span&gt; probs&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kt"&gt;c&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;0.01&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0.05&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0.5&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
ylim&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kp"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;100&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;4200&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
plot&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kp"&gt;seq&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kp"&gt;ncol&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;dataout&lt;span class="p"&gt;)),&lt;/span&gt; dataout&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,],&lt;/span&gt; t&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;l&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; lty&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; ylim&lt;span class="o"&gt;=&lt;/span&gt;ylim&lt;span class="p"&gt;,&lt;/span&gt; main&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;Flow Percentiles&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; xlab&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;Hour&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; ylab&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;Packets&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;#1%&lt;/span&gt;
lines&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kp"&gt;seq&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kp"&gt;ncol&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;dataout&lt;span class="p"&gt;)),&lt;/span&gt; dataout&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,],&lt;/span&gt; lty&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; lwd&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;#5%&lt;/span&gt;
lines&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kp"&gt;seq&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kp"&gt;ncol&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;dataout&lt;span class="p"&gt;)),&lt;/span&gt; dataout&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="m"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,],&lt;/span&gt; lty&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; col&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="c1"&gt;#50%&lt;/span&gt;
legend&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;topleft&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; legend&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kp"&gt;rev&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kp"&gt;rownames&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;dataout&lt;span class="p"&gt;)),&lt;/span&gt; lwd&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kt"&gt;c&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; col&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kt"&gt;c&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; lty&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kt"&gt;c&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;&lt;a href="https://www.rsreese.com/assets/hourly-https-lowerplot.png"&gt;&lt;img alt="hourly-https-lowerplot" src="https://www.rsreese.com/assets/hourly-https-lowerplot.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;mydata &lt;span class="o"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="kt"&gt;matrix&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;ncol&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;24&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; nrow&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;3&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
mydata &lt;span class="o"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="kt"&gt;matrix&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;df&lt;span class="o"&gt;$&lt;/span&gt;Packets&lt;span class="p"&gt;,&lt;/span&gt; ncol&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; nrow&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;24&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
dataout &lt;span class="o"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="kp"&gt;apply&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;mydata&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; quantile&lt;span class="p"&gt;,&lt;/span&gt; probs&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kt"&gt;c&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;0.90&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0.95&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
ylim&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kp"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;dataout&lt;span class="p"&gt;)&lt;/span&gt;
plot&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kp"&gt;seq&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kp"&gt;ncol&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;dataout&lt;span class="p"&gt;)),&lt;/span&gt; dataout&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,],&lt;/span&gt; t&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;l&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; lty&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; ylim&lt;span class="o"&gt;=&lt;/span&gt;ylim&lt;span class="p"&gt;,&lt;/span&gt; main&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;Flow Percentiles&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; xlab&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;Hour&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; ylab&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;Packets&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;#90%&lt;/span&gt;
lines&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kp"&gt;seq&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kp"&gt;ncol&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;dataout&lt;span class="p"&gt;)),&lt;/span&gt; dataout&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,],&lt;/span&gt; lty&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; lwd&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;#95%&lt;/span&gt;
legend&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;topleft&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; legend&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kp"&gt;rev&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kp"&gt;rownames&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;dataout&lt;span class="p"&gt;)),&lt;/span&gt; lwd&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kt"&gt;c&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; col&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kt"&gt;c&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; lty&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kt"&gt;c&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;&lt;a href="https://www.rsreese.com/assets/hourly-https-upperplot.png"&gt;&lt;img alt="hourly-https-upperplot" src="https://www.rsreese.com/assets/hourly-https-upperplot.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This is a better analytical view. We can infer that if we see traffic at the 90 percentile, likely something is off. For the heck of it, let us see how the percentiles compare to the mean and median, the former not being necessary as we already included it in the percentile two examples above but&amp;nbsp;nevertheless.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;ylim&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kp"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;500&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;5000&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
mydata &lt;span class="o"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="kt"&gt;matrix&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;ncol&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;24&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; nrow&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;3&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
mydata &lt;span class="o"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="kt"&gt;matrix&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;df&lt;span class="o"&gt;$&lt;/span&gt;Packets&lt;span class="p"&gt;,&lt;/span&gt; ncol&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; nrow&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;24&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
meandata &lt;span class="o"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="kp"&gt;apply&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;mydata&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kp"&gt;mean&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
mediandata &lt;span class="o"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="kp"&gt;apply&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;mydata&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; median&lt;span class="p"&gt;)&lt;/span&gt;
plot&lt;span class="p"&gt;(&lt;/span&gt;meandata&lt;span class="p"&gt;,&lt;/span&gt; t&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;l&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; lty&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; ylim&lt;span class="o"&gt;=&lt;/span&gt;ylim&lt;span class="p"&gt;,&lt;/span&gt; main&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;Flows&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; xlab&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;Hour&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; ylab&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;Packets&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
lines&lt;span class="p"&gt;(&lt;/span&gt;mediandata&lt;span class="p"&gt;,&lt;/span&gt; lty&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; lwd&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
legend&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;topleft&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; legend&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kt"&gt;c&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;Mean&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;&amp;quot;Median&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; lwd&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kt"&gt;c&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; col&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kt"&gt;c&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; lty&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kt"&gt;c&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;The tabular data outliers are obvious but we will graph it. Based on this, we could leverage around 5 to 10 percentile for normal traffic but much larger sampling would need to take place as we only used three&amp;nbsp;days.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&amp;gt; meandata
 [1]   1398.333   2173.000   1665.333   1758.667   1518.667   1449.667
 [7]   1501.000   1129.000   1310.333   1503.667   1199.333   3562.000
[13]   2124.333   1666.333   2418.333   1565.000   1301.333 241496.333
[19]   3716.000   3138.333   4152.333  15842.000   1483.333   1145.667
&amp;gt; mediandata
 [1] 1392 1969 1642 1612 1531 1175 1450 1294 1448 1763 1283 3055 1639 1511 2476
[16] 1722 1114 1338 3888 3646 1650 1590 1190 1135
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;&lt;a href="https://www.rsreese.com/assets/hourly-https-meanplot.png"&gt;&lt;img alt="hourly-https-meanplot" src="https://www.rsreese.com/assets/hourly-https-meanplot.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Last but not least, we are going to take a look at a tool the &lt;a href="https://tools.netsa.cert.org/index.html"&gt;NetSA&lt;/a&gt; team has developed for graphically representing data named &lt;a href="https://tools.netsa.cert.org/rayon/index.html"&gt;Rayon&lt;/a&gt;. I will provide a quick reference, but you can find more details &lt;a href="https://resources.sei.cmu.edu/asset_files/Poster/2014_020_001_300465.pdf"&gt;here&lt;/a&gt; and &lt;a href="https://tools.netsa.cert.org/rayon/doc/man-rytimeseries.html"&gt;here&lt;/a&gt;. As with R language, the outliers distort the graph so we use &lt;code&gt;log&lt;/code&gt; functions for the second and third graphs in order to minimize the outlier effects. First, grab the data we are interested&amp;nbsp;in:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ rwfilter --start-date&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;2015&lt;/span&gt;/7/21 --end-date&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;2015&lt;/span&gt;/7/21 --dport&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;443&lt;/span&gt; --proto&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;6&lt;/span&gt; --type&lt;span class="o"&gt;=&lt;/span&gt;inweb --pass&lt;span class="o"&gt;=&lt;/span&gt;httpsin.bin
$ rwfilter --start-date&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;2015&lt;/span&gt;/7/21 --end-date&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;2015&lt;/span&gt;/7/21 --dport&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;443&lt;/span&gt; --proto&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;6&lt;/span&gt; --type&lt;span class="o"&gt;=&lt;/span&gt;outweb --pass&lt;span class="o"&gt;=&lt;/span&gt;httpsout.bin
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Next, export the values we need, we provide a snippet of our&amp;nbsp;data:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ rwcount --bin-size&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;300&lt;/span&gt; --no-titles --delimited httpsin.bin&lt;span class="p"&gt;|&lt;/span&gt;awk -F&lt;span class="se"&gt;\|&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;{printf(&amp;quot;%s|%s|in\n&amp;quot;, $1, $3)}&amp;#39;&lt;/span&gt; &amp;gt; &lt;span class="m"&gt;2&lt;/span&gt;-top.txt
--snip--
&lt;span class="m"&gt;2015&lt;/span&gt;/07/21T00:00:00&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;5003&lt;/span&gt;.00&lt;span class="p"&gt;|&lt;/span&gt;in
&lt;span class="m"&gt;2015&lt;/span&gt;/07/21T00:05:00&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;16677&lt;/span&gt;.47&lt;span class="p"&gt;|&lt;/span&gt;in
&lt;span class="m"&gt;2015&lt;/span&gt;/07/21T00:10:00&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;4814&lt;/span&gt;.53&lt;span class="p"&gt;|&lt;/span&gt;in
&lt;span class="m"&gt;2015&lt;/span&gt;/07/21T00:15:00&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;4951&lt;/span&gt;.00&lt;span class="p"&gt;|&lt;/span&gt;in
&lt;span class="m"&gt;2015&lt;/span&gt;/07/21T00:20:00&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;1440&lt;/span&gt;.00&lt;span class="p"&gt;|&lt;/span&gt;in
&lt;span class="m"&gt;2015&lt;/span&gt;/07/21T00:25:00&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;10055&lt;/span&gt;.00&lt;span class="p"&gt;|&lt;/span&gt;in
&lt;span class="m"&gt;2015&lt;/span&gt;/07/21T00:30:00&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;5410&lt;/span&gt;.06&lt;span class="p"&gt;|&lt;/span&gt;in
&lt;span class="m"&gt;2015&lt;/span&gt;/07/21T00:35:00&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;1356&lt;/span&gt;.94&lt;span class="p"&gt;|&lt;/span&gt;in
&lt;span class="m"&gt;2015&lt;/span&gt;/07/21T00:40:00&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;4346&lt;/span&gt;.32&lt;span class="p"&gt;|&lt;/span&gt;in
&lt;span class="m"&gt;2015&lt;/span&gt;/07/21T00:45:00&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;10125&lt;/span&gt;.04&lt;span class="p"&gt;|&lt;/span&gt;in
&lt;span class="m"&gt;2015&lt;/span&gt;/07/21T00:50:00&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;7178&lt;/span&gt;.64&lt;span class="p"&gt;|&lt;/span&gt;in
&lt;span class="m"&gt;2015&lt;/span&gt;/07/21T00:55:00&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;16766&lt;/span&gt;.00&lt;span class="p"&gt;|&lt;/span&gt;in
--snip--

$ rwcount --bin-size&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;300&lt;/span&gt; --no-titles --delimited httpsout.bin&lt;span class="p"&gt;|&lt;/span&gt;awk -F&lt;span class="se"&gt;\|&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;{printf(&amp;quot;%s|%s|out\n&amp;quot;, $1, $3)}&amp;#39;&lt;/span&gt; &amp;gt; &lt;span class="m"&gt;2&lt;/span&gt;-btm.txt
--snip--
&lt;span class="m"&gt;2015&lt;/span&gt;/07/21T00:00:00&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;60615&lt;/span&gt;.00&lt;span class="p"&gt;|&lt;/span&gt;out
&lt;span class="m"&gt;2015&lt;/span&gt;/07/21T00:05:00&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;317387&lt;/span&gt;.87&lt;span class="p"&gt;|&lt;/span&gt;out
&lt;span class="m"&gt;2015&lt;/span&gt;/07/21T00:10:00&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;214138&lt;/span&gt;.13&lt;span class="p"&gt;|&lt;/span&gt;out
&lt;span class="m"&gt;2015&lt;/span&gt;/07/21T00:15:00&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;60527&lt;/span&gt;.00&lt;span class="p"&gt;|&lt;/span&gt;out
&lt;span class="m"&gt;2015&lt;/span&gt;/07/21T00:20:00&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;3500&lt;/span&gt;.00&lt;span class="p"&gt;|&lt;/span&gt;out
&lt;span class="m"&gt;2015&lt;/span&gt;/07/21T00:25:00&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;76385&lt;/span&gt;.00&lt;span class="p"&gt;|&lt;/span&gt;out
&lt;span class="m"&gt;2015&lt;/span&gt;/07/21T00:30:00&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;77113&lt;/span&gt;.44&lt;span class="p"&gt;|&lt;/span&gt;out
&lt;span class="m"&gt;2015&lt;/span&gt;/07/21T00:35:00&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;32326&lt;/span&gt;.56&lt;span class="p"&gt;|&lt;/span&gt;out
&lt;span class="m"&gt;2015&lt;/span&gt;/07/21T00:40:00&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;39375&lt;/span&gt;.58&lt;span class="p"&gt;|&lt;/span&gt;out
&lt;span class="m"&gt;2015&lt;/span&gt;/07/21T00:45:00&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;96888&lt;/span&gt;.67&lt;span class="p"&gt;|&lt;/span&gt;out
&lt;span class="m"&gt;2015&lt;/span&gt;/07/21T00:50:00&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;30598&lt;/span&gt;.75&lt;span class="p"&gt;|&lt;/span&gt;out
&lt;span class="m"&gt;2015&lt;/span&gt;/07/21T00:55:00&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;313460&lt;/span&gt;.00&lt;span class="p"&gt;|&lt;/span&gt;out
--snip--
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;We graph the values with &lt;code&gt;rwtimeseries&lt;/code&gt;. As expected, the incoming traffic is less than the outgoing &lt;span class="caps"&gt;HTTPS&lt;/span&gt; response. We adjusted the scale of the second and third graph using &lt;code&gt;log&lt;/code&gt;, and the last Rayon graph describes data between the 95 and 100&amp;nbsp;percentiles.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ cat &lt;span class="m"&gt;2&lt;/span&gt;-top.txt &lt;span class="m"&gt;2&lt;/span&gt;-btm.txt &lt;span class="p"&gt;|&lt;/span&gt; rytimeseries --style&lt;span class="o"&gt;=&lt;/span&gt;filled_lines --output-path&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt;.png --top-filter&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;[2]==in&amp;quot;&lt;/span&gt; --bottom-filter&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;[2]==out&amp;quot;&lt;/span&gt; --top-column&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt; --bottom-column&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt; --annotate-max --value-tick-label-format&lt;span class="o"&gt;=&lt;/span&gt;metric --value-units&lt;span class="o"&gt;=&lt;/span&gt;B --title&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Traffic to/from Web Servers&amp;quot;&lt;/span&gt; --value-scale&lt;span class="o"&gt;=&lt;/span&gt;linear
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;&lt;a href="https://www.rsreese.com/assets/linear-rayon-graph.png"&gt;&lt;img alt="linear-rayon-graph" src="https://www.rsreese.com/assets/linear-rayon-graph.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ cat &lt;span class="m"&gt;2&lt;/span&gt;-top.txt &lt;span class="m"&gt;2&lt;/span&gt;-btm.txt &lt;span class="p"&gt;|&lt;/span&gt; rytimeseries --style&lt;span class="o"&gt;=&lt;/span&gt;filled_lines --output-path&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt;.png --top-filter&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;[2]==in&amp;quot;&lt;/span&gt; --bottom-filter&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;[2]==out&amp;quot;&lt;/span&gt; --top-column&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt; --bottom-column&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt; --annotate-max --value-tick-label-format&lt;span class="o"&gt;=&lt;/span&gt;metric --value-units&lt;span class="o"&gt;=&lt;/span&gt;B --title&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Traffic to/from Web Servers&amp;quot;&lt;/span&gt; --value-scale&lt;span class="o"&gt;=&lt;/span&gt;log --&lt;span class="sb"&gt;`&lt;/span&gt;fix-scale-min&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;&lt;a href="https://www.rsreese.com/assets/log-rayon-graph.png"&gt;&lt;img alt="log-rayon-graph" src="https://www.rsreese.com/assets/log-rayon-graph.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ cat &lt;span class="m"&gt;2&lt;/span&gt;-top.txt &lt;span class="m"&gt;2&lt;/span&gt;-btm.txt &lt;span class="p"&gt;|&lt;/span&gt; rytimeseries --style&lt;span class="o"&gt;=&lt;/span&gt;filled_lines --output-path&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt;.png --top-filter&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;[2]==in&amp;quot;&lt;/span&gt; --bottom-filter&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;[2]==out&amp;quot;&lt;/span&gt; --top-column&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt; --bottom-column&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt; --annotate-max --value-tick-label-format&lt;span class="o"&gt;=&lt;/span&gt;metric --value-units&lt;span class="o"&gt;=&lt;/span&gt;B --title&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Traffic to/from Web Servers&amp;quot;&lt;/span&gt; --value-scale&lt;span class="o"&gt;=&lt;/span&gt;clog
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;&lt;a href="https://www.rsreese.com/assets/clog-rayon-graph.png"&gt;&lt;img alt="clog-rayon-graph" src="https://www.rsreese.com/assets/clog-rayon-graph.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ cat &lt;span class="m"&gt;2&lt;/span&gt;-top.txt &lt;span class="m"&gt;2&lt;/span&gt;-btm.txt &lt;span class="p"&gt;|&lt;/span&gt; rytimeseries --style&lt;span class="o"&gt;=&lt;/span&gt;filled_lines --output-path&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt;.png --top-filter&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;[2]==in&amp;quot;&lt;/span&gt; --bottom-filter&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;[2]==out&amp;quot;&lt;/span&gt; --top-column&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt; --bottom-column&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt; --annotate-max --value-tick-label-format&lt;span class="o"&gt;=&lt;/span&gt;metric --value-units&lt;span class="o"&gt;=&lt;/span&gt;B --title&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Traffic to/from Web Servers&amp;quot;&lt;/span&gt; --value-scale&lt;span class="o"&gt;=&lt;/span&gt;linear --value-min-pct&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;90&lt;/span&gt; --value-max-pct&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;95&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;&lt;a href="https://www.rsreese.com/assets/percentile-rayon-graph.png"&gt;&lt;img alt="percentile-rayon-graph" src="https://www.rsreese.com/assets/percentile-rayon-graph.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;There you go. A quick and dirty way to identify traffic surges to whatever services you have sitting behind your collector. Please leave any questions you have regarding this post&amp;nbsp;below.&lt;/p&gt;</content><category term="silk"></category><category term="graph"></category><category term="R"></category></entry><entry><title>Online Information Security Analysis Tools and Resources</title><link href="https://www.rsreese.com/online-information-security-analysis-tools-and-resources/" rel="alternate"></link><published>2015-10-18T12:00:00-04:00</published><updated>2015-10-18T12:00:00-04:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2015-10-18:/online-information-security-analysis-tools-and-resources/</id><summary type="html">A list of sites that analysts may find useful in their day-to-day analysis of indicators and threats. While verifying and searching for new sources, I came across Links and resources for malware samples, Malware Analysis and Incident Response Tools for the Frugal and Lazy, and Free Online Tools for Looking …</summary><content type="html">&lt;p&gt;A list of sites that analysts may find useful in their day-to-day analysis of indicators and threats. While verifying and searching for new sources, I came across &lt;a href="http://contagiodump.blogspot.com/2010/11/links-and-resources-for-malware-samples.html"&gt;Links and resources for malware samples&lt;/a&gt;, &lt;a href="http://postmodernsecurity.com/2015/09/11/malware-analysis-and-incident-response-tools-for-the-frugal-and-lazy/"&gt;Malware Analysis and Incident Response Tools for the Frugal and Lazy&lt;/a&gt;, and &lt;a href="https://zeltser.com/lookup-malicious-websites/"&gt;Free Online Tools for Looking Up Potentially Malicious Websites&lt;/a&gt; which may also be helpful. Please let me know if you feel something is missing or broken by leaving a comment or &lt;a href="https://www.rsreese.com/contact/"&gt;contacting me&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span class="caps"&gt;IP&lt;/span&gt;/&lt;span class="caps"&gt;ISP&lt;/span&gt;/Domain, and &lt;span class="caps"&gt;WHOIS&lt;/span&gt;&amp;nbsp;look-ups&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.robtex.com"&gt;https://www.robtex.com&lt;/a&gt; - &lt;span class="caps"&gt;IP&lt;/span&gt;/&lt;span class="caps"&gt;DNS&lt;/span&gt;/&lt;span class="caps"&gt;WHOIS&lt;/span&gt;&amp;nbsp;look-ups&lt;/li&gt;
&lt;li&gt;&lt;a href="http://centralops.net/co/"&gt;http://centralops.net/co/&lt;/a&gt; - &lt;span class="caps"&gt;IP&lt;/span&gt;/&lt;span class="caps"&gt;DNS&lt;/span&gt;/&lt;span class="caps"&gt;WHOIS&lt;/span&gt;&amp;nbsp;look-ups&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.yougetsignal.com/tools/web-sites-on-web-server/"&gt;http://www.yougetsignal.com/tools/web-sites-on-web-server/&lt;/a&gt; - Reverse&amp;nbsp;lookup&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.dshield.org/ipinfo.html?ip=8.8.8.8"&gt;http://www.dshield.org/ipinfo.html?ip=8.8.8.8&lt;/a&gt; - Internet Storm Center&amp;nbsp;DShield&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.ipchecking.com"&gt;http://www.ipchecking.com&lt;/a&gt; - &lt;span class="caps"&gt;IP&lt;/span&gt;/&lt;span class="caps"&gt;DNS&lt;/span&gt;/&lt;span class="caps"&gt;WHO&lt;/span&gt;-&lt;span class="caps"&gt;IS&lt;/span&gt; &lt;span class="caps"&gt;GEOGRAPHIC&lt;/span&gt; &lt;span class="caps"&gt;IP&lt;/span&gt;&amp;nbsp;look-up&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.isup.me"&gt;http://www.isup.me&lt;/a&gt; - Check to see if site is&amp;nbsp;up&lt;/li&gt;
&lt;li&gt;&lt;a href="https://isc.sans.edu/port.html?port=8080"&gt;https://isc.sans.edu/port.html?port=8080&lt;/a&gt; - Port details and usage&amp;nbsp;statistics&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.traceroute.org/#USA"&gt;http://www.traceroute.org/#&lt;span class="caps"&gt;USA&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.net.princeton.edu/tools"&gt;https://www.net.princeton.edu/tools&lt;/a&gt; -&amp;nbsp;Traceroute&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.projecthoneypot.org/list_of_ips.php"&gt;http://www.projecthoneypot.org/list_of_ips.php&lt;/a&gt; - IPs obtained from&amp;nbsp;honeypots&lt;/li&gt;
&lt;li&gt;&lt;a href="http://whois.arin.net"&gt;http://whois.arin.net&lt;/a&gt; - &lt;span class="caps"&gt;IP&lt;/span&gt; Whois&amp;nbsp;lookup &lt;/li&gt;
&lt;li&gt;&lt;a href="http://whois.domaintools.com"&gt;http://whois.domaintools.com&lt;/a&gt; - Reverse Whois and Whois&amp;nbsp;History&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.webconfs.com/domain-age.php"&gt;http://www.webconfs.com/domain-age.php&lt;/a&gt; - Domain&amp;nbsp;age&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.dnsstuff.com/"&gt;http://www.dnsstuff.com&lt;/a&gt; - &lt;span class="caps"&gt;IP&lt;/span&gt;/&lt;span class="caps"&gt;DNS&lt;/span&gt;/&lt;span class="caps"&gt;WHO&lt;/span&gt;-&lt;span class="caps"&gt;IS&lt;/span&gt;&amp;nbsp;look-ups&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.dnscolos.com/free-dns-report.html"&gt;http://www.dnscolos.com/free-dns-report.html&lt;/a&gt; - &lt;span class="caps"&gt;DNS&lt;/span&gt;&amp;nbsp;Report&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dnshistory.org"&gt;https://dnshistory.org&lt;/a&gt; - The history of &lt;span class="caps"&gt;IP&lt;/span&gt;/&lt;span class="caps"&gt;DNS&lt;/span&gt; Records for&amp;nbsp;domains&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.dnsdigger.com"&gt;http://www.dnsdigger.com&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.bfk.de/bfk_dnslogger_en.html"&gt;http://www.bfk.de/bfk_dnslogger_en.html&lt;/a&gt; - Passive &lt;span class="caps"&gt;DNS&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.dnsdb.info"&gt;https://www.dnsdb.info&lt;/a&gt; - &lt;span class="caps"&gt;IP&lt;/span&gt;/&lt;span class="caps"&gt;DNS&lt;/span&gt;/Passive&amp;nbsp;look-ups&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;&lt;span class="caps"&gt;IP&lt;/span&gt; and Domain analysis for malware or web-based&amp;nbsp;threats&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.mcafee.com/us/threat-center.aspx"&gt;http://www.mcafee.com/us/threat-center.aspx&lt;/a&gt; - &lt;span class="caps"&gt;IP&lt;/span&gt; and Domain threat&amp;nbsp;intel&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.siteadvisor.com/sites/rsreese.com"&gt;http://www.siteadvisor.com/sites/rsreese.com&lt;/a&gt; - McAfee Site&amp;nbsp;Advisor&lt;/li&gt;
&lt;li&gt;&lt;a href="https://safeweb.norton.com"&gt;https://safeweb.norton.com&lt;/a&gt; - Norton Safe&amp;nbsp;Web&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.virustotal.com/#url"&gt;https://www.virustotal.com/#url&lt;/a&gt; - Analyzes suspicious files and URLs/detects&amp;nbsp;malware&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.projecthoneypot.org/search_ip.php"&gt;http://www.projecthoneypot.org/search_ip.php&lt;/a&gt; - Inspect an &lt;span class="caps"&gt;IP&lt;/span&gt; by Project Honey&amp;nbsp;Pot&lt;/li&gt;
&lt;li&gt;&lt;a href="http://urlquery.net"&gt;http://urlquery.net&lt;/a&gt; - Detailed information about actions a browser takes while visiting a&amp;nbsp;site&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.dtrackr.com"&gt;http://www.dtrackr.com&lt;/a&gt; - Domain activity&amp;nbsp;tracking&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.ipvoid.com"&gt;http://www.ipvoid.com&lt;/a&gt; - Scans an &lt;span class="caps"&gt;IP&lt;/span&gt; address against &lt;span class="caps"&gt;IP&lt;/span&gt;&amp;nbsp;blacklists&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.urlvoid.com"&gt;http://www.urlvoid.com&lt;/a&gt; - Scans a domain address for its&amp;nbsp;reputation&lt;/li&gt;
&lt;li&gt;&lt;a href="http://minotauranalysis.com"&gt;http://minotauranalysis.com&lt;/a&gt; - Check against secure &lt;span class="caps"&gt;DNS&lt;/span&gt; providers and determine whether they block/redirect a&amp;nbsp;hostname&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.malwareurl.com/listing-urls.php"&gt;http://www.malwareurl.com/listing-urls.php&lt;/a&gt; - Scans a domain address for its&amp;nbsp;reputation&lt;/li&gt;
&lt;li&gt;&lt;a href="https://sitecheck.sucuri.net"&gt;https://sitecheck.sucuri.net&lt;/a&gt; - Check the site for malware, blacklisting status, and out-of-date&amp;nbsp;software&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.avgthreatlabs.com/ww-en/website-safety-reports"&gt;http://www.avgthreatlabs.com/ww-en/website-safety-reports&lt;/a&gt;k - Check the safety of a &lt;span class="caps"&gt;URL&lt;/span&gt; or web page by scanning it for&amp;nbsp;threats&lt;/li&gt;
&lt;li&gt;&lt;a href="http://global.sitesafety.trendmicro.com"&gt;http://global.sitesafety.trendmicro.com&lt;/a&gt; - Latest tests indicate that this website contains no malicious software and shows no signs of&amp;nbsp;fraud&lt;/li&gt;
&lt;li&gt;&lt;a href="http://urlblacklist.com/?sec=search"&gt;http://urlblacklist.com/?sec=search&lt;/a&gt; - Find out if a &lt;span class="caps"&gt;URL&lt;/span&gt; is in the&amp;nbsp;blacklist&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.senderbase.org"&gt;http://www.senderbase.org&lt;/a&gt; - Cisco &lt;span class="caps"&gt;IP&lt;/span&gt; and domain blacklist&amp;nbsp;check &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Open-source Threat Reports, &lt;span class="caps"&gt;IP&lt;/span&gt; and Domain&amp;nbsp;Blacklists&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.sophos.com/en-us/threat-center.aspx"&gt;http://www.sophos.com/en-us/threat-center.aspx&lt;/a&gt; - Malware&amp;nbsp;reports&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.symantec.com/security_response/"&gt;http://www.symantec.com/security_response/&lt;/a&gt; - Threats, risks, and&amp;nbsp;vulnerabilities&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.spamhaus.org/lookup/"&gt;http://www.spamhaus.org/lookup/&lt;/a&gt; - Database of IPs reporting email spam&amp;nbsp;abuse&lt;/li&gt;
&lt;li&gt;&lt;a href="http://hosts-file.net"&gt;http://hosts-file.net&lt;/a&gt; - Community managed host file to protect against&amp;nbsp;malicious&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.phishtank.com"&gt;http://www.phishtank.com&lt;/a&gt; -&amp;nbsp;PhishTank&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.malwaredomainlist.com/mdl.php"&gt;http://www.malwaredomainlist.com/mdl.php&lt;/a&gt; - Malicious domains/IPs and&amp;nbsp;malware&lt;/li&gt;
&lt;li&gt;&lt;a href="http://malc0de.com/database/"&gt;http://malc0de.com/database/&lt;/a&gt; - Database of malicious domains/IPs and&amp;nbsp;malware&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.malwaregroup.com"&gt;http://www.malwaregroup.com&lt;/a&gt; - Feed of malware reports from  multiple&amp;nbsp;sites&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.mywot.com"&gt;http://www.mywot.com&lt;/a&gt; - Tells you reputation of a website from public&amp;nbsp;reports&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.malwaredomains.com"&gt;http://www.malwaredomains.com&lt;/a&gt; - Malware Prevention through Domain&amp;nbsp;Blocking&lt;/li&gt;
&lt;li&gt;&lt;a href="http://multirbl.valli.org"&gt;http://multirbl.valli.org&lt;/a&gt; - Free multiple &lt;span class="caps"&gt;DNSBL&lt;/span&gt;/&lt;span class="caps"&gt;RBL&lt;/span&gt; lookup and FCrDNS check&amp;nbsp;tool&lt;/li&gt;
&lt;li&gt;&lt;a href="http://toolbar.netcraft.com/stats/countries"&gt;http://toolbar.netcraft.com/stats/countries&lt;/a&gt; - Phishiest hosting&amp;nbsp;countries&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.dcwg.org/detect/"&gt;http://www.dcwg.org/detect/&lt;/a&gt; - Detect &lt;span class="caps"&gt;DNS&lt;/span&gt; Changer&amp;nbsp;infection&lt;/li&gt;
&lt;li&gt;&lt;a href="http://stopmalvertising.com"&gt;http://stopmalvertising.com&lt;/a&gt; - Investigate distribution of malware exploits through online advertising&amp;nbsp;networks&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Malware Binary&amp;nbsp;Analysis&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.virustotal.com/en/"&gt;https://www.virustotal.com/en/&lt;/a&gt; - Analyze suspicious&amp;nbsp;binaries&lt;/li&gt;
&lt;li&gt;&lt;a href="http://anubis.iseclab.org"&gt;http://anubis.iseclab.org&lt;/a&gt; - &lt;span class="caps"&gt;ANUBIS&lt;/span&gt; ANalyzing Unknown&amp;nbsp;BInarieS&lt;/li&gt;
&lt;li&gt;&lt;a href="http://wepawet.iseclab.org"&gt;http://wepawet.iseclab.org&lt;/a&gt; - Analyze Flash, JavaScript, and&amp;nbsp;PDFs&lt;/li&gt;
&lt;li&gt;&lt;a href="http://jsunpack.jeek.org"&gt;http://jsunpack.jeek.org&lt;/a&gt; - JavaScript Unpacker/ Decode De-Obfuscated&amp;nbsp;JavaScript&lt;/li&gt;
&lt;li&gt;&lt;a href="http://minotauranalysis.com"&gt;http://minotauranalysis.com&lt;/a&gt; - Hash value&amp;nbsp;search&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.threatexpert.com/filescan.aspx"&gt;http://www.threatexpert.com/filescan.aspx&lt;/a&gt; - Analyze suspicious&amp;nbsp;binaries&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.threattracksecurity.com/resources/sandbox-malware-analysis.aspx"&gt;http://www.threattracksecurity.com/resources/sandbox-malware-analysis.aspx&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Malware&amp;nbsp;Samples&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://contagiodump.blogspot.com"&gt;http://contagiodump.blogspot.com&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://contagioexchange.blogspot.com"&gt;http://contagioexchange.blogspot.com&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://malware.lu"&gt;http://malware.lu&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://virusshare.com"&gt;http://virusshare.com&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;&lt;span class="caps"&gt;HTTP&lt;/span&gt; Agent sniffers, Decode De-Obfuscate JavaScript and Base&amp;nbsp;64&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://web-sniffer.net"&gt;http://web-sniffer.net&lt;/a&gt; - Analysis of &lt;span class="caps"&gt;HTTP&lt;/span&gt; Request and Response&amp;nbsp;Headers&lt;/li&gt;
&lt;li&gt;&lt;a href="http://builtwith.com"&gt;http://builtwith.com&lt;/a&gt; - Determine services running on&amp;nbsp;target&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.rexswain.com/httpview.html"&gt;http://www.rexswain.com/httpview.html&lt;/a&gt; - See &lt;em&gt;exactly&lt;/em&gt; what an &lt;span class="caps"&gt;HTTP&lt;/span&gt; request returns to your&amp;nbsp;browser&lt;/li&gt;
&lt;li&gt;&lt;a href="http://gsitecrawler.com/tools/Server-Status.aspx"&gt;http://gsitecrawler.com/tools/Server-Status.aspx&lt;/a&gt; Sever redirect&amp;nbsp;checker&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.unmaskcontent.com"&gt;http://www.unmaskcontent.com&lt;/a&gt; - Unmask&amp;nbsp;Content&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.yellowpipe.com/yis/tools/encrypter"&gt;http://www.yellowpipe.com/yis/tools/encrypter&lt;/a&gt; - encode/decode or encrypt/decrypt your documents in various formats such as: &lt;span class="caps"&gt;ASCSII&lt;/span&gt;, Binary, Base 64,&lt;span class="caps"&gt;HTML&lt;/span&gt;/text/JavaScript&amp;nbsp;Escaping&lt;/li&gt;
&lt;li&gt;&lt;a href="http://scriptasylum.com/tutorials/encode-decode.html"&gt;http://scriptasylum.com/tutorials/encode-decode.html&lt;/a&gt; - &lt;span class="caps"&gt;HTML&lt;/span&gt;/text/JavaSript Escaping/Encoding&amp;nbsp;Script&lt;/li&gt;
&lt;li&gt;&lt;a href="http://ln.hixie.ch/?start=1073090889&amp;amp;count=1"&gt;http://ln.hixie.ch/?start=1073090889&amp;amp;count=1&lt;/a&gt; - Unicode decoder&amp;nbsp;tools&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.crypo.com"&gt;http://www.crypo.com&lt;/a&gt; - Encode or Decode strings, email and other&amp;nbsp;messages&lt;/li&gt;
&lt;li&gt;&lt;a href="http://spyonweb.com"&gt;http://spyonweb.com&lt;/a&gt; - Determine what sites are sharing Google analytic&amp;nbsp;code&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.netdemon.net/decode.html"&gt;http://www.netdemon.net/decode.html&lt;/a&gt; - obfuscated &lt;span class="caps"&gt;URL&lt;/span&gt;&amp;nbsp;Decoder&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;BotNet&amp;nbsp;Tracking&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://botlab.org"&gt;http://botlab.org&lt;/a&gt; - Spam ranking, botnet &lt;span class="amp"&gt;&amp;amp;&lt;/span&gt; C2&amp;nbsp;tracking&lt;/li&gt;
&lt;li&gt;&lt;a href="https://palevotracker.abuse.ch"&gt;https://palevotracker.abuse.ch&lt;/a&gt; - Palevo&amp;nbsp;Tracker&lt;/li&gt;
&lt;li&gt;&lt;a href="https://zeustracker.abuse.ch/"&gt;https://zeustracker.abuse.ch&lt;/a&gt; - ZeuS&amp;nbsp;Tracker&lt;/li&gt;
&lt;li&gt;&lt;a href="https://zeustracker.abuse.ch"&gt;https://spyeyetracker.abuse.ch&lt;/a&gt; - SpyEye&amp;nbsp;Tracker&lt;/li&gt;
&lt;li&gt;&lt;a href="http://atlas.arbor.net/summary/fastflux"&gt;http://atlas.arbor.net/summary/fastflux&lt;/a&gt; - &lt;span class="caps"&gt;ATLAS&lt;/span&gt; Summary&amp;nbsp;Report&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.cert.pl/news/4711/langswitch_lang/en"&gt;http://www.cert.pl/news/4711/langswitch_lang/en&lt;/a&gt; - ZeuS – &lt;span class="caps"&gt;P2P&lt;/span&gt;+&lt;span class="caps"&gt;DGA&lt;/span&gt;&amp;nbsp;variant&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Site&amp;nbsp;History&lt;/strong&gt;  &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://archive.org"&gt;https://archive.org&lt;/a&gt; - Wayback Machine Internet&amp;nbsp;Archive&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.spiderfoot.net"&gt;http://www.spiderfoot.net&lt;/a&gt; - Spider&amp;nbsp;Indexing&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Google&amp;nbsp;Hacking&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.exploit-db.com/google-dorks/"&gt;http://www.exploit-db.com/google-dorks/&lt;/a&gt; - Google Hacking Database (&lt;span class="caps"&gt;GHDB&lt;/span&gt;) by &lt;a href="http://www.hackersforcharity.org/"&gt;HfC&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://ghh.sourceforge.net"&gt;http://ghh.sourceforge.net&lt;/a&gt; - Google Hack&amp;nbsp;Honeynet&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.edge-security.com"&gt;http://www.edge-security.com&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content><category term="analysis"></category><category term="defense"></category><category term="indicator"></category></entry><entry><title>Graphing Namebench Spreadsheet Data with R</title><link href="https://www.rsreese.com/graphing-namebench-spreadsheet-data-with-r/" rel="alternate"></link><published>2015-07-11T12:00:00-04:00</published><updated>2015-07-11T12:00:00-04:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2015-07-11:/graphing-namebench-spreadsheet-data-with-r/</id><summary type="html">In the previous post, I described the process of benchmarking domain name servers for a website domain with a modified version of Namebench. Namebench generates graphs using the Google chart API. This left me wanting a little more therefore decided to explore the data using the R Project. This post …</summary><content type="html">&lt;p&gt;In the previous &lt;a href="/benchmarking-website-domain-name-servers/"&gt;post&lt;/a&gt;, I described the process of benchmarking domain name servers for a website domain with a modified version of &lt;a href="https://github.com/rsreese/namebench"&gt;Namebench&lt;/a&gt;. Namebench generates graphs using the Google chart &lt;span class="caps"&gt;API&lt;/span&gt;. This left me wanting a little more therefore decided to explore the data using the &lt;a href="http://www.r-project.org"&gt;R Project&lt;/a&gt;. This post makes the assumption you are using our &lt;a href="https://www.rsreese.com/assets/namebench_2015-07-14_1952.csv"&gt;data set&lt;/a&gt; in order to follow along or else &lt;span class="caps"&gt;YMMV&lt;/span&gt;. &lt;/p&gt;
&lt;p&gt;First, remove trailing commas from each&amp;nbsp;row:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ sed &lt;span class="s1"&gt;&amp;#39;s/,[[:space:]]*$//&amp;#39;&lt;/span&gt; namebench_2015-07-14_1952.csv &amp;gt; data.csv
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Next, we read in the data from the &lt;span class="caps"&gt;CSV&lt;/span&gt; file into the R buffer assuming you are already in the R&amp;nbsp;console:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; data &lt;span class="o"&gt;&amp;lt;-&lt;/span&gt; read.table&lt;span class="p"&gt;(&lt;/span&gt;file&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;data.csv&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;header&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kc"&gt;TRUE&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;sep&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;,&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;row.names&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kc"&gt;NULL&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;If you get errors about a line not having 9 elements, you likely had timeouts in your &lt;span class="caps"&gt;DNS&lt;/span&gt; queries. You can either re-run the test until you do not experience any timeouts or remove the Timeout error message lines. Something like &lt;code&gt;grep -v Timeout data.csv &amp;gt;a.out&lt;/code&gt; and copy back to data.csv or whatever filename you would like to work&amp;nbsp;with.&lt;/p&gt;
&lt;p&gt;As an aside, we can also export our data back&amp;nbsp;out:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&amp;gt; write.table(data, &amp;#39;a.txt&amp;#39;, col.names=NA)
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Which results&amp;nbsp;in:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&amp;quot;&amp;quot; &amp;quot;IP&amp;quot; &amp;quot;Name&amp;quot; &amp;quot;Test_Num&amp;quot; &amp;quot;Record&amp;quot; &amp;quot;Record_Type&amp;quot; &amp;quot;Duration&amp;quot; &amp;quot;TTL&amp;quot; &amp;quot;Answer_Count&amp;quot; &amp;quot;Response&amp;quot;
&amp;quot;1&amp;quot; &amp;quot;2600:3c01::a&amp;quot; &amp;quot;Linode 2 IPv6&amp;quot; 0 &amp;quot;www.rsreese.com.&amp;quot; &amp;quot;A&amp;quot; 76.2228965759277 86400 1 &amp;quot;74.207.234.79&amp;quot;
&amp;quot;2&amp;quot; &amp;quot;2600:3c01::a&amp;quot; &amp;quot;Linode 2 IPv6&amp;quot; 0 &amp;quot;www.rsreese.com.&amp;quot; &amp;quot;A&amp;quot; 73.7550258636475 86400 1 &amp;quot;74.207.234.79&amp;quot;
&amp;quot;3&amp;quot; &amp;quot;2600:3c01::a&amp;quot; &amp;quot;Linode 2 IPv6&amp;quot; 0 &amp;quot;www.rsreese.com.&amp;quot; &amp;quot;A&amp;quot; 73.4801292419434 86400 1 &amp;quot;74.207.234.79&amp;quot;
&amp;quot;4&amp;quot; &amp;quot;2600:3c01::a&amp;quot; &amp;quot;Linode 2 IPv6&amp;quot; 0 &amp;quot;www.rsreese.com.&amp;quot; &amp;quot;A&amp;quot; 76.7168998718262 86400 1 &amp;quot;74.207.234.79&amp;quot;
&amp;quot;5&amp;quot; &amp;quot;2600:3c01::a&amp;quot; &amp;quot;Linode 2 IPv6&amp;quot; 0 &amp;quot;www.rsreese.com.&amp;quot; &amp;quot;A&amp;quot; 73.2970237731934 86400 1 &amp;quot;74.207.234.79&amp;quot;
&amp;quot;6&amp;quot; &amp;quot;2600:3c01::a&amp;quot; &amp;quot;Linode 2 IPv6&amp;quot; 0 &amp;quot;www.rsreese.com.&amp;quot; &amp;quot;A&amp;quot; 73.3959674835205 86400 1 &amp;quot;74.207.234.79&amp;quot;
&amp;quot;7&amp;quot; &amp;quot;2600:3c01::a&amp;quot; &amp;quot;Linode 2 IPv6&amp;quot; 0 &amp;quot;www.rsreese.com.&amp;quot; &amp;quot;A&amp;quot; 72.7560520172119 86400 1 &amp;quot;74.207.234.79&amp;quot;
&amp;quot;8&amp;quot; &amp;quot;2600:3c01::a&amp;quot; &amp;quot;Linode 2 IPv6&amp;quot; 0 &amp;quot;www.rsreese.com.&amp;quot; &amp;quot;A&amp;quot; 76.8599510192871 86400 1 &amp;quot;74.207.234.79&amp;quot;
&amp;quot;9&amp;quot; &amp;quot;2600:3c01::a&amp;quot; &amp;quot;Linode 2 IPv6&amp;quot; 0 &amp;quot;www.rsreese.com.&amp;quot; &amp;quot;A&amp;quot; 72.8960037231445 86400 1 &amp;quot;74.207.234.79&amp;quot;
&amp;quot;10&amp;quot; &amp;quot;2600:3c01::a&amp;quot; &amp;quot;Linode 2 IPv6&amp;quot; 0 &amp;quot;www.rsreese.com.&amp;quot; &amp;quot;A&amp;quot; 74.0060806274414 86400 1 &amp;quot;74.207.234.79&amp;quot;
--snip--
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Now that R has our data, we can take a quick look to ensure the columns make&amp;nbsp;sense:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&amp;gt; options(width=150)
&amp;gt; head(data,n=10)
&amp;gt; head(data,n=10)
             IP          Name Test_Num           Record Record_Type Duration   TTL Answer_Count      Response
1  2600:3c01::a Linode 2 IPv6        0 www.rsreese.com.           A 76.22290 86400            1 74.207.234.79
2  2600:3c01::a Linode 2 IPv6        0 www.rsreese.com.           A 73.75503 86400            1 74.207.234.79
3  2600:3c01::a Linode 2 IPv6        0 www.rsreese.com.           A 73.48013 86400            1 74.207.234.79
4  2600:3c01::a Linode 2 IPv6        0 www.rsreese.com.           A 76.71690 86400            1 74.207.234.79
5  2600:3c01::a Linode 2 IPv6        0 www.rsreese.com.           A 73.29702 86400            1 74.207.234.79
6  2600:3c01::a Linode 2 IPv6        0 www.rsreese.com.           A 73.39597 86400            1 74.207.234.79
7  2600:3c01::a Linode 2 IPv6        0 www.rsreese.com.           A 72.75605 86400            1 74.207.234.79
8  2600:3c01::a Linode 2 IPv6        0 www.rsreese.com.           A 76.85995 86400            1 74.207.234.79
9  2600:3c01::a Linode 2 IPv6        0 www.rsreese.com.           A 72.89600 86400            1 74.207.234.79
10 2600:3c01::a Linode 2 IPv6        0 www.rsreese.com.           A 74.00608 86400            1 74.207.234.79
&amp;gt; summary(data$Duration)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  1.455   2.582   3.836  24.430  47.640 780.500
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;We can create an aggregated table of the data based on mean&amp;nbsp;values:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&amp;gt; aggregate(data$Duration, by=list(data$Name), FUN=mean)
         Group.1         x
1        CF Erin  3.752344
2         CF Ram  6.141772
3           HE 1  2.563629
4           HE 2  2.494576
5      HE 2 IPv6  2.677688
6           HE 3  5.510935
7      HE 3 IPv6  3.057263
8           HE 4  2.982669
9      HE 4 IPv6  2.626012
10          HE 5  2.642891
11     HE 5 IPv6  2.736038
12      Linode 1 49.536158
13 Linode 1 IPv6 48.098648
14      Linode 2 75.840130
15 Linode 2 IPv6 76.885061
16      Linode 3 25.727819
17 Linode 3 IPv6 26.703984
18      Linode 4  8.020208
19 Linode 4 IPv6  7.908908
20      Linode 5 82.185041
21 Linode 5 IPv6 76.434550
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Lets see how a boxplot looks. The graph is representative of the third command listed here, others are for&amp;nbsp;reference/tinkering:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&amp;gt; plot(data$Duration ~ data$Name, horizontal=TRUE, par(las=1))
&amp;gt; boxplot(data$Duration ~ data$Name, horizontal=TRUE, par(las=1), col=rainbow(10))
&amp;gt; boxplot(data$Duration ~ data$Name, ylim=c(0,100), horizontal=TRUE, par(las=1), col=rainbow(10))
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;&lt;a href="https://www.rsreese.com/assets/namebench-boxplot.png"&gt;&lt;img alt="namebench-boxplot" src="https://www.rsreese.com/assets/namebench-boxplot.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If we zoom in a little more, the distribution of the more responsive name servers becomes apparent. I believe this graph is the best representation of the fastest name servers in the&amp;nbsp;dataset:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&amp;gt; boxplot(data$Duration ~ data$Name, ylim=c(0,10), horizontal=TRUE, par(las=1), col=rainbow(10))
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;&lt;a href="https://www.rsreese.com/assets/namebench-boxplot2.png"&gt;&lt;img alt="namebench-boxplot2" src="https://www.rsreese.com/assets/namebench-boxplot2.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Alternatively, we can plot using ggplot2 if&amp;nbsp;available:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&amp;gt; library(ggplot2)
&amp;gt; ggplot(data=data, aes(x=Duration, y=Name, group=Name, colour=Name)) + geom_line() + geom_point()
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;&lt;a href="https://www.rsreese.com/assets/namebench-ggplot2.png"&gt;&lt;img alt="namebench-ggplot2" src="https://www.rsreese.com/assets/namebench-ggplot2.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Display horizontal bar graph. I did not do a great job with the axis labels here but you get the&amp;nbsp;idea:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; agg &lt;span class="o"&gt;&amp;lt;-&lt;/span&gt; aggregate&lt;span class="p"&gt;(&lt;/span&gt;data&lt;span class="o"&gt;$&lt;/span&gt;Duration&lt;span class="p"&gt;,&lt;/span&gt; by&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kt"&gt;list&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;data&lt;span class="o"&gt;$&lt;/span&gt;Name&lt;span class="p"&gt;),&lt;/span&gt; FUN&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kp"&gt;mean&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; sorted &lt;span class="o"&gt;&amp;lt;-&lt;/span&gt; agg&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="kp"&gt;with&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;agg&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kp"&gt;order&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;x&lt;span class="p"&gt;)),&lt;/span&gt; &lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; mymat &lt;span class="o"&gt;&amp;lt;-&lt;/span&gt; &lt;span class="kp"&gt;t&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;sorted&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="m"&gt;-1&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="kp"&gt;colnames&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;mymat&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;-&lt;/span&gt; sorted&lt;span class="p"&gt;[,&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; barplot&lt;span class="p"&gt;(&lt;/span&gt;mymat&lt;span class="p"&gt;,&lt;/span&gt; horiz&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kc"&gt;TRUE&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; col&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kt"&gt;c&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;blue&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; las&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;&lt;a href="https://www.rsreese.com/assets/namebench-barplot.png"&gt;&lt;img alt="namebench-barplot" src="https://www.rsreese.com/assets/namebench-barplot.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Finally, we will graph a group of values from the set and display them. We also limit the range so the graph is&amp;nbsp;readable:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&amp;gt; plot(ecdf(data$Duration[data$Name==&amp;quot;Linode 1&amp;quot;]), xlim=c(45,55), ylim=c(0,1))
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;&lt;a href="https://www.rsreese.com/assets/namebench-line.png"&gt;&lt;img alt="namebench-line" src="https://www.rsreese.com/assets/namebench-line.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Please leave any questions you have regarding this post&amp;nbsp;below.&lt;/p&gt;</content><category term="benchmark"></category><category term="graph"></category><category term="R"></category><category term="namebench"></category></entry><entry><title>Benchmarking Website Domain Name Servers</title><link href="https://www.rsreese.com/benchmarking-website-domain-name-servers/" rel="alternate"></link><published>2015-06-14T12:00:00-04:00</published><updated>2015-06-14T12:00:00-04:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2015-06-14:/benchmarking-website-domain-name-servers/</id><summary type="html">This post evaluates a few methods to benchmark name servers that provide resolution of your websites domain name to its respective IP address. While DNS resolution for you domain is a small piece of the process for a user to retrieve a page, it is still important to provide the …</summary><content type="html">&lt;p&gt;This post evaluates a few methods to benchmark name servers that provide resolution of your websites domain name to its respective &lt;span class="caps"&gt;IP&lt;/span&gt; address. While &lt;span class="caps"&gt;DNS&lt;/span&gt; resolution for you domain is a small piece of the process for a user to retrieve a page, it is still important to provide the fastest experience possible, regardless of where they are connecting from. There are several methods to benchmark: from a dedicated host, or &lt;span class="caps"&gt;VPS&lt;/span&gt; or a last-mile end-point such as a residential connection. Dedicated host benchmark examples would include &lt;a href="http://www.dnsperf.com"&gt;DNSPerf&lt;/a&gt; and &lt;a href="https://pulse.turbobytes.com"&gt;TurboBytes Pulse&lt;/a&gt;. While the metrics provided by these assessments may be consistent, they may not necessarily represent realistic last-mile performance the end-user would typically experience. This is because these agents are typically on backbone internet connections that have peering agreements with very low latency providers. An exception to Pulse is some of the agents are hosted at locations that would be considered last-mile but at this time the results are averaged into the mean&amp;nbsp;result.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.dnsperf.com"&gt;DNSPerf:&lt;/a&gt;
&lt;a href="https://www.rsreese.com/assets/dnsperf.png"&gt;&lt;img alt="dnsperf" src="https://www.rsreese.com/assets/dnsperf.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://pulse.turbobytes.com"&gt;TurboBytes Pulse:&lt;/a&gt;
&lt;a href="https://www.rsreese.com/assets/pulse.png"&gt;&lt;img alt="pulse" src="https://www.rsreese.com/assets/pulse.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Last-mile metrics provide us with an idea of what our site users first request for a &lt;span class="caps"&gt;DNS&lt;/span&gt; lookup will be. Specifically, a request for a record that is not cached by the system performing the lookup e.g. browser, &lt;span class="caps"&gt;OS&lt;/span&gt;, local network &lt;span class="caps"&gt;DNS&lt;/span&gt; forwarder, etc. Depending on the users geographic location and network connection (latency considerations), this could be the difference of several hundred milliseconds for an initial lookup. A few ways to examine last mile &lt;span class="caps"&gt;DNS&lt;/span&gt; are via browser, visitor analytics, or scripts. All have their pro and cons just as backbone tests do. Examples&amp;nbsp;include:&lt;/p&gt;
&lt;p&gt;Chrome Browser Console:
&lt;a href="https://www.rsreese.com/assets/chrome-console.png"&gt;&lt;img alt="chrome-console" src="https://www.rsreese.com/assets/chrome-console.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://tools.pingdom.com/fpt/"&gt;Pingdom:&lt;/a&gt;
&lt;a href="https://www.rsreese.com/assets/pingdom.png"&gt;&lt;img alt="pingdom" src="https://www.rsreese.com/assets/pingdom.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.webpagetest.org"&gt;WebPagetest:&lt;/a&gt;
&lt;a href="https://www.rsreese.com/assets/webpagetest.png"&gt;&lt;img alt="webpagetest" src="https://www.rsreese.com/assets/webpagetest.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.google.com/analytics/"&gt;Google Analytics:&lt;/a&gt;
&lt;a href="https://www.rsreese.com/assets/google-analytics.png"&gt;&lt;img alt="google-analytics" src="https://www.rsreese.com/assets/google-analytics.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The aforementioned tools provide some solid metrics but I wanted a way to assess my domains name servers with a large number of &lt;span class="caps"&gt;DNS&lt;/span&gt; requests from locations of my choosing. I modified Googles Namebench code available &lt;a href="https://www.github.com/rsreese/namebench"&gt;here&lt;/a&gt; to allow for on demand name server benchmarks of the specified domain(s) verse its original purpose of benchmarking name servers for general &lt;span class="caps"&gt;DNS&lt;/span&gt; lookups. Next I setup the zone I wanted to examine at other &lt;span class="caps"&gt;DNS&lt;/span&gt; providers, Hurricane Electric (&lt;span class="caps"&gt;HE&lt;/span&gt;) and CloudFlare (&lt;span class="caps"&gt;CF&lt;/span&gt;). While these two hosts are not authoritative for my domain, i.e. they are not the name servers registered with my domain registrar, they will still respond if I have setup &lt;span class="caps"&gt;DNS&lt;/span&gt; records. In this case I am testing www.rsreese.com from a Digital Ocean host. Again, this is not realistic as we are testing from a host on optimal network and route conditions but merely to show the&amp;nbsp;output. &lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="gh"&gt;Fastest individual response (in milliseconds):&lt;/span&gt;
&lt;span class="gh"&gt;----------------------------------------------&lt;/span&gt;
HE 3             ## 1.45507
HE 5             ## 1.56093
HE 5 IPv6        ## 1.58811
HE 3 IPv6        ## 1.61195
HE 4             ## 1.62816
HE 2             ## 1.63388
HE 4 IPv6        ## 1.66416
HE 1             ## 1.66702
HE 2 IPv6        ## 1.70302
CF Ram           ## 1.98388
CF Erin          ## 1.98603
Linode 4         ### 4.05502
Linode 4 IPv6    ### 4.06694
Linode 3         ############### 19.89603
Linode 3 IPv6    ################ 21.06285
Linode 1 IPv6    ################################ 42.38200
Linode 1         ################################# 43.81895
Linode 5 IPv6    ################################################### 69.63682
Linode 2 IPv6    #################################################### 70.39404
Linode 2         ##################################################### 71.63501
Linode 5         ##################################################### 72.44182

&lt;span class="gh"&gt;Mean response (in milliseconds):&lt;/span&gt;
&lt;span class="gh"&gt;--------------------------------&lt;/span&gt;
HE 2             ## 2.49
HE 1             ## 2.56
HE 4 IPv6        ## 2.63
HE 5             ## 2.64
HE 2 IPv6        ## 2.68
HE 5 IPv6        ## 2.74
HE 4             ## 2.98
HE 3 IPv6        ## 3.06
CF Erin          ## 3.75
HE 3             ### 5.51
CF Ram           ### 6.14
Linode 4 IPv6    ########## 21.88
Linode 4         ########## 21.99
Linode 3         ############ 25.73
Linode 3 IPv6    ################## 40.60
Linode 1         ###################### 49.54
Linode 1 IPv6    ########################### 61.91
Linode 2         ################################# 75.84
Linode 2 IPv6    ####################################### 90.58
Linode 5 IPv6    ################################################### 117.52
Linode 5         ##################################################### 123.20
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;A similar test run from a residential internet connection providing more realistic metrics for a broadband&amp;nbsp;connection:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="gh"&gt;Fastest individual response (in milliseconds):&lt;/span&gt;
&lt;span class="gh"&gt;----------------------------------------------&lt;/span&gt;
CF Erin          ######## 13.67188
CF Ram           ######## 13.88907
HE 1             ########### 18.39805
HE 5             ########### 18.72587
HE 2             ########### 18.76688
HE 4             ########### 18.77284
HE 3             ########### 18.92185
Linode 4         ############# 21.31605
Linode 3         ################# 28.21493
Linode 1         ############################ 48.61617
Linode 2         ################################################# 83.48799
Linode 5         ##################################################### 92.02409

&lt;span class="gh"&gt;Mean response (in milliseconds):&lt;/span&gt;
&lt;span class="gh"&gt;--------------------------------&lt;/span&gt;
HE 3             ############## 27.24
HE 4             ############## 27.68
HE 1             ############### 28.58
HE 5             ############### 28.58
HE 2             ############### 28.89
Linode 4         ################ 31.83
CF Erin          ################### 38.02
Linode 3         ########################## 51.06
CF Ram           ########################## 51.32
Linode 1         #################################### 71.66
Linode 5         ################################################### 102.22
Linode 2         ##################################################### 106.29
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Based on the results that I tested from a number of locations, Hurricane Electric and Cloudflare were consistently faster than Linode, whom hosts my authoritative name servers, i.e. the servers that will respond if no one upstream has the answer cached. Lastly, the Namebench tool does have some built in graphing capability as shown below (not representative of the tabular data&amp;nbsp;above):&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.rsreese.com/assets/namebench-chart.png"&gt;&lt;img alt="namebench-chart" src="https://www.rsreese.com/assets/namebench-chart.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If you find yourself wanting a little more in the way of graphs then what the Google chart &lt;span class="caps"&gt;API&lt;/span&gt; provides, Namebench provides us a handy spreadsheet that we can use for graphing in R which we demonstrate in the next blog &lt;a href="/graphing-namebench-spreadsheet-data-with-r/"&gt;post&lt;/a&gt;. Until then, please leave any questions you have regarding this post below or file an issue on the Github page relevant to the issue you are having with the customized &lt;a href="https://www.github.com/rsreese/namebench"&gt;Namebench&lt;/a&gt;&amp;nbsp;tool.&lt;/p&gt;</content><category term="benchmark"></category><category term="name servers"></category><category term="namebench"></category></entry><entry><title>Building Apache and ModSecurity from source</title><link href="https://www.rsreese.com/building-apache-and-modsecurity-from-source/" rel="alternate"></link><published>2015-02-27T08:00:00-05:00</published><updated>2015-02-27T08:00:00-05:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2015-02-27:/building-apache-and-modsecurity-from-source/</id><summary type="html">This entry describes settting up ModSecurity on a node in order to protect a few WordPress sites I host. There are a slew of guides out there describing ModSecurity builds but I wanted to leverage the latest ModSecurity and Apache MPM Event packages which typically are not included in most …</summary><content type="html">&lt;p&gt;This entry describes settting up &lt;a href="http://modsecurity.org"&gt;ModSecurity&lt;/a&gt; on a node in order to protect a few WordPress sites I host. There are a slew of guides out there describing ModSecurity &lt;a href="https://github.com/SpiderLabs/ModSecurity/wiki/Reference-Manual#Installation_for_Apache"&gt;builds&lt;/a&gt; but I wanted to leverage the latest ModSecurity and Apache &lt;span class="caps"&gt;MPM&lt;/span&gt; Event packages which typically are not included in most Linux distribution repositories. We use a proxy node that passes requests to the backend (origin) server hosting the web application. You may just as easily build ModSecurity on the same host that is serving your content verse using a reverse proxy, i.e. there are a number of ways to architect the setup. In the figure below, a request is first received by the proxy with ModSecurity enabled, and then passed to the origin host serving the actual content if ModSecurity does not intervene. We use Debian but other distributions should be&amp;nbsp;similar.&lt;/p&gt;
&lt;p&gt;&lt;img alt="ModSecurity Proxy" src="https://www.rsreese.com/assets/modsecurity-proxy-figure.png"&gt;&lt;/p&gt;
&lt;p&gt;Install prerequisite&amp;nbsp;packages:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ sudo apt-get install gcc libpcre3-dev libxml2-dev libcurl4-gnutls-dev
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Download, Build, and Install &lt;span class="caps"&gt;SSL&lt;/span&gt; (enable shared if on&amp;nbsp;64bit):&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ mkdir install
$ ./config shared --prefix&lt;span class="o"&gt;=&lt;/span&gt;/root/openssl-1.0.2a/install/
$ make depend
$ make
$ make &lt;span class="nb"&gt;test&lt;/span&gt;
$ make install
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Download latest Apache, &lt;span class="caps"&gt;APR&lt;/span&gt;, and &lt;span class="caps"&gt;APR&lt;/span&gt; Util packages. Extract &lt;span class="caps"&gt;APR&lt;/span&gt; and &lt;span class="caps"&gt;APR&lt;/span&gt; Util, copy both to Apache src directory, build and install&amp;nbsp;Apache:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ cp -R apr-util-1.5.4 httpd-2.4.12/srclib/apr-util/
$ cp -R apr-1.5.1 httpd-2.4.12/srclib/apr/
$ ./configure --with-included-apr --enable-ssl --enable-ssl-staticlib-deps --with-ssl&lt;span class="o"&gt;=&lt;/span&gt;/root/openssl-1.0.2/install/ --enable-proxy --with-mpm&lt;span class="o"&gt;=&lt;/span&gt;event
$ make
$ sudo make install
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Download, Build and install ModSecurity (optionally install &lt;span class="caps"&gt;LUA&lt;/span&gt; if&amp;nbsp;desired):&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ tar xzf modsecurity-2.9.0.tar.gz
$ &lt;span class="nb"&gt;cd&lt;/span&gt; modsecurity-2.9.0/
$ ./configure --with-apxs&lt;span class="o"&gt;=&lt;/span&gt;/usr/local/apache2/bin/apxs --with-apr&lt;span class="o"&gt;=&lt;/span&gt;/root/httpd-2.4.12/srclib/apr/ --with-apu&lt;span class="o"&gt;=&lt;/span&gt;/root/httpd-2.4.12/srclib/apr-util/ --with-lua&lt;span class="o"&gt;=&lt;/span&gt;/usr/lib/x86_64-linux-gnu/pkgconfig/
$ make
$ sudo make install
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Grab a rule-set. You may also choose to use &lt;span class="caps"&gt;GIT&lt;/span&gt; to&amp;nbsp;download.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ wget https://github.com/SpiderLabs/owasp-modsecurity-crs/tarball/master
$ mv master master.tar.gz
$ cp -R SpiderLabs-owasp-modsecurity-crs-ebe8790/ /usr/local/apache2/conf/crs/
$ &lt;span class="nb"&gt;cd&lt;/span&gt; /usr/local/apache2/conf/crs/
$ mv modsecurity_crs_10_setup.conf.example modsecurity_crs_10_setup.conf
$ ln -s /usr/local/apache2/conf/crs/modsecurity_crs_10_setup.conf activated_rules/
$ &lt;span class="k"&gt;for&lt;/span&gt; f in &lt;span class="sb"&gt;`&lt;/span&gt;ls base_rules/&lt;span class="sb"&gt;`&lt;/span&gt; &lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt; ln -s /usr/local/apache2/conf/crs/base_rules/&lt;span class="nv"&gt;$f&lt;/span&gt; activated_rules/&lt;span class="nv"&gt;$f&lt;/span&gt; &lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;done&lt;/span&gt;
$ &lt;span class="k"&gt;for&lt;/span&gt; f in &lt;span class="sb"&gt;`&lt;/span&gt;ls optional_rules/&lt;span class="sb"&gt;`&lt;/span&gt; &lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt; ln -s /usr/local/apache2/conf/crs/optional_rules/&lt;span class="nv"&gt;$f&lt;/span&gt; activated_rules/&lt;span class="nv"&gt;$f&lt;/span&gt; &lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;done&lt;/span&gt;
$ mkdir /etc/modsec
$ &lt;span class="nb"&gt;cd&lt;/span&gt;
$ cp modsecurity-2.9.0/modsecurity.conf-recommended /etc/modsec/modsecurity.conf
$ cp modsecurity-2.9.0/unicode.mapping /etc/modsec/
$ vim /etc/modsec/whitelist.conf
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Setup your Apache site, virtual host, or use proxy pass in order to fetch from a back-end origin node. Add ModSecurity directives to Apache conf&amp;nbsp;file:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;LoadModule unique_id_module modules/mod_unique_id.so
LoadModule security2_module modules/mod_security2.so
&lt;span class="nt"&gt;&amp;lt;IfModule&lt;/span&gt; &lt;span class="err"&gt;security2_module&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
Include /etc/modsec/modsecurity.conf
Include conf/crs/activated_rules/*.conf
Include /etc/modsec/whitelist.conf
SecRule ARGS &amp;quot;mod_security_test&amp;quot; &amp;quot;t:normalisePathWin,id:99999,severity:4,msg:&amp;#39;Drive Access&amp;#39;&amp;quot;
&lt;span class="nt"&gt;&amp;lt;/IfModule&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Start Apache and test to validate rules are logging and optionally being enforced. You should see a 403 forbidden response meaning that the malicious requests were blocked. Now you can move to tuning the ruleset to your web&amp;nbsp;application:&lt;/p&gt;
&lt;p&gt;http://waf.rsreese.com/?test=mod_security_test&lt;/p&gt;
&lt;p&gt;&lt;img alt="Forbidden" src="https://www.rsreese.com/assets/modsecurity-forbidden.png"&gt;&lt;/p&gt;
&lt;p&gt;If something is not clear, leave a comment&amp;nbsp;below.&lt;/p&gt;</content><category term="apache"></category><category term="modsecurity"></category></entry><entry><title>Redirect HTTP to HTTPS using Varnish</title><link href="https://www.rsreese.com/redirect-http-to-https-using-varnish/" rel="alternate"></link><published>2014-12-30T08:00:00-05:00</published><updated>2014-12-30T08:00:00-05:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2014-12-30:/redirect-http-to-https-using-varnish/</id><summary type="html">I recently enabled HTTPS on this site and wanted to use a 301 redirect in order to correctly re-route guests from HTTP to HTTPS (HTTP to SSL/TLS). I originally performed all of my rewrites in Apache which acts as my backend. While Apache handled the typical non-www to www …</summary><content type="html">&lt;p&gt;I recently enabled &lt;span class="caps"&gt;HTTPS&lt;/span&gt; on this site and wanted to use a 301 redirect in order to correctly re-route guests from &lt;span class="caps"&gt;HTTP&lt;/span&gt; to &lt;span class="caps"&gt;HTTPS&lt;/span&gt; (&lt;span class="caps"&gt;HTTP&lt;/span&gt; to &lt;span class="caps"&gt;SSL&lt;/span&gt;/&lt;span class="caps"&gt;TLS&lt;/span&gt;). I originally performed all of my rewrites in Apache which acts as my backend. While Apache handled the typical non-www to www redirects with ease, it created a redirect loop when attempting to redirect users from &lt;span class="caps"&gt;HTTP&lt;/span&gt; to &lt;span class="caps"&gt;HTTPS&lt;/span&gt;. I decided to let Varnish Cache 4 rather than the Apache backend handle the&amp;nbsp;redirect.&lt;/p&gt;
&lt;p&gt;&lt;img alt="HTTP to HTTPS redirect" src="https://www.rsreese.com/assets/http-to-https.png"&gt;&lt;/p&gt;
&lt;p&gt;The documentation on the on the Varnish site is for Varnish 3 which is not compatible for Varnish 4 as of this&amp;nbsp;writing:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nt"&gt;sub&lt;/span&gt; &lt;span class="nt"&gt;vcl_recv&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="err"&gt;if&lt;/span&gt; &lt;span class="err"&gt;(&lt;/span&gt; &lt;span class="err"&gt;(req.http.host&lt;/span&gt; &lt;span class="err"&gt;~&lt;/span&gt; &lt;span class="err"&gt;&amp;quot;^(?i)somesite.org&amp;quot;&lt;/span&gt; &lt;span class="err"&gt;||&lt;/span&gt; &lt;span class="err"&gt;req.http.host&lt;/span&gt; &lt;span class="err"&gt;~&lt;/span&gt; &lt;span class="err"&gt;&amp;quot;^(?i)www.somesite.org&amp;quot;)&lt;/span&gt;
         &lt;span class="err"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="err"&gt;req.http.X-Forwarded-Proto&lt;/span&gt; &lt;span class="err"&gt;!~&lt;/span&gt; &lt;span class="err"&gt;&amp;quot;(?i)https&amp;quot;)&lt;/span&gt; &lt;span class="err"&gt;{&lt;/span&gt;
        &lt;span class="err"&gt;set&lt;/span&gt; &lt;span class="err"&gt;req.http.x-Redir-Url&lt;/span&gt; &lt;span class="err"&gt;=&lt;/span&gt; &lt;span class="err"&gt;&amp;quot;&lt;/span&gt;&lt;span class="n"&gt;https&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;//&lt;/span&gt;&lt;span class="n"&gt;www&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;somesite&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;org&lt;/span&gt;&lt;span class="err"&gt;&amp;quot;&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;req&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="err"&gt;error&lt;/span&gt; &lt;span class="err"&gt;750&lt;/span&gt; &lt;span class="err"&gt;req.http.x-Redir-Url&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="err"&gt;}&lt;/span&gt;

&lt;span class="nt"&gt;sub&lt;/span&gt; &lt;span class="nt"&gt;vcl_error&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="err"&gt;if&lt;/span&gt; &lt;span class="err"&gt;(obj.status&lt;/span&gt; &lt;span class="err"&gt;==&lt;/span&gt; &lt;span class="err"&gt;750)&lt;/span&gt; &lt;span class="err"&gt;{&lt;/span&gt;
        &lt;span class="err"&gt;set&lt;/span&gt; &lt;span class="err"&gt;obj.http.Location&lt;/span&gt; &lt;span class="err"&gt;=&lt;/span&gt; &lt;span class="err"&gt;obj.response&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="err"&gt;set&lt;/span&gt; &lt;span class="err"&gt;obj.status&lt;/span&gt; &lt;span class="err"&gt;=&lt;/span&gt; &lt;span class="err"&gt;302&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="err"&gt;return&lt;/span&gt; &lt;span class="err"&gt;(deliver)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;After some research, I found a &lt;a href="http://www.softprayog.in/troubleshooting/how-to-redirect-non-www-urls-to-www-in-varnish"&gt;redirect example&lt;/a&gt; that was similar to what I was trying to achieve in Varnish&amp;nbsp;4:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nt"&gt;sub&lt;/span&gt; &lt;span class="nt"&gt;vcl_recv&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="err"&gt;if&lt;/span&gt; &lt;span class="err"&gt;(&lt;/span&gt; &lt;span class="err"&gt;(req.http.host&lt;/span&gt; &lt;span class="err"&gt;~&lt;/span&gt; &lt;span class="err"&gt;&amp;quot;^(?i)www.domain.com&amp;quot;&lt;/span&gt; &lt;span class="err"&gt;||&lt;/span&gt; &lt;span class="err"&gt;req.http.host&lt;/span&gt; &lt;span class="err"&gt;~&lt;/span&gt; &lt;span class="err"&gt;&amp;quot;^(?i)domain.com&amp;quot;)&lt;/span&gt; &lt;span class="err"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="err"&gt;req.http.X-Forwarded-Proto&lt;/span&gt; &lt;span class="err"&gt;!~&lt;/span&gt; &lt;span class="err"&gt;&amp;quot;(?i)https&amp;quot;)&lt;/span&gt; &lt;span class="err"&gt;{&lt;/span&gt;
                &lt;span class="err"&gt;return&lt;/span&gt; &lt;span class="err"&gt;(synth(750,&lt;/span&gt; &lt;span class="err"&gt;&amp;quot;&amp;quot;))&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="err"&gt;}&lt;/span&gt;

&lt;span class="nt"&gt;sub&lt;/span&gt; &lt;span class="nt"&gt;vcl_synth&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="err"&gt;if&lt;/span&gt; &lt;span class="err"&gt;(resp.status&lt;/span&gt; &lt;span class="err"&gt;==&lt;/span&gt; &lt;span class="err"&gt;750)&lt;/span&gt; &lt;span class="err"&gt;{&lt;/span&gt;
        &lt;span class="err"&gt;set&lt;/span&gt; &lt;span class="err"&gt;resp.status&lt;/span&gt; &lt;span class="err"&gt;=&lt;/span&gt; &lt;span class="err"&gt;301&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="err"&gt;set&lt;/span&gt; &lt;span class="err"&gt;resp.http.Location&lt;/span&gt; &lt;span class="err"&gt;=&lt;/span&gt; &lt;span class="err"&gt;&amp;quot;&lt;/span&gt;&lt;span class="n"&gt;https&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;//&lt;/span&gt;&lt;span class="n"&gt;www&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;domain&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;com&lt;/span&gt;&lt;span class="err"&gt;&amp;quot;&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;req&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="err"&gt;return(deliver)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="err"&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Now non-&lt;span class="caps"&gt;HTTPS&lt;/span&gt; requests to domains listed in the &lt;code&gt;vcl_recv&lt;/code&gt; should redirect to the respective &lt;span class="caps"&gt;HTTPS&lt;/span&gt; version of your&amp;nbsp;site.&lt;/p&gt;</content><category term="varnish"></category></entry><entry><title>Making WordPress Fast</title><link href="https://www.rsreese.com/making-wordpress-fast/" rel="alternate"></link><published>2014-12-15T12:00:00-05:00</published><updated>2014-12-15T12:00:00-05:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2014-12-15:/making-wordpress-fast/</id><summary type="html">This site previously used WordPress as a CMS platform. Quite a bit of time was spent tuning in order to get page load times that were consistently less then 500ms although usually closer to 200 to 300ms. The WordPress site was able to burst to around to 2000 users per …</summary><content type="html">&lt;p&gt;This site previously used WordPress as a &lt;span class="caps"&gt;CMS&lt;/span&gt; platform. Quite a bit of time was spent tuning in order to get page load times that were consistently less then 500ms although usually closer to 200 to 300ms. The WordPress site was able to burst to around to 2000 users per &lt;a href="https://www.blitz.io/report/904c1ab082af0d106e4be71c0023b2aa"&gt;blitz.io&lt;/a&gt; although there was an error here or there. I speculate that is a limitation on the outgoing bandwidth of the &lt;span class="caps"&gt;VPS&lt;/span&gt; as the system resources appeared stable. The largest improvements were made by caching, Varnish prevented repeat Apache, &lt;span class="caps"&gt;PHP&lt;/span&gt; and MySQL requests. Real world saturation is a different scenario but not too bad when compared to a stock &lt;a href="http://en.wikipedia.org/wiki/LAMP_%28software_bundle%29"&gt;&lt;span class="caps"&gt;LAMP&lt;/span&gt;&lt;/a&gt; setup. A stock &lt;span class="caps"&gt;LAMP&lt;/span&gt; setup on my &lt;span class="caps"&gt;VPS&lt;/span&gt; would handle around 50 req/sec before services started to hang up. I have since migrated to a new platform but wanted to keep this around for&amp;nbsp;reference.&lt;/p&gt;
&lt;p&gt;Note that the process flow in the following diagram is approximate and does not necessarily&amp;nbsp;accurate.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Web Stack Architecture" src="https://www.rsreese.com/assets/web-stack-arch.png"&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Hosted with &lt;a href="http://www.linode.com/?r=6579d0b21f581ea769a6ca4af46de0dad6f88df8"&gt;Linode&lt;/a&gt; on a &lt;a href="http://wiki.xenproject.org/wiki/Xen_Overview"&gt;Xen Hypervisor&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.debian.org/"&gt;Debian&lt;/a&gt; Linux Operating&amp;nbsp;System&lt;/li&gt;
&lt;li&gt;&lt;a href="http://httpd.apache.org/docs/2.2/mod/worker.html"&gt;Apache &lt;span class="caps"&gt;MPM&lt;/span&gt; worker&lt;/a&gt; - Multi-Processing Module implementing a hybrid multi-threaded multi-process web&amp;nbsp;server&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developers.google.com/speed/pagespeed/mod"&gt;Google PageSpeed Apache module&lt;/a&gt; backed by&amp;nbsp;Memcached&lt;/li&gt;
&lt;li&gt;&lt;a href="http://php-fpm.org/"&gt;&lt;span class="caps"&gt;PHP&lt;/span&gt;-&lt;span class="caps"&gt;FPM&lt;/span&gt;&lt;/a&gt; (FastCGI Process&amp;nbsp;Manager)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.varnish-cache.org/"&gt;Varnish Cache&lt;/a&gt; - a web application accelerator &lt;span class="caps"&gt;AKA&lt;/span&gt; a caching &lt;span class="caps"&gt;HTTP&lt;/span&gt; reverse&amp;nbsp;proxy&lt;/li&gt;
&lt;li&gt;&lt;a href="http://memcached.org/"&gt;Memcached&lt;/a&gt; memory object caching&amp;nbsp;system&lt;/li&gt;
&lt;li&gt;&lt;a href="http://wordpress.org/"&gt;WordPress&lt;/a&gt; running 2010&amp;nbsp;template&lt;/li&gt;
&lt;li&gt;&lt;a href="http://wordpress.org/extend/plugins/batcache/"&gt;Batcache&lt;/a&gt; plugin using &lt;a href="http://svn.wp-plugins.org/memcached/trunk/"&gt;Object Cache&lt;/a&gt; backed by&amp;nbsp;Memcached&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you are looking for a solid do it yourself hosting provider, I recommend you checkout &lt;a href="http://www.linode.com/?r=6579d0b21f581ea769a6ca4af46de0dad6f88df8"&gt;Linode&lt;/a&gt; and use my referral &lt;a href="http://www.linode.com/?r=6579d0b21f581ea769a6ca4af46de0dad6f88df8"&gt;link&lt;/a&gt; if you sign up which helps support this&amp;nbsp;site.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Blitz Report" src="https://www.rsreese.com/assets/wordpress-blitz-report.png"&gt;&lt;/p&gt;</content><category term="wordpress"></category></entry><entry><title>Parsing Microsoft DNS Server Logs</title><link href="https://www.rsreese.com/parsing-microsoft-dns-server-logs/" rel="alternate"></link><published>2014-12-14T12:00:00-05:00</published><updated>2014-12-14T12:00:00-05:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2014-12-14:/parsing-microsoft-dns-server-logs/</id><summary type="html">This is a quick post about one of many ways you may want to parse Microsoft DNS server logs. I this case, I simply wanted to know the top talkers. We use shell and Python in this entry on a Linux host. We follow-up with an all inclusive Python script …</summary><content type="html">&lt;p&gt;This is a quick post about one of many ways you may want to parse Microsoft &lt;span class="caps"&gt;DNS&lt;/span&gt; server logs. I this case, I simply wanted to know the top talkers. We use shell and Python in this entry on a Linux host. We follow-up with an all inclusive Python script if you want to skip to the&amp;nbsp;end.&lt;/p&gt;
&lt;p&gt;Here is the example data or you can follow along with your&amp;nbsp;own:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;DNS Server log file creation at 6/15/2014 6:11:48 PM UTC
Log file wrap at 6/15/2014 5:00:23 PM

Message logging key (for packets - other items use a subset of these fields):
        Field #  Information         Values
        -------  -----------         ------
           1     Date^M
           2     Time^M
           3     Thread ID
           4     Context
           5     Internal packet identifier^M
           6     UDP/TCP indicator^M
           7     Send/Receive indicator^M
           8     Remote IP^M
           9     Xid (hex)^M
          10     Query/Response      R = Response^M
                                     blank = Query^M
          11     Opcode              Q = Standard Query^M
                                     N = Notify^M
                                     U = Update^M
                                     ? = Unknown^M
          12     [ Flags (hex)^M
          13     Flags (char codes)  A = Authoritative Answer^M
                                     T = Truncated Response^M
                                     D = Recursion Desired^M
                                     R = Recursion Available^M
          14     ResponseCode ]^M
          15     Question Type^M
          16     Question Name^M

20140816 16:08:57 588 PACKET  019B99F0 UDP Rcv 192.168.0.2 80fd   Q [0001   D   NOERROR] A     (3)www(1)l(6)google(3)com(0)

20140816 16:08:57 588 PACKET  019CEFF0 UDP Snd 192.168.0.2 622d   Q [0001   D   NOERROR] A     (3)www(1)l(6)google(3)com(0)

20140816 16:08:57 588 PACKET  01C61480 UDP Rcv 192.168.0.2 622d R Q [8081   DR  NOERROR] A     (3)www(1)l(6)google(3)com(0)

20140816 16:08:57 588 PACKET  01C61480 UDP Snd 192.168.0.2 80fd R Q [8081   DR  NOERROR] A     (3)www(1)l(6)google(3)com(0)

20140816 15:51:47 588 PACKET  02131B00 UDP Snd 192.168.0.2 1b77   Q [0001   D   NOERROR] A     (9)messaging(9)microsoft(3)com(0)

20140816 15:51:47 588 PACKET  0242BD70 UDP Rcv 192.168.0.2 1b77 R Q [8081   DR  NOERROR] A     (9)messaging(9)microsoft(3)com(0)

20140816 16:28:56 588 PACKET  02447E50 UDP Rcv 192.168.0.2 6a24   Q [0001   D   NOERROR] A     (10)akamaiedge(3)net(0)

20140816 16:28:56 588 PACKET  01E8B070 UDP Snd 192.168.0.2 f11d   Q [0001   D   NOERROR] A     (10)akamaiedge(3)net(0)

20140816 16:28:56 588 PACKET  01BDA5A0 UDP Rcv 192.168.0.2 f11d R Q [8081   DR  NOERROR] A     (10)akamaiedge(3)net(0)

20140816 16:28:56 588 PACKET  01BDA5A0 UDP Snd 192.168.0.2 6a24 R Q [8081   DR  NOERROR] A     (10)akamaiedge(3)net(0)
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Since there is a header, cut the 28 header&amp;nbsp;lines.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ sed &lt;span class="s1"&gt;&amp;#39;1,29d&amp;#39;&lt;/span&gt; log
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Convert log from Windows to Unix format to handle pesky line&amp;nbsp;returns:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ awk &lt;span class="s1"&gt;&amp;#39;{ sub(&amp;quot;\r$&amp;quot;, &amp;quot;&amp;quot;); print }&amp;#39;&lt;/span&gt; log &amp;gt; log.wintounix
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Get rid of blank&amp;nbsp;lines:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ sed &lt;span class="s1"&gt;&amp;#39;/^$/d&amp;#39;&lt;/span&gt; log.wintounix &amp;gt; log.nolines
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Python code we are going to use to parse the file we have cleaned&amp;nbsp;up. &lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;re&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;collections&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Counter&lt;/span&gt;
&lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="nb"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;log.nolines&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;c&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Counter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;.&amp;#39;&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;re&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;findall&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;r&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;(\w+\(\d+\))&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;split&lt;/span&gt;&lt;span class="p"&gt;()[&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;])[&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;:])&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;line&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;domain&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;count&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;most_common&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="k"&gt;print&lt;/span&gt; &lt;span class="n"&gt;domain&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;count&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Sort the values returned from the Python script above, modify the key as&amp;nbsp;needed.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ sort -t&lt;span class="s2"&gt;&amp;quot; &amp;quot;&lt;/span&gt; -k3 -n -r parsed &amp;gt; parsed.sorted
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;That was a lot of work to parse a file. Lets make it a little easier. Run the following with an input file: &lt;code&gt;parseMSDNS.py log&lt;/code&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="ch"&gt;#!/usr/bin/env python&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;re&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;sys&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;fileinput&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;operator&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;time&lt;/span&gt;
&lt;span class="n"&gt;ret&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt;

&lt;span class="n"&gt;filename&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;argv&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="n"&gt;myfile&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;filename&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;r&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;start_time&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="n"&gt;myfile&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;theFile&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;line&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;theFile&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="c1"&gt;# normalize newlines&lt;/span&gt;
        &lt;span class="c1"&gt;#line = line.replace(&amp;#39;\r\n&amp;#39;, &amp;#39;\n&amp;#39;).line.replace(&amp;#39;\r&amp;#39;, &amp;#39;\n&amp;#39;)&lt;/span&gt;
        &lt;span class="c1"&gt;# match pattern returns true of false&lt;/span&gt;
        &lt;span class="n"&gt;match&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;re&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;search&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;r&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;Q \[.+\].+\(\d+\)([^\(]+)\(\d+\)([^\(]+)&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;strip&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;match&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="bp"&gt;None&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="c1"&gt;# if a match, determine the value&lt;/span&gt;
            &lt;span class="n"&gt;key&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39; &amp;#39;&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;match&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;groups&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
            &lt;span class="c1"&gt;# calculate the number of key&lt;/span&gt;
            &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;key&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;ret&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;keys&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
                &lt;span class="n"&gt;ret&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
            &lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                &lt;span class="n"&gt;ret&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;

&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;k&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;sorted&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ret&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;keys&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="k"&gt;lambda&lt;/span&gt; &lt;span class="n"&gt;k&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="n"&gt;ret&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;k&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="n"&gt;reverse&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;print&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;{:15} - {}&amp;quot;&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;format&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;k&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ret&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;k&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;

&lt;span class="k"&gt;print&lt;/span&gt; &lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;start_time&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;seconds&amp;quot;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;That should do it. Leave a comment if something is not working as&amp;nbsp;expected.&lt;/p&gt;</content><category term="dns"></category></entry><entry><title>Parsing Netflow using Kibana via Logstash to ElasticSearch</title><link href="https://www.rsreese.com/parsing-netflow-using-kibana-via-logstash-to-elasticsearch/" rel="alternate"></link><published>2014-03-18T02:40:00-04:00</published><updated>2014-03-18T02:40:00-04:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2014-03-18:/parsing-netflow-using-kibana-via-logstash-to-elasticsearch/</id><summary type="html">This blog entry shows how to easily insert flow data into an ElasticSearch instance using Logstash and view the data using Kibana. To keep the example simple, we will use Kibana that is integrated in LogStash. We will not use the ElasticSearch that is bundled with LogStash. Instead, we will …</summary><content type="html">&lt;p&gt;This blog entry shows how to easily insert flow data into an
&lt;a href="http://www.elasticsearch.org/"&gt;ElasticSearch&lt;/a&gt; instance using &lt;a href="http://logstash.net/"&gt;Logstash&lt;/a&gt; and view the data using
&lt;a href="http://www.elasticsearch.org/overview/kibana/"&gt;Kibana&lt;/a&gt;. To keep the example simple, we will use Kibana that is
integrated in LogStash. We will not use the ElasticSearch that is
bundled with LogStash. Instead, we will run latest stable version of
ElasticSearch. Testing for this entry was done using Ubuntu 12.04 but
most Linux or similar distributions should work&amp;nbsp;fine.&lt;/p&gt;
&lt;p&gt;First, I needed the ability to generate network flow. Softflowd provided
a simple solution for my purposes. You skip the flow generation
installation if you already have a v5 or v9 netflow source you could
point to your LogStash instance. My testing was done with netflow
version 9, but it appears the the LogStash netflow codec will also
support 5. Softflowd required, byacc which you can get from &lt;a href="http://invisible-island.net/byacc/byacc.html#download"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ ./configure
$ make
$ sudo make install
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Next, setup the netflow daemon that will create flow records from
traffic on an interface that is designated. You can download the
Softflowd source from &lt;a href="https://code.google.com/p/softflowd/"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ ./configure
$ make
$ sudo ./softflowd -i eth0 -n &lt;span class="m"&gt;127&lt;/span&gt;.0.0.1:12345 -v &lt;span class="m"&gt;9&lt;/span&gt; -d
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Before running ElasticSearch or LogStash, you will need Java. The latest
7.0 Java version should work just fine. You can confirm your Java&amp;nbsp;version:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ java -version
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Before we run LogStash, grab the latest &lt;a href="http://www.elasticsearch.org/downloads/"&gt;ElasticSearch&lt;/a&gt; version from
the 0.90.x train. While ElasticSearch 1.x is out, I do not believe
LogStash is yet compatible. If need be, you can edit the memory
requirements in the following configuration&amp;nbsp;file:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ vim ./elasticsearch-0.90.12/bin/elasticsearch.in.sh
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Next start the ElasticSearch&amp;nbsp;instance:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ sudo ./elasticsearch-0.90.12/bin/elasticsearch
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Pull the latest &lt;a href="http://logstash.net/"&gt;LogStash&lt;/a&gt; &lt;span class="caps"&gt;JAR&lt;/span&gt;, before trying to run it, you
will need a netflow configuration file. This configuration file says
that we expect to receive network flow on &lt;span class="caps"&gt;UDP&lt;/span&gt; port 12345. Secondly, we
output to &lt;span class="caps"&gt;STDOUT&lt;/span&gt; and the ElasticSearch entry, the former output is for&amp;nbsp;testing.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;input {
  udp {
    port =&amp;gt; 12345
    codec =&amp;gt; netflow
  }
}
output {
  stdout { }
  elasticsearch { host =&amp;gt; &amp;quot;127.0.0.1&amp;quot; }
}
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Next, we begin collecting&amp;nbsp;netflow:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ sudo java -jar ./Downloads/logstash-1.3.3-flatjar.jar agent -f logstash/netflow.conf -- &lt;span class="p"&gt;&amp;amp;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;After a minute or two, you should start seeing some entries via &lt;span class="caps"&gt;STDOUT&lt;/span&gt;
in the terminal you started LogStash in. While you could start Kibana
with the previous entry by adding the &lt;em&gt;web&lt;/em&gt; toggle, I preferred separate
instances for my&amp;nbsp;evaluation:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ sudo java -jar ./Downloads/logstash-1.3.3-flatjar.jar agent web -- &lt;span class="p"&gt;&amp;amp;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Lastly, the fun part, you should be able to cruise over to either
localhost or whatever &lt;span class="caps"&gt;IP&lt;/span&gt; address the systems as appending by port 9292
and starting&amp;nbsp;tinkering:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;http://127.0.0.1:9292
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Here are three dashboards I quickly put together. Not only is Logstash a
good way to quickly parse netflow, the dashboard&amp;nbsp;shiny:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.rsreese.com/assets/kibana1.png"&gt;&lt;img alt="Kibana Screen Shot" src="https://www.rsreese.com/assets/kibana1-thumb.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.rsreese.com/assets/kibana2.png"&gt;&lt;img alt="Kibana Screen Shot" src="https://www.rsreese.com/assets/kibana2-thumb.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.rsreese.com/assets/kibana3.png"&gt;&lt;img alt="Kibana Screen Shot" src="https://www.rsreese.com/assets/kibana3-thumb.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Leave a comment below if you have any&amp;nbsp;questions.&lt;/p&gt;</content><category term="elasticsearch"></category><category term="logstash"></category><category term="netflow"></category></entry><entry><title>Detecting Tor network traffic with YaF and Python</title><link href="https://www.rsreese.com/detecting-tor-network-traffic-with-yaf-and-python/" rel="alternate"></link><published>2014-02-19T03:36:00-05:00</published><updated>2014-02-19T03:36:00-05:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2014-02-19:/detecting-tor-network-traffic-with-yaf-and-python/</id><summary type="html">This entry continues a series of posts on identifying Tor network traffic and usage. The entry will demonstrate how to parse the output of YaF records via mediator using a Python script in order to determine if the SSL certificate values match the pattern of Tor certificates. It is assumed …</summary><content type="html">&lt;p&gt;This entry continues a series of &lt;a href="http://www.rsreese.com/tag/tor/"&gt;posts&lt;/a&gt; on identifying Tor network
traffic and usage. The entry will demonstrate how to parse the output of
YaF records via mediator using a Python script in order to determine if
the &lt;span class="caps"&gt;SSL&lt;/span&gt; certificate values match the pattern of Tor certificates. It is
assumed you have downloaded, compiled and installed &lt;a href="http://tools.netsa.cert.org/yaf/"&gt;YaF&lt;/a&gt;,
&lt;a href="https://tools.netsa.cert.org/confluence/display/tt/YAF+2.x+IPFIX+File+Mediator"&gt;mediator&lt;/a&gt;, and &lt;a href="https://tools.netsa.cert.org/fixbuf/"&gt;libfixbuf&lt;/a&gt;. Please see prior &lt;a href="http://www.rsreese.com/tag/silk/"&gt;posts&lt;/a&gt; on this
topic or the respective documentation for installation help if&amp;nbsp;needed.&lt;/p&gt;
&lt;p&gt;We first generate the YaF records from the &lt;span class="caps"&gt;PCAP&lt;/span&gt; we acquired. You can
grab the example &lt;span class="caps"&gt;PCAP&lt;/span&gt; from &lt;a href="http://www.cloudshark.org/captures/96ed6d98c159"&gt;cloudshark&lt;/a&gt;.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ yaf --in tor.pcap --out tor.yaf
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Next, parse the YaF output using mediator to disk in a format that we
can parse. Alternatively, we could output to MySQL verse flat text&amp;nbsp;files.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ yaf_file_mediator-1.1.0/yaf_file_mediator --input tor.yaf --output tor.txt
**** Total flow count is &lt;span class="m"&gt;29&lt;/span&gt; ****
**** Stats Total Count is &lt;span class="m"&gt;1&lt;/span&gt; ****
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Using Python, we can parse the records for patterns that match Tor &lt;span class="caps"&gt;SSL&lt;/span&gt;&amp;nbsp;certificates.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="ch"&gt;#!/usr/bin/python&lt;/span&gt;

&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;re&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;sys&lt;/span&gt;

&lt;span class="n"&gt;filename&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;argv&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="n"&gt;myfile&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;filename&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;r&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;sourceIP&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;Source IP:&amp;#39;&lt;/span&gt;
&lt;span class="n"&gt;destIP&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;Destination IP:&amp;#39;&lt;/span&gt;
&lt;span class="n"&gt;issuerID&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;Issuer ID:&amp;#39;&lt;/span&gt;
&lt;span class="n"&gt;subjectID&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;Subject ID:&amp;#39;&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;line&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;myfile&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;readlines&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="n"&gt;line&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;strip&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;startswith&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sourceIP&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;sourceIPline&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;line&lt;/span&gt;
    &lt;span class="k"&gt;elif&lt;/span&gt; &lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;startswith&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;destIP&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;destIPline&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;line&lt;/span&gt;
    &lt;span class="k"&gt;elif&lt;/span&gt; &lt;span class="n"&gt;line&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;startswith&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;issuerID&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;issuerDomain&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;re&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;search&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;r&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;www.\w+.com&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;elif&lt;/span&gt; &lt;span class="n"&gt;line&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;startswith&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;subjectID&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;subjectDomain&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;re&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;search&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;r&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;www.\w+.net&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;issuerDomain&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;subjectDomain&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;print&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sourceIPline&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="k"&gt;print&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;destIPline&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="k"&gt;print&lt;/span&gt; &lt;span class="n"&gt;issuerDomain&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;group&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
            &lt;span class="k"&gt;print&lt;/span&gt; &lt;span class="n"&gt;subjectDomain&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;group&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
            &lt;span class="k"&gt;print&lt;/span&gt;
&lt;span class="n"&gt;myfile&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;close&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;The following is an example output from the example &lt;span class="caps"&gt;PCAP&lt;/span&gt; provided earlier in this post. The Python regular expression ignores other &lt;span class="caps"&gt;SSL&lt;/span&gt; certificate values as they traditionally do not match the pattern that Tor certificates use, the inclusion of a domain for the Issuer and Subject IDs. That said, false-positives could be&amp;nbsp;introduced.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ tor-ssl-parser.py tor.txt
Source IP: &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126
Destination IP: &lt;span class="m"&gt;198&lt;/span&gt;.27.97.223
www.axslhtfqq.com
www.hkkch64skp7am.net

Source IP: &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126
Destination IP: &lt;span class="m"&gt;96&lt;/span&gt;.127.153.58
www.rtqtkopfct767ai.com
www.facp2b2y5wjffbo5ioy.net

Source IP: &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126
Destination IP: &lt;span class="m"&gt;192&lt;/span&gt;.151.147.5
www.5m6ywj2w7zs.com
www.iolbr3jbfs.net

Source IP: &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126
Destination IP: &lt;span class="m"&gt;66&lt;/span&gt;.18.12.197
www.igdpzct5tauwgyqs.com
www.4tdznzbrfuv.net

Source IP: &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126
Destination IP: &lt;span class="m"&gt;64&lt;/span&gt;.62.249.222
www.3pzqe4en5.com
www.glk3fwiz6.net

Source IP: &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126
Destination IP: &lt;span class="m"&gt;212&lt;/span&gt;.83.158.173
www.lvv4l6sx3qafei2s5u.com
www.vznlngjz7a2fpg.net

Source IP: &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126
Destination IP: &lt;span class="m"&gt;212&lt;/span&gt;.83.155.250
www.mbrdx4tz2ob5wlvazlr.com
www.shxl35n3zt.net

Source IP: &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126
Destination IP: &lt;span class="m"&gt;212&lt;/span&gt;.83.140.45
www.3pxivyds.com
www.nolspqtib3ix.net

Source IP: &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126
Destination IP: &lt;span class="m"&gt;212&lt;/span&gt;.83.158.50
www.s426lumoi7.com
www.ouzbot23a6lw3vvmszx.net

Source IP: &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126
Destination IP: &lt;span class="m"&gt;212&lt;/span&gt;.83.158.40
www.3eexfeaw.com
www.iedhzej4tie4egm.net

Source IP: &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126
Destination IP: &lt;span class="m"&gt;212&lt;/span&gt;.83.158.5
www.2fwld67ac2.com
www.6suxdq3miwwewq4.net

Source IP: &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126
Destination IP: &lt;span class="m"&gt;31&lt;/span&gt;.7.186.228
www.5orbut4ufhohm5rlj47.com
www.orutxjqwf.net

Source IP: &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126
Destination IP: &lt;span class="m"&gt;216&lt;/span&gt;.66.85.146
www.6pp7bfbdywvcaicqmfq.com
www.g6oa3qdobmdgl5tprm.net

Source IP: &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126
Destination IP: &lt;span class="m"&gt;178&lt;/span&gt;.254.35.132
www.hbwpqbx4zimtptui.com
www.77wneeix55t.net

Source IP: &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126
Destination IP: &lt;span class="m"&gt;188&lt;/span&gt;.40.98.96
www.ozsx22b4nda.com
www.lr7s5k3n6ber.net

Source IP: &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126
Destination IP: &lt;span class="m"&gt;80&lt;/span&gt;.100.45.156
www.npmxal2ohuefme26yf.com
www.c7kriuquvh.net

Source IP: &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126
Destination IP: &lt;span class="m"&gt;91&lt;/span&gt;.143.91.174
www.zcgg5yiwzajal4.com
www.55a4kx5jrqxezvk.net

Source IP: &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126
Destination IP: &lt;span class="m"&gt;85&lt;/span&gt;.17.122.80
www.plgx26wgyroot37x3ysj.com
www.xwx5gpj5t2msq3.net

Source IP: &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126
Destination IP: &lt;span class="m"&gt;88&lt;/span&gt;.159.20.120
www.s5rc22gpzrwt4e.com
www.qzsg2ioaoplbs2gaha5.net

Source IP: &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126
Destination IP: &lt;span class="m"&gt;37&lt;/span&gt;.59.150.178
www.vywbff5wkza6npkd5l.com
www.ugdrrog5ro5wdfddj.net

Source IP: &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126
Destination IP: &lt;span class="m"&gt;91&lt;/span&gt;.219.237.229
www.twngp3xrqgo4p.com
www.znskvp5k5pns22y2.net

Source IP: &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126
Destination IP: &lt;span class="m"&gt;95&lt;/span&gt;.211.225.167
www.75ba5lymxpbhw3a2kb.com
www.rnspic4yus5crf6w.net

Source IP: &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126
Destination IP: &lt;span class="m"&gt;82&lt;/span&gt;.96.35.7
www.spx5a4e5eyhkdtpt2xj.com
www.6phyovjhggkfm.net

Source IP: &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126
Destination IP: &lt;span class="m"&gt;83&lt;/span&gt;.140.59.2
www.o5qzqtbs.com
www.bnymkm3nk7jtz3.net

Source IP: &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126
Destination IP: &lt;span class="m"&gt;82&lt;/span&gt;.96.35.8
www.7wdf4rkj5mew.com
www.sd5mkmsmo.net

Source IP: &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126
Destination IP: &lt;span class="m"&gt;93&lt;/span&gt;.180.156.45
www.rxy4jiw4wk.com
www.g66mipkcyhjwumywk4h.net

Source IP: &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126
Destination IP: &lt;span class="m"&gt;81&lt;/span&gt;.218.109.195
www.gempmzrnwnk.com
www.6lrz7wtwprz.net

Source IP: &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126
Destination IP: &lt;span class="m"&gt;31&lt;/span&gt;.172.30.4
www.4jvdpoo5wcklhd3usu.com
www.f4uxyorx2h.net

Source IP: &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126
Destination IP: &lt;span class="m"&gt;50&lt;/span&gt;.7.194.122
www.pxznjv3t75.com
www.wuqq77l634eogfm.net
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Please leave a comment if you have any&amp;nbsp;questions.&lt;/p&gt;</content><category term="analysis"></category><category term="python"></category><category term="silk"></category><category term="tor"></category></entry><entry><title>Detecting Tor network traffic with SiLK</title><link href="https://www.rsreese.com/detecting-tor-network-traffic-with-silk/" rel="alternate"></link><published>2014-01-09T04:33:00-05:00</published><updated>2014-01-09T04:33:00-05:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2014-01-09:/detecting-tor-network-traffic-with-silk/</id><summary type="html">This entry continues a series of posts on identifying Tor network traffic and usage. This post is not to argue the merits of allowing Tor to run on a network. However, the entry will demonstrate how to create a set of Tor server IP addresses to parse network flow using …</summary><content type="html">&lt;p&gt;This entry continues a series of &lt;a href="http://www.rsreese.com/tag/tor/"&gt;posts&lt;/a&gt; on identifying Tor network
traffic and usage. This post is not to argue the merits of allowing Tor
to run on a network. However, the entry will demonstrate how to create a
set of Tor server &lt;span class="caps"&gt;IP&lt;/span&gt; addresses to parse network flow using SiLK (System
for Internet-Level Knowledge) in order to determine if the network flow
is a match. It is assumed you have downloaded, compiled and installed
&lt;a href="http://tools.netsa.cert.org/silk/"&gt;SiLK&lt;/a&gt;, &lt;a href="http://tools.netsa.cert.org/yaf/"&gt;YaF&lt;/a&gt;, and &lt;a href="https://tools.netsa.cert.org/fixbuf/"&gt;libfixbuf&lt;/a&gt;. Please see prior &lt;a href="http://www.rsreese.com/tag/silk/"&gt;posts&lt;/a&gt; on
this topic or the respective documentation for installation help if&amp;nbsp;needed.&lt;/p&gt;
&lt;p&gt;We need to obtain the current list of Tor servers and place them in a
file. We will then parse the destination &lt;span class="caps"&gt;IP&lt;/span&gt; addresses which will be
placed into a SiLK set using the SiLK &lt;code&gt;rwsetbuild&lt;/code&gt; command. Creating an
&lt;span class="caps"&gt;IP&lt;/span&gt; set will allow us to use &lt;em&gt;rwfilter&lt;/em&gt; to specify what &lt;span class="caps"&gt;IP&lt;/span&gt; addresses
should match outgoing network traffic. A Perl script from &lt;a href="http://blog.vorant.com/2008/06/tor-server-lists-revisited.html"&gt;here&lt;/a&gt; makes
quick work of downloading the current Tor server&amp;nbsp;list.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="ch"&gt;#!/usr/bin/perl&lt;/span&gt;
&lt;span class="c1"&gt;#&lt;/span&gt;
&lt;span class="c1"&gt;# Fetch the list of known Tor servers (from an existing Tor server) and&lt;/span&gt;
&lt;span class="c1"&gt;# display some of the basic info for each router.&lt;/span&gt;

&lt;span class="k"&gt;use&lt;/span&gt; &lt;span class="nn"&gt;LWP::Simple&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;# Hostname of an existing Tor router.  We use one of the directory authorities&lt;/span&gt;
&lt;span class="c1"&gt;# since that&amp;#39;s pretty much what they&amp;#39;re for.&lt;/span&gt;
&lt;span class="nv"&gt;$INITIAL_TOR_SERVER&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;&amp;quot;193.23.244.244&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;   &lt;span class="c1"&gt;# http://dannenberg.ccc.de/tor/status/all&lt;/span&gt;
&lt;span class="nv"&gt;$DIR_PORT&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;80&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;# Fetch the list of servers&lt;/span&gt;
&lt;span class="nv"&gt;$content&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;http://$INITIAL_TOR_SERVER:$DIR_PORT/tor/status/all&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nv"&gt;@lines&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;split&lt;/span&gt; &lt;span class="sr"&gt;/\n/&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nv"&gt;$content&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;foreach&lt;/span&gt; &lt;span class="nv"&gt;$router&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;@lines&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$router&lt;/span&gt; &lt;span class="o"&gt;=~&lt;/span&gt; &lt;span class="sr"&gt;m/^r\s+(\S+)\s+(\S+)\s+(\S+)\s+(\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2})\s+(\S+)\s+(\d+)\s+(\d+)$/&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$address&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$or_port&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$directory_port&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$update_time&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;
            &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$6&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$7&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$4&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="k"&gt;print&lt;/span&gt; &lt;span class="s"&gt;&amp;quot;$name | $address | $or_port | $directory_port | $update_time\n&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Now that we have the current Tor server list, we can parse the Tor &lt;span class="caps"&gt;IP&lt;/span&gt;
addresses. While you can modify the Perl script to only display the Tor
server &lt;span class="caps"&gt;IP&lt;/span&gt; addresses, I still like to sort and parse for unique addresses
as there are could be duplicates. You could also specify what type of
Tor &lt;span class="caps"&gt;IP&lt;/span&gt; addresses you would like, i.e. exit, active, etc. Further, it is
not bad to have a reference to determine what ports are associated with
which addresses. Useful for more advanced&amp;nbsp;queries.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ awk -F &lt;span class="s2"&gt;&amp;quot;|&amp;quot;&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;{ print $2 }&amp;#39;&lt;/span&gt; exit-addresses &lt;span class="p"&gt;|&lt;/span&gt; awk &lt;span class="s1"&gt;&amp;#39;{sub(/^[ \t]+/, &amp;quot;&amp;quot;)};1&amp;#39;&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt;sort&lt;span class="p"&gt;|&lt;/span&gt;uniq &amp;gt; tor.txt
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;We convert the file containing the Tor server &lt;span class="caps"&gt;IP&lt;/span&gt; addresses to a set
using the following&amp;nbsp;command:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ rwsetbuild tor.txt tor-servers.set
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Typically, network flow would have already been captured for
retrospective analysis, but for example sake, we will use a packet
capture which already contains Tor traffic. We first convert our
captured traffic to a YaF formatted file. This example &lt;span class="caps"&gt;PCAP&lt;/span&gt; may be
downloaded from &lt;a href="http://www.cloudshark.org/captures/96ed6d98c159"&gt;CloudShark&lt;/a&gt;.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ /usr/local/bin/yaf --in tor.pcap --out ~/tor.yaf --filter&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;port 443&amp;quot;&lt;/span&gt; --applabel --applabel-rules&lt;span class="o"&gt;=&lt;/span&gt;/usr/local/etc/yafApplabelRules.conf --max-payload&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;4000&lt;/span&gt; --plugin-name&lt;span class="o"&gt;=&lt;/span&gt;/usr/local/lib/yaf/dpacketplugin.la --plugin-opts&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;443&amp;quot;&lt;/span&gt; --lock &lt;span class="p"&gt;&amp;amp;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Next, we convert the YaF format file to an &lt;span class="caps"&gt;IPFIX&lt;/span&gt; formatted&amp;nbsp;file.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ rwipfix2silk --silk-output&lt;span class="o"&gt;=&lt;/span&gt;tor.rw tor.yaf
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;This &lt;em&gt;rwfilter&lt;/em&gt; query parses for the data we are looking for and places
in a binary file. We can write to standard out but I usually end up
running additional queries using tools such as &lt;em&gt;rwcut&lt;/em&gt; and &lt;em&gt;rwstats&lt;/em&gt; so
it is much faster to work from the smaller binary file, verse running
the original query&amp;nbsp;again.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ rwfilter --start-date&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30 --end-date&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30  --dipset&lt;span class="o"&gt;=&lt;/span&gt;tor-servers.set --proto&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;- --type&lt;span class="o"&gt;=&lt;/span&gt;all --pass&lt;span class="o"&gt;=&lt;/span&gt;tor2.bin tor.rw
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;We parse the SiLK records we are interested in seeing to standard out
via the &lt;em&gt;rwcut&lt;/em&gt; command. Note the use of the &lt;em&gt;cut&lt;/em&gt; command to minimize
the white-space prefixing the&amp;nbsp;output.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ rwcut tor2.bin&lt;span class="p"&gt;|&lt;/span&gt;cut -c26-
           sIP&lt;span class="p"&gt;|&lt;/span&gt;                                    dIP&lt;span class="p"&gt;|&lt;/span&gt;sPort&lt;span class="p"&gt;|&lt;/span&gt;dPort&lt;span class="p"&gt;|&lt;/span&gt;pro&lt;span class="p"&gt;|&lt;/span&gt;   packets&lt;span class="p"&gt;|&lt;/span&gt;     bytes&lt;span class="p"&gt;|&lt;/span&gt;   flags&lt;span class="p"&gt;|&lt;/span&gt;                  sTime&lt;span class="p"&gt;|&lt;/span&gt; duration&lt;span class="p"&gt;|&lt;/span&gt;                  eTime&lt;span class="p"&gt;|&lt;/span&gt;sen&lt;span class="p"&gt;|&lt;/span&gt;
    &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;                          &lt;span class="m"&gt;198&lt;/span&gt;.27.97.223&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;38946&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;30&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8497&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.336&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;76&lt;/span&gt;.182&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.518&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
 &lt;span class="m"&gt;198&lt;/span&gt;.27.97.223&lt;span class="p"&gt;|&lt;/span&gt;                             &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;38946&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;32&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;     &lt;span class="m"&gt;28802&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.381&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;76&lt;/span&gt;.137&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.518&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
    &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;                          &lt;span class="m"&gt;96&lt;/span&gt;.127.153.58&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;42529&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;27&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8341&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:22.190&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;75&lt;/span&gt;.341&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.531&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
 &lt;span class="m"&gt;96&lt;/span&gt;.127.153.58&lt;span class="p"&gt;|&lt;/span&gt;                             &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;42529&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;30&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;     &lt;span class="m"&gt;26678&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:22.232&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;75&lt;/span&gt;.299&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.531&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
    &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;                          &lt;span class="m"&gt;192&lt;/span&gt;.151.147.5&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;44384&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;14&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;3502&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:26.486&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;71&lt;/span&gt;.052&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.538&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
 &lt;span class="m"&gt;192&lt;/span&gt;.151.147.5&lt;span class="p"&gt;|&lt;/span&gt;                             &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;44384&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;14&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;4819&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:26.535&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;71&lt;/span&gt;.003&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.538&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
    &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;                           &lt;span class="m"&gt;66&lt;/span&gt;.18.12.197&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;49341&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;28&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8475&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.426&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;76&lt;/span&gt;.125&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.551&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
  &lt;span class="m"&gt;66&lt;/span&gt;.18.12.197&lt;span class="p"&gt;|&lt;/span&gt;                             &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;49341&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;29&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;     &lt;span class="m"&gt;26805&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.471&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;76&lt;/span&gt;.080&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.551&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
    &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;                          &lt;span class="m"&gt;64&lt;/span&gt;.62.249.222&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;40742&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;30&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8159&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.375&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;76&lt;/span&gt;.208&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.583&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
 &lt;span class="m"&gt;64&lt;/span&gt;.62.249.222&lt;span class="p"&gt;|&lt;/span&gt;                             &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;40742&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;32&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;     &lt;span class="m"&gt;28493&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.461&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;76&lt;/span&gt;.122&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.583&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
    &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;                         &lt;span class="m"&gt;212&lt;/span&gt;.83.158.173&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;40825&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;28&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8394&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:22.079&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;75&lt;/span&gt;.506&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.585&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;212&lt;/span&gt;.83.158.173&lt;span class="p"&gt;|&lt;/span&gt;                             &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;40825&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;31&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;     &lt;span class="m"&gt;28867&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:22.180&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;75&lt;/span&gt;.405&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.585&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
    &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;                         &lt;span class="m"&gt;212&lt;/span&gt;.83.155.250&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;55603&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;29&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8454&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:22.196&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;75&lt;/span&gt;.389&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.585&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;212&lt;/span&gt;.83.155.250&lt;span class="p"&gt;|&lt;/span&gt;                             &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;55603&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;31&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;     &lt;span class="m"&gt;27840&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:22.290&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;75&lt;/span&gt;.295&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.585&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
    &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;                          &lt;span class="m"&gt;212&lt;/span&gt;.83.140.45&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;46797&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;29&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8455&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.342&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;76&lt;/span&gt;.245&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.587&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
 &lt;span class="m"&gt;212&lt;/span&gt;.83.140.45&lt;span class="p"&gt;|&lt;/span&gt;                             &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;46797&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;30&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;     &lt;span class="m"&gt;26648&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.439&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;76&lt;/span&gt;.148&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.587&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
    &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;                          &lt;span class="m"&gt;212&lt;/span&gt;.83.158.50&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;50935&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;31&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8567&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.396&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;76&lt;/span&gt;.191&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.587&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
 &lt;span class="m"&gt;212&lt;/span&gt;.83.158.50&lt;span class="p"&gt;|&lt;/span&gt;                             &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;50935&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;30&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;     &lt;span class="m"&gt;26145&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.492&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;76&lt;/span&gt;.095&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.587&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
    &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;                          &lt;span class="m"&gt;212&lt;/span&gt;.83.158.40&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;33170&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;29&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8459&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:22.088&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;75&lt;/span&gt;.506&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.594&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
 &lt;span class="m"&gt;212&lt;/span&gt;.83.158.40&lt;span class="p"&gt;|&lt;/span&gt;                             &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;33170&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;33&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;     &lt;span class="m"&gt;28930&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:23.199&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;74&lt;/span&gt;.395&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.594&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
    &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;                           &lt;span class="m"&gt;212&lt;/span&gt;.83.158.5&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;37960&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;27&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8342&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.415&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;76&lt;/span&gt;.187&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.602&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
  &lt;span class="m"&gt;212&lt;/span&gt;.83.158.5&lt;span class="p"&gt;|&lt;/span&gt;                             &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;37960&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;32&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;     &lt;span class="m"&gt;26758&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.517&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;76&lt;/span&gt;.085&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.602&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
    &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;                           &lt;span class="m"&gt;31&lt;/span&gt;.7.186.228&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;44997&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;26&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8294&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.377&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;76&lt;/span&gt;.227&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.604&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
  &lt;span class="m"&gt;31&lt;/span&gt;.7.186.228&lt;span class="p"&gt;|&lt;/span&gt;                             &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;44997&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;34&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;     &lt;span class="m"&gt;29440&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.486&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;76&lt;/span&gt;.118&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.604&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
    &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;                          &lt;span class="m"&gt;216&lt;/span&gt;.66.85.146&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;50817&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;15&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;3379&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:34.492&lt;span class="p"&gt;|&lt;/span&gt;    &lt;span class="m"&gt;3&lt;/span&gt;.114&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.606&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
 &lt;span class="m"&gt;216&lt;/span&gt;.66.85.146&lt;span class="p"&gt;|&lt;/span&gt;                             &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;50817&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;15&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;6866&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:34.590&lt;span class="p"&gt;|&lt;/span&gt;    &lt;span class="m"&gt;3&lt;/span&gt;.016&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.606&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
    &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;                         &lt;span class="m"&gt;178&lt;/span&gt;.254.35.132&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;50724&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;20&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;5347&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:33.494&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;64&lt;/span&gt;.117&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.611&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;178&lt;/span&gt;.254.35.132&lt;span class="p"&gt;|&lt;/span&gt;                             &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;50724&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;23&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;     &lt;span class="m"&gt;16358&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:33.595&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;64&lt;/span&gt;.016&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.611&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
    &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;                           &lt;span class="m"&gt;188&lt;/span&gt;.40.98.96&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;54796&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;30&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8565&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.380&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;76&lt;/span&gt;.231&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.611&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
  &lt;span class="m"&gt;188&lt;/span&gt;.40.98.96&lt;span class="p"&gt;|&lt;/span&gt;                             &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;54796&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;32&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;     &lt;span class="m"&gt;27966&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.494&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;76&lt;/span&gt;.117&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.611&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
    &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;                          &lt;span class="m"&gt;80&lt;/span&gt;.100.45.156&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;60680&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;30&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8578&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.386&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;76&lt;/span&gt;.228&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.614&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
 &lt;span class="m"&gt;80&lt;/span&gt;.100.45.156&lt;span class="p"&gt;|&lt;/span&gt;                             &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;60680&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;31&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;     &lt;span class="m"&gt;28447&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.496&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;76&lt;/span&gt;.118&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.614&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
    &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;                          &lt;span class="m"&gt;91&lt;/span&gt;.143.91.174&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;39275&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;23&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8209&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:22.185&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;75&lt;/span&gt;.435&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.620&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
 &lt;span class="m"&gt;91&lt;/span&gt;.143.91.174&lt;span class="p"&gt;|&lt;/span&gt;                             &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;39275&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;33&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;     &lt;span class="m"&gt;28626&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:22.312&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;75&lt;/span&gt;.308&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.620&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
    &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;                           &lt;span class="m"&gt;85&lt;/span&gt;.17.122.80&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;43989&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;29&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8457&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.418&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;76&lt;/span&gt;.202&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.620&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
  &lt;span class="m"&gt;85&lt;/span&gt;.17.122.80&lt;span class="p"&gt;|&lt;/span&gt;                             &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;43989&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;32&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;     &lt;span class="m"&gt;28409&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.539&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;76&lt;/span&gt;.081&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.620&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
    &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;                          &lt;span class="m"&gt;88&lt;/span&gt;.159.20.120&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;49609&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;31&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8633&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.412&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;76&lt;/span&gt;.208&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.620&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
 &lt;span class="m"&gt;88&lt;/span&gt;.159.20.120&lt;span class="p"&gt;|&lt;/span&gt;                             &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;49609&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;34&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;     &lt;span class="m"&gt;29194&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.513&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;76&lt;/span&gt;.107&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.620&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
    &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;                          &lt;span class="m"&gt;37&lt;/span&gt;.59.150.178&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;47658&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;30&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8516&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.399&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;76&lt;/span&gt;.223&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.622&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
 &lt;span class="m"&gt;37&lt;/span&gt;.59.150.178&lt;span class="p"&gt;|&lt;/span&gt;                             &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;47658&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;33&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;     &lt;span class="m"&gt;29412&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.513&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;76&lt;/span&gt;.109&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.622&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
    &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;                         &lt;span class="m"&gt;91&lt;/span&gt;.219.237.229&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;35498&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;15&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;3616&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:34.489&lt;span class="p"&gt;|&lt;/span&gt;    &lt;span class="m"&gt;3&lt;/span&gt;.134&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.623&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;91&lt;/span&gt;.219.237.229&lt;span class="p"&gt;|&lt;/span&gt;                             &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;35498&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;14&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;7664&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:34.614&lt;span class="p"&gt;|&lt;/span&gt;    &lt;span class="m"&gt;3&lt;/span&gt;.009&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.623&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
    &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;                         &lt;span class="m"&gt;95&lt;/span&gt;.211.225.167&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;57656&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;27&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8359&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.345&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;76&lt;/span&gt;.280&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.625&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;95&lt;/span&gt;.211.225.167&lt;span class="p"&gt;|&lt;/span&gt;                             &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;57656&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;33&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;     &lt;span class="m"&gt;27948&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.475&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;76&lt;/span&gt;.150&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.625&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
    &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;                             &lt;span class="m"&gt;82&lt;/span&gt;.96.35.7&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;58655&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;15&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;3563&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:34.486&lt;span class="p"&gt;|&lt;/span&gt;    &lt;span class="m"&gt;3&lt;/span&gt;.147&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.633&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
    &lt;span class="m"&gt;82&lt;/span&gt;.96.35.7&lt;span class="p"&gt;|&lt;/span&gt;                             &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;58655&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;13&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;7445&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:34.629&lt;span class="p"&gt;|&lt;/span&gt;    &lt;span class="m"&gt;3&lt;/span&gt;.004&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.633&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
    &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;                            &lt;span class="m"&gt;83&lt;/span&gt;.140.59.2&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;45720&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;22&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8160&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.745&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;75&lt;/span&gt;.888&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.633&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
   &lt;span class="m"&gt;83&lt;/span&gt;.140.59.2&lt;span class="p"&gt;|&lt;/span&gt;                             &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;45720&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;30&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;     &lt;span class="m"&gt;27422&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.887&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;75&lt;/span&gt;.746&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.633&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
    &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;                             &lt;span class="m"&gt;82&lt;/span&gt;.96.35.8&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;42995&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;28&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8414&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.339&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;76&lt;/span&gt;.302&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.641&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
    &lt;span class="m"&gt;82&lt;/span&gt;.96.35.8&lt;span class="p"&gt;|&lt;/span&gt;                             &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;42995&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;33&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;     &lt;span class="m"&gt;28927&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.479&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;76&lt;/span&gt;.162&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.641&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
    &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;                          &lt;span class="m"&gt;93&lt;/span&gt;.180.156.45&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;47282&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;33&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8671&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.421&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;76&lt;/span&gt;.223&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.644&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
 &lt;span class="m"&gt;93&lt;/span&gt;.180.156.45&lt;span class="p"&gt;|&lt;/span&gt;                             &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;47282&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;39&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;     &lt;span class="m"&gt;31370&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.562&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;76&lt;/span&gt;.082&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.644&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
    &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;                         &lt;span class="m"&gt;81&lt;/span&gt;.218.109.195&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;60000&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;29&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8460&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.383&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;76&lt;/span&gt;.277&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.660&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;81&lt;/span&gt;.218.109.195&lt;span class="p"&gt;|&lt;/span&gt;                             &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;60000&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;32&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;     &lt;span class="m"&gt;27852&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.535&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;76&lt;/span&gt;.125&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.660&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
    &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;                            &lt;span class="m"&gt;31&lt;/span&gt;.172.30.4&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;35914&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;36&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8922&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:22.146&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;75&lt;/span&gt;.538&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.684&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
   &lt;span class="m"&gt;31&lt;/span&gt;.172.30.4&lt;span class="p"&gt;|&lt;/span&gt;                             &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;35914&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;34&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;     &lt;span class="m"&gt;32082&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:22.271&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;75&lt;/span&gt;.413&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.684&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
    &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;                           &lt;span class="m"&gt;50&lt;/span&gt;.7.194.122&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;38522&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;20&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;5384&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:33.487&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;64&lt;/span&gt;.202&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.689&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
  &lt;span class="m"&gt;50&lt;/span&gt;.7.194.122&lt;span class="p"&gt;|&lt;/span&gt;                             &lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;38522&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;17&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;9223&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:33.671&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;64&lt;/span&gt;.018&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.689&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;With the next query, we adjust the &lt;em&gt;type&lt;/em&gt; of traffic we want to look at
to only outgoing traffic to the Tor servers instead of the previously
displayed bi-directional&amp;nbsp;traffic.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ rwfilter --dipset&lt;span class="o"&gt;=&lt;/span&gt;tor-servers.set --proto&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;- --type&lt;span class="o"&gt;=&lt;/span&gt;out --pass&lt;span class="o"&gt;=&lt;/span&gt;tor.bin tor.rw
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Again, we parse the SiLK records. Again, note the use of the cut command
to minimize the white-space prefix the first column of data. The reason
for this is there are additional columns of data not displayed by
default. Checkout the &lt;em&gt;rwcut&lt;/em&gt; man page for other columns data that may
be of&amp;nbsp;interest.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ rwcut tor.bin &lt;span class="p"&gt;|&lt;/span&gt;cut -c30-
       sIP&lt;span class="p"&gt;|&lt;/span&gt;                                    dIP&lt;span class="p"&gt;|&lt;/span&gt;sPort&lt;span class="p"&gt;|&lt;/span&gt;dPort&lt;span class="p"&gt;|&lt;/span&gt;pro&lt;span class="p"&gt;|&lt;/span&gt;   packets&lt;span class="p"&gt;|&lt;/span&gt;     bytes&lt;span class="p"&gt;|&lt;/span&gt;   flags&lt;span class="p"&gt;|&lt;/span&gt;                  sTime&lt;span class="p"&gt;|&lt;/span&gt; duration&lt;span class="p"&gt;|&lt;/span&gt;                  eTime&lt;span class="p"&gt;|&lt;/span&gt;sen&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;                          &lt;span class="m"&gt;198&lt;/span&gt;.27.97.223&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;38946&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;30&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8497&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.336&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;76&lt;/span&gt;.182&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.518&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;                          &lt;span class="m"&gt;96&lt;/span&gt;.127.153.58&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;42529&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;27&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8341&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:22.190&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;75&lt;/span&gt;.341&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.531&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;                          &lt;span class="m"&gt;192&lt;/span&gt;.151.147.5&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;44384&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;14&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;3502&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:26.486&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;71&lt;/span&gt;.052&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.538&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;                           &lt;span class="m"&gt;66&lt;/span&gt;.18.12.197&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;49341&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;28&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8475&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.426&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;76&lt;/span&gt;.125&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.551&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;                          &lt;span class="m"&gt;64&lt;/span&gt;.62.249.222&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;40742&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;30&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8159&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.375&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;76&lt;/span&gt;.208&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.583&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;                         &lt;span class="m"&gt;212&lt;/span&gt;.83.158.173&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;40825&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;28&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8394&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:22.079&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;75&lt;/span&gt;.506&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.585&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;                         &lt;span class="m"&gt;212&lt;/span&gt;.83.155.250&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;55603&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;29&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8454&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:22.196&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;75&lt;/span&gt;.389&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.585&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;                          &lt;span class="m"&gt;212&lt;/span&gt;.83.140.45&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;46797&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;29&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8455&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.342&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;76&lt;/span&gt;.245&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.587&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;                          &lt;span class="m"&gt;212&lt;/span&gt;.83.158.50&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;50935&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;31&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8567&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.396&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;76&lt;/span&gt;.191&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.587&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;                          &lt;span class="m"&gt;212&lt;/span&gt;.83.158.40&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;33170&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;29&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8459&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:22.088&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;75&lt;/span&gt;.506&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.594&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;                           &lt;span class="m"&gt;212&lt;/span&gt;.83.158.5&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;37960&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;27&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8342&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.415&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;76&lt;/span&gt;.187&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.602&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;                           &lt;span class="m"&gt;31&lt;/span&gt;.7.186.228&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;44997&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;26&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8294&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.377&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;76&lt;/span&gt;.227&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.604&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;                          &lt;span class="m"&gt;216&lt;/span&gt;.66.85.146&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;50817&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;15&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;3379&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:34.492&lt;span class="p"&gt;|&lt;/span&gt;    &lt;span class="m"&gt;3&lt;/span&gt;.114&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.606&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;                         &lt;span class="m"&gt;178&lt;/span&gt;.254.35.132&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;50724&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;20&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;5347&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:33.494&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;64&lt;/span&gt;.117&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.611&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;                           &lt;span class="m"&gt;188&lt;/span&gt;.40.98.96&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;54796&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;30&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8565&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.380&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;76&lt;/span&gt;.231&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.611&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;                          &lt;span class="m"&gt;80&lt;/span&gt;.100.45.156&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;60680&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;30&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8578&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.386&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;76&lt;/span&gt;.228&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.614&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;                          &lt;span class="m"&gt;91&lt;/span&gt;.143.91.174&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;39275&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;23&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8209&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:22.185&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;75&lt;/span&gt;.435&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.620&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;                           &lt;span class="m"&gt;85&lt;/span&gt;.17.122.80&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;43989&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;29&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8457&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.418&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;76&lt;/span&gt;.202&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.620&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;                          &lt;span class="m"&gt;88&lt;/span&gt;.159.20.120&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;49609&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;31&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8633&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.412&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;76&lt;/span&gt;.208&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.620&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;                          &lt;span class="m"&gt;37&lt;/span&gt;.59.150.178&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;47658&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;30&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8516&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.399&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;76&lt;/span&gt;.223&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.622&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;                         &lt;span class="m"&gt;91&lt;/span&gt;.219.237.229&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;35498&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;15&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;3616&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:34.489&lt;span class="p"&gt;|&lt;/span&gt;    &lt;span class="m"&gt;3&lt;/span&gt;.134&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.623&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;                         &lt;span class="m"&gt;95&lt;/span&gt;.211.225.167&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;57656&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;27&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8359&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.345&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;76&lt;/span&gt;.280&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.625&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;                             &lt;span class="m"&gt;82&lt;/span&gt;.96.35.7&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;58655&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;15&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;3563&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:34.486&lt;span class="p"&gt;|&lt;/span&gt;    &lt;span class="m"&gt;3&lt;/span&gt;.147&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.633&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;                            &lt;span class="m"&gt;83&lt;/span&gt;.140.59.2&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;45720&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;22&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8160&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.745&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;75&lt;/span&gt;.888&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.633&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;                             &lt;span class="m"&gt;82&lt;/span&gt;.96.35.8&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;42995&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;28&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8414&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.339&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;76&lt;/span&gt;.302&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.641&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;                          &lt;span class="m"&gt;93&lt;/span&gt;.180.156.45&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;47282&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;33&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8671&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.421&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;76&lt;/span&gt;.223&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.644&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;                         &lt;span class="m"&gt;81&lt;/span&gt;.218.109.195&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;60000&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;29&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8460&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.383&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;76&lt;/span&gt;.277&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.660&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;                            &lt;span class="m"&gt;31&lt;/span&gt;.172.30.4&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;35914&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;36&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8922&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:22.146&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;75&lt;/span&gt;.538&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.684&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;                           &lt;span class="m"&gt;50&lt;/span&gt;.7.194.122&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;38522&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;20&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;5384&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:33.487&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;64&lt;/span&gt;.202&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.689&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Lastly, we take a look at the reverse entries. As you can see, it is
apparent that some of the hosts have Tor tertiary domain names which
suggests that some of the flows may be destined for Tor&amp;nbsp;servers.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ rwcut tor.bin &lt;span class="p"&gt;|&lt;/span&gt;rwresolve &lt;span class="p"&gt;|&lt;/span&gt;cut -c30-
       sIP&lt;span class="p"&gt;|&lt;/span&gt;                                    dIP&lt;span class="p"&gt;|&lt;/span&gt;sPort&lt;span class="p"&gt;|&lt;/span&gt;dPort&lt;span class="p"&gt;|&lt;/span&gt;pro&lt;span class="p"&gt;|&lt;/span&gt;   packets&lt;span class="p"&gt;|&lt;/span&gt;     bytes&lt;span class="p"&gt;|&lt;/span&gt;   flags&lt;span class="p"&gt;|&lt;/span&gt;                  sTime&lt;span class="p"&gt;|&lt;/span&gt; duration&lt;span class="p"&gt;|&lt;/span&gt;                  eTime&lt;span class="p"&gt;|&lt;/span&gt;sen&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;198&lt;/span&gt;.27.97.223.vpsrealm.com&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;38946&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;30&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8497&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.336&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;76&lt;/span&gt;.182&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.518&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;xxviii.example.tld&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;42529&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;27&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8341&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:22.190&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;75&lt;/span&gt;.341&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.531&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;tor.koehn.com&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;44384&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;14&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;3502&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:26.486&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;71&lt;/span&gt;.052&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.538&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;                           &lt;span class="m"&gt;66&lt;/span&gt;.18.12.197&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;49341&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;28&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8475&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.426&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;76&lt;/span&gt;.125&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.551&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;hecustomer.10gigabitethernet8-1.core1.pao1.he.net&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;40742&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;30&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8159&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.375&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;76&lt;/span&gt;.208&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.583&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;n5.servbr.net&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;40825&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;28&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8394&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:22.079&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;75&lt;/span&gt;.506&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.585&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;n15.servbr.net&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;55603&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;29&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8454&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:22.196&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;75&lt;/span&gt;.389&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.585&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;212&lt;/span&gt;-83-140-45.rev.poneytelecom.eu&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;46797&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;29&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8455&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.342&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;76&lt;/span&gt;.245&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.587&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;n13.servbr.net&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;50935&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;31&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8567&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.396&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;76&lt;/span&gt;.191&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.587&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;n12.servbr.net&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;33170&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;29&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8459&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:22.088&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;75&lt;/span&gt;.506&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.594&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;n10.servbr.net&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;37960&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;27&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8342&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.415&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;76&lt;/span&gt;.187&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.602&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;                           &lt;span class="m"&gt;31&lt;/span&gt;.7.186.228&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;44997&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;26&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8294&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.377&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;76&lt;/span&gt;.227&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.604&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;hecustomer.10gigabitethernet1-2.core1.ams1.he.net&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;50817&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;15&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;3379&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:34.492&lt;span class="p"&gt;|&lt;/span&gt;    &lt;span class="m"&gt;3&lt;/span&gt;.114&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.606&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;v37433.1blu.de&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;50724&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;20&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;5347&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:33.494&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;64&lt;/span&gt;.117&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.611&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;static.188-40-98-96.clients.your-server.de&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;54796&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;30&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8565&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.380&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;76&lt;/span&gt;.231&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.611&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;a80-100-45-156.adsl.xs4all.nl&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;60680&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;30&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8578&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.386&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;76&lt;/span&gt;.228&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.614&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;91&lt;/span&gt;.143.91.174&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;39275&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;23&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8209&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:22.185&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;75&lt;/span&gt;.435&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.620&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;                           &lt;span class="m"&gt;85&lt;/span&gt;.17.122.80&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;43989&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;29&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8457&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.418&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;76&lt;/span&gt;.202&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.620&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;120&lt;/span&gt;-20-159-88.business.edutel.nl&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;49609&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;31&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8633&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.412&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;76&lt;/span&gt;.208&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.620&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;37&lt;/span&gt;-59-150-178.static-ip.hostplanet.me&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;47658&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;30&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8516&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.399&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;76&lt;/span&gt;.223&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.622&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;sa0111.azar-a.net&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;35498&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;15&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;3616&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:34.489&lt;span class="p"&gt;|&lt;/span&gt;    &lt;span class="m"&gt;3&lt;/span&gt;.134&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.623&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;greendale.badexample.net&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;57656&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;27&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8359&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.345&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;76&lt;/span&gt;.280&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.625&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;luftgitarr.mooo.se&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;58655&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;15&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;3563&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:34.486&lt;span class="p"&gt;|&lt;/span&gt;    &lt;span class="m"&gt;3&lt;/span&gt;.147&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.633&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;kimya.mooo.se&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;45720&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;22&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8160&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.745&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;75&lt;/span&gt;.888&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.633&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;junis.mooo.se&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;42995&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;28&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8414&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.339&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;76&lt;/span&gt;.302&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.641&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;tor.b0red.de&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;47282&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;33&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8671&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.421&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;76&lt;/span&gt;.223&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.644&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;195&lt;/span&gt;.ab4.interhost.co.il&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;60000&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;29&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8460&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:21.383&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;76&lt;/span&gt;.277&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.660&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;tor21.anonymizer.ccc.de&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;35914&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;36&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;8922&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:22.146&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;75&lt;/span&gt;.538&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.684&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;10&lt;/span&gt;.0.0.126&lt;span class="p"&gt;|&lt;/span&gt;torsrvl.snydernet.net&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;38522&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;443&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;        &lt;span class="m"&gt;20&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;5384&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;FS PA   &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:20:33.487&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;64&lt;/span&gt;.202&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;2013&lt;/span&gt;/12/30T20:21:37.689&lt;span class="p"&gt;|&lt;/span&gt; S0&lt;span class="p"&gt;|&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Or we can use the &lt;em&gt;rwuniq&lt;/em&gt; command to list the unique destinations,
again piping through &lt;em&gt;rwresolve&lt;/em&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ rwuniq --fields&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt; --no-columns tor.bin &lt;span class="p"&gt;|&lt;/span&gt;rwresolve
dIP&lt;span class="p"&gt;|&lt;/span&gt;Records&lt;span class="p"&gt;|&lt;/span&gt;
luftgitarr.mooo.se&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;
tor.b0red.de&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;
junis.mooo.se&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;31&lt;/span&gt;.7.186.228&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;
tor21.anonymizer.ccc.de&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;
xxviii.example.tld&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;
tor.koehn.com&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;
n15.servbr.net&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;
a80-100-45-156.adsl.xs4all.nl&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;
n13.servbr.net&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;120&lt;/span&gt;-20-159-88.business.edutel.nl&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;91&lt;/span&gt;.143.91.174&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;195&lt;/span&gt;.ab4.interhost.co.il&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;37&lt;/span&gt;-59-150-178.static-ip.hostplanet.me&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;
sa0111.azar-a.net&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;
static.188-40-98-96.clients.your-server.de&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;
n5.servbr.net&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;
torsrvl.snydernet.net&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;198&lt;/span&gt;.27.97.223.vpsrealm.com&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;66&lt;/span&gt;.18.12.197&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;
v37433.1blu.de&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;
hecustomer.10gigabitethernet1-2.core1.ams1.he.net&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;212&lt;/span&gt;-83-140-45.rev.poneytelecom.eu&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;
kimya.mooo.se&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;85&lt;/span&gt;.17.122.80&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;
n12.servbr.net&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;
greendale.badexample.net&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;
n10.servbr.net&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;
hecustomer.10gigabitethernet8-1.core1.pao1.he.net&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;In conclusion, using SiLK we can provide retrospective analysis to
determine if traffic may be destined for Tor servers. While not a
definitive method of detection as there could be false-positives due to
hosting of legitimate services on Tor servers, it is a quick method to
get some insight. As usual, please leave a comment below if you have any
questions or&amp;nbsp;comments.&lt;/p&gt;</content><category term="analysis"></category><category term="silk"></category><category term="tor"></category></entry><entry><title>Resizing Xen guest parition based filesystems</title><link href="https://www.rsreese.com/resizing-xen-guest-parition-based-filesystems/" rel="alternate"></link><published>2013-07-03T14:27:00-04:00</published><updated>2013-07-03T14:27:00-04:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2013-07-03:/resizing-xen-guest-parition-based-filesystems/</id><summary type="html">This post assumes you are running the Xen hypervisor and are using a partitions based filesystems for you Xen guest you would like to re-size. I have previously written on Installing Xen on CentOS 6 from source and another blog entry that describes how to create partition based Xen guests …</summary><content type="html">&lt;p&gt;This post assumes you are running the Xen hypervisor and are using a
partitions based filesystems for you Xen guest you would like to
re-size. I have previously written on &lt;a href="http://www.rsreese.com/installing-xen-on-centos-6-from-source/" title="Installing Xen on CentOS 6 from source"&gt;Installing Xen on CentOS 6 from
source&lt;/a&gt; and another blog entry that describes how to create partition
based Xen guests on &lt;a href="http://www.rsreese.com/creating-debian-guests-on-xen-using-parition-based-filesystem/" title="Creating Debian guests on Xen using partition based filesystem"&gt;Creating Debian guests on Xen using partition based
filesystem&lt;/a&gt; if you would like to see how to get started running&amp;nbsp;Xen.&lt;/p&gt;
&lt;p&gt;To resize, first shutdown the guest&amp;nbsp;instance:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ sudo xm shutdown Wheezy
$ sudo lvresize /dev/VolGroup00/Wheezy -L +10GB
Extending logical volume Wheezy to &lt;span class="m"&gt;20&lt;/span&gt;.00 GiB
Logical volume Wheezy successfully resized
$ sudo lvdisplay
--- Logical volume ---
LV Path                /dev/VolGroup00/Wheezy
LV Name                Wheezy
VG Name                VolGroup00
LV UUID                jQqEFZ-sd39-siY6-kqCZ-l8Lq-UWWk-3f4oh5
LV Write Access        read/write
LV Creation host, &lt;span class="nb"&gt;time&lt;/span&gt; host.localdomain, &lt;span class="m"&gt;2013&lt;/span&gt;-05-14 &lt;span class="m"&gt;12&lt;/span&gt;:32:00 -0400
LV Status              available
&lt;span class="c1"&gt;# open                 0&lt;/span&gt;
LV Size                &lt;span class="m"&gt;20&lt;/span&gt;.00 GiB
Current LE             &lt;span class="m"&gt;5120&lt;/span&gt;
Segments               &lt;span class="m"&gt;1&lt;/span&gt;
Allocation             inherit
Read ahead sectors     auto
- currently &lt;span class="nb"&gt;set&lt;/span&gt; to     &lt;span class="m"&gt;256&lt;/span&gt;
Block device           &lt;span class="m"&gt;253&lt;/span&gt;:0
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;I would first backup the partition that is going to be modified. This is
going to sound weird; but this process uses fdisk to delete and recreate
the&amp;nbsp;partition.&lt;/p&gt;
&lt;p&gt;List you&amp;nbsp;partition:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ sudo fdisk -l /dev/VolGroup00/Wheezy

Disk /dev/VolGroup00/Wheezy: &lt;span class="m"&gt;21&lt;/span&gt;.5 GB, &lt;span class="m"&gt;21474836480&lt;/span&gt; bytes
&lt;span class="m"&gt;255&lt;/span&gt; heads, &lt;span class="m"&gt;63&lt;/span&gt; sectors/track, &lt;span class="m"&gt;2610&lt;/span&gt; cylinders
&lt;span class="nv"&gt;Units&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; cylinders of &lt;span class="m"&gt;16065&lt;/span&gt; * &lt;span class="nv"&gt;512&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;8225280&lt;/span&gt; bytes
Sector size &lt;span class="o"&gt;(&lt;/span&gt;logical/physical&lt;span class="o"&gt;)&lt;/span&gt;: &lt;span class="m"&gt;512&lt;/span&gt; bytes / &lt;span class="m"&gt;512&lt;/span&gt; bytes
I/O size &lt;span class="o"&gt;(&lt;/span&gt;minimum/optimal&lt;span class="o"&gt;)&lt;/span&gt;: &lt;span class="m"&gt;512&lt;/span&gt; bytes / &lt;span class="m"&gt;512&lt;/span&gt; bytes
Disk identifier: 0x00081c29

Device Boot      Start         End      Blocks   Id  System
/dev/VolGroup00/Wheezy1               &lt;span class="m"&gt;1&lt;/span&gt;          &lt;span class="m"&gt;63&lt;/span&gt;      &lt;span class="m"&gt;498688&lt;/span&gt;   &lt;span class="m"&gt;82&lt;/span&gt;  Linux swap / Solaris
Partition &lt;span class="m"&gt;1&lt;/span&gt; does not end on cylinder boundary.
/dev/VolGroup00/Wheezy2              &lt;span class="m"&gt;63&lt;/span&gt;        &lt;span class="m"&gt;1306&lt;/span&gt;     &lt;span class="m"&gt;9985024&lt;/span&gt;   &lt;span class="m"&gt;83&lt;/span&gt;  Linux
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;When trying to directly re-size, an error&amp;nbsp;occurs.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ sudo resize2fs /dev/VolGroup00/Wheezy
resize2fs &lt;span class="m"&gt;1&lt;/span&gt;.41.12 &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="m"&gt;17&lt;/span&gt;-May-2010&lt;span class="o"&gt;)&lt;/span&gt;
resize2fs: Bad magic number in super-block &lt;span class="k"&gt;while&lt;/span&gt; trying to open /dev/VolGroup00/Wheezy
Couldn&lt;span class="err"&gt;&amp;#39;&lt;/span&gt;t find valid filesystem superblock.
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;We are now going to delete the partition, as warned before, make sure
you have&amp;nbsp;backups.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ sudo fdisk /dev/VolGroup00/Wheezy

WARNING: DOS-compatible mode is deprecated. It&lt;span class="s1"&gt;&amp;#39;s strongly recommended to&lt;/span&gt;
&lt;span class="s1"&gt;switch off the mode (command &amp;#39;&lt;/span&gt;c&lt;span class="s1"&gt;&amp;#39;) and change display units to&lt;/span&gt;
&lt;span class="s1"&gt;sectors (command &amp;#39;&lt;/span&gt;u&lt;span class="err"&gt;&amp;#39;&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;.

Command &lt;span class="o"&gt;(&lt;/span&gt;m &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="nb"&gt;help&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;: p

Disk /dev/VolGroup00/Wheezy: &lt;span class="m"&gt;21&lt;/span&gt;.5 GB, &lt;span class="m"&gt;21474836480&lt;/span&gt; bytes
&lt;span class="m"&gt;255&lt;/span&gt; heads, &lt;span class="m"&gt;63&lt;/span&gt; sectors/track, &lt;span class="m"&gt;2610&lt;/span&gt; cylinders
&lt;span class="nv"&gt;Units&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; cylinders of &lt;span class="m"&gt;16065&lt;/span&gt; * &lt;span class="nv"&gt;512&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;8225280&lt;/span&gt; bytes
Sector size &lt;span class="o"&gt;(&lt;/span&gt;logical/physical&lt;span class="o"&gt;)&lt;/span&gt;: &lt;span class="m"&gt;512&lt;/span&gt; bytes / &lt;span class="m"&gt;512&lt;/span&gt; bytes
I/O size &lt;span class="o"&gt;(&lt;/span&gt;minimum/optimal&lt;span class="o"&gt;)&lt;/span&gt;: &lt;span class="m"&gt;512&lt;/span&gt; bytes / &lt;span class="m"&gt;512&lt;/span&gt; bytes
Disk identifier: 0x00081c29

Device Boot      Start         End      Blocks   Id  System
/dev/VolGroup00/Wheezy1               &lt;span class="m"&gt;1&lt;/span&gt;          &lt;span class="m"&gt;63&lt;/span&gt;      &lt;span class="m"&gt;498688&lt;/span&gt;   &lt;span class="m"&gt;82&lt;/span&gt;  Linux swap / Solaris
Partition &lt;span class="m"&gt;1&lt;/span&gt; does not end on cylinder boundary.
/dev/VolGroup00/Wheezy2              &lt;span class="m"&gt;63&lt;/span&gt;        &lt;span class="m"&gt;1306&lt;/span&gt;     &lt;span class="m"&gt;9985024&lt;/span&gt;   &lt;span class="m"&gt;83&lt;/span&gt;  Linux

Command &lt;span class="o"&gt;(&lt;/span&gt;m &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="nb"&gt;help&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;: d
Partition number &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;-4&lt;span class="o"&gt;)&lt;/span&gt;: &lt;span class="m"&gt;2&lt;/span&gt;

Command &lt;span class="o"&gt;(&lt;/span&gt;m &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="nb"&gt;help&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;: p

Disk /dev/VolGroup00/Wheezy: &lt;span class="m"&gt;21&lt;/span&gt;.5 GB, &lt;span class="m"&gt;21474836480&lt;/span&gt; bytes
&lt;span class="m"&gt;255&lt;/span&gt; heads, &lt;span class="m"&gt;63&lt;/span&gt; sectors/track, &lt;span class="m"&gt;2610&lt;/span&gt; cylinders
&lt;span class="nv"&gt;Units&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; cylinders of &lt;span class="m"&gt;16065&lt;/span&gt; * &lt;span class="nv"&gt;512&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="m"&gt;8225280&lt;/span&gt; bytes
Sector size &lt;span class="o"&gt;(&lt;/span&gt;logical/physical&lt;span class="o"&gt;)&lt;/span&gt;: &lt;span class="m"&gt;512&lt;/span&gt; bytes / &lt;span class="m"&gt;512&lt;/span&gt; bytes
I/O size &lt;span class="o"&gt;(&lt;/span&gt;minimum/optimal&lt;span class="o"&gt;)&lt;/span&gt;: &lt;span class="m"&gt;512&lt;/span&gt; bytes / &lt;span class="m"&gt;512&lt;/span&gt; bytes
Disk identifier: 0x00081c29

Device Boot      Start         End      Blocks   Id  System
/dev/VolGroup00/Wheezy1               &lt;span class="m"&gt;1&lt;/span&gt;          &lt;span class="m"&gt;63&lt;/span&gt;      &lt;span class="m"&gt;498688&lt;/span&gt;   &lt;span class="m"&gt;82&lt;/span&gt;  Linux swap / Solaris
Partition &lt;span class="m"&gt;1&lt;/span&gt; does not end on cylinder boundary.
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Recreate the partition with the new&amp;nbsp;size.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;Command (m for help): n
Command action
e   extended
p   primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (63-2610, default 63):
Using default value 63
Last cylinder, +cylinders or +size{K,M,G} (63-2610, default 2610):
Using default value 2610

Command (m for help): p

Disk /dev/VolGroup00/Wheezy: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00081c29

Device Boot      Start         End      Blocks   Id  System
/dev/VolGroup00/Wheezy1               1          63      498688   82  Linux swap / Solaris
Partition 1 does not end on cylinder boundary.
/dev/VolGroup00/Wheezy2              63        2610    20465113   83  Linux

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 22: Invalid argument.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;The follow command splits the partitions apart as using the simple
Debian partitioning scheme may combine&amp;nbsp;them.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ sudo kpartx -a /dev/VolGroup00/Wheezy
$ &lt;span class="nb"&gt;cd&lt;/span&gt; /dev/mapper/
$ ls
control  VolGroup00-Wheezy  VolGroup00-Wheezy1  VolGroup00-Wheezy2
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Next, check the filesystem for&amp;nbsp;errors.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ sudo e2fsck -f VolGroup00-Wheezy2
e2fsck &lt;span class="m"&gt;1&lt;/span&gt;.41.12 &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="m"&gt;17&lt;/span&gt;-May-2010&lt;span class="o"&gt;)&lt;/span&gt;
Pass &lt;span class="m"&gt;1&lt;/span&gt;: Checking inodes, blocks, and sizes
Pass &lt;span class="m"&gt;2&lt;/span&gt;: Checking directory structure
Pass &lt;span class="m"&gt;3&lt;/span&gt;: Checking directory connectivity
Pass &lt;span class="m"&gt;4&lt;/span&gt;: Checking reference counts
Pass &lt;span class="m"&gt;5&lt;/span&gt;: Checking group summary information
VolGroup00-Wheezy2: &lt;span class="m"&gt;29159&lt;/span&gt;/624624 files &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;.2% non-contiguous&lt;span class="o"&gt;)&lt;/span&gt;, &lt;span class="m"&gt;224352&lt;/span&gt;/2496256 blocks
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;We can now re-size the&amp;nbsp;filesystem.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ sudo resize2fs VolGroup00-Wheezy2
resize2fs &lt;span class="m"&gt;1&lt;/span&gt;.41.12 &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="m"&gt;17&lt;/span&gt;-May-2010&lt;span class="o"&gt;)&lt;/span&gt;
Resizing the filesystem on VolGroup00-Wheezy2 to &lt;span class="m"&gt;5116278&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;4k&lt;span class="o"&gt;)&lt;/span&gt; blocks.
The filesystem on VolGroup00-Wheezy2 is now &lt;span class="m"&gt;5116278&lt;/span&gt; blocks long.
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Reattach the filesystems that were previously&amp;nbsp;split.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ sudo kpartx -d /dev/VolGroup00/Wheezy
$ ls
control  VolGroup00-Wheezy
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;A quick look at the logical volume and we can see we grew from 10 to 20&amp;nbsp;Gigabytes.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ sudo lvscan
ACTIVE            &lt;span class="s1"&gt;&amp;#39;/dev/VolGroup00/Wheezy&amp;#39;&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="m"&gt;20&lt;/span&gt;.00 GiB&lt;span class="o"&gt;]&lt;/span&gt; inherit
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;You should now be able to boot the guest using the larger file&amp;nbsp;system.&lt;/p&gt;
&lt;p&gt;To delete the guest&amp;nbsp;filesystem:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;sudo vgremove lvmxen
sudo pvremove /dev/sdb1
sudo parted /dev/sdb
(parted) rm 1
(parted) quit
&lt;/pre&gt;&lt;/div&gt;</content><category term="linux"></category><category term="xen"></category></entry><entry><title>Creating Debian guests on Xen using parition based filesystem</title><link href="https://www.rsreese.com/creating-debian-guests-on-xen-using-parition-based-filesystem/" rel="alternate"></link><published>2013-06-29T17:47:00-04:00</published><updated>2013-06-29T17:47:00-04:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2013-06-29:/creating-debian-guests-on-xen-using-parition-based-filesystem/</id><summary type="html">This guide describes how to create a filesystem and guest for the Xen hypervisor. This assumes you have a working Xen install with Dom U. I have described setting up a Xen hypervisor from source in another posted titled Installing Xen on CentOS 6 from source. Create a partition to …</summary><content type="html">&lt;p&gt;This guide describes how to create a filesystem and guest for the &lt;a href="http://www.xenproject.org/users/why-the-xen-project.html"&gt;Xen
hypervisor&lt;/a&gt;. This assumes you have a working Xen install with Dom U. I
have described setting up a Xen hypervisor from source in another posted
titled &lt;a href="http://www.rsreese.com/installing-xen-on-centos-6-from-source/" title="Installing Xen on CentOS 6 from source"&gt;Installing Xen on CentOS 6 from source&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Create a partition to store virtual machines on. We want to use a
partition based verse file based file-system for our guests as the
performance is much&amp;nbsp;better.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ sudo parted /dev/sdb
mklabel gpt
&lt;span class="o"&gt;(&lt;/span&gt;parted&lt;span class="o"&gt;)&lt;/span&gt; unit GB
&lt;span class="o"&gt;(&lt;/span&gt;parted&lt;span class="o"&gt;)&lt;/span&gt; mkpart VolGroup00 0GB 400GB
&lt;span class="o"&gt;(&lt;/span&gt;parted&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="nb"&gt;set&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt; lvm on
&lt;span class="o"&gt;(&lt;/span&gt;parted&lt;span class="o"&gt;)&lt;/span&gt; quit
&lt;span class="o"&gt;(&lt;/span&gt;parted&lt;span class="o"&gt;)&lt;/span&gt; p
Model: DELL PERC &lt;span class="m"&gt;6&lt;/span&gt;/i &lt;span class="o"&gt;(&lt;/span&gt;scsi&lt;span class="o"&gt;)&lt;/span&gt;
Disk /dev/sdb: 3999GB
Sector size &lt;span class="o"&gt;(&lt;/span&gt;logical/physical&lt;span class="o"&gt;)&lt;/span&gt;: 512B/512B
Partition Table: gpt
Number  Start   End    Size   File system  Name        Flags
&lt;span class="m"&gt;1&lt;/span&gt;      1049kB  400GB  400GB               VolGroup00  lvm
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Create a partition for the first virtual&amp;nbsp;machine.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ sudo pvcreate /dev/sdb1
$ sudo vgcreate VolGroup00 /dev/sdb1
$ sudo vgdisplay
--- Volume group ---
VG Name               VolGroup00
System ID
Format                lvm2
Metadata Areas        &lt;span class="m"&gt;1&lt;/span&gt;
Metadata Sequence No  &lt;span class="m"&gt;1&lt;/span&gt;
VG Access             read/write
VG Status             resizable
MAX LV                &lt;span class="m"&gt;0&lt;/span&gt;
Cur LV                &lt;span class="m"&gt;0&lt;/span&gt;
Open LV               &lt;span class="m"&gt;0&lt;/span&gt;
Max PV                &lt;span class="m"&gt;0&lt;/span&gt;
Cur PV                &lt;span class="m"&gt;1&lt;/span&gt;
Act PV                &lt;span class="m"&gt;1&lt;/span&gt;
VG Size               &lt;span class="m"&gt;372&lt;/span&gt;.53 GiB
PE Size               &lt;span class="m"&gt;4&lt;/span&gt;.00 MiB
Total PE              &lt;span class="m"&gt;95367&lt;/span&gt;
Alloc PE / Size       &lt;span class="m"&gt;0&lt;/span&gt; / &lt;span class="m"&gt;0&lt;/span&gt;
Free  PE / Size       &lt;span class="m"&gt;95367&lt;/span&gt; / &lt;span class="m"&gt;372&lt;/span&gt;.53 GiB
VG UUID               hdCkfh-twnj-Nu2V-FsTe-RsQg-PzlE-5w4QGR
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Create a logical volume for the virtual&amp;nbsp;machine.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ sudo lvcreate -L 10GB -n Wheezy VolGroup00
$ sudo lvdisplay
--- Logical volume ---
LV Path                /dev/VolGroup00/Wheezy
LV Name                Wheezy
VG Name                VolGroup00
LV UUID                jQqEFZ-sd39-siY6-kqCZ-l8Lq-UWWk-3f4oh5
LV Write Access        read/write
LV Creation host, &lt;span class="nb"&gt;time&lt;/span&gt; host.localdomain, &lt;span class="m"&gt;2013&lt;/span&gt;-05-14 &lt;span class="m"&gt;12&lt;/span&gt;:32:00 -0400
LV Status              available
&lt;span class="c1"&gt;# open                 0&lt;/span&gt;
LV Size                &lt;span class="m"&gt;10&lt;/span&gt;.00 GiB
Current LE             &lt;span class="m"&gt;2560&lt;/span&gt;
Segments               &lt;span class="m"&gt;1&lt;/span&gt;
Allocation             inherit
Read ahead sectors     auto
- currently &lt;span class="nb"&gt;set&lt;/span&gt; to     &lt;span class="m"&gt;256&lt;/span&gt;
Block device           &lt;span class="m"&gt;253&lt;/span&gt;:0
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Get the latest Debian &lt;a href="http://http.us.debian.org/debian/dists/wheezy/main/installer-i386/current/images/hd-media/"&gt;hd-media&lt;/a&gt;. Specify these parameters in the
virtual machine configuration that will be used for the first start-up,
i.e. the install of your guest. A second configuration will be used for
booting the guest&amp;nbsp;post-install.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;kernel = &amp;quot;/scratch/debian/wheezy/vmlinuz&amp;quot;
ramdisk = &amp;quot;/scratch/debian/wheezy/initrd.gz&amp;quot;
extra = &amp;quot;debian-installer/exit/always_halt=true -- console=hvc0&amp;quot;
memory = 512
name = &amp;quot;Wheezy&amp;quot;
vif = [&amp;#39;bridge=br0&amp;#39;]
disk = [&amp;#39;phy:/dev/VolGroup00/Wheezy,xvda,w&amp;#39;]
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Connect to the new guest with a console and perform the&amp;nbsp;installation.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ sudo xl create -c /etc/xen/install-debian.cfg
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Start a guest without a&amp;nbsp;console.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ sudo xl create /etc/xen/debian.cfg
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Leave the&amp;nbsp;console.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ &lt;span class="s2"&gt;&amp;quot;Ctrl+]&amp;quot;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;List the&amp;nbsp;instances.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ sudo xl list
Name                                        ID   Mem VCPUs      State   Time&lt;span class="o"&gt;(&lt;/span&gt;s&lt;span class="o"&gt;)&lt;/span&gt;
Domain-0                                     &lt;span class="m"&gt;0&lt;/span&gt;  &lt;span class="m"&gt;2048&lt;/span&gt;     &lt;span class="m"&gt;1&lt;/span&gt;     r-----    &lt;span class="m"&gt;237&lt;/span&gt;.4
Wheezy                                      &lt;span class="m"&gt;11&lt;/span&gt;   &lt;span class="m"&gt;512&lt;/span&gt;     &lt;span class="m"&gt;1&lt;/span&gt;     -b----      &lt;span class="m"&gt;6&lt;/span&gt;.8
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Connect to the&amp;nbsp;console.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ sudo xl console Wheezy
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Leave the&amp;nbsp;console.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ &lt;span class="s2"&gt;&amp;quot;Ctrl+]&amp;quot;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;If you have any questions or feel something is missing, leave a comment&amp;nbsp;below.&lt;/p&gt;</content><category term="linux"></category><category term="xen"></category></entry><entry><title>Installing Xen on CentOS 6 from source</title><link href="https://www.rsreese.com/installing-xen-on-centos-6-from-source/" rel="alternate"></link><published>2013-06-29T17:33:00-04:00</published><updated>2013-06-29T17:33:00-04:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2013-06-29:/installing-xen-on-centos-6-from-source/</id><summary type="html">I recently had a need to install Xen hypervisor on CentOS and most of the guides covered using the package maintainers version. Further, RHEL distributions favor using KVM. I did come across HowTo: Install XEN Dom0 on CentOS 6 from source but the domain was blocked (Google cache made quick …</summary><content type="html">&lt;p&gt;I recently had a need to install Xen hypervisor on CentOS and most of
the guides covered using the package maintainers version. Further, &lt;span class="caps"&gt;RHEL&lt;/span&gt;
distributions favor using &lt;span class="caps"&gt;KVM&lt;/span&gt;. I did come across &lt;a href="http://blog.tidyhosts.com/index.php/howto-install-xen-dom0-on-centos-6-from-source"&gt;HowTo: Install &lt;span class="caps"&gt;XEN&lt;/span&gt;
Dom0 on CentOS 6 from source&lt;/a&gt; but the domain was blocked (Google cache
made quick work of getting around that issue) and there were a few steps
that felt unclear. I took that guide and made a few changes which are
reflected below. You may want to also reference the Xen &lt;a href="http://wiki.xen.org/wiki/Compiling_Xen_From_Source"&gt;Wiki&lt;/a&gt; CenOS
6.2, Xen 4.2.1, and Kernel version 3.9.2 were used in this example but
newer and older versions should be&amp;nbsp;similar.&lt;/p&gt;
&lt;p&gt;First install&amp;nbsp;dependencies:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;yum groupinstall &amp;quot;Development Libraries&amp;quot;
yum groupinstall &amp;quot;Development Tools&amp;quot;
yum install transfig wget tar less texi2html libaio-devel dev86 glibc-devel e2fsprogs-devel gitk mkinitrd iasl xz-devel bzip2-devel
yum install pciutils-libs pciutils-devel SDL-devel libX11-devel gtk2-devel bridge-utils PyXML qemu-common qemu-img mercurial texinfo
yum install libidn-devel yajl yajl-devel ocaml ocaml-findlib ocaml-findlib-devel python-devel uuid-devel libuuid-devel openssl-devel
yum install glibc-devel.i686
yum install
libvirt python-virtinst
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Download the latest Xen &lt;a href="http://www.xenproject.org/downloads/xen-archives.html"&gt;source package&lt;/a&gt;.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ tar xzf xen-4.2.1.tar.gz
$ &lt;span class="nb"&gt;cd&lt;/span&gt; xen-4.2.1
$ ./configure
$ make xen &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; make tools &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; make stubdom
$ sudo make install xen
$ sudo make install xen-tools
$ sudo make install stubdom
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Prevent the screen from powering&amp;nbsp;off:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ sudo sh -c &lt;span class="s2"&gt;&amp;quot;echo &amp;#39;/usr/bin/setterm -powersave off&amp;#39; &amp;gt;&amp;gt; /etc/rc.local&amp;quot;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Define the resources for domain&amp;nbsp;0:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ sudo sh -c &lt;span class="s2"&gt;&amp;quot;echo &amp;#39;xl sched-credit -d Domain-0 -w 512&amp;#39; &amp;gt;&amp;gt; /etc/xendom0caps&amp;quot;&lt;/span&gt;
$ sudo chmod +x /etc/xendom0caps
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Start the services at&amp;nbsp;boot:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;sudo ln -s /etc/init.d/xendomains /etc/rc0.d/S10xendomains
sudo ln -s /etc/init.d/xendomains /etc/rc6.d/S10xendomains
sudo ln -s /etc/init.d/xendomains /etc/rc3.d/S98xendomains
sudo ln -s /etc/init.d/xencommons /etc/rc3.d/S98xencommons
sudo ln -s /etc/xendom0caps /etc/rc3.d/S97xendom0caps
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Optionally for those that want to use the xm&amp;nbsp;commands.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;sudo ln -s /etc/init.d/xend /etc/rc3.d/S98xend
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Make sure everything is going to start at the correct runlevel. Note
that &lt;strong&gt;xend&lt;/strong&gt; is&amp;nbsp;optional&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ chkconfig --list &lt;span class="p"&gt;|&lt;/span&gt;grep xen
xencommons      &lt;span class="m"&gt;0&lt;/span&gt;:off   &lt;span class="m"&gt;1&lt;/span&gt;:off   &lt;span class="m"&gt;2&lt;/span&gt;:off   &lt;span class="m"&gt;3&lt;/span&gt;:on    &lt;span class="m"&gt;4&lt;/span&gt;:off   &lt;span class="m"&gt;5&lt;/span&gt;:off   &lt;span class="m"&gt;6&lt;/span&gt;:off
xend            &lt;span class="m"&gt;0&lt;/span&gt;:off   &lt;span class="m"&gt;1&lt;/span&gt;:off   &lt;span class="m"&gt;2&lt;/span&gt;:off   &lt;span class="m"&gt;3&lt;/span&gt;:on    &lt;span class="m"&gt;4&lt;/span&gt;:off   &lt;span class="m"&gt;5&lt;/span&gt;:off   &lt;span class="m"&gt;6&lt;/span&gt;:off
xendomains      &lt;span class="m"&gt;0&lt;/span&gt;:on    &lt;span class="m"&gt;1&lt;/span&gt;:off   &lt;span class="m"&gt;2&lt;/span&gt;:off   &lt;span class="m"&gt;3&lt;/span&gt;:on    &lt;span class="m"&gt;4&lt;/span&gt;:off   &lt;span class="m"&gt;5&lt;/span&gt;:off   &lt;span class="m"&gt;6&lt;/span&gt;:on
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Make sure the weight is setup, this may vary depending your
needs/resources&amp;nbsp;available.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ sudo xl sched-credit
Cpupool Pool-0: &lt;span class="nv"&gt;tslice&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;30ms &lt;span class="nv"&gt;ratelimit&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;1000us
Name                                ID Weight  Cap
Domain-0                             &lt;span class="m"&gt;0&lt;/span&gt;    &lt;span class="m"&gt;512&lt;/span&gt;    &lt;span class="m"&gt;0&lt;/span&gt;
Wheezy                               &lt;span class="m"&gt;3&lt;/span&gt;    &lt;span class="m"&gt;256&lt;/span&gt;    &lt;span class="m"&gt;0&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;&lt;a href="https://www.kernel.org/"&gt;Download&lt;/a&gt; the latest kernel version you would like to use and extract
the contents of the archive. You can try pulling your configuration via
&amp;#8220;&lt;em&gt;make oldconfig&lt;/em&gt;&amp;#8220;, so your old settings are migrated and only new or
changed options are presented to you to select. Then to make sure
everything is ok, run &amp;#8220;&lt;em&gt;make menuconfig&lt;/em&gt;&amp;#8221; or &amp;#8220;&lt;em&gt;make xconfig&lt;/em&gt;&amp;#8221; to
determine if the feature/module setting are appropriate for you. I left
everything alone with the exception of enabling the Xen features as
described below. &lt;em&gt;make oldconfig&lt;/em&gt; is clever, it can do its job between
different versions of kernel although just issuing a &amp;#8220;&lt;em&gt;make menuconfig&lt;/em&gt;&amp;#8221;
is probably also&amp;nbsp;fine.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ &lt;span class="nb"&gt;cd&lt;/span&gt; linux-3.9.2
$ make oldconfig
scripts/kconfig/conf --oldconfig Kconfig
&lt;span class="c1"&gt;#&lt;/span&gt;
&lt;span class="c1"&gt;# configuration written to .config&lt;/span&gt;
&lt;span class="c1"&gt;#&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Alternatively just use the defaults and add the required Xen&amp;nbsp;features:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ &lt;span class="nb"&gt;cd&lt;/span&gt; linux-3.9.2
$ make menuconfig
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Location:&lt;br&gt;
-&gt; Processor type and features&lt;br&gt;
-&gt; Paravirtualized guest support&lt;br&gt;
Select all&amp;nbsp;features.&lt;/p&gt;
&lt;p&gt;&lt;img alt="makemenu3" src="https://www.rsreese.com/assets/makemenu3.png"&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="makemenu2" src="https://www.rsreese.com/assets/makemenu2.png"&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="makemenu4" src="https://www.rsreese.com/assets/makemenu4.png"&gt;&lt;/p&gt;
&lt;p&gt;Location:&lt;br&gt;
-&gt; Device Drivers&lt;br&gt;
-&gt; Block devices&lt;br&gt;
Select the two features &amp;#8220;Xen virtual block device support&amp;#8221; and &amp;#8220;Xen
block-device backend&amp;nbsp;driver&amp;#8221;&lt;/p&gt;
&lt;p&gt;&lt;img alt="makemenu5" src="https://www.rsreese.com/assets/makemenu5.png"&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="makemenu6" src="https://www.rsreese.com/assets/makemenu6.png"&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="makemenu7" src="https://www.rsreese.com/assets/makemenu7.png"&gt;&lt;/p&gt;
&lt;p&gt;Location:&lt;br&gt;
-&gt; Device Drivers&lt;br&gt;
-&gt; Xen driver support&lt;br&gt;
Select all&amp;nbsp;features.&lt;/p&gt;
&lt;p&gt;&lt;img alt="makemenu5" src="https://www.rsreese.com/assets/makemenu5.png"&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="makemenu8" src="https://www.rsreese.com/assets/makemenu8.png"&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="makemenu9" src="https://www.rsreese.com/assets/makemenu9.png"&gt;&lt;/p&gt;
&lt;p&gt;Location:&lt;br&gt;
-&gt; Device Drivers&lt;br&gt;
-&gt; Network device support&lt;br&gt;
Select the two features &amp;#8220;Xen network device frontend driver&amp;#8221; and &amp;#8220;Xen
backend network&amp;nbsp;device&amp;#8221;&lt;/p&gt;
&lt;p&gt;&lt;img alt="makemenu5" src="https://www.rsreese.com/assets/makemenu5.png"&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="makemenu10" src="https://www.rsreese.com/assets/makemenu10.png"&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="makemenu11" src="https://www.rsreese.com/assets/makemenu11.png"&gt;&lt;/p&gt;
&lt;p&gt;Lastly, you can search using &amp;#8220;/&amp;#8221; when at the root menu to see what you
have&amp;nbsp;enabled:&lt;/p&gt;
&lt;p&gt;&lt;img alt="makemenu1" src="https://www.rsreese.com/assets/makemenu1.png"&gt;&lt;/p&gt;
&lt;p&gt;Which will provide you a list of features that have been selected but it
may be easier to grep through the .config as shown in the next&amp;nbsp;command.&lt;/p&gt;
&lt;p&gt;&lt;img alt="makemenu12" src="https://www.rsreese.com/assets/makemenu12.png"&gt;&lt;/p&gt;
&lt;p&gt;You can use &amp;#8220;&lt;em&gt;grep&lt;/em&gt;&amp;#8221; to ensure you should have similar values for your
Xen settings after running menu&amp;nbsp;config.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ grep XEN .config
&lt;span class="nv"&gt;CONFIG_XEN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;y
&lt;span class="nv"&gt;CONFIG_XEN_DOM0&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;y
&lt;span class="nv"&gt;CONFIG_XEN_PRIVILEGED_GUEST&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;y
&lt;span class="nv"&gt;CONFIG_XEN_PVHVM&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;y
&lt;span class="nv"&gt;CONFIG_XEN_MAX_DOMAIN_MEMORY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;500&lt;/span&gt;
&lt;span class="nv"&gt;CONFIG_XEN_SAVE_RESTORE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;y
&lt;span class="nv"&gt;CONFIG_XEN_DEBUG_FS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;y
&lt;span class="nv"&gt;CONFIG_PCI_XEN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;y
&lt;span class="nv"&gt;CONFIG_XEN_PCIDEV_FRONTEND&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;y
&lt;span class="nv"&gt;CONFIG_XEN_BLKDEV_FRONTEND&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;y
&lt;span class="nv"&gt;CONFIG_XEN_BLKDEV_BACKEND&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;y
&lt;span class="nv"&gt;CONFIG_NETXEN_NIC&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;m
&lt;span class="nv"&gt;CONFIG_XEN_NETDEV_FRONTEND&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;y
&lt;span class="nv"&gt;CONFIG_XEN_NETDEV_BACKEND&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;y
&lt;span class="nv"&gt;CONFIG_INPUT_XEN_KBDDEV_FRONTEND&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;y
&lt;span class="nv"&gt;CONFIG_HVC_XEN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;y
&lt;span class="nv"&gt;CONFIG_HVC_XEN_FRONTEND&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;y
&lt;span class="c1"&gt;# CONFIG_XEN_WDT is not set&lt;/span&gt;
&lt;span class="nv"&gt;CONFIG_XEN_FBDEV_FRONTEND&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;y
&lt;span class="nv"&gt;CONFIG_XEN_BALLOON&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;y
&lt;span class="nv"&gt;CONFIG_XEN_BALLOON_MEMORY_HOTPLUG&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;y
&lt;span class="nv"&gt;CONFIG_XEN_SCRUB_PAGES&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;y
&lt;span class="nv"&gt;CONFIG_XEN_DEV_EVTCHN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;y
&lt;span class="nv"&gt;CONFIG_XEN_BACKEND&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;y
&lt;span class="nv"&gt;CONFIG_XENFS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;y
&lt;span class="nv"&gt;CONFIG_XEN_COMPAT_XENFS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;y
&lt;span class="nv"&gt;CONFIG_XEN_SYS_HYPERVISOR&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;y
&lt;span class="nv"&gt;CONFIG_XEN_XENBUS_FRONTEND&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;y
&lt;span class="nv"&gt;CONFIG_XEN_GNTDEV&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;y
&lt;span class="nv"&gt;CONFIG_XEN_GRANT_DEV_ALLOC&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;y
&lt;span class="nv"&gt;CONFIG_SWIOTLB_XEN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;y
&lt;span class="nv"&gt;CONFIG_XEN_PCIDEV_BACKEND&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;y
&lt;span class="nv"&gt;CONFIG_XEN_PRIVCMD&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;y
&lt;span class="nv"&gt;CONFIG_XEN_ACPI_PROCESSOR&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;y
&lt;span class="nv"&gt;CONFIG_XEN_MCE_LOG&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;y
&lt;span class="nv"&gt;CONFIG_XEN_HAVE_PVMMU&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;y
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;If all of the Xen features are enabled, move on to&amp;nbsp;compiling.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ make bzImage
$ make modules
$ sudo make modules_install
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Copy the images to the appropriate&amp;nbsp;locations.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ sudo cp -a arch/x86/boot/bzImage /boot/vmlinuz-3.9.2
$ sudo cp -a System.map /boot/System.map-3.9.2
$ sudo cp -a .config /boot/config-3.9.2
$ sudo depmod -a
$ sudo mkinitrd /boot/initrd.img-3.9.2 &lt;span class="m"&gt;3&lt;/span&gt;.9.2
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Add a grub entry to /etc/grub.conf, make sure it is the first entry but
leave an existing distribution kernel entry to fall back to if there are&amp;nbsp;problems:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;title Xen 4.2.1 / Kernel 3.9.2
root (hd0,0)
kernel /xen.gz
module /vmlinuz-3.9.2
module /initrd.img-3.9.2
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Reboot the system and you should be able to run the following command to
verify that your efforts have paid&amp;nbsp;off.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ sudo xl list
Name                                        ID   Mem VCPUs      State   Time&lt;span class="o"&gt;(&lt;/span&gt;s&lt;span class="o"&gt;)&lt;/span&gt;
Domain-0                                     &lt;span class="m"&gt;0&lt;/span&gt;  &lt;span class="m"&gt;2048&lt;/span&gt;     &lt;span class="m"&gt;1&lt;/span&gt;     r-----     &lt;span class="m"&gt;941&lt;/span&gt;.4
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Now you can move on to setting up a guest as described in &lt;a href="http://www.rsreese.com/creating-debian-guests-on-xen-using-parition-based-filesystem/" title="Creating Debian guests on Xen using parition based filesystem"&gt;Creating
Debian guests on Xen using parition based filesystem&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If you are unable to reboot using your new kernel, revert back to a
distro kernel and double check that you have done everything as
described. If something is not clear or could be improved upon, let me
know by leaving a comment&amp;nbsp;below.&lt;/p&gt;</content><category term="linux"></category><category term="xen"></category><category term="virtualization"></category></entry><entry><title>Passive DNS collection and analysis using YaF and Mediator</title><link href="https://www.rsreese.com/passive-dns-collection-and-analysis-using-yaf-and-mediator/" rel="alternate"></link><published>2013-05-20T11:12:00-04:00</published><updated>2013-05-20T11:12:00-04:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2013-05-20:/passive-dns-collection-and-analysis-using-yaf-and-mediator/</id><summary type="html">Passive DNS is a useful tool for any analysts teams toolbox, I have noted several public sensors here but they only see data (queries and responses) that transverse their sensors. I have been working on setting up passive DNS using Yet another Flowmeter (YaF) and Mediator (YaF to MySQL) to …</summary><content type="html">&lt;p&gt;Passive &lt;span class="caps"&gt;DNS&lt;/span&gt; is a useful tool for any analysts teams toolbox, I have noted several public sensors &lt;a href="http://www.rsreese.com/online-information-security-analysis-tools-and-resources/"&gt;here&lt;/a&gt; but they only see data (queries and responses) that transverse their sensors. I have been working on setting up passive &lt;span class="caps"&gt;DNS&lt;/span&gt; using Yet another Flowmeter (YaF) and Mediator (YaF to MySQL) to fill the gap where third-party sensors may not be providing the coverage I would like. Passive &lt;span class="caps"&gt;DNS&lt;/span&gt; can provide tremendous insight and analytics upon &lt;span class="caps"&gt;DNS&lt;/span&gt; queries that users and/or malware may beperforming. A few items of&amp;nbsp;interest:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Hostnames that have a large number of &lt;span class="caps"&gt;IP&lt;/span&gt; addresses associated with them in a short time period and they have only been visited by very few hosts host on the&amp;nbsp;network.&lt;/li&gt;
&lt;li&gt;Tertiary name usage associated with a specific&amp;nbsp;domain?&lt;/li&gt;
&lt;li&gt;When was the domain first resolved on the network and further, how often is it being resolved and by&amp;nbsp;whom?&lt;/li&gt;
&lt;li&gt;A recently accessed/registered domain with short time to live (TTLs) often associated with new &lt;span class="caps"&gt;IP&lt;/span&gt; addresses may indicate
    malicious activity, or a &lt;span class="caps"&gt;CDN&lt;/span&gt;.&lt;/li&gt;
&lt;li&gt;Queries for TLDs that you typically do not interact with may be worth looking&amp;nbsp;into.&lt;/li&gt;
&lt;li&gt;Users using non-approved &lt;span class="caps"&gt;DNS&lt;/span&gt;&amp;nbsp;servers&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Passive &lt;span class="caps"&gt;DNS&lt;/span&gt; may be also helpful in tracking infections using Fast-fluxwhich make blocking the C2 difficult as the attackers will create algorithms to rotate the &lt;span class="caps"&gt;IP&lt;/span&gt; addresses and even the hostnames in the case of double-flux. (&lt;a href="http://www.cs.ucsb.edu/~kemm/courses/cs177/torpig.pdf"&gt;TorPig&lt;/a&gt;) The list goes on but in a nutshell, I wanted to be able to perform this activity without having to rely on having all of the &lt;span class="caps"&gt;DNS&lt;/span&gt; server logs in a centralized location, especially since users may reconfigure their &lt;span class="caps"&gt;DNS&lt;/span&gt; settings to use non-approved servers, e.g. &lt;span class="caps"&gt;BYOD&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;This entry demonstrates how to build and setup &lt;a href="http://tools.netsa.cert.org/yaf/yaf.html"&gt;YaF&lt;/a&gt; and &lt;a href="https://tools.netsa.cert.org/confluence/pages/viewpage.action?pageId=15958035"&gt;Mediator&lt;/a&gt; both of which are available from the &lt;span class="caps"&gt;CERT&lt;/span&gt; &lt;a href="http://www.cert.org/netsa/"&gt;NetSA&lt;/a&gt; &lt;a href="http://tools.netsa.cert.org/"&gt;site&lt;/a&gt; and should be considered complementary to the documentation the NetSA team have already provided for each of the respective tools. This setup was tested on CentOS 6.4 but most Linux distributions should work&amp;nbsp;fine.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Have site reconfigure interfaces on all hosts. eth0 should be management interface and eth1 should be the tap &lt;span class="caps"&gt;OR&lt;/span&gt; whatever makes sense, this need to happen every time the host comes up,&amp;nbsp;i.e.&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;sudo ifconfig eth1 up promisc
&lt;/pre&gt;&lt;/div&gt;


&lt;ol&gt;
&lt;li&gt;Ensure development libraries/dependencies are installed. Some may require enabling the optional software&amp;nbsp;channel&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;sudo yum install glib2-devel lzo  gcc-c++ libpcap-devel pcre-devel
&lt;/pre&gt;&lt;/div&gt;


&lt;ol&gt;
&lt;li&gt;Install &lt;a href="http://tools.netsa.cert.org/fixbuf/"&gt;libfixbuf&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;cd libfixbuf-1.3.0
./configure
make
sudo make install
&lt;/pre&gt;&lt;/div&gt;


&lt;ol&gt;
&lt;li&gt;Install&amp;nbsp;YaF&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;cd yaf-2.3.3
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
./configure --with-libpcap --enable-applabel --enable-plugins
make
sudo make install
&lt;/pre&gt;&lt;/div&gt;


&lt;ol&gt;
&lt;li&gt;Edit&amp;nbsp;ld&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;sudo echo &amp;quot;/usr/local/lib&amp;quot; &amp;gt;&amp;gt; /etc/ld.so.conf
sudo /sbin/ldconfig
sudo /sbin/ldconfig -v | grep libzmq # should rebuild the cache including zmq too.
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;&lt;span class="caps"&gt;OR&lt;/span&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;export PATH=$PATH:/usr/local/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
&lt;/pre&gt;&lt;/div&gt;


&lt;ol&gt;
&lt;li&gt;Configure&amp;nbsp;cmake&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;cd cmake-2.8.10.2
./configure
gmake
&lt;/pre&gt;&lt;/div&gt;


&lt;ol&gt;
&lt;li&gt;Optionally, configure YaF to File output for testing&amp;nbsp;purposes.&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
cd yaf_file_mediator-1.1.0/
./configure
../cmake-2.8.10.2/bin/cmake .
make
&lt;/pre&gt;&lt;/div&gt;


&lt;ol&gt;
&lt;li&gt;Configure YaF to&amp;nbsp;MySQL&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
cd yaf_silk_mysql_mediator-1.4.0
../cmake-2.8.10.2/bin/cmake .
./configure --with-mysql
make
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Next, populate create a database and respective&amp;nbsp;tables:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;./yafMySQL -o localhost -n username -p password -d eflows
&lt;/pre&gt;&lt;/div&gt;


&lt;ol&gt;
&lt;li&gt;Setup YaF to start capturing. Here we are only capture &lt;span class="caps"&gt;DNS&lt;/span&gt; traffic and rotating the files written to disk after 5 minutes. Originally set to 10 minutes but yaf_silk_mysql_mediator would segmentation fault because MySQL would close the connection before all of the data would insert. We have a continuous method that works a little better which we should a little later. We lock the file so that another process cannot take the file that is currently being written&amp;nbsp;to.&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;sudo /usr/local/bin/yaf --live pcap --in eth1 --out /data/ipfix/ --rotate 600 --filter=&amp;quot;port 53&amp;quot; --applabel --applabel-rules=/usr/local/etc/yafApplabelRules.conf --max-payload=1000 --plugin-name=/usr/local/lib/yaf/dpacketplugin.la --plugin-opts=&amp;quot;53&amp;quot; --lock --become-user=nobody --become-group=nobody &amp;amp;
&lt;/pre&gt;&lt;/div&gt;


&lt;ol&gt;
&lt;li&gt;Testing the output of a&amp;nbsp;YaF&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;yaf_file_mediator-1.1.0/yaf_file_mediator --input /data/ipfix/filename.yaf --output test.txt
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;After a few minutes, you should be able to parse the filename.yaf that was first written (in this case 5 minutes). The contents of test.txt should be similar to the&amp;nbsp;following:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;-------------------------------
Template ID is 45841
Application Label: 53
Source IP: 192.168.0.5
Destination IP: 8.8.8.8
Source Port: 53855
Dest Port: 53
Flow Attributes: 1
Rev Flow Attributes: 0
flowStartTime: 2013-04-24 23:53:43
flowEndTime: 2013-04-24 23:58:02
flowEndReason: 1
Protocol: 17
Octet Total Count: 120
Rev Octet count: 244
Packet Total Count: 2
Rev Packet Total Count: 2
DNS ID: 32852 Type: 28 RR Section: 0 TTL: 0 Query: www.google.com.
DNS ID: 32852 Type: 28 RR Section: 1 TTL: 204 RRName: www.google.com. AAAA: 2607:f8b0:400c:0c04::0069

-------------------------------
Template ID is 45841
Application Label: 53
Source IP: 192.168.0.5
Destination IP: 8.8.8.8
Source Port: 50845
Dest Port: 53
flowStartTime: 2013-04-24 23:58:02
flowEndTime: 2013-04-24 23:58:02
flowEndReason: 1
Protocol: 17
Octet Total Count: 60
Rev Octet count: 156
Packet Total Count: 1
Rev Packet Total Count: 1
DNS ID: 21141 Type: 1 RR Section: 0 TTL: 0 Query: www.google.com.
DNS ID: 21141 Type: 1 RR Section: 1 TTL: 208 RRName: www.google.com. A: 74.125.26.103
DNS ID: 21141 Type: 1 RR Section: 1 TTL: 208 RRName: www.google.com. A: 74.125.26.99
DNS ID: 21141 Type: 1 RR Section: 1 TTL: 208 RRName: www.google.com. A: 74.125.26.105
DNS ID: 21141 Type: 1 RR Section: 1 TTL: 208 RRName: www.google.com. A: 74.125.26.104
DNS ID: 21141 Type: 1 RR Section: 1 TTL: 208 RRName: www.google.com. A: 74.125.26.106
DNS ID: 21141 Type: 1 RR Section: 1 TTL: 208 RRName: www.google.com. A: 74.125.26.147
&lt;/pre&gt;&lt;/div&gt;


&lt;ol&gt;
&lt;li&gt;After you have confirmed that your YaF entries contain records, adda little automation. This will scoop up the files in the directory where the YaF files are being written, place them in the MySQL &lt;span class="caps"&gt;DBMS&lt;/span&gt; and delete the file. Note, if you start seeing &amp;#8220;Segmentation Fault&amp;#8221; then MySQL maybe closing the connection before all of the records from the YaF file could be written to the &lt;span class="caps"&gt;DBMS&lt;/span&gt;. You can try modifying MySQL parameters or reduce the the size of YaF files being written to disk in order to try mitigating this symptom if it occurs in your&amp;nbsp;environment.&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;for i in $( ls /data/ipfix/*.yaf ); do /home/user/silk-installs/yaf_silk_mysql_mediator-1.4.0/yaf_silk_mysql_mediator --in-file $i --mysql-host localhost --name username --pass password --database eflows &amp;amp;&amp;amp; sudo rm $i; done
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Here is our first query, lets see who has recently made requests for&amp;nbsp;www.google.com.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;mysql&amp;gt; SELECT rrname,rrval,srcip4,dstip4,flowStartMilliseconds FROM dns d, flows f WHERE f.id = d.id AND rrname LIKE &amp;quot;www.google.com.&amp;quot; GROUP by rrval ORDER BY f.id DESC LIMIT 50;
+-----------------+---------------------------+------------+-----------+-----------------------+
| rrname          | rrval                     | srcip4     | dstip4    | flowStartMilliseconds |
+-----------------+---------------------------+------------+-----------+-----------------------+
| www.google.com. | 2001:4860:4001:0802::1012 | 3232235525 | 134744072 | 2013-05-03 17:47:24   |
| www.google.com. | 2001:4860:4001:0801::1014 | 3232235525 | 134744072 | 2013-05-03 15:35:32   |
| www.google.com. | 2001:4860:4001:0802::1014 | 3232235525 | 134744072 | 2013-05-03 11:28:42   |
| www.google.com. | 2001:4860:4001:0801::1010 | 3232235525 | 134744072 | 2013-05-02 16:48:31   |
| www.google.com. | 2001:4860:4001:0802::1011 | 3232235525 | 134744072 | 2013-05-02 13:33:57   |
| www.google.com. | 2001:4860:4001:0803::1010 | 3232235525 | 134744072 | 2013-05-02 12:01:56   |
| www.google.com. | 2607:f8b0:4004:0801::1012 | 3232235525 | 134744072 | 2013-05-01 21:36:55   |
| www.google.com. | 2001:4860:4001:0802::1010 | 3232235525 | 134744072 | 2013-05-01 12:44:52   |
| www.google.com. | 74.125.239.80             | 3232235525 | 134744072 | 2013-05-01 10:45:04   |
| www.google.com. | 74.125.239.83             | 3232235525 | 134744072 | 2013-05-01 10:45:04   |
| www.google.com. | 74.125.239.82             | 3232235525 | 134744072 | 2013-05-01 10:45:04   |
| www.google.com. | 74.125.239.81             | 3232235525 | 134744072 | 2013-05-01 10:45:04   |
| www.google.com. | 74.125.239.84             | 3232235525 | 134744072 | 2013-05-01 10:45:04   |
| www.google.com. | 2607:f8b0:4004:0802::1010 | 3232235525 | 134744072 | 2013-04-29 19:54:00   |
| www.google.com. | 2607:f8b0:4005:0802::1010 | 3232235525 | 134744072 | 2013-04-28 15:52:00   |
| www.google.com. | 2607:f8b0:4004:0803::1013 | 3232235525 | 134744072 | 2013-04-28 15:05:53   |
| www.google.com. | 2607:f8b0:4005:0802::1011 | 3232235525 | 134744072 | 2013-04-27 14:45:35   |
| www.google.com. | 2607:f8b0:4004:0801::1013 | 3232235525 | 134744072 | 2013-04-26 18:53:45   |
| www.google.com. | 2607:f8b0:4005:0802::1012 | 3232235525 | 134744072 | 2013-04-26 13:55:51   |
| www.google.com. | 2607:f8b0:4005:0802::1013 | 3232235525 | 134744072 | 2013-04-26 12:35:18   |
| www.google.com. | 74.125.239.145            | 3232235525 | 134744072 | 2013-04-26 12:03:10   |
| www.google.com. | 74.125.239.148            | 3232235525 | 134744072 | 2013-04-26 12:03:10   |
| www.google.com. | 74.125.239.146            | 3232235525 | 134744072 | 2013-04-26 12:03:10   |
| www.google.com. | 74.125.239.147            | 3232235525 | 134744072 | 2013-04-26 12:03:10   |
| www.google.com. | 74.125.239.144            | 3232235525 | 134744072 | 2013-04-26 12:03:10   |
| www.google.com. | 2607:f8b0:4005:0802::1014 | 3232235525 | 134744072 | 2013-04-26 11:31:59   |
| www.google.com. | 74.125.228.112            | 3232235525 | 134744072 | 2013-04-25 16:25:39   |
| www.google.com. | 74.125.228.114            | 3232235525 | 134744072 | 2013-04-25 16:25:39   |
| www.google.com. | 74.125.228.113            | 3232235525 | 134744072 | 2013-04-25 16:25:39   |
| www.google.com. | 74.125.228.115            | 3232235525 | 134744072 | 2013-04-25 16:25:39   |
| www.google.com. | 74.125.228.116            | 3232235525 | 134744072 | 2013-04-25 16:25:39   |
| www.google.com. | 2607:f8b0:4004:0802::1012 | 3232235525 | 134744072 | 2013-04-25 11:29:45   |
| www.google.com. | 2607:f8b0:4004:0803::1014 | 3232235525 | 134744072 | 2013-04-24 20:33:42   |
| www.google.com. | 2607:f8b0:400e:0c04::006a | 3232235525 | 134744072 | 2013-04-24 18:04:19   |
| www.google.com. | 2607:f8b0:400e:0c02::006a | 3232235525 | 134744072 | 2013-04-24 15:26:22   |
| www.google.com. | 74.125.228.20             | 3232235525 | 134744072 | 2013-04-24 12:05:43   |
| www.google.com. | 74.125.228.16             | 3232235525 | 134744072 | 2013-04-24 12:05:43   |
| www.google.com. | 74.125.228.18             | 3232235525 | 134744072 | 2013-04-24 12:05:43   |
| www.google.com. | 74.125.228.19             | 3232235525 | 134744072 | 2013-04-24 12:05:43   |
| www.google.com. | 74.125.228.17             | 3232235525 | 134744072 | 2013-04-24 12:05:43   |
| www.google.com. | 2607:f8b0:4004:0801::1014 | 3232235525 | 134744072 | 2013-04-23 20:43:26   |
| www.google.com. | 74.125.228.50             | 3232235525 | 134744072 | 2013-04-23 20:38:43   |
| www.google.com. | 74.125.228.51             | 3232235525 | 134744072 | 2013-04-23 20:38:43   |
| www.google.com. | 74.125.228.52             | 3232235525 | 134744072 | 2013-04-23 20:38:43   |
| www.google.com. | 74.125.228.48             | 3232235525 | 134744072 | 2013-04-23 20:38:43   |
| www.google.com. | 74.125.228.49             | 3232235525 | 134744072 | 2013-04-23 20:38:43   |
| www.google.com. | 2607:f8b0:4004:0801::1011 | 3232235525 | 134744072 | 2013-04-23 18:38:52   |
| www.google.com. | 2607:f8b0:400e:0c01::0067 | 3232235525 | 134744072 | 2013-04-23 15:57:45   |
| www.google.com. | 2607:f8b0:4004:0801::1010 | 3232235525 | 134744072 | 2013-04-23 15:07:59   |
| www.google.com. | 2607:f8b0:400e:0c01::0069 | 3232235525 | 134744072 | 2013-04-23 12:30:28   |
+-----------------+---------------------------+------------+-----------+-----------------------+
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Here is a similar query but we want to see any tertiary youtube.com domains and sort by the lookup&amp;nbsp;returned.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;mysql&amp;gt; SELECT qr,type,auth,nx,ttl,rrname,rrval from dns WHERE rrname LIKE &amp;quot;%.youtube.com.&amp;quot; GROUP BY rrval LIMIT 50;
+------+------+------+------+------+--------------------------------+----------------+
| qr   | type | auth | nx   | ttl  | rrname                         | rrval          |
+------+------+------+------+------+--------------------------------+----------------+
|    0 |    1 |    0 |    0 |    0 | www.youtube.com.               |                |
|    1 |    1 |    0 |    0 |  300 | v17.lscache2.c.youtube.com.    | 12.216.80.12   |
|    1 |    1 |    0 |    0 | 1800 | r2.sn-5uu-vgqe.c.youtube.com.  | 12.216.80.13   |
|    1 |    1 |    0 |    0 | 1800 | r3.sn-5uu-vgqe.c.youtube.com.  | 12.216.80.14   |
|    1 |    1 |    0 |    0 | 1800 | r4.att-ord1.c.youtube.com.     | 12.216.80.15   |
|    1 |    1 |    0 |    0 | 1800 | r6.sn-5uu-vgqe.c.youtube.com.  | 12.216.80.17   |
|    1 |    1 |    0 |    0 | 1714 | r8.sn-5uu-vgqe.c.youtube.com.  | 12.216.80.19   |
|    1 |    1 |    0 |    0 | 1741 | r1.sn-5uu-vgql.c.youtube.com.  | 12.216.80.44   |
|    1 |    1 |    0 |    0 | 1800 | r2.sn-5uu-vgql.c.youtube.com.  | 12.216.80.45   |
|    1 |    1 |    0 |    0 | 1800 | r3.sn-5uu-vgql.c.youtube.com.  | 12.216.80.46   |
|    1 |    1 |    0 |    0 | 1279 | r4.sn-5uu-vgql.c.youtube.com.  | 12.216.80.47   |
|    1 |    1 |    0 |    0 | 1800 | r6.sn-5uu-vgql.c.youtube.com.  | 12.216.80.49   |
|    1 |    1 |    0 |    0 | 1800 | r7.sn-5uu-vgql.c.youtube.com.  | 12.216.80.50   |
|    1 |    1 |    0 |    0 | 1739 | r8.sn-5uu-vgql.c.youtube.com.  | 12.216.80.51   |
|    1 |    1 |    0 |    0 | 1800 | r12.sn-hp576nes.c.youtube.com. | 173.194.17.17  |
|    1 |    1 |    0 |    0 | 1800 | r20.sn-hp576nes.c.youtube.com. | 173.194.17.25  |
|    1 |    1 |    0 |    0 | 1800 | r6.sn-q4f7dnel.c.youtube.com.  | 173.194.24.11  |
|    1 |    1 |    0 |    0 | 1800 | r1.dfw06s08.c.youtube.com.     | 173.194.24.134 |
|    1 |    1 |    0 |    0 | 1800 | r15.sn-q4f7dn7r.c.youtube.com. | 173.194.24.148 |
|    1 |    1 |    0 |    0 | 1800 | r18.sn-hp576n7d.c.youtube.com. | 173.194.29.119 |
|    1 |    1 |    0 |    0 | 1800 | r9.sn-hp576n7z.c.youtube.com.  | 173.194.29.46  |
|    1 |    1 |    0 |    0 | 1800 | r5.sn-ab5e6ner.c.youtube.com.  | 173.194.31.10  |
|    1 |    1 |    0 |    0 | 1800 | r1.sn-ab5e6nle.c.youtube.com.  | 173.194.31.102 |
|    1 |    1 |    0 |    0 |  640 | r2.sn-ab5e6nle.c.youtube.com.  | 173.194.31.103 |
|    1 |    1 |    0 |    0 | 1800 | r3.sn-ab5e6nle.c.youtube.com.  | 173.194.31.104 |
|    1 |    1 |    0 |    0 | 1800 | r4.sn-ab5e6nle.c.youtube.com.  | 173.194.31.105 |
|    1 |    1 |    0 |    0 | 1800 | r5.sn-ab5e6nle.c.youtube.com.  | 173.194.31.106 |
|    1 |    1 |    0 |    0 | 1800 | r6.sn-ab5e6nle.c.youtube.com.  | 173.194.31.107 |
|    1 |    1 |    0 |    0 | 1800 | r7.sn-ab5e6nle.c.youtube.com.  | 173.194.31.108 |
|    1 |    1 |    0 |    0 | 1800 | r8.sn-ab5e6nle.c.youtube.com.  | 173.194.31.109 |
|    1 |    1 |    0 |    0 |  705 | r6.sn-ab5e6ner.c.youtube.com.  | 173.194.31.11  |
|    1 |    1 |    0 |    0 | 1800 | r9.sn-ab5e6nle.c.youtube.com.  | 173.194.31.110 |
|    1 |    1 |    0 |    0 | 1800 | r10.sn-ab5e6nle.c.youtube.com. | 173.194.31.111 |
|    1 |    1 |    0 |    0 |  292 | r11.sn-ab5e6nle.c.youtube.com. | 173.194.31.112 |
|    1 |    1 |    0 |    0 | 1800 | r12.sn-ab5e6nle.c.youtube.com. | 173.194.31.113 |
|    1 |    1 |    0 |    0 |  178 | r13.sn-ab5e6nle.c.youtube.com. | 173.194.31.114 |
|    1 |    1 |    0 |    0 | 1800 | r14.sn-ab5e6nle.c.youtube.com. | 173.194.31.115 |
|    1 |    1 |    0 |    0 | 1800 | r15.sn-ab5e6nle.c.youtube.com. | 173.194.31.116 |
|    1 |    1 |    0 |    0 | 1800 | r16.sn-ab5e6nle.c.youtube.com. | 173.194.31.117 |
|    1 |    1 |    0 |    0 | 1800 | r17.sn-ab5e6nle.c.youtube.com. | 173.194.31.118 |
|    1 |    1 |    0 |    0 | 1800 | r18.sn-ab5e6nle.c.youtube.com. | 173.194.31.119 |
|    1 |    1 |    0 |    0 | 1653 | r7.sn-ab5e6ner.c.youtube.com.  | 173.194.31.12  |
|    1 |    1 |    0 |    0 | 1800 | r19.sn-ab5e6nle.c.youtube.com. | 173.194.31.120 |
|    1 |    1 |    0 |    0 | 1800 | r20.sn-ab5e6nle.c.youtube.com. | 173.194.31.121 |
|    1 |    1 |    0 |    0 | 1800 | r8.sn-ab5e6ner.c.youtube.com.  | 173.194.31.13  |
|    1 |    1 |    0 |    0 |   81 | r1.sn-ab5e6nll.c.youtube.com.  | 173.194.31.134 |
|    1 |    1 |    0 |    0 | 1800 | r2.sn-ab5e6nll.c.youtube.com.  | 173.194.31.135 |
|    1 |    1 |    0 |    0 | 1800 | r3.sn-ab5e6nll.c.youtube.com.  | 173.194.31.136 |
|    1 |    1 |    0 |    0 | 1800 | r4.sn-ab5e6nll.c.youtube.com.  | 173.194.31.137 |
|    1 |    1 |    0 |    0 | 1800 | r5.lga15s22.c.youtube.com.     | 173.194.31.138 |
+------+------+------+------+------+--------------------------------+----------------+
50 rows in set (22.17 sec)
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;An alternative method is to write YaF records directly to mediator, and further the MySQL &lt;span class="caps"&gt;DBMS&lt;/span&gt; rather then writing files to disk although youcan still do this with the appropriate toggles. Here is example usage to start the&amp;nbsp;processes:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ ./silk-installs/yaf_silk_mysql_mediator-1.4.0/yaf_silk_mysql_mediator --in-host&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;127&lt;/span&gt;.0.0.1 --in-port&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;18000&lt;/span&gt; --mysql-host&lt;span class="o"&gt;=&lt;/span&gt;localhost --name&lt;span class="o"&gt;=&lt;/span&gt;username --pass password --database eflows
$ sudo /usr/local/bin/yaf --live pcap --in eth1 --out &lt;span class="m"&gt;127&lt;/span&gt;.0.0.1 --ipfix-port&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;18000&lt;/span&gt; --ipfix tcp --log&lt;span class="o"&gt;=&lt;/span&gt;/var/log/yaf.log --filter&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;port 53&amp;quot;&lt;/span&gt; --applabel --applabel-rules&lt;span class="o"&gt;=&lt;/span&gt;/usr/local/etc/yafApplabelRules.conf --max-payload&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;1000&lt;/span&gt; --plugin-name&lt;span class="o"&gt;=&lt;/span&gt;/usr/local/lib/yaf/dpacketplugin.la --plugin-opts&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;53&amp;quot;&lt;/span&gt; &lt;span class="p"&gt;&amp;amp;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Ensure YaF and mediator are&amp;nbsp;connected:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ sudo netstat -tupan&lt;span class="p"&gt;|&lt;/span&gt;grep yaf
tcp        &lt;span class="m"&gt;0&lt;/span&gt;      &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;127&lt;/span&gt;.0.0.1:18000             &lt;span class="m"&gt;0&lt;/span&gt;.0.0.0:*                   LISTEN      &lt;span class="m"&gt;6497&lt;/span&gt;/yaf_silk_mysql
tcp        &lt;span class="m"&gt;0&lt;/span&gt;      &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;127&lt;/span&gt;.0.0.1:47417             &lt;span class="m"&gt;127&lt;/span&gt;.0.0.1:18000             ESTABLISHED &lt;span class="m"&gt;6513&lt;/span&gt;/yaf
tcp        &lt;span class="m"&gt;0&lt;/span&gt;      &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;127&lt;/span&gt;.0.0.1:18000             &lt;span class="m"&gt;127&lt;/span&gt;.0.0.1:47417             ESTABLISHED &lt;span class="m"&gt;6497&lt;/span&gt;/yaf_silk_mysql
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;You may use the following MySQL query to see when the table was last updated to ensure records are being inserted on a regular&amp;nbsp;basis:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;mysql&amp;gt; SHOW TABLE STATUS in eflows;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;After a few minutes of collection, query a domain that has been recently resolved and you should see it in the &lt;span class="caps"&gt;DBMS&lt;/span&gt;.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;mysql&amp;gt; SELECT rrname,rrval from dns WHERE rrname LIKE &amp;quot;%rsreese.com.&amp;quot; GROUP BY rrval LIMIT 10;
+--------------+--------------------------------+
| rrname       | rrval                          |
+--------------+--------------------------------+
| rsreese.com. |                                |
| rsreese.com. | 2600:3c02::f03c:91ff:fe96:f7bd |
| rsreese.com. | 74.207.234.79                  |
| rsreese.com. | ns1.linode.com.                |
| rsreese.com. | ns2.linode.com.                |
| rsreese.com. | ns3.linode.com.                |
| rsreese.com. | ns4.linode.com.                |
| rsreese.com. | ns5.linode.com.                |
+--------------+--------------------------------+
8 rows in set (18.26 sec)
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;There are a number of different fields available for query so I leave it to you to come up with whatever is most useful for you. Further, think of how you could write a shiny front-end for analysts to use rather then having to use the MySQL command line interface. Hope you found this useful and leave a comment if you did or have any&amp;nbsp;questions. &lt;/p&gt;</content><category term="analysis"></category><category term="netflow"></category><category term="passive dns"></category></entry><entry><title>Running Moloch</title><link href="https://www.rsreese.com/running-moloch/" rel="alternate"></link><published>2013-03-16T18:19:00-04:00</published><updated>2013-03-16T18:19:00-04:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2013-03-16:/running-moloch/</id><summary type="html">This is an overview of installing and running Moloch on a single host. After seeing the 2013 ShmooCon presentation, I have been looking forward to giving the tool a test-drive. Per the documentation, “Moloch is a open source large scale IPv4 full PCAP capturing, indexing and database system”. It is …</summary><content type="html">&lt;p&gt;This is an overview of installing and running &lt;a href="https://github.com/aol/moloch#what-is-moloch"&gt;Moloch&lt;/a&gt; on a single host. After seeing the 2013 ShmooCon &lt;a href="http://www.shmoocon.org/speakers#moloch"&gt;presentation&lt;/a&gt;, I have been looking forward to giving the tool a test-drive. Per the documentation, &amp;#8220;Moloch is a open source large scale IPv4 full &lt;span class="caps"&gt;PCAP&lt;/span&gt; capturing, indexing and database system&amp;#8221;. It is fast and has a pretty nice interface to boot. Although it does not contain the same feature-set as some commercial over the shelf (&lt;span class="caps"&gt;COTS&lt;/span&gt;) products, I see Moloch fitting into a similar space where &lt;span class="caps"&gt;COTS&lt;/span&gt; products such might sit. When analysts are made aware of anomaly-based alerts from signature/misuse based intrusion detection systems (&lt;span class="caps"&gt;IDS&lt;/span&gt;), e.g. Snort, or anomalous activity from network flow, e.g. SiLK, the analyst can obtain packet capture (&lt;span class="caps"&gt;PCAP&lt;/span&gt;) for further investigation. The existing commercial tool suites are expensive &lt;span class="caps"&gt;PCAP&lt;/span&gt; indexing tools if that is all they are being used for, especially if you are locked into their storage mechanism. A budget conscious security operation center (&lt;span class="caps"&gt;SOC&lt;/span&gt;) can setup Moloch for a fraction of the maintenance cost of commercial offerings and instead use the funds for additional hardware (longer retention), maintenance, and even some Moloch development&amp;nbsp;contribution. &lt;/p&gt;
&lt;p&gt;Although the developers have provided a script to get Moloch going, I had a few hiccups so I figured I would document them in the event they help someone else out. I used a CentOS release 6.4 (Final) x86_64 base bare-metal install. I imagine you could run it in a virtual environment for testing purposes. After you get the operating system (&lt;span class="caps"&gt;OS&lt;/span&gt;) installed and patched, pull down the latest Oracle Java for your distribution. Untar the package and create a symbolic in a directory that Moloch will be able to&amp;nbsp;find. &lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ sudo cp -R jre1.7.0_17/ /usr/bin/
$ sudo  ln -s /usr/bin/jre1.7.0_17/bin/java /usr/bin/java
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Next, pull down the latest moloch build. I just grabbed the &lt;span class="caps"&gt;ZIP&lt;/span&gt; but it is hosted on GitHub. You might want to take a look at the install script to see if everything is ideal for you. Run the easy installer which should pull down the prerequisites needed, build and&amp;nbsp;install. &lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ &lt;span class="nb"&gt;cd&lt;/span&gt; moloch-master/
$ sudo ./easybutton-singlehost.sh
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;If everything went smoothly, the script will try starting the three Moloch components being elasticsearch, capture, and viewer. The latter process did not start and this was probably for the better as I required me to take a closer look at what the install script was doing and the default configuration files (&lt;em&gt;config.ini&lt;/em&gt; and &lt;em&gt;elaseticsearch.yml&lt;/em&gt;). The configuration files are located&amp;nbsp;in: &lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;# ls -l /data/moloch/etc/
total 4680
-rw-r--r--. 1 root root    6766 Mar 14 17:21 config.ini
-rw-r--r--. 1 root root    6551 Mar 13 22:30 config.ini.template
-rw-r--r--. 1 root root   12545 Mar 14 22:54 elasticsearch.yml
-rw-r--r--. 1 root root 3360134 Mar  6 15:10 GeoIPASNum.dat
-rw-r--r--. 1 root root 1358092 Mar  5 21:48 GeoIP.dat
-rw-r--r--. 1 root root    1249 Mar 13 22:31 moloch.crt
-rw-r--r--. 1 root root    1029 Mar 13 22:31 moloch.csr
-rw-r--r--. 1 root root    1704 Mar 13 22:31 moloch.key
-rw-r--r--. 1 root root   10875 Mar 13 22:31 openssl.cnf
-rw-r--r--. 1 root root   10909 Mar 13 22:30 openssl.cnf.template
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;First, I had to sort out what was preventing the viewer from starting so I took a look at the&amp;nbsp;viewer.log.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;Mar 13 23:13:04 http.c:245 moloch_http_connect(): Connecting 0x7f6e0d19b010
Mar 13 23:13:04 http.c:276 moloch_http_connect(): 0x7f6e0d19b010: Error: Error connecting: Address family not supported by protocol
Couldn&amp;#39;t connect to elastic search at &amp;#39;localhost:9200&amp;#39;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Log files are located&amp;nbsp;in:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;# ls -l /data/moloch/logs/
total 6047776
-rw-r--r--. 1 root root 6180585472 Mar 15 23:44 capture.log
-rw-r--r--. 1 root root   12062720 Mar 14 17:22 capture.log.old
-rw-r--r--. 1 root root          0 Mar 13 22:31 Moloch_index_indexing_slowlog.log
-rw-r--r--. 1 root root          0 Mar 13 22:31 Moloch_index_search_slowlog.log
-rw-r--r--. 1 root root        163 Mar 15 20:00 Moloch.log
-rw-r--r--. 1 root root       2943 Mar 13 23:27 Moloch.log.2013-03-13
-rw-r--r--. 1 root root      35410 Mar 14 23:34 Moloch.log.2013-03-14
-rw-r--r--. 1 root root     208487 Mar 15 23:06 viewer.log
-rw-r--r--. 1 root root       1668 Mar 15 09:06 viewer.log.old
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;I had to change the directive in the config.ini from localhost to 127.0.0.1, otherwise the viewer would not connect to the elasticsearch instance in CentOS. Probably due to the initial IPv6 look-up, just a guess. Also added a Berkley packet filter (&lt;span class="caps"&gt;BPF&lt;/span&gt;) to prevent the capture and indexing of internal-to-internal&amp;nbsp;traffic. &lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;elasticsearch=127.0.0.1:9200
bpf=not src net (10.0.0.0/8) and dst net (10.0.0.0/8)
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;While I was adjusting the configuration, I decided to adjust the elasticsearch memory usage from what I originally specified in the installer script. You might want to take a look at their &lt;a href="https://github.com/aol/moloch#hardware-requirements"&gt;hardware requirements&lt;/a&gt; but I was able to run with a less powerful&amp;nbsp;node: &lt;/p&gt;
&lt;p&gt;&lt;em&gt;$ sudo vim&amp;nbsp;/data/moloch/bin/run_es.sh&lt;/em&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;ES_HEAP_SIZE=2G bin/elasticsearch -Des.config=&lt;span class="cp"&gt;${&lt;/span&gt;&lt;span class="n"&gt;TDIR&lt;/span&gt;&lt;span class="cp"&gt;}&lt;/span&gt;/etc/elasticsearch.yml
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;The viewer would now start (the capture and viewer process were already running but had gracefully killed them). Here are the commands to start each process based on the default installation&amp;nbsp;criteria.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ sudo nohup /data/moloch/bin/run_es.sh
$ sudo nohup /data/moloch/bin/run_capture.sh &lt;span class="p"&gt;&amp;amp;&lt;/span&gt;
$ sudo nohup /data/moloch/bin/run_viewer.sh &lt;span class="p"&gt;&amp;amp;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Sessions page screen-shot after capturing some traffic, not including session&amp;nbsp;listing:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.rsreese.com/assets/moloch-graph.png"&gt;&lt;img alt="Moloch Graph" src="https://www.rsreese.com/assets/moloch-graph-thumb.jpg"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Stats page&amp;nbsp;screen-shot:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.rsreese.com/assets/moloch-stats.png"&gt;&lt;img alt="moloch-stats-thumb" src="https://www.rsreese.com/assets/moloch-stats-thumb.jpg"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I noticed the mention of two plugins to keep tabs on the elasticsearch memory usage and to maintain session data. This is pretty important as I determined if you remove &lt;span class="caps"&gt;PCAP&lt;/span&gt; and the session data remained, think metadata, users that attempted to drill-down on the aforementioned session data for the missing &lt;span class="caps"&gt;PCAP&lt;/span&gt; would cause the viewer process to die. In my case, I setup Putty to tunnel my connection to the locally listening plug-in interfaces and delete the offending session&amp;nbsp;data: &lt;/p&gt;
&lt;p&gt;&lt;img alt="moloch-putty" src="https://www.rsreese.com/assets/moloch-putty.png"&gt;&lt;/p&gt;
&lt;p&gt;ElasticSearch maintenance screenshot located at http://127.0.0.1:9200/_plugin/head/ after tunneling via Putty. I was able to drop the session via this&amp;nbsp;interface.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.rsreese.com/assets/moloch-head.png"&gt;&lt;img alt="moloch-head-thumb" src="https://www.rsreese.com/assets/moloch-head-thumb.jpg"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Node statistics screen-shot accessed at
http://127.0.0.1:9200/_plugin/bigdesk/ after correctly configuring
Putty. Note that we want to keep an eye on the heap memory to ensure it
does not approach the maximum specified value. There are many more
statistics not shown in this&amp;nbsp;screen-shot.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.rsreese.com/assets/moloch-bigdesk.png"&gt;&lt;img alt="moloch-bigdesk-thumb" src="https://www.rsreese.com/assets/moloch-bigdesk-thumb.jpg"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Here is a Youtube &lt;a href="http://www.youtube.com/watch?v=BWxrXJz_Ay0"&gt;video&lt;/a&gt; featuring Moloch in actions. As usual, if you have trouble installing or running Moloch, please leave a comment below, and do not forget to check out the Moloch &lt;a href="https://github.com/aol/moloch/wiki/FAQ"&gt;&lt;span class="caps"&gt;FAQ&lt;/span&gt;&lt;/a&gt;.&lt;/p&gt;</content><category term="java"></category><category term="moloch"></category><category term="network defense"></category></entry><entry><title>Increment IP packet timestamp</title><link href="https://www.rsreese.com/increment-ip-packet-timestamp/" rel="alternate"></link><published>2013-03-13T02:48:00-04:00</published><updated>2013-03-13T02:48:00-04:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2013-03-13:/increment-ip-packet-timestamp/</id><summary type="html">I recently had a need to specify and increment the IP timestamp values of packets in a PCAP. In this example, the starting second value is specified and we increment the microsecond value. This requires the use of Scapy. If you have any questions or recommendations for improvement, please leave …</summary><content type="html">&lt;p&gt;I recently had a need to specify and increment the &lt;span class="caps"&gt;IP&lt;/span&gt; timestamp values of packets in a &lt;code&gt;PCAP&lt;/code&gt;. In this example, the starting second value is specified and we increment the microsecond value. This requires the use of &lt;a href="http://www.secdev.org/projects/scapy/"&gt;Scapy&lt;/a&gt;. If you have any questions or recommendations for improvement, please leave a comment&amp;nbsp;below.&lt;/p&gt;
&lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt; 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="ch"&gt;#!/usr/bin/python&lt;/span&gt;
&lt;span class="c1"&gt;# Script to parse a PCAP and modify timestamps&lt;/span&gt;
&lt;span class="c1"&gt;# Requires Scapy&lt;/span&gt;
&lt;span class="c1"&gt;# 0.1 - 03012012&lt;/span&gt;
&lt;span class="c1"&gt;# Stephen Reese&lt;/span&gt;

&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;scapy.all&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;sys&lt;/span&gt;

&lt;span class="c1"&gt;# Get input and output files from command line&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;argv&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;print&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;Usage: rewritetimestamp.py inputpcapfile&amp;quot;&lt;/span&gt;
        &lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;exit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Assign variable names for input and output files&lt;/span&gt;
&lt;span class="n"&gt;infile&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;argv&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;process_packets&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="n"&gt;pkts&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;rdpcap&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;infile&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;cooked&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt;
    &lt;span class="n"&gt;timestamp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;1234567890.000000&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;pkts&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;time&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;timestamp&lt;/span&gt;
        &lt;span class="n"&gt;timestamp&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mf"&gt;0.000001&lt;/span&gt;
        &lt;span class="n"&gt;pmod&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;
        &lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;time&lt;/span&gt;
        &lt;span class="n"&gt;cooked&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pmod&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;wrpcap&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;out.pcap&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;cooked&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;process_packets&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</content><category term="python"></category><category term="scapy"></category></entry><entry><title>Running SnortAD</title><link href="https://www.rsreese.com/running-snortad/" rel="alternate"></link><published>2013-01-10T03:00:00-05:00</published><updated>2013-01-10T03:00:00-05:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2013-01-10:/running-snortad/</id><summary type="html">I recently fired up a Snort Anomaly Detection instance provided by the SnortAD project and wanted to share my experience for those who might be interested in trying it on your network. SnortAD is the third generation anomaly detection preprocessor for Snort and is a little different than its predecessors …</summary><content type="html">&lt;p&gt;I recently fired up a Snort Anomaly Detection instance provided by the
&lt;a href="http://anomalydetection.info/"&gt;SnortAD&lt;/a&gt; project and wanted to share my experience for those who
might be interested in trying it on your network. SnortAD is the third
generation anomaly detection preprocessor for Snort and is a little
different than its predecessors but don&amp;#8217;t take my word for it, check out
their &lt;a href="http://anomalydetection.info/"&gt;site&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;First you need to create a log file based on your network, the log file
will contain a profile of your network traffics characteristics.
Although a log file has been provided with the SnortAD virtual machine
(&lt;span class="caps"&gt;VM&lt;/span&gt;) that contains null entries it will not do you much good aside from
alerting on everything. In order to characterize your network, you will
need to create a log file with enough data to be statistically relevant.
For the impatient, you can create a day or two worth of data and
duplicate the data. Duplicating the data will have adverse effects
though. Think about a university in which a majority of classes occur on
Monday and Wednesday. If you only create a profile for Monday and
duplicate it for the rest of the week, you can quickly understand how
your results might be&amp;nbsp;skewed.&lt;/p&gt;
&lt;p&gt;To get going, use the snort.conf included on SnortAD &lt;span class="caps"&gt;VM&lt;/span&gt; and begin
creating a log file but remember to backup or remove the original log
file in the event you need it for reference. Also, always backup your
configuration files before making changes for good&amp;nbsp;measure.&lt;/p&gt;
&lt;p&gt;Configure the snort.conf file to log. Something like the following
should work&amp;nbsp;fine:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;preprocessor AnomalyDetection: LogPath /var/log/snort log time 60
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Next, run Snort to generate log data. As mentioned, you should create
enough data to make it statistically relevant. The evaluator script
expects three weeks. As an alternate, you might be able to use tcpreplay
to replay existing &lt;span class="caps"&gt;PCAP&lt;/span&gt; if you have enough&amp;nbsp;data.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ sudo /usr/local/bin/snort -c /etc/snort.conf -i eth0
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;You should start seeing messages to stdout that look like the&amp;nbsp;following:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;Loged transfer between 06-01-13 15:33:52 - 06-01-13 15:34:52
Loged transfer between 06-01-13 15:34:52 - 06-01-13 15:35:52
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Now you should have a log with a number of entries saved in
/var/log/snort. The profile generation script is next run. In this
example we specify a week rather than opt for the three week default but
again, &lt;span class="caps"&gt;YMMV&lt;/span&gt; and you made need to adjust these values. Also, make sure
you check the help of the profile generator as there are other
algorithms, five to be specific: Moving average (default), Naive method,
Autoregressive time series model, Holt-Winters model, and &lt;span class="caps"&gt;HW&lt;/span&gt; model with
Brutlag&amp;#8217;s confidence&amp;nbsp;band.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;/usr/local/src/profilegenerator/ad_profilegenerator.r -m AVG --avg &amp;#39;WEEKLY,1&amp;#39; -l Log_Data.txt -p profile.txt -e evaluator.txt -P pattern.txt
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;The previous command creates the profile.txt file which is a &lt;span class="caps"&gt;CSV&lt;/span&gt; file,
i.e. you could respectively name it profile.csv. The &lt;span class="caps"&gt;CSV&lt;/span&gt; file will be
used by your updated snort.conf file. In order to enable anomaly
detection, we need to download or create a few Snort configuration&amp;nbsp;files:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ ls -l /etc/snort
total &lt;span class="m"&gt;4200&lt;/span&gt;
-rw-r--r--. &lt;span class="m"&gt;1&lt;/span&gt; root root    &lt;span class="m"&gt;3621&lt;/span&gt; Jan  &lt;span class="m"&gt;5&lt;/span&gt; &lt;span class="m"&gt;15&lt;/span&gt;:35 classification.config
-rw-r--r--. &lt;span class="m"&gt;1&lt;/span&gt; root root   &lt;span class="m"&gt;29596&lt;/span&gt; Jan  &lt;span class="m"&gt;5&lt;/span&gt; &lt;span class="m"&gt;15&lt;/span&gt;:35 gen-msg.map
-rw-r--r--. &lt;span class="m"&gt;1&lt;/span&gt; root root    &lt;span class="m"&gt;7897&lt;/span&gt; Jan  &lt;span class="m"&gt;5&lt;/span&gt; &lt;span class="m"&gt;15&lt;/span&gt;:35 preprocessor.rules
-rw-r--r--. &lt;span class="m"&gt;1&lt;/span&gt; root root &lt;span class="m"&gt;1484013&lt;/span&gt; Jan  &lt;span class="m"&gt;5&lt;/span&gt; &lt;span class="m"&gt;15&lt;/span&gt;:35 profile.csv
-rw-r--r--. &lt;span class="m"&gt;1&lt;/span&gt; root root     &lt;span class="m"&gt;746&lt;/span&gt; Jan  &lt;span class="m"&gt;5&lt;/span&gt; &lt;span class="m"&gt;15&lt;/span&gt;:35 reference.config
-rw-r--r--. &lt;span class="m"&gt;1&lt;/span&gt; root root &lt;span class="m"&gt;2696705&lt;/span&gt; Jan  &lt;span class="m"&gt;5&lt;/span&gt; &lt;span class="m"&gt;15&lt;/span&gt;:35 sid-msg.map
-rw-r--r--. &lt;span class="m"&gt;1&lt;/span&gt; root root     &lt;span class="m"&gt;255&lt;/span&gt; Jan  &lt;span class="m"&gt;5&lt;/span&gt; &lt;span class="m"&gt;15&lt;/span&gt;:35 snort.conf
-rw-r--r--. &lt;span class="m"&gt;1&lt;/span&gt; root root    &lt;span class="m"&gt;2556&lt;/span&gt; Jan  &lt;span class="m"&gt;5&lt;/span&gt; &lt;span class="m"&gt;15&lt;/span&gt;:35 threshold.conf
-rw-r--r--. &lt;span class="m"&gt;1&lt;/span&gt; root root   &lt;span class="m"&gt;53841&lt;/span&gt; Jan  &lt;span class="m"&gt;5&lt;/span&gt; &lt;span class="m"&gt;15&lt;/span&gt;:35 unicode.map
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;I found it simplest to pull down the latest Snort signature as they have
the additional required files that are not included in the provide
SnortAD build. You can pull down the needed preprocessor.rules from one
of the authors &lt;a href="https://bitbucket.org/AnomalyDetection/preprocessor/src/2aaea35a15b0a3dcb7f627cc428e4a136420c9d3/preproc_rules/preprocessor.rules?at=default"&gt;bitbucket&lt;/a&gt;. The snort.conf was populated with the
following&amp;nbsp;contents:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;include classification.config
include reference.config
include preprocessor.rules
preprocessor AnomalyDetection: ProfilePath /etc/snort/profile.csv LogPath /var/log/snort alert log time 60
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;If you have everything in the /etc/snort directory, you should be able
to run Snort and see alerts when anomalies are&amp;nbsp;detected:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ sudo /usr/local/bin/snort -c /etc/snort/snort.conf -i eth0
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Here are some sample alerts from some early testing. It will probably
take some tuning to begin seeing useful&amp;nbsp;alerts:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="k"&gt;[**] [1000100:1000101:1] AD_UNUSUALLY_HIGH_TCP_TRAFFIC [**]&lt;/span&gt;
&lt;span class="k"&gt;[Classification: Potentially Bad Traffic] [Priority: 2]&lt;/span&gt;
&lt;span class="na"&gt;01/06-20:59:04.308505 10.0.0.116 -&amp;gt; 8.8.8.8&lt;/span&gt;
&lt;span class="na"&gt;ICMP TTL:64 TOS:0x0 ID:0 IpLen:20 DgmLen:84 DF&lt;/span&gt;
&lt;span class="na"&gt;Type:8  Code:0  ID:30537   Seq:1  ECHO&lt;/span&gt;

&lt;span class="k"&gt;[**] [1000100:1000107:1] AD_HIGH_LAN_TCP_TRAFFIC [**]&lt;/span&gt;
&lt;span class="k"&gt;[Classification: Potentially Bad Traffic] [Priority: 2]&lt;/span&gt;
&lt;span class="na"&gt;01/06-20:59:04.308505 10.0.0.116 -&amp;gt; 8.8.8.8&lt;/span&gt;
&lt;span class="na"&gt;ICMP TTL:64 TOS:0x0 ID:0 IpLen:20 DgmLen:84 DF&lt;/span&gt;
&lt;span class="na"&gt;Type:8  Code:0  ID:30537   Seq:1  ECHO&lt;/span&gt;

&lt;span class="k"&gt;[**] [1000100:1000108:1] AD_UNUSUALLY_LOW_UDP_TRAFFIC [**]&lt;/span&gt;
&lt;span class="k"&gt;[Classification: Potentially Bad Traffic] [Priority: 2]&lt;/span&gt;
&lt;span class="na"&gt;01/06-20:59:04.308505 10.0.0.116 -&amp;gt; 8.8.8.8&lt;/span&gt;
&lt;span class="na"&gt;ICMP TTL:64 TOS:0x0 ID:0 IpLen:20 DgmLen:84 DF&lt;/span&gt;
&lt;span class="na"&gt;Type:8  Code:0  ID:30537   Seq:1  ECHO&lt;/span&gt;

&lt;span class="k"&gt;[**] [1000100:1000114:1] AD_LOW_LAN_UDP_TRAFFIC [**]&lt;/span&gt;
&lt;span class="k"&gt;[Classification: Potentially Bad Traffic] [Priority: 2]&lt;/span&gt;
&lt;span class="na"&gt;01/06-20:59:04.308505 10.0.0.116 -&amp;gt; 8.8.8.8&lt;/span&gt;
&lt;span class="na"&gt;ICMP TTL:64 TOS:0x0 ID:0 IpLen:20 DgmLen:84 DF&lt;/span&gt;
&lt;span class="na"&gt;Type:8  Code:0  ID:30537   Seq:1  ECHO&lt;/span&gt;

&lt;span class="k"&gt;[**] [1000100:1000134:1] AD_LOW_ARP_REQUEST_NUMBER [**]&lt;/span&gt;
&lt;span class="k"&gt;[Classification: Potentially Bad Traffic] [Priority: 2]&lt;/span&gt;
&lt;span class="na"&gt;01/06-20:59:04.308505 10.0.0.116 -&amp;gt; 8.8.8.8&lt;/span&gt;
&lt;span class="na"&gt;ICMP TTL:64 TOS:0x0 ID:0 IpLen:20 DgmLen:84 DF&lt;/span&gt;
&lt;span class="na"&gt;Type:8  Code:0  ID:30537   Seq:1  ECHO&lt;/span&gt;

&lt;span class="k"&gt;[**] [1000100:1000138:1] AD_LOW_NOT_TCP_IP_TRAFFIC [**]&lt;/span&gt;
&lt;span class="k"&gt;[Classification: Potentially Bad Traffic] [Priority: 2]&lt;/span&gt;
&lt;span class="na"&gt;01/06-20:59:04.308505 10.0.0.116 -&amp;gt; 8.8.8.8&lt;/span&gt;
&lt;span class="na"&gt;ICMP TTL:64 TOS:0x0 ID:0 IpLen:20 DgmLen:84 DF&lt;/span&gt;
&lt;span class="na"&gt;Type:8  Code:0  ID:30537   Seq:1  ECHO&lt;/span&gt;

&lt;span class="k"&gt;[**] [1000100:1000140:1] AD_LOW_OVERALL_PACKET_NUMBER [**]&lt;/span&gt;
&lt;span class="k"&gt;[Classification: Potentially Bad Traffic] [Priority: 2]&lt;/span&gt;
&lt;span class="na"&gt;01/06-20:59:04.308505 10.0.0.116 -&amp;gt; 8.8.8.8&lt;/span&gt;
&lt;span class="na"&gt;ICMP TTL:64 TOS:0x0 ID:0 IpLen:20 DgmLen:84 DF&lt;/span&gt;
&lt;span class="na"&gt;Type:8  Code:0  ID:30537   Seq:1  ECHO&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;If you have any questions, leave a comment and/or check out the authors
&lt;a href="https://bitbucket.org/AnomalyDetection/preprocessor/raw/2aaea35a15b0a3dcb7f627cc428e4a136420c9d3/ReadMe.txt"&gt;Readme.txt&lt;/a&gt; for some additional usage&amp;nbsp;insight.&lt;/p&gt;</content><category term="anomaly detection"></category></entry><entry><title>Mailing Lists</title><link href="https://www.rsreese.com/mailing-lists/" rel="alternate"></link><published>2012-11-10T04:27:00-05:00</published><updated>2012-11-10T04:27:00-05:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2012-11-10:/mailing-lists/</id><summary type="html">Here are a few technology and information security related mailing-lists that I subscribe to in no particular order. Leave a comment if you think I missed one. asterisk-users.lists.digium.com beginners.perl.org snort-users.lists.sourceforge.net nessus.list.nessus.org pauldotcom.mail.pauldotcom.com samurai-devel.lists.sourceforge.net …</summary><content type="html">&lt;p&gt;Here are a few technology and information security related mailing-lists
that I subscribe to in no particular order. Leave a comment if you think
I missed&amp;nbsp;one.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;asterisk-users.lists.digium.com&lt;/em&gt;&lt;br&gt;
&lt;em&gt;beginners.perl.org&lt;/em&gt;&lt;br&gt;
&lt;em&gt;snort-users.lists.sourceforge.net&lt;/em&gt;&lt;br&gt;
&lt;em&gt;nessus.list.nessus.org&lt;/em&gt;&lt;br&gt;
&lt;em&gt;pauldotcom.mail.pauldotcom.com&lt;/em&gt;&lt;br&gt;
&lt;em&gt;samurai-devel.lists.sourceforge.net&lt;/em&gt;&lt;br&gt;
&lt;em&gt;ptk-forensics-mail.lists.sourceforge.net&lt;/em&gt;&lt;br&gt;
&lt;em&gt;gcfa.lists.sans.org&lt;/em&gt;&lt;br&gt;
&lt;em&gt;framework-hackers.spool.metasploit.com&lt;/em&gt;&lt;br&gt;
&lt;em&gt;framework.spool.metasploit.com&lt;/em&gt;&lt;br&gt;
&lt;em&gt;secureideas-base-user.lists.sourceforge.net&lt;/em&gt;&lt;br&gt;
&lt;em&gt;python-list.python.org&lt;/em&gt;&lt;br&gt;
&lt;em&gt;nexpose-users.lists.rapid7.com&lt;/em&gt;&lt;br&gt;
&lt;em&gt;winquisitor-beta.googlegroups.com&lt;/em&gt;&lt;br&gt;
&lt;em&gt;securitybsides.googlegroups.com&lt;/em&gt;&lt;br&gt;
&lt;em&gt;datarecoverycertification.googlegroups.com&lt;/em&gt;&lt;br&gt;
&lt;em&gt;full-disclosure.lists.grok.org.uk&lt;/em&gt;&lt;br&gt;
&lt;em&gt;scap_interest.ietf.org&lt;/em&gt;&lt;br&gt;
&lt;em&gt;cipp.news.infracritical.com&lt;/em&gt;&lt;br&gt;
&lt;em&gt;scadasec.news.infracritical.com&lt;/em&gt;&lt;br&gt;
&lt;em&gt;debian-security-announce.lists.debian.org&lt;/em&gt;&lt;br&gt;
&lt;em&gt;bugtraq.list-id.securityfocus.com&lt;/em&gt;&lt;br&gt;
&lt;em&gt;ietf.ietf.org&lt;/em&gt;&lt;br&gt;
&lt;em&gt;dfir.lists.sans.org&lt;/em&gt;&lt;br&gt;
&lt;em&gt;webappsec.list-id.securityfocus.com&lt;/em&gt;&lt;br&gt;
&lt;em&gt;sleuthkit-users.lists.sourceforge.net&lt;/em&gt;&lt;br&gt;
&lt;em&gt;vol-users.volatilesystems.com&lt;/em&gt;&lt;br&gt;
&lt;em&gt;emerging-sigs.emergingthreats.net&lt;/em&gt;&lt;/p&gt;</content><category term="mailing lists"></category></entry><entry><title>Podcasts</title><link href="https://www.rsreese.com/podcasts/" rel="alternate"></link><published>2012-09-10T04:29:00-04:00</published><updated>2012-09-10T04:29:00-04:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2012-09-10:/podcasts/</id><summary type="html">Here is a list of information technology and security podcasts. Some are technical, others are higher level so YMMV. A source of information to keep me up to date on what is going on in the information technology realm. If you think of something I have missed, leave a commment …</summary><content type="html">&lt;p&gt;Here is a list of information technology and security podcasts. Some are technical, others are higher level so &lt;span class="caps"&gt;YMMV&lt;/span&gt;. A source of information to keep me up to date on what is going on in the information technology realm. If you think of something I have missed, leave a commment. Some of these may be explicit so please use discretion and they are in no particular&amp;nbsp;order.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://dataclonelabs.com/security_talkworkshop/datasecurity.xml" title="http://www.thecyberjungle.com"&gt;The CyberJungle&lt;/a&gt;&lt;br&gt;
&lt;a href="http://www.cbsnews.com/common/includes/podcast/podcast_larry_magid_1.rss" title="http://www.cbsradionewsfeed.com/rss.php?id=112"&gt;Tech Talk&lt;/a&gt;&lt;br&gt;
&lt;a href="http://feeds2.feedburner.com/Threatpost-DigitalUnderground" title="http://threatpost.com/en_us/feeds/blog/hearsay/digitalunderground.xml"&gt;The Digital Underground Podcast&lt;/a&gt;&lt;br&gt;
&lt;a href="http://feeds.feedburner.com/TheLinuxActionShow" title="http://www.jupiterbroadcasting.com"&gt;The Linux Action Show! &lt;span class="caps"&gt;MP3&lt;/span&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="http://feeds.packetpushers.net/PacketPushersPodcast" title="http://packetpushers.net"&gt;Packet Pushers Podcast&lt;/a&gt;&lt;br&gt;
&lt;a href="http://www.cigital.com/silverbullet/feed/" title="http://www.cigital.com/silverbullet"&gt;The Silver Bullet Security Podcast&lt;/a&gt;&lt;br&gt;
&lt;a href="http://www.social-engineer.org/category/podcast/" title="http://socialengineer.podbean.com"&gt;Social-Engineer.Org PodCast&lt;/a&gt;&lt;br&gt;
&lt;a href="http://sfspodcast.libsyn.com/rss" title="http://www.southernfriedsecurity.com"&gt;The Southern Fried Security Podcast&lt;/a&gt;&lt;br&gt;
&lt;a href="https://isc.sans.edu/dailypodcast.xml" title="http://isc.sans.edu/"&gt;Internet Storm Center Threat Update&lt;/a&gt;&lt;br&gt;
&lt;a href="http://risky.biz/feeds/rb2" title="http://risky.biz/feeds/rb2"&gt;&lt;span class="caps"&gt;RB2&lt;/span&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="http://www.npr.org/rss/podcast.php?id=1019&amp;amp;uid=n1qe4e85742c986fdb81d2d38ffa0d5d53" title="http://www.npr.org/templates/topics/topic.php?topicId= 1019"&gt;&lt;span class="caps"&gt;NPR&lt;/span&gt; Topics: Technology Podcast&lt;/a&gt;&lt;br&gt;
&lt;a href="http://securityweekly.com/podcast/psw.xml" title="http://www.securityweekly.com/"&gt;Security Weekly&lt;/a&gt;&lt;br&gt;
&lt;a href="http://feeds.sophos.com/en/rss2_0-sophos-podcasts.xml" title="http://feeds.sophos.com/en/rss2_0-sophos-podcasts.xml"&gt;Sophos Podcasts&lt;/a&gt;&lt;br&gt;
&lt;a href="http://risky.biz/feeds/risky-business" title="http://risky.biz/feeds/risky-business"&gt;Risky Business&lt;/a&gt;&lt;br&gt;
&lt;a href="http://www.eurotrashsecurity.eu/episodes/eurotrash.xml" title="http://www.eurotrashsecurity.eu"&gt;Eurotrash Security Podcast: Security with funny accents&lt;/a&gt;&lt;br&gt;
&lt;a href="http://securabit.libsyn.com/rss" title="http://www.securabit.com"&gt;SecuraBit&lt;/a&gt;&lt;br&gt;
&lt;a href="http://www.securitycatalyst.com/feed/" title="http://www.securitycatalyst.com"&gt;The Security Catalyst&lt;/a&gt;&lt;br&gt;
&lt;a href="http://www.cert.org/podcast/exec_podcast.rss" title="http://www.cert.org/podcast"&gt;&lt;span class="caps"&gt;CERT&lt;/span&gt; Podcast Series: Security for Business Leaders&lt;/a&gt;&lt;br&gt;
&lt;a href="http://feeds2.feedburner.com/myharddrivedied" title="http://podnutz.com/mhdd/feed"&gt;My Hard Drive Died - w/Scott Moulton&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.owasp.org/download/jmanico/podcast.xml" title="https://www.owasp.org/index.php/OWASP_Podcast"&gt;&lt;span class="caps"&gt;OWASP&lt;/span&gt; Security Podcast&lt;/a&gt;&lt;br&gt;
&lt;a href="http://crypto-gram.libsyn.com/rss" title="http://crypto-gram.libsyn.com"&gt;Crypto-Gram Security Podcast&lt;/a&gt;&lt;br&gt;
&lt;a href="http://www.cisco.com/assets/cdc_content_elements/rss/security_podcast/security_tac_pcast.xml" title="http://www.cisco.com/en/US/solutions/ns170/tac/ security_tac_podcasts.html"&gt;Cisco &lt;span class="caps"&gt;TAC&lt;/span&gt; Security Podcast Series&lt;/a&gt;&lt;br&gt;
&lt;a href="http://www.2600.com/oth-broadband.xml" title="http://www.2600.com/offthehook/"&gt;Off The Hook: high-bitrate &lt;span class="caps"&gt;MP3&lt;/span&gt; feed&lt;/a&gt;&lt;br&gt;
&lt;a href="http://infosecplacepodcast.com/?feed=podcast" title="http://infosecplacepodcast.com"&gt;An Information Security Place Podcast&lt;/a&gt;&lt;br&gt;
&lt;a href="http://feeds.feedburner.com/townsendsecurity" title="http://www.townsendsecurity.com"&gt;Security Insider - Podcast Edition&lt;/a&gt;&lt;br&gt;
&lt;a href="http://feeds.wsjonline.com/wsj/podcast_wall_street_journal_tech_news_briefing?format=xml" title="http://online.wsj.com/page/audio.html"&gt;Wall Street Journal Tech News Briefing&lt;/a&gt;&lt;br&gt;
&lt;a href="http://feeds.feedburner.com/The404?format=xml" title="http://www.cnet.com/8300-13952_1-81.html"&gt;The 404 (&lt;span class="caps"&gt;MP3&lt;/span&gt;)&lt;/a&gt;&lt;br&gt;
&lt;a href="http://downloads.bbc.co.uk/podcasts/worldservice/digitalp/rss.xml" title="http://www.bbc.co.uk/click"&gt;Click&lt;/a&gt;&lt;br&gt;
&lt;a href="http://ashimmy.podomatic.com/rss2.xml" title="http://ashimmy.podomatic.com"&gt;Security.Exe powered by The &lt;span class="caps"&gt;CISO&lt;/span&gt; Group with Alan Shimel&lt;/a&gt;&lt;br&gt;
&lt;a href="http://leoville.tv/podcasts/floss.xml" title="http://twit.tv"&gt;&lt;span class="caps"&gt;FLOSS&lt;/span&gt; Weekly&lt;/a&gt;&lt;br&gt;
&lt;a href="http://blog.stackoverflow.com/?feed=podcast" title="http://blog.stackoverflow.com"&gt;The Stack Exchange Podcast&lt;/a&gt;&lt;br&gt;
&lt;a href="http://podcast.wh1t3rabbit.net/rss" title="http://hp.com/go/white-rabbit"&gt;Down the Security Rabbithole&lt;/a&gt;&lt;br&gt;
&lt;a href="http://auditcasts.com/screencasts/feed.rss" title="http://auditcasts.com/"&gt;AuditCasts with David Hoelzer&lt;/a&gt;&lt;br&gt;
&lt;a href="http://feeds.feedburner.com/CeriasSecuritySeminarPodcast" title="http://www.cerias.purdue.edu/security_seminar"&gt;&lt;span class="caps"&gt;CERIAS&lt;/span&gt; Security Seminar&amp;nbsp;Podcast&lt;/a&gt;&lt;/p&gt;</content><category term="podcasts"></category></entry><entry><title>Decoding XOR payload using first few bytes as key</title><link href="https://www.rsreese.com/decoding-xor-payload-using-first-few-bytes-as-key/" rel="alternate"></link><published>2012-07-24T04:07:00-04:00</published><updated>2012-07-24T04:07:00-04:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2012-07-24:/decoding-xor-payload-using-first-few-bytes-as-key/</id><summary type="html">I recently came across the need to decode an exclusive or (XOR) payload. In my case, the key to de-obfuscating the traffic was the first three bytes of each packets payload. While it is trivial to decode each payload, it was not reasonable for a large number of packets. For …</summary><content type="html">&lt;p&gt;I recently came across the need to decode an exclusive or (&lt;span class="caps"&gt;XOR&lt;/span&gt;) payload.
In my case, the key to de-obfuscating the traffic was the first three
bytes of each packets payload. While it is trivial to decode each
payload, it was not reasonable for a large number of&amp;nbsp;packets.&lt;/p&gt;
&lt;p&gt;For testing purposes, create a&amp;nbsp;packet:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ scapy
Welcome to Scapy &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt;.1.0&lt;span class="o"&gt;)&lt;/span&gt;
&amp;gt;&amp;gt;&amp;gt; &lt;span class="nv"&gt;p&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;IP&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;ttl&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;10&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;/TCP&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;sport&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;1024&lt;/span&gt;,dport&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;443&lt;/span&gt;,flags&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;S&amp;quot;&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;/&lt;span class="s2"&gt;&amp;quot;   WHATSTHESECRET0000ABCD0000ABCD0000ABCD&amp;quot;&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&amp;gt;&amp;gt;&amp;gt; wrpcap&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;p.pcap&amp;quot;&lt;/span&gt;, p&lt;span class="o"&gt;)&lt;/span&gt;
&amp;gt;&amp;gt;&amp;gt; quit&lt;span class="o"&gt;()&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Should see something similar to&amp;nbsp;this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="mi"&gt;04&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;29&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="mf"&gt;31.255470&lt;/span&gt; &lt;span class="n"&gt;IP&lt;/span&gt; &lt;span class="mf"&gt;127.0&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;0.1&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;1024&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mf"&gt;127.0&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;0.1&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;443&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Flags&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;S&lt;/span&gt;&lt;span class="o"&gt;],&lt;/span&gt; &lt;span class="n"&gt;seq&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;41&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;win&lt;/span&gt; &lt;span class="mi"&gt;8192&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;length&lt;/span&gt; &lt;span class="mi"&gt;41&lt;/span&gt;
        &lt;span class="mh"&gt;0x0000&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;  &lt;span class="mi"&gt;4500&lt;/span&gt; &lt;span class="mi"&gt;0051&lt;/span&gt; &lt;span class="mi"&gt;0001&lt;/span&gt; &lt;span class="mi"&gt;0000&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="n"&gt;a06&lt;/span&gt; &lt;span class="n"&gt;b2a4&lt;/span&gt; &lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="n"&gt;f00&lt;/span&gt; &lt;span class="mi"&gt;0001&lt;/span&gt;  &lt;span class="n"&gt;E&lt;/span&gt;&lt;span class="o"&gt;..&lt;/span&gt;&lt;span class="n"&gt;Q&lt;/span&gt;&lt;span class="o"&gt;............&lt;/span&gt;
        &lt;span class="mh"&gt;0x0010&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;  &lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="n"&gt;f00&lt;/span&gt; &lt;span class="mi"&gt;0001&lt;/span&gt; &lt;span class="mi"&gt;0400&lt;/span&gt; &lt;span class="mi"&gt;01&lt;/span&gt;&lt;span class="n"&gt;bb&lt;/span&gt; &lt;span class="mi"&gt;0000&lt;/span&gt; &lt;span class="mi"&gt;0000&lt;/span&gt; &lt;span class="mi"&gt;0000&lt;/span&gt; &lt;span class="mi"&gt;0000&lt;/span&gt;  &lt;span class="o"&gt;................&lt;/span&gt;
        &lt;span class="mh"&gt;0x0020&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;  &lt;span class="mi"&gt;5002&lt;/span&gt; &lt;span class="mi"&gt;2000&lt;/span&gt; &lt;span class="mi"&gt;751&lt;/span&gt;&lt;span class="n"&gt;d&lt;/span&gt; &lt;span class="mi"&gt;0000&lt;/span&gt; &lt;span class="mi"&gt;2020&lt;/span&gt; &lt;span class="mi"&gt;2057&lt;/span&gt; &lt;span class="mi"&gt;4841&lt;/span&gt; &lt;span class="mi"&gt;5453&lt;/span&gt;  &lt;span class="n"&gt;P&lt;/span&gt;&lt;span class="o"&gt;...&lt;/span&gt;&lt;span class="n"&gt;u&lt;/span&gt;&lt;span class="o"&gt;......&lt;/span&gt;&lt;span class="n"&gt;WHATS&lt;/span&gt;
        &lt;span class="mh"&gt;0x0030&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;  &lt;span class="mi"&gt;5448&lt;/span&gt; &lt;span class="mi"&gt;4553&lt;/span&gt; &lt;span class="mi"&gt;4543&lt;/span&gt; &lt;span class="mi"&gt;5245&lt;/span&gt; &lt;span class="mi"&gt;5430&lt;/span&gt; &lt;span class="mi"&gt;3030&lt;/span&gt; &lt;span class="mi"&gt;3041&lt;/span&gt; &lt;span class="mi"&gt;4243&lt;/span&gt;  &lt;span class="n"&gt;THESECRET0000ABC&lt;/span&gt;
        &lt;span class="mh"&gt;0x0040&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;  &lt;span class="mi"&gt;4430&lt;/span&gt; &lt;span class="mi"&gt;3030&lt;/span&gt; &lt;span class="mi"&gt;3041&lt;/span&gt; &lt;span class="mi"&gt;4243&lt;/span&gt; &lt;span class="mi"&gt;4430&lt;/span&gt; &lt;span class="mi"&gt;3030&lt;/span&gt; &lt;span class="mi"&gt;3041&lt;/span&gt; &lt;span class="mi"&gt;4243&lt;/span&gt;  &lt;span class="n"&gt;D0000ABCD0000ABC&lt;/span&gt;
        &lt;span class="mh"&gt;0x0050&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;  &lt;span class="mi"&gt;44&lt;/span&gt;                                       &lt;span class="n"&gt;D&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;&lt;img alt="Screen Shot" src="https://www.rsreese.com/assets/Screen-Shot-2012-07-23-at-10.37.49-PM.png"&gt;&lt;/p&gt;
&lt;p&gt;Next, the payload is &lt;span class="caps"&gt;XOR&lt;/span&gt; using the first three bytes of the payload
for the entire payload. If you note the first tcpdump, the three bytes
of the payload were left empty, here I am placing the key that will be
used to &lt;span class="caps"&gt;XOR&lt;/span&gt; the rest of the payload within the first three bytes of the&amp;nbsp;payload.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screen Shot" src="https://www.rsreese.com/assets/Screen-Shot-2012-07-23-at-10.39.30-PM.png"&gt;&lt;/p&gt;
&lt;p&gt;The payload has been obfuscated using the key&amp;nbsp;&amp;#8216;the&amp;#8217;.&lt;/p&gt;
&lt;p&gt;Next we can use the &lt;a href="https://code.google.com/p/reese/source/browse/trunk/decodexorpayload.py"&gt;script&lt;/a&gt; below or &lt;a href="https://code.google.com/p/reese/source/browse/trunk/decodexorpayload.py"&gt;here&lt;/a&gt; to decode all of
the packets. The script is not intelligent enough to know which need to
be de-obfuscated so it is best to probably filter these into a new &lt;span class="caps"&gt;PCAP&lt;/span&gt;.
Secondly, the script requires &lt;a href="http://www.secdev.org/projects/scapy/"&gt;Scapy&lt;/a&gt; to be&amp;nbsp;installed.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="ch"&gt;#!/usr/bin/python&lt;/span&gt;
&lt;span class="c1"&gt;# Script to parse a PCAP and XOR data based on a byte offset&lt;/span&gt;
&lt;span class="c1"&gt;# Requires Scapy&lt;/span&gt;
&lt;span class="c1"&gt;# 0.1 - 07172012&lt;/span&gt;
&lt;span class="c1"&gt;# Default is two bytes, change at line 35&lt;/span&gt;
&lt;span class="c1"&gt;# Stephen Reese and Chris Gragsone&lt;/span&gt;
&lt;span class="c1"&gt;#&lt;/span&gt;
&lt;span class="c1"&gt;# todo: add two more args, offset length and static offset option&lt;/span&gt;

&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;scapy.all&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;sys&lt;/span&gt;

&lt;span class="c1"&gt;# Get input and output files from command line&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;argv&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;print&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;Usage: decodexorpayload.py [input pcap file]&amp;quot;&lt;/span&gt;
        &lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;exit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Assign variable names for input and output files&lt;/span&gt;
&lt;span class="n"&gt;infile&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;argv&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;many_byte_xor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;buf&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;buf&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;bytearray&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;buf&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;key&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;bytearray&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;key_len&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;bufbyte&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;enumerate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;buf&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;buf&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;bufbyte&lt;/span&gt; &lt;span class="o"&gt;^&lt;/span&gt; &lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="n"&gt;key_len&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;buf&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;process_packets&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="n"&gt;pkts&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;rdpcap&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;infile&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;cooked&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;pkts&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="c1"&gt;# You may have to adjust the payload depth here:&lt;/span&gt;
        &lt;span class="c1"&gt;# i.e. p.payload.payload.payload&lt;/span&gt;
        &lt;span class="n"&gt;pkt_payload&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;payload&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;pkt_offset&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;payload&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;)[:&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;pkt_payload&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;pkt_offset&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
              &lt;span class="n"&gt;pmod&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;
              &lt;span class="c1"&gt;# You may have to adjust the payload depth here:&lt;/span&gt;
              &lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;payload&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;payload&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;many_byte_xor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pkt_payload&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;pkt_offset&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
              &lt;span class="n"&gt;cooked&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pmod&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;wrpcap&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;dump.pcap&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;cooked&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;process_packets&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;After script completion, viewing the packet does indeed show the
de-obfuscated&amp;nbsp;packet:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;reading from file dump.pcap, link-type RAW (Raw IP)
04:24:44.415262 IP 127.0.0.1.1024 &amp;gt; 127.0.0.1.443: Flags [S], seq 0:41, win 8192, length 41
        0x0000:  4500 0051 0001 0000 0a06 b2a4 7f00 0001  E..Q............
        0x0010:  7f00 0001 0400 01bb 0000 0000 0000 0000  ................
        0x0020:  5002 2000 751d 0000 0000 0057 4841 5453  P...u......WHATS
        0x0030:  5448 4553 4543 5245 5430 3030 3041 4243  THESECRET0000ABC
        0x0040:  4430 3030 3041 4243 4430 3030 3041 4243  D0000ABCD0000ABC
        0x0050:  44                                       D
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;There are a number of features that could be added and of course the
code can probably be improved upon. Have some ideas? Leave a comment&amp;nbsp;below.&lt;/p&gt;</content><category term="obfuscation"></category><category term="python"></category></entry><entry><title>World IPv6 Day</title><link href="https://www.rsreese.com/world-ipv6-day/" rel="alternate"></link><published>2012-06-07T01:29:00-04:00</published><updated>2012-06-07T01:29:00-04:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2012-06-07:/world-ipv6-day/</id><summary type="html">World IPv6 Day on June 8th 2012 is rapidly approaching. It is an exciting and scary reality. For my personal assets, there was a small investment on my part to get everything up to par. My internet provider Comcast is dual-stack ready which is nice because I experienced some serious …</summary><content type="html">&lt;p&gt;&lt;img src="/assets/IPv6-wordmark-256-trans.png" style="float:right; padding:10px;" /&gt;&lt;a href="http://www.worldipv6day.org/"&gt;World IPv6 Day&lt;/a&gt; on June 8th 2012 is rapidly approaching. It is an exciting and scary reality. For my personal assets, there was a small investment on my part to get everything up to par. My internet provider Comcast is dual-stack ready which is nice because I experienced some serious latency from time to time when using a tunnel-broker (note that other factors probably contributed). You can see more information about the Comcast IPv6 trial and preparation &lt;a href="http://www.comcast6.net/"&gt;here&lt;/a&gt;. First, I had to invest in a new cable-modem as my old Motorola &lt;span class="caps"&gt;SB1000&lt;/span&gt; was not up to the task. Comcast has created a hardware compatibility &lt;a href="http://mydeviceinfo.comcast.net/"&gt;list&lt;/a&gt;. From the list I decided to go with the Motorola &lt;span class="caps"&gt;SB6121&lt;/span&gt; as I have had pretty good success with their modems in the past. Secondly you need a device that is capable of filtering and distributing addresses to your internal devices. I am not going into details here, but a Cisco &lt;span class="caps"&gt;ASA5500&lt;/span&gt; or a home-brew Linux device usually will work quite nicely. The most important part to read into is that you are also filtering v6 &lt;span class="caps"&gt;IP&lt;/span&gt; traffic along with the v4 so you do not have evil-doers sneaker-netting into your network. Your network devices will not hide behind network address translation (&lt;span class="caps"&gt;NAT&lt;/span&gt;). Lastly, keep the images, firmware, or distributions patched and monitor your traffic from time to time. Kind of like a cavity, you usually do not know you have one until it is too&amp;nbsp;late.&lt;/p&gt;
&lt;p&gt;My blog has also moved to a dual-stack (&lt;a href="http://www.linode.com/?r=6579d0b21f581ea769a6ca4af46de0dad6f88df8"&gt;Linode&lt;/a&gt; awesome service and support) from a tunnel-broker! This was really straightforward to implement as Linode provides some great documentation in their &lt;a href="https://library.linode.com/networking/ipv6"&gt;library&lt;/a&gt;. As with any setup, you need to filter unwanted traffic from entering/exiting your node(s), Iptables makes quick work of this. In this scenario, I am going with a deny-by-default posture and log everything that is dropped. This is by no means definitive but just a place to get&amp;nbsp;started. &lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;*filter
# Drop everything
:INPUT DROP [0:0]
:FORWARD DROP [0:0]
:OUTPUT DROP [0:0]

# Allow the loopback
-A INPUT -i lo -j ACCEPT
-A INPUT -d ::1/128 ! -i lo -j REJECT --reject-with icmp6-port-unreachable

# All returning connections
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT

# Let the web server respond
-A INPUT -p tcp --sport 1024:65535 --dport 80 -m state --state NEW -j ACCEPT
-A INPUT -p tcp --sport 1024:65535 --dport 443 -m state --state NEW -j ACCEPT

# All SSH session but limit attempt, also see fail2ban
-A INPUT -p tcp --sport 1024:65535 --dport 22 --tcp-flags FIN,SYN,RST,ACK SYN -m state --state NEW -m limit --limit 1/min --limit-burst 3 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 --tcp-flags FIN,SYN,RST,ACK SYN -j DROP

# Allow ICMP but need to restrict based on type
-A INPUT -p ipv6-icmp -j ACCEPT

# Drop everything else and log it
-A INPUT -m limit --limit 3/min -j LOG --log-prefix &amp;quot;ipv6 input denied: &amp;quot; --log-level 7

# Respective outbound rules
-A OUTPUT -p ipv6-icmp -j ACCEPT
-A OUTPUT -o lo -j ACCEPT
-A OUTPUT -m state --state NEW,RELATED,ESTABLISHED -j ACCEPT
-A OUTPUT -m limit --limit 3/min -j LOG --log-prefix &amp;quot;ipv6 output denied: &amp;quot; --log-level 7
COMMIT
&lt;/pre&gt;&lt;/div&gt;</content><category term="ipv6"></category></entry><entry><title>How-to setup an Upside-Down-Ternet</title><link href="https://www.rsreese.com/how-to-setup-an-upside-down-ternet/" rel="alternate"></link><published>2012-02-11T03:07:00-05:00</published><updated>2012-02-11T03:07:00-05:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2012-02-11:/how-to-setup-an-upside-down-ternet/</id><summary type="html">In an effort to replicate the amusing idea of a transparent proxy that manipulates traffic in a fun way found here and made even better with some great scripts that you can pull down from here. A Debian box was stood up with two network cards; one connects to the …</summary><content type="html">&lt;p&gt;In an effort to replicate the amusing idea of a transparent proxy that
manipulates traffic in a fun way found &lt;a href="http://www.ex-parrot.com/pete/upside-down-ternet.html"&gt;here&lt;/a&gt; and made even better
with some great scripts that you can pull down from &lt;a href="https://code.google.com/p/g0tmi1k/source/browse/trunk#trunk%2FsquidScripts"&gt;here&lt;/a&gt;. A Debian
box was stood up with two network cards; one connects to the internal
&lt;span class="caps"&gt;LAN&lt;/span&gt; and the other connected to an access-point which your guests connect
to. I chose to post this how-to as the initial idea did not provide a
complete reference on how to setup the needed&amp;nbsp;components.&lt;/p&gt;
&lt;p&gt;First, we are using an access-point we take care of the &lt;span class="caps"&gt;DHCP&lt;/span&gt; and &lt;span class="caps"&gt;DNS&lt;/span&gt;
duties but the access-point or another host could perform these duties
if they support said services. I choose to install the following &lt;span class="caps"&gt;DHCP&lt;/span&gt;&amp;nbsp;service:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ sudo apt-get install isc-dhcp-server
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;The following configuration provides the scope for the clients. We only
define a scope for the client side which will use a 192.168.0.0 network
for the example&amp;nbsp;purposes.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ grep ^&lt;span class="o"&gt;[&lt;/span&gt;^#&lt;span class="o"&gt;]&lt;/span&gt; /etc/dhcp/dhcpd.conf
ddns-update-style none&lt;span class="p"&gt;;&lt;/span&gt;
default-lease-time &lt;span class="m"&gt;600&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
max-lease-time &lt;span class="m"&gt;7200&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
log-facility local7&lt;span class="p"&gt;;&lt;/span&gt;
subnet &lt;span class="m"&gt;192&lt;/span&gt;.168.0.0 netmask &lt;span class="m"&gt;255&lt;/span&gt;.255.255.0 &lt;span class="o"&gt;{&lt;/span&gt;
  range &lt;span class="m"&gt;192&lt;/span&gt;.168.0.100 &lt;span class="m"&gt;192&lt;/span&gt;.168.0.200&lt;span class="p"&gt;;&lt;/span&gt;
  option domain-name-servers &lt;span class="m"&gt;192&lt;/span&gt;.168.0.1&lt;span class="p"&gt;;&lt;/span&gt;
  option domain-name &lt;span class="s2"&gt;&amp;quot;kittenwar.com&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  option routers &lt;span class="m"&gt;192&lt;/span&gt;.168.0.1&lt;span class="p"&gt;;&lt;/span&gt;
  option broadcast-address &lt;span class="m"&gt;192&lt;/span&gt;.168.0.255&lt;span class="p"&gt;;&lt;/span&gt;
  default-lease-time &lt;span class="m"&gt;600&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  max-lease-time &lt;span class="m"&gt;7200&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Secondly, the guests are going to need some resolution, rather than have
their queries pass through the network, lets setup a simple resolver for
them using &lt;span class="caps"&gt;BIND&lt;/span&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ sudo apt-get install bind9
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Setup some forwarders and the interface we want to listen on, for
example sake, the same subnet servicing the&amp;nbsp;clients:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ grep ^&lt;span class="o"&gt;[&lt;/span&gt;^#&lt;span class="o"&gt;]&lt;/span&gt; /etc/bind/named.conf.options
options &lt;span class="o"&gt;{&lt;/span&gt;
        directory &lt;span class="s2"&gt;&amp;quot;/var/cache/bind&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        version &lt;span class="s2"&gt;&amp;quot;tbd&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        forwarders &lt;span class="o"&gt;{&lt;/span&gt; &lt;span class="m"&gt;8&lt;/span&gt;.8.8.8&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="m"&gt;8&lt;/span&gt;.8.4.4&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="o"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        auth-nxdomain no&lt;span class="p"&gt;;&lt;/span&gt;    &lt;span class="c1"&gt;# conform to RFC1035&lt;/span&gt;
        listen-on-v6 &lt;span class="o"&gt;{&lt;/span&gt; none&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="o"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        listen-on &lt;span class="o"&gt;{&lt;/span&gt; &lt;span class="m"&gt;192&lt;/span&gt;.168.0.1&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="m"&gt;127&lt;/span&gt;.0.0.1&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="o"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Some of the fun scripts require a &lt;span class="caps"&gt;HTTP&lt;/span&gt; service to serve up flipped
images and all sorts of other goodness so Apache and ImageMagick are&amp;nbsp;needed:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ sudo apt-get install apache2
&lt;span class="nv"&gt;$sudo&lt;/span&gt; apt-get -y install imagemagick
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;The last service is Squid caching proxy. Install version 3 was installed
from the&amp;nbsp;repositories:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ sudo apt-get install squid3
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Edit the Squid configuration, this is a default configuration but the
&lt;strong&gt;acl&lt;/strong&gt; for the clients has been enabled along with &lt;strong&gt;interception&lt;/strong&gt;
mode (read transparent) and finally call the script via
&lt;strong&gt;url_rewrite_program&lt;/strong&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ grep ^&lt;span class="o"&gt;[&lt;/span&gt;^#&lt;span class="o"&gt;]&lt;/span&gt; /etc/squid3/squid.conf
acl manager proto cache_object
acl localhost src &lt;span class="m"&gt;127&lt;/span&gt;.0.0.1/32 ::1
acl to_localhost dst &lt;span class="m"&gt;127&lt;/span&gt;.0.0.0/8 &lt;span class="m"&gt;0&lt;/span&gt;.0.0.0/32 ::1
acl localnet src &lt;span class="m"&gt;192&lt;/span&gt;.168.0.0/16 &lt;span class="c1"&gt;# RFC1918 possible internal network&lt;/span&gt;
acl SSL_ports port &lt;span class="m"&gt;443&lt;/span&gt;
acl Safe_ports port &lt;span class="m"&gt;80&lt;/span&gt;          &lt;span class="c1"&gt;# http&lt;/span&gt;
acl Safe_ports port &lt;span class="m"&gt;21&lt;/span&gt;          &lt;span class="c1"&gt;# ftp&lt;/span&gt;
acl Safe_ports port &lt;span class="m"&gt;443&lt;/span&gt;         &lt;span class="c1"&gt;# https&lt;/span&gt;
acl Safe_ports port &lt;span class="m"&gt;70&lt;/span&gt;          &lt;span class="c1"&gt;# gopher&lt;/span&gt;
acl Safe_ports port &lt;span class="m"&gt;210&lt;/span&gt;         &lt;span class="c1"&gt;# wais&lt;/span&gt;
acl Safe_ports port &lt;span class="m"&gt;1025&lt;/span&gt;-65535  &lt;span class="c1"&gt;# unregistered ports&lt;/span&gt;
acl Safe_ports port &lt;span class="m"&gt;280&lt;/span&gt;         &lt;span class="c1"&gt;# http-mgmt&lt;/span&gt;
acl Safe_ports port &lt;span class="m"&gt;488&lt;/span&gt;         &lt;span class="c1"&gt;# gss-http&lt;/span&gt;
acl Safe_ports port &lt;span class="m"&gt;591&lt;/span&gt;         &lt;span class="c1"&gt;# filemaker&lt;/span&gt;
acl Safe_ports port &lt;span class="m"&gt;777&lt;/span&gt;         &lt;span class="c1"&gt;# multiling http&lt;/span&gt;
acl CONNECT method CONNECT
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localnet
http_access allow localhost
http_access deny all
http_port &lt;span class="m"&gt;3128&lt;/span&gt; intercept
hierarchy_stoplist cgi-bin ?
coredump_dir /var/spool/squid3
url_rewrite_program /home/us3r/squidScripts/flipImages.pl
refresh_pattern ^ftp:           &lt;span class="m"&gt;1440&lt;/span&gt;    &lt;span class="m"&gt;20&lt;/span&gt;%     &lt;span class="m"&gt;10080&lt;/span&gt;
refresh_pattern ^gopher:        &lt;span class="m"&gt;1440&lt;/span&gt;    &lt;span class="m"&gt;0&lt;/span&gt;%      &lt;span class="m"&gt;1440&lt;/span&gt;
refresh_pattern -i &lt;span class="o"&gt;(&lt;/span&gt;/cgi-bin/&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="se"&gt;\?&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;     &lt;span class="m"&gt;0&lt;/span&gt;%      &lt;span class="m"&gt;0&lt;/span&gt;
refresh_pattern .               &lt;span class="m"&gt;0&lt;/span&gt;       &lt;span class="m"&gt;20&lt;/span&gt;%     &lt;span class="m"&gt;4320&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Execute the following to create some protection from the subnet being
advertised and furthermore forces all of the web request to use the
Squid cache. The rule-set is by no means perfect or definitive, feel
free to tailor to your needs and provide&amp;nbsp;feedback.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ grep ^&lt;span class="o"&gt;[&lt;/span&gt;^#&lt;span class="o"&gt;]&lt;/span&gt; fw-script
&lt;span class="nv"&gt;PATH&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/sbin
iptables -F
iptables -t nat -F
iptables -t mangle -F
iptables -X
iptables --policy INPUT DROP
iptables --policy OUTPUT DROP
iptables --policy FORWARD DROP
iptables -A INPUT -i lo -j ACCEPT
iptables -A OUTPUT -o lo -j ACCEPT
iptables -A INPUT -i eth2 -p tcp --dport &lt;span class="m"&gt;3128&lt;/span&gt; -j ACCEPT
iptables -A INPUT -i eth2 -p tcp --dport &lt;span class="m"&gt;443&lt;/span&gt; -j ACCEPT
iptables -A INPUT -i eth2 -p tcp --dport &lt;span class="m"&gt;80&lt;/span&gt; -j ACCEPT
iptables -A INPUT -i eth2 -p udp --dport &lt;span class="m"&gt;53&lt;/span&gt; -j ACCEPT
iptables -A INPUT -i eth2 -p udp --dport &lt;span class="m"&gt;67&lt;/span&gt; -j ACCEPT
iptables -A OUTPUT -o eth2 -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -i eth1 -p tcp --dport &lt;span class="m"&gt;22&lt;/span&gt; -j ACCEPT
iptables -A INPUT -i eth1 -p tcp --dport &lt;span class="m"&gt;8000&lt;/span&gt; -j ACCEPT
iptables -A INPUT -i eth1 -p udp --dport &lt;span class="m"&gt;68&lt;/span&gt; -j ACCEPT
iptables -A INPUT -i eth1 -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A OUTPUT -o eth1 -p tcp --dport &lt;span class="m"&gt;80&lt;/span&gt; -j ACCEPT
iptables -A OUTPUT -o eth1 -p udp --dport &lt;span class="m"&gt;67&lt;/span&gt; -j ACCEPT
iptables -A OUTPUT -o eth1 -p udp --dport &lt;span class="m"&gt;53&lt;/span&gt; -j ACCEPT
iptables -A OUTPUT -o eth1 -p udp --dport &lt;span class="m"&gt;443&lt;/span&gt; -j ACCEPT
iptables -A OUTPUT -o eth1 -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -I INPUT -j LOG --log-prefix &lt;span class="s2"&gt;&amp;quot;iptables denied: &amp;quot;&lt;/span&gt; --log-level &lt;span class="m"&gt;7&lt;/span&gt;
iptables -I OUTPUT -j LOG --log-prefix &lt;span class="s2"&gt;&amp;quot;iptables denied: &amp;quot;&lt;/span&gt; --log-level &lt;span class="m"&gt;7&lt;/span&gt;
iptables -t nat -A PREROUTING -i eth2 -p tcp --dport &lt;span class="m"&gt;80&lt;/span&gt; -j DNAT --to-destination &lt;span class="m"&gt;192&lt;/span&gt;.168.0.1:3128
iptables -t nat -A POSTROUTING -o eth2 -s &lt;span class="m"&gt;192&lt;/span&gt;.168.0.0/24 -d &lt;span class="m"&gt;192&lt;/span&gt;.168.0.1 -j SNAT --to &lt;span class="m"&gt;192&lt;/span&gt;.168.0.1
iptables -t nat -A PREROUTING -i eth2 -p tcp --dport &lt;span class="m"&gt;80&lt;/span&gt; -j REDIRECT --to-port &lt;span class="m"&gt;3128&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;You can down pull down a script from the Google code repository
mentioned above which you have referenced in the Squid configuration.
There are variables in the top of the scripts that you downloaded
earlier. The variables need to be updated to reflect your system. A few
Perl module prerequisites are also listed in the top of said scripts,
access &lt;span class="caps"&gt;CPAN&lt;/span&gt; and install&amp;nbsp;them:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ sudo perl -MCPAN -e shell
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;After the required Perl modules are installed, you should be able to
place a client on the guest network and they will retrieve sites,
although it will not take long for to notice that in this case all of
the images are inverted. Do not forget to checkout the other&amp;nbsp;scripts.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.rsreese.com/assets/ternet-pinterest.png"&gt;&lt;img alt="ternet-pinterest-scaled" src="https://www.rsreese.com/assets/ternet-pinterest-scaled.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Lots of fun! If I missed something or you have some feedback, use the
comment form&amp;nbsp;below.&lt;/p&gt;</content><category term="iptables"></category><category term="linux"></category><category term="squid proxy"></category></entry><entry><title>Block Command and Control requests using ASA 5500</title><link href="https://www.rsreese.com/block-command-and-control-requests-using-asa-5500/" rel="alternate"></link><published>2011-12-10T02:26:00-05:00</published><updated>2011-12-10T02:26:00-05:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2011-12-10:/block-command-and-control-requests-using-asa-5500/</id><summary type="html">I recently came across a blog post demonstrating how to use the Emerging Threats rule sets in order to block malware calls to command and control (C&amp;C) hosts. Using the script referenced in the blog post may work fine, but I want to review and update when I feel …</summary><content type="html">&lt;p&gt;I recently came across a &lt;a href="http://packetpushers.net/netting-the-botnets-with-cisco-asa-without-a-license/"&gt;blog&lt;/a&gt; post demonstrating how to use the
&lt;a href="http://rules.emergingthreats.net/fwrules/"&gt;Emerging Threats&lt;/a&gt; rule sets in order to block malware calls to
command and control (C&amp;amp;C) hosts. Using the script referenced in the blog
post may work fine, but I want to review and update when I feel like it
via &lt;span class="caps"&gt;SSH&lt;/span&gt;. Per the Emerging Threats &lt;a href="http://doc.emergingthreats.net/bin/view/Main/EmergingFirewallRules"&gt;wiki&lt;/a&gt; these rules probably only
need to be updated once a week but &lt;span class="caps"&gt;YMMV&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Setup the &lt;span class="caps"&gt;ASA&lt;/span&gt; (one&amp;nbsp;time):&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;configure terminal 
access-list dynamic-filter_acl extended permit ip any any 
dynamic-filter enable interface outside classify-list dynamic-filter_acl 
dynamic-filter drop blacklist interface outside 
dynamic-filter blacklist 
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Download the C&amp;amp;C list from Emerging&amp;nbsp;Threats:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ wget http://rules.emergingthreats.net/fwrules/emerging-PIX-CC.rules
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Convert the list to the required&amp;nbsp;format:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ sed &lt;span class="s1"&gt;&amp;#39;s/ET-drop/ET-cc/g&amp;#39;&lt;/span&gt; emerging-PIX-CC.rules &lt;span class="p"&gt;|&lt;/span&gt; egrep &lt;span class="s2"&gt;&amp;quot;^access-list ET-cc deny&amp;quot;&lt;/span&gt;   
emerging-PIX-CC.rules &lt;span class="p"&gt;|&lt;/span&gt; sed &lt;span class="s1"&gt;&amp;#39;s/access-list ET-cc deny ip/address/g;s/host //g;s/any   &lt;/span&gt;
&lt;span class="s1"&gt;/255.255.255.255/g&amp;#39;&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt; awk &lt;span class="s1"&gt;&amp;#39;{print $1,$2,$3}&amp;#39;&lt;/span&gt; &amp;gt; emerging-PIX-CC.rules.asa
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Paste the list using Putty or similar. At current there are around 3000
rules so it takes a&amp;nbsp;minute:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;configure terminal
no dynamic-filter blacklist
blacklist dynamic-filter blacklist
address x.x.x.x y.y.y.y
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Finally, it is important to note that there could be performance
implications with implementing too many rules. Be warned you may shun
legitimate sites on shared hosting providers and the&amp;nbsp;like.&lt;/p&gt;</content><category term="asa"></category><category term="bot"></category><category term="cisco"></category></entry><entry><title>Amazon S3 Server-Side Encryption using GSUtil</title><link href="https://www.rsreese.com/amazon-s3-server-side-encryption-using-gsutil/" rel="alternate"></link><published>2011-10-29T14:39:00-04:00</published><updated>2011-10-29T14:39:00-04:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2011-10-29:/amazon-s3-server-side-encryption-using-gsutil/</id><summary type="html">If you would like to enable server-side encryption which is a relatively new feature for your Amazon S3 data using GSUtil then you need specify the header value when pushing files to their cloud. $ gsutil -h "x-amz-server-side-encryption: AES256" cp /backups/files* s3://bucket Note that server-side encryption protects your data …</summary><content type="html">&lt;p&gt;If you would like to enable &lt;a href="http://docs.amazonwebservices.com/AmazonS3/latest/dev/UsingServerSideEncryption.html"&gt;server-side encryption&lt;/a&gt; which is a
relatively new &lt;a href="http://aws.typepad.com/aws/2011/10/new-amazon-s3-server-side-encryption.html"&gt;feature&lt;/a&gt; for your Amazon S3 data using GSUtil then you
need specify the header value when pushing files to their&amp;nbsp;cloud.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ gsutil -h &lt;span class="s2"&gt;&amp;quot;x-amz-server-side-encryption: AES256&amp;quot;&lt;/span&gt; cp /backups/files* s3://bucket
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Note that server-side encryption protects your data at rest and that
Amazon is managing the keys on your behalf by default, see post
&lt;a href="http://alan.blog-city.com/amazon_s3_encryption.htm"&gt;here&lt;/a&gt;. A better practice is to provide the encryption and decryption
before and after you send and receive your data from&amp;nbsp;S3.&lt;/p&gt;</content><category term="encryption"></category><category term="gsutil"></category><category term="s3"></category></entry><entry><title>Block IRC and other communications with McAfee VirusScan</title><link href="https://www.rsreese.com/block-irc-and-other-communications-with-mcafee-virusscan/" rel="alternate"></link><published>2011-10-15T05:01:00-04:00</published><updated>2011-10-15T05:01:00-04:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2011-10-15:/block-irc-and-other-communications-with-mcafee-virusscan/</id><summary type="html">After seeing some suspicious activitiy in my McAfee antivirus logs, I learned the Access Protection functionality, specifically IRC communication setting may be able to thwart some of the aforementioned activity. There are a number of useful setting to log or even block attempts that are not enable by default. A …</summary><content type="html">&lt;p&gt;After seeing some suspicious activitiy in my McAfee antivirus logs, I learned the Access Protection functionality, specifically &lt;span class="caps"&gt;IRC&lt;/span&gt; communication setting may be able to thwart some of the aforementioned activity. There are a number of useful setting to log or even block attempts that are not enable by default. A test environment was setup using a &lt;span class="caps"&gt;IRC&lt;/span&gt; daemon on &lt;a href="http://zeltser.com/remnux/"&gt;Remnux&lt;/a&gt; and a &lt;a href="http://nmap.org"&gt;Nmap&lt;/a&gt; plug-in called &lt;a href="http://nmap.org/svn/scripts/irc-info.nse"&gt;irc-info.nse&lt;/a&gt;. An initial baseline scan/connect is made to confirm that the service residing in the virtual guest was working as&amp;nbsp;advertised.&lt;/p&gt;
&lt;p&gt;&lt;img alt="image" src="https://www.rsreese.com/assets/scan_win.png"&gt;&lt;/p&gt;
&lt;p&gt;The host indeed had a &lt;span class="caps"&gt;IRC&lt;/span&gt; server running. We do not want our host communicating with &lt;span class="caps"&gt;IRC&lt;/span&gt; daemons so we can leverage McAfee to help us block the communication attempts. First, open up the Auto Protect settings in the VirusScan&amp;nbsp;console.&lt;/p&gt;
&lt;p&gt;&lt;img alt="image" src="https://www.rsreese.com/assets/vs0.png"&gt;&lt;/p&gt;
&lt;p&gt;Next, &amp;#8220;Prevent &lt;span class="caps"&gt;IRC&lt;/span&gt; communication&amp;#8221; was enabled. This hosts processesshould not be making outgoing requests. If there were such requests from a process it could be indicative of malicious software contacting a&amp;nbsp;C&amp;amp;C.&lt;/p&gt;
&lt;p&gt;&lt;img alt="image" src="https://www.rsreese.com/assets/vs1.png"&gt;&lt;/p&gt;
&lt;p&gt;Now the policy is being enforced, we again test the ability to connect the remote hosts &lt;span class="caps"&gt;IRC&lt;/span&gt;&amp;nbsp;service.&lt;/p&gt;
&lt;p&gt;&lt;img alt="image" src="https://www.rsreese.com/assets/scan_fail.png"&gt;&lt;/p&gt;
&lt;p&gt;Nmap is able to elicit responses from the host but is unable to complete a connection to interact with the &lt;span class="caps"&gt;IRC&lt;/span&gt; server. The last screen shot depicts log entries reporting, and a blocking and reporting&amp;nbsp;entry.&lt;/p&gt;
&lt;p&gt;&lt;img alt="image" src="https://www.rsreese.com/assets/vs_log.png"&gt;&lt;/p&gt;
&lt;p&gt;Be cautious of shunning all processes for a specific check as some applications may inadvertently use a port that a malicious process would typically use. Instead, consider white-listing those or one selecting known&amp;nbsp;evil.&lt;/p&gt;</content><category term="antivirus"></category><category term="irc"></category></entry><entry><title>Variance in rwfilter results from netflow v5 and YaF</title><link href="https://www.rsreese.com/variance-in-rwfilter-results-from-netflow-v5-and-yaf/" rel="alternate"></link><published>2011-10-03T14:04:00-04:00</published><updated>2011-10-03T14:04:00-04:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2011-10-03:/variance-in-rwfilter-results-from-netflow-v5-and-yaf/</id><summary type="html">Looking over some netflow data I notice some variance between the two sensors. Sensor s0 is v5 netflow data from a Cisco switch, s1 is from a network tap listening between a Router on a Stick and said Cisco switch. The latter is a capture from YaF listening on a …</summary><content type="html">&lt;p&gt;Looking over some netflow data I notice some variance between the two
sensors. Sensor s0 is v5 netflow data from a Cisco switch, s1 is from a
network tap listening between a Router on a Stick and said Cisco switch.
The latter is a capture from YaF listening on a promiscuous network
interface. I needed some data so a movie streaming took care of this for
me. Here is the first difference between the two data&amp;nbsp;sources.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ rwfilter --start-date&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$today&lt;/span&gt; --end-date&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$today&lt;/span&gt; --proto&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;-255 --pass&lt;span class="o"&gt;=&lt;/span&gt;stdout --sensor&lt;span class="o"&gt;=&lt;/span&gt;s0 &lt;span class="p"&gt;|&lt;/span&gt; rwstats --protocol --top --count&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;5&lt;/span&gt; --flows
INPUT: &lt;span class="m"&gt;675&lt;/span&gt; Records &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt; Bin and &lt;span class="m"&gt;675&lt;/span&gt; Total Records
OUTPUT: Top &lt;span class="m"&gt;5&lt;/span&gt; Bins by Records
pro&lt;span class="p"&gt;|&lt;/span&gt;   Records&lt;span class="p"&gt;|&lt;/span&gt;  %Records&lt;span class="p"&gt;|&lt;/span&gt;   cumul_%&lt;span class="p"&gt;|&lt;/span&gt;
  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;       &lt;span class="m"&gt;675&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;100&lt;/span&gt;.000000&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;100&lt;/span&gt;.000000&lt;span class="p"&gt;|&lt;/span&gt;
$ rwfilter --start-date&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$today&lt;/span&gt; --end-date&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$today&lt;/span&gt; --proto&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;-255 --pass&lt;span class="o"&gt;=&lt;/span&gt;stdout --sensor&lt;span class="o"&gt;=&lt;/span&gt;s1 &lt;span class="p"&gt;|&lt;/span&gt; rwstats --protocol --top --count&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;5&lt;/span&gt; --flows
INPUT: &lt;span class="m"&gt;2640&lt;/span&gt; Records &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="m"&gt;3&lt;/span&gt; Bins and &lt;span class="m"&gt;2640&lt;/span&gt; Total Records
OUTPUT: Top &lt;span class="m"&gt;5&lt;/span&gt; Bins by Records
pro&lt;span class="p"&gt;|&lt;/span&gt;   Records&lt;span class="p"&gt;|&lt;/span&gt;  %Records&lt;span class="p"&gt;|&lt;/span&gt;   cumul_%&lt;span class="p"&gt;|&lt;/span&gt;
 &lt;span class="m"&gt;17&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;      &lt;span class="m"&gt;1927&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="m"&gt;72&lt;/span&gt;.992424&lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="m"&gt;72&lt;/span&gt;.992424&lt;span class="p"&gt;|&lt;/span&gt;
  &lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;       &lt;span class="m"&gt;712&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="m"&gt;26&lt;/span&gt;.969697&lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="m"&gt;99&lt;/span&gt;.962121&lt;span class="p"&gt;|&lt;/span&gt;
  &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;         &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;0&lt;/span&gt;.037879&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;100&lt;/span&gt;.000000&lt;span class="p"&gt;|&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;The difference between the flow data here is the v5 data only shows &lt;span class="caps"&gt;TCP&lt;/span&gt;
connections at this point where as the tap is seeing &lt;span class="caps"&gt;ICMP&lt;/span&gt;, &lt;span class="caps"&gt;TCP&lt;/span&gt; and &lt;span class="caps"&gt;UDP&lt;/span&gt;.
The next set of queries are from a streaming movie which the output has
been cut for&amp;nbsp;brevity.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ rwfilter --start-date&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$today&lt;/span&gt; --end-date&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$today&lt;/span&gt; --sensor&lt;span class="o"&gt;=&lt;/span&gt;s0 --type&lt;span class="o"&gt;=&lt;/span&gt;all --proto&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;,6,17 --pass&lt;span class="o"&gt;=&lt;/span&gt;stdout --daddress&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;172&lt;/span&gt;.16.0.10 &lt;span class="p"&gt;|&lt;/span&gt; rwsort --fields&lt;span class="o"&gt;=&lt;/span&gt;bytes &lt;span class="p"&gt;|&lt;/span&gt; rwcut --fields&lt;span class="o"&gt;=&lt;/span&gt;sip,sport,dip,dport,bytes
                           &lt;span class="m"&gt;69&lt;/span&gt;.241.37.66&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;80&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;                            &lt;span class="m"&gt;172&lt;/span&gt;.16.0.10&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;65184&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;57713601&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;
                           &lt;span class="m"&gt;69&lt;/span&gt;.241.37.66&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;80&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;                            &lt;span class="m"&gt;172&lt;/span&gt;.16.0.10&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;65183&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;58666986&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;
                           &lt;span class="m"&gt;69&lt;/span&gt;.241.37.66&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;80&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;                            &lt;span class="m"&gt;172&lt;/span&gt;.16.0.10&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;65183&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="m"&gt;146904926&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;
                           &lt;span class="m"&gt;69&lt;/span&gt;.241.37.66&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;80&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;                            &lt;span class="m"&gt;172&lt;/span&gt;.16.0.10&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;65184&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="m"&gt;153098218&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;

$ rwfilter --start-date&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$today&lt;/span&gt; --end-date&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$today&lt;/span&gt; --sensor&lt;span class="o"&gt;=&lt;/span&gt;s1 --type&lt;span class="o"&gt;=&lt;/span&gt;all --proto&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;,6,17 --pass&lt;span class="o"&gt;=&lt;/span&gt;stdout --daddress&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;172&lt;/span&gt;.16.0.10 &lt;span class="p"&gt;|&lt;/span&gt; rwsort --fields&lt;span class="o"&gt;=&lt;/span&gt;bytes &lt;span class="p"&gt;|&lt;/span&gt; rwcut --fields&lt;span class="o"&gt;=&lt;/span&gt;sip,sport,dip,dport,bytes
                           &lt;span class="m"&gt;69&lt;/span&gt;.241.37.66&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;80&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;                            &lt;span class="m"&gt;172&lt;/span&gt;.16.0.10&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;65183&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="m"&gt;110759034&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;
                           &lt;span class="m"&gt;69&lt;/span&gt;.241.37.66&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;80&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;                            &lt;span class="m"&gt;172&lt;/span&gt;.16.0.10&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;65184&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="m"&gt;111370758&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;
                           &lt;span class="m"&gt;69&lt;/span&gt;.241.37.66&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;80&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;                            &lt;span class="m"&gt;172&lt;/span&gt;.16.0.10&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;65183&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="m"&gt;148760315&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;
                           &lt;span class="m"&gt;69&lt;/span&gt;.241.37.66&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;80&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;                            &lt;span class="m"&gt;172&lt;/span&gt;.16.0.10&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;65184&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="m"&gt;150597449&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;The item to note here is the v5 netflow is reporting more bytes than the
network tap for similar source and &lt;span class="caps"&gt;IP&lt;/span&gt; addresses for the respective
destination &lt;span class="caps"&gt;IP&lt;/span&gt; addresses. Same results with the next&amp;nbsp;filter.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ rwfilter --start-date&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$today&lt;/span&gt; --end-date&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$today&lt;/span&gt; --protocol&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;,6,17 --sensor&lt;span class="o"&gt;=&lt;/span&gt;s0 --type&lt;span class="o"&gt;=&lt;/span&gt;all --pass&lt;span class="o"&gt;=&lt;/span&gt;stdout --saddress&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;69&lt;/span&gt;.241.37.66 --daddress&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;172&lt;/span&gt;.16.0.10 &lt;span class="p"&gt;|&lt;/span&gt; rwstats --count&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;10&lt;/span&gt; --fields&lt;span class="o"&gt;=&lt;/span&gt;sip,dip,scc,bytes,sport
INPUT: &lt;span class="m"&gt;4&lt;/span&gt; Records &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="m"&gt;4&lt;/span&gt; Bins and &lt;span class="m"&gt;4&lt;/span&gt; Total Records
OUTPUT: Top &lt;span class="m"&gt;10&lt;/span&gt; Bins by Records
                                    sIP&lt;span class="p"&gt;|&lt;/span&gt;                                    dIP&lt;span class="p"&gt;|&lt;/span&gt;scc&lt;span class="p"&gt;|&lt;/span&gt;     bytes&lt;span class="p"&gt;|&lt;/span&gt;sPort&lt;span class="p"&gt;|&lt;/span&gt;   Records&lt;span class="p"&gt;|&lt;/span&gt;  %Records&lt;span class="p"&gt;|&lt;/span&gt;   cumul_%&lt;span class="p"&gt;|&lt;/span&gt;
                           &lt;span class="m"&gt;69&lt;/span&gt;.241.37.66&lt;span class="p"&gt;|&lt;/span&gt;                            &lt;span class="m"&gt;172&lt;/span&gt;.16.0.10&lt;span class="p"&gt;|&lt;/span&gt; us&lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="m"&gt;111370758&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;80&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;         &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="m"&gt;25&lt;/span&gt;.000000&lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="m"&gt;25&lt;/span&gt;.000000&lt;span class="p"&gt;|&lt;/span&gt;
                           &lt;span class="m"&gt;69&lt;/span&gt;.241.37.66&lt;span class="p"&gt;|&lt;/span&gt;                            &lt;span class="m"&gt;172&lt;/span&gt;.16.0.10&lt;span class="p"&gt;|&lt;/span&gt; us&lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="m"&gt;150597449&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;80&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;         &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="m"&gt;25&lt;/span&gt;.000000&lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="m"&gt;50&lt;/span&gt;.000000&lt;span class="p"&gt;|&lt;/span&gt;
                           &lt;span class="m"&gt;69&lt;/span&gt;.241.37.66&lt;span class="p"&gt;|&lt;/span&gt;                            &lt;span class="m"&gt;172&lt;/span&gt;.16.0.10&lt;span class="p"&gt;|&lt;/span&gt; us&lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="m"&gt;110759034&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;80&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;         &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="m"&gt;25&lt;/span&gt;.000000&lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="m"&gt;75&lt;/span&gt;.000000&lt;span class="p"&gt;|&lt;/span&gt;
                           &lt;span class="m"&gt;69&lt;/span&gt;.241.37.66&lt;span class="p"&gt;|&lt;/span&gt;                            &lt;span class="m"&gt;172&lt;/span&gt;.16.0.10&lt;span class="p"&gt;|&lt;/span&gt; us&lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="m"&gt;148760315&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;80&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;         &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="m"&gt;25&lt;/span&gt;.000000&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;100&lt;/span&gt;.000000&lt;span class="p"&gt;|&lt;/span&gt;
$ rwfilter --start-date&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$today&lt;/span&gt; --end-date&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$today&lt;/span&gt; --protocol&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;,6,17 --sensor&lt;span class="o"&gt;=&lt;/span&gt;s1 --type&lt;span class="o"&gt;=&lt;/span&gt;all --pass&lt;span class="o"&gt;=&lt;/span&gt;stdout --saddress&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;69&lt;/span&gt;.241.37.66 --daddress&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;172&lt;/span&gt;.16.0.10 &lt;span class="p"&gt;|&lt;/span&gt; rwstats --count&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;10&lt;/span&gt; --fields&lt;span class="o"&gt;=&lt;/span&gt;sip,dip,scc,bytes,sport
INPUT: &lt;span class="m"&gt;4&lt;/span&gt; Records &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="m"&gt;4&lt;/span&gt; Bins and &lt;span class="m"&gt;4&lt;/span&gt; Total Records
OUTPUT: Top &lt;span class="m"&gt;10&lt;/span&gt; Bins by Records
                                    sIP&lt;span class="p"&gt;|&lt;/span&gt;                                    dIP&lt;span class="p"&gt;|&lt;/span&gt;scc&lt;span class="p"&gt;|&lt;/span&gt;     bytes&lt;span class="p"&gt;|&lt;/span&gt;sPort&lt;span class="p"&gt;|&lt;/span&gt;   Records&lt;span class="p"&gt;|&lt;/span&gt;  %Records&lt;span class="p"&gt;|&lt;/span&gt;   cumul_%&lt;span class="p"&gt;|&lt;/span&gt;
                           &lt;span class="m"&gt;69&lt;/span&gt;.241.37.66&lt;span class="p"&gt;|&lt;/span&gt;                            &lt;span class="m"&gt;172&lt;/span&gt;.16.0.10&lt;span class="p"&gt;|&lt;/span&gt; us&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;57713601&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;80&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;         &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="m"&gt;25&lt;/span&gt;.000000&lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="m"&gt;25&lt;/span&gt;.000000&lt;span class="p"&gt;|&lt;/span&gt;
                           &lt;span class="m"&gt;69&lt;/span&gt;.241.37.66&lt;span class="p"&gt;|&lt;/span&gt;                            &lt;span class="m"&gt;172&lt;/span&gt;.16.0.10&lt;span class="p"&gt;|&lt;/span&gt; us&lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="m"&gt;153098218&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;80&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;         &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="m"&gt;25&lt;/span&gt;.000000&lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="m"&gt;50&lt;/span&gt;.000000&lt;span class="p"&gt;|&lt;/span&gt;
                           &lt;span class="m"&gt;69&lt;/span&gt;.241.37.66&lt;span class="p"&gt;|&lt;/span&gt;                            &lt;span class="m"&gt;172&lt;/span&gt;.16.0.10&lt;span class="p"&gt;|&lt;/span&gt; us&lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="m"&gt;146904926&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;80&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;         &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="m"&gt;25&lt;/span&gt;.000000&lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="m"&gt;75&lt;/span&gt;.000000&lt;span class="p"&gt;|&lt;/span&gt;
                           &lt;span class="m"&gt;69&lt;/span&gt;.241.37.66&lt;span class="p"&gt;|&lt;/span&gt;                            &lt;span class="m"&gt;172&lt;/span&gt;.16.0.10&lt;span class="p"&gt;|&lt;/span&gt; us&lt;span class="p"&gt;|&lt;/span&gt;  &lt;span class="m"&gt;58666986&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;   &lt;span class="m"&gt;80&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;         &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="m"&gt;25&lt;/span&gt;.000000&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;100&lt;/span&gt;.000000&lt;span class="p"&gt;|&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;The output difference between the two sensors are minimal in most cases
and a large portion could be due to traffic that the tap may have better
insight to report though more analysis needs to be done using tcpdump or
Wireshark. Nevertheless this should be considered when determine the
senor requirements and the type of data that you would like to view
reporting for. That said, any reporting is be better than&amp;nbsp;none.&lt;/p&gt;</content><category term="netflow"></category><category term="silk"></category></entry><entry><title>Configure YAF on Linux for NetFlow collection from a network tap or SPAN</title><link href="https://www.rsreese.com/configure-yaf-on-linux-for-netflow-collection-from-a-network-tap-or-span/" rel="alternate"></link><published>2011-08-26T21:27:00-04:00</published><updated>2011-08-26T21:27:00-04:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2011-08-26:/configure-yaf-on-linux-for-netflow-collection-from-a-network-tap-or-span/</id><summary type="html">In a previous post SiLK was setup on a Debian host using NetFlow v5 from a Cisco switch. This worked well but I also have a network tap and said Cisco switch is capable of capturing data via SPAN port(s). This got me thinking about what difference I may …</summary><content type="html">&lt;p&gt;In a previous &lt;a href="https://www.rsreese.com/configure-silk-on-linux-for-netflow-collection-from-a-cisco-router/"&gt;post&lt;/a&gt; SiLK was setup on a Debian host using NetFlow v5
from a Cisco switch. This worked well but I also have a network tap and
said Cisco switch is capable of capturing data via &lt;span class="caps"&gt;SPAN&lt;/span&gt; port(s). This
got me thinking about what difference I may see between the two NetFlow
sources. This guide walks through setting up &lt;span class="caps"&gt;YAF&lt;/span&gt; on a Debian Linux host
to receive data from a network tap or Switched Port Analyzer (&lt;span class="caps"&gt;SPAN&lt;/span&gt;) and
converting it using &lt;a href="http://tools.netsa.cert.org/yaf/index.html"&gt;Yet Another Flowmeter (&lt;span class="caps"&gt;YAF&lt;/span&gt;)&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;First, your host will need to obtain data from your network tap or &lt;span class="caps"&gt;SPAN&lt;/span&gt;
port. I have two network interface cards in my box so I connected the
non-management interface to the tap and started the interface without an
&lt;span class="caps"&gt;IP&lt;/span&gt; in promiscuous mode. If you would like to use a &lt;span class="caps"&gt;SPAN&lt;/span&gt; port seek
guidance &lt;a href="https://www.cisco.com/en/US/products/hw/switches/ps708/products_tech_note09186a008015c612.shtml"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Note that this guide assumes that you already have compiled and
successfully built SiLK. If not checkout this&amp;nbsp;[post][].&lt;/p&gt;
&lt;p&gt;You first need &lt;em&gt;libfixbuf&lt;/em&gt; - &lt;a href="http://tools.netsa.cert.org/fixbuf/index.html"&gt;&lt;span class="caps"&gt;IPFIX&lt;/span&gt; Protocol Library&lt;/a&gt;. Before building
&lt;span class="caps"&gt;IPFIX&lt;/span&gt; will need glib2 and its respective development libraries, I did
not have the latter so a little &lt;span class="caps"&gt;APT&lt;/span&gt; action takes care of that for&amp;nbsp;me.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ sudo apt-get install libglib2-dev
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Building libfixbuf is straigtforward once the prerequetes are in&amp;nbsp;place.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ ./configure --prefix&lt;span class="o"&gt;=&lt;/span&gt;/usr
$ make
$ make install
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Next we are going to build &lt;a href="http://tools.netsa.cert.org/yaf/index.html"&gt;&lt;span class="caps"&gt;YAF&lt;/span&gt; is Yet Another Flowmeter&lt;/a&gt; which has several prerequisites. &lt;em&gt;libpcap&lt;/em&gt; needs to be
installed along with its respective development libraries. I also
installed the required &lt;em&gt;&lt;span class="caps"&gt;PCRE&lt;/span&gt;&lt;/em&gt; required libraries for application&amp;nbsp;labeling.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ sudo apt-get install libpcap-dev
$ sudo apt-get install libpcre3-dev
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Next we can build &lt;span class="caps"&gt;YAF&lt;/span&gt;.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ ./configure --prefix&lt;span class="o"&gt;=&lt;/span&gt;/usr --enable-applabel
$ make
$ sudo make install
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Now that everything is ready to go we have a little housekeeping to do
on the &lt;span class="caps"&gt;YAF&lt;/span&gt; configuration files. I placed the &lt;span class="caps"&gt;YAF&lt;/span&gt; configuration file in
&lt;em&gt;/etc/silk/yaf.conf&lt;/em&gt;. This file contains all of the setting such as
which interface to listen on, &lt;span class="caps"&gt;IPFIX&lt;/span&gt; port, etc.&lt;em&gt;&lt;br&gt;
&lt;/em&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;## ------------------------------------------------------------------------
## yaf.conf
## YAF daemon startup script configuration file
## ------------------------------------------------------------------------
## Copyright (C) 2007-2011 Carnegie Mellon University. All Rights Reserved.
## ------------------------------------------------------------------------
## Authors: Brian Trammell
## ------------------------------------------------------------------------
## GNU General Public License (GPL) Rights pursuant to Version 2, June 1991
## Government Purpose License Rights (GPLR) pursuant to DFARS 252.227-7013
## ------------------------------------------------------------------------

# Must be non-empty to start YAF
ENABLED=yes

##### Capture Options ##########################################################

# Live capture type. Must be pcap, or dag for Endace DAG if YAF was built
# with libdag.
YAF_CAP_TYPE=pcap

# Live capture interface name.
YAF_CAP_IF=eth0

##### Export Options ###########################################################

# IPFIX transport protocol to use for export. Must be one of tcp or udp, or
# sctp if fixbuf was built with SCTP support.
YAF_IPFIX_PROTO=tcp

# Hostname or IP address of IPFIX collector to export flows to.
YAF_IPFIX_HOST=localhost

# If present, connect to the IPFIX collector on the specified port.
# Defaults to port 4739, the IANA-assigned port for IPFIX
YAF_IPFIX_PORT=18000

##### Logging and State Options ################################################

# Path to state location directory; contains the log and pidfiles unless
# modified by the following configuration parameters.
# Defaults to &lt;span class="cp"&gt;${&lt;/span&gt;&lt;span class="n"&gt;prefix&lt;/span&gt;&lt;span class="cp"&gt;}&lt;/span&gt;/var.
#YAF_STATEDIR=

# Path to PID file for YAF. Defaults to YAF_STATEDIR/yaf.pid
#YAF_PIDFILE=

# File or syslog facility name for YAF logging. If file, must be an absolute
# path to a logfile. Defaults to YAF_STATEDIR/yaf.log
#YAF_LOG=

# File or syslog facility name for YAF airdaemon logging. If file, must be an
# absolute path to a logfile. Defaults to YAF_STATEDIR/airdaemon-yaf.log
#YAF_DAEMON_LOG=

##### Miscellaneous Options ####################################################

# If present, become the specified user after starting YAF
#YAF_USER=

# Additional flags to pass to the YAF process. Use --silk --ip4-only for
# export to SiLK rwflowpack or SiLK flowcap.
YAF_EXTRAFLAGS=&amp;quot;--silk&amp;quot;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Made sure there was a sensor definition in the &lt;em&gt;/netflow/silk.conf&lt;/em&gt;.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nx"&gt;sensor&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="nx"&gt;s0&lt;/span&gt;    &lt;span class="s2"&gt;&amp;quot;v5 netflow from router&amp;quot;&lt;/span&gt;
&lt;span class="nx"&gt;sensor&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="nx"&gt;s1&lt;/span&gt;    &lt;span class="s2"&gt;&amp;quot;YAF converted from tap&amp;quot;&lt;/span&gt;

&lt;span class="kr"&gt;class&lt;/span&gt; &lt;span class="nx"&gt;all&lt;/span&gt;
    &lt;span class="nx"&gt;sensors&lt;/span&gt; &lt;span class="nx"&gt;s0&lt;/span&gt; &lt;span class="nx"&gt;s1&lt;/span&gt;
&lt;span class="nx"&gt;end&lt;/span&gt; &lt;span class="kr"&gt;class&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;The &lt;em&gt;/etc/silk/sensor.conf&lt;/em&gt; configuration file also need to be updated
with the new sensor definition. In this case s1 is our&amp;nbsp;tap.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;probe s0 netflow-v5
    listen-on-port 9990
    protocol udp
    accept-from-host 172.16.0.1
end probe

sensor s0
    netflow-v5-probes s0
    internal-ipblocks 172.16.0.0/24
    external-ipblocks remainder
end sensor

probe s1 ipfix
    listen-on-port 18000
    protocol tcp
    accept-from-host 127.0.0.1
end probe

sensor s1
    ipfix-probes s1
    internal-ipblocks 172.16.0.0/24
    external-ipblocks remainder
end sensor
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Lastly, start &lt;span class="caps"&gt;YAF&lt;/span&gt; assuming that you have rwflowpack running from the
SiLK package per the previous&amp;nbsp;[post][].&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ sudo yaf --silk --ipfix&lt;span class="o"&gt;=&lt;/span&gt;tcp --live&lt;span class="o"&gt;=&lt;/span&gt;pcap --in&lt;span class="o"&gt;=&lt;/span&gt;eth0 --out&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;127&lt;/span&gt;.0.0.1 --ipfix-port&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;18000&lt;/span&gt; &lt;span class="p"&gt;&amp;amp;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;You should now be capturing data and converting into a format that SiLK
can process via &lt;span class="caps"&gt;YAF&lt;/span&gt;.&lt;/p&gt;</content><category term="linux"></category><category term="netflow"></category><category term="silk"></category><category term="yaf"></category></entry><entry><title>Configure SiLK on Linux for NetFlow collection from a Cisco router</title><link href="https://www.rsreese.com/configure-silk-on-linux-for-netflow-collection-from-a-cisco-router/" rel="alternate"></link><published>2011-08-15T00:43:00-04:00</published><updated>2011-08-15T00:43:00-04:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2011-08-15:/configure-silk-on-linux-for-netflow-collection-from-a-cisco-router/</id><summary type="html">This guide walks through configuring SiLK from a source install on a Debian 6 host in order to collect NetFlow data from a Cisco router. The guides here and here written by CERT NetSA are quite good but lack some detail specific to the Debian distribution which required a bit …</summary><content type="html">&lt;p&gt;This guide walks through configuring &lt;a href="http://tools.netsa.cert.org/silk/index.html"&gt;SiLK&lt;/a&gt; from a source install on a
&lt;a href="http://www.debian.org/"&gt;Debian&lt;/a&gt; 6 host in order to collect &lt;a href="https://www.cisco.com/en/US/products/ps6601/products_ios_protocol_group_home.html"&gt;NetFlow&lt;/a&gt; data from a Cisco
router. The guides &lt;a href="http://tools.netsa.cert.org/silk/install-handbook.html#x1-130002"&gt;here&lt;/a&gt; and &lt;a href="https://tools.netsa.cert.org/confluence/display/tt/Configure+SiLK+for+NetFlow+collection+from+a+Cisco+router"&gt;here&lt;/a&gt; written by &lt;span class="caps"&gt;CERT&lt;/span&gt; &lt;a href="https://www.cert.org/netsa/"&gt;NetSA&lt;/a&gt; are
quite good but lack some detail specific to the Debian distribution
which required a bit of mucking about to get everything functioning
correctly. This assumes that you have a Cisco router to send NetFlow
data to a host on your network, in this case, a Debian&amp;nbsp;host.&lt;/p&gt;
&lt;p&gt;Installation:&lt;/p&gt;
&lt;p&gt;First install a&amp;nbsp;prerequisite.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ sudo apt-get install libpcap-dev
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Next untar and change into the SiLK directory. For Debian I found that
using the &lt;em&gt;/usr&lt;/em&gt; directory worked well. By default the configure script
uses &lt;em&gt;/usr/local&lt;/em&gt; in which it places the binaries, libraries, etc
outside of Debians default&amp;nbsp;paths.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ ./configure --prefix&lt;span class="o"&gt;=&lt;/span&gt;/usr --sysconfdir&lt;span class="o"&gt;=&lt;/span&gt;/etc/silk --enable-data-rootdir&lt;span class="o"&gt;=&lt;/span&gt;/netflow   
--enable-ipv6 --enable-output-compression
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Your output should be something along the&amp;nbsp;following:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;    * Configured package:           SiLK 2.4.5
    * Host type:                    x86_64-unknown-linux-gnu
    * Source files ($top_srcdir):   .
    * Install directory:            /usr
    * Root of packed data tree:     /netflow
    * Packing logic:                via run-time plugin
    * Timezone support:             UTC
    * Default compression method:   SK_COMPMETHOD_ZLIB
    * IPv6 support:                 YES
    * IPFIX collection support:     YES (-pthread -lfixbuf -lgthread-2.0 -lrt -lglib-2.0)
    * Transport encryption support: NO (gnutls not found)
    * IPA support:                  NO
    * LIBPCAP support:              YES (-lpcap)
    * ADNS support:                 NO
    * Python support:               NO
    * Build analysis tools:         YES
    * Build packing tools:          YES
    * Compiler (CC):                gcc
    * Compiler flags (CFLAGS):      -I$(srcdir) -I$(top_builddir)/src/include -I$(top_srcdir)/src/include -DNDEBUG -O3 -fno-strict-aliasing -Wall -W -Wmissing-prototypes -Wformat=2 -Wdeclaration-after-statement -Wpointer-arith
    * Linker flags (LDFLAGS):
    * Libraries (LIBS):             -lz -ldl -lm
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Lastly:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ make
$ sudo make install
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Configuration:&lt;/p&gt;
&lt;p&gt;Example files are available in the tarball that you extracted. Modified
versions or notes for Debian and similar architectures available&amp;nbsp;below.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;/netflow/silk.conf&lt;/em&gt; in your data directory, the default is &lt;em&gt;/data&lt;/em&gt; but
I used /netflow as you can see in the configure toggle above. The
changes I made were to reduce the number of&amp;nbsp;sensors.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="err"&gt;#&lt;/span&gt; &lt;span class="nx"&gt;The&lt;/span&gt; &lt;span class="nx"&gt;syntactic&lt;/span&gt; &lt;span class="nx"&gt;format&lt;/span&gt; &lt;span class="nx"&gt;of&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt; &lt;span class="nx"&gt;file&lt;/span&gt;
&lt;span class="err"&gt;#&lt;/span&gt;    &lt;span class="nx"&gt;version&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="nx"&gt;supports&lt;/span&gt; &lt;span class="nx"&gt;sensor&lt;/span&gt; &lt;span class="nx"&gt;descriptions&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;but&lt;/span&gt; &lt;span class="nx"&gt;otherwise&lt;/span&gt; &lt;span class="nx"&gt;identical&lt;/span&gt; &lt;span class="nx"&gt;to&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
&lt;span class="nx"&gt;version&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;

&lt;span class="nx"&gt;sensor&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="nx"&gt;s0&lt;/span&gt;    &lt;span class="s2"&gt;&amp;quot;Description for sensor S0&amp;quot;&lt;/span&gt;
&lt;span class="nx"&gt;sensor&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="nx"&gt;s1&lt;/span&gt;

&lt;span class="kr"&gt;class&lt;/span&gt; &lt;span class="nx"&gt;all&lt;/span&gt;
    &lt;span class="nx"&gt;sensors&lt;/span&gt; &lt;span class="nx"&gt;s0&lt;/span&gt; &lt;span class="nx"&gt;s1&lt;/span&gt;
&lt;span class="nx"&gt;end&lt;/span&gt; &lt;span class="kr"&gt;class&lt;/span&gt;

&lt;span class="err"&gt;#&lt;/span&gt; &lt;span class="nx"&gt;Editing&lt;/span&gt; &lt;span class="nx"&gt;above&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt; &lt;span class="nx"&gt;line&lt;/span&gt; &lt;span class="nx"&gt;is&lt;/span&gt; &lt;span class="nx"&gt;sufficient&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="nx"&gt;sensor&lt;/span&gt; &lt;span class="nx"&gt;definition&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;&lt;em&gt;/etc/silk/sensor.conf&lt;/em&gt; is the definition for the data coming in from
your Cisco&amp;nbsp;router:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;probe s0 netflow-v5
    listen-on-port 9990
    protocol udp
    accept-from-host 172.16.0.1
end probe

sensor s0
    netflow-v5-probes s0
    internal-ipblocks 172.16.0.0/24
    external-ipblocks remainder
end sensor
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;&lt;em&gt;/etc/silk/rwflowpack.conf&lt;/em&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;### Packer configuration file  -*- sh -*-
##
## The canonical pathname for this file is /usr/local/etc/rwflowpack.conf
##
## RCSIDENT(&amp;quot;&lt;span class="nv"&gt;$SiLK&lt;/span&gt;: rwflowpack.conf.in 16306 2010-09-15 18:14:41Z mthomas $&amp;quot;)
##
## This is a /bin/sh file that gets loaded by the init.d/rwflowpack
## wrapper script, and this file must follow /bin/sh syntax rules.

# Set to non-empty value to enable rwflowpack
ENABLED=yes

# These are convenience variables for setting other values in this
# configuration file; their use is not required.
statedirectory=/var/lib/rwflowpack

# If CREATE_DIRECTORIES is set to &amp;quot;yes&amp;quot;, the directories named in this
# file will be created automatically if they do not already exist
CREATE_DIRECTORIES=yes

# Full path of the directory containing the &amp;quot;rwflowpack&amp;quot; program
BIN_DIR=/usr/sbin

# The full path to the sensor configuration file.  Used by
# --sensor-configuration.  YOU MUST PROVIDE THIS (the value is ignored
# when INPUT_MODE is &amp;quot;respool&amp;quot;).
SENSOR_CONFIG=/etc/silk/sensor.conf

# The full path to the root of the tree under which the packed SiLK
# Flow files will be written.  Used by --root-directory.
DATA_ROOTDIR=/netflow

# The full path to the site configuration file.  Used by
# --site-config-file.  If not set, defaults to silk.conf in the
# &lt;span class="cp"&gt;${&lt;/span&gt;&lt;span class="n"&gt;DATA_ROOTDIR&lt;/span&gt;&lt;span class="cp"&gt;}&lt;/span&gt;.
SITE_CONFIG=/netflow/silk.conf

# Specify the path to the packing-logic plug-in that rwflowpack should
# load and use.  The plug-in provides functions that determine into
# which class and type each flow record will be categorized and the
# format of the files that rwflowpack will write.  When SiLK has been
# configured with hard-coded packing logic (i.e., when
# --enable-packing-logic was specified to the configure script), this
# value should be empty.  A default value for this switch may be
# specified in the &lt;span class="cp"&gt;${&lt;/span&gt;&lt;span class="n"&gt;SITE_CONFIG&lt;/span&gt;&lt;span class="cp"&gt;}&lt;/span&gt; site configuration file.  This value
# is ignored when INPUT_MODE is &amp;quot;respool&amp;quot;.
PACKING_LOGIC=

# Data input mode.  Valid values are:
#  * &amp;quot;stream&amp;quot; mode to read from the network or from probes that have
#    poll-directories
#  * &amp;quot;fcfiles&amp;quot; to process flowcap files on the local disk
#  * &amp;quot;respool&amp;quot; to process SiLK flow files maintaining the sensor and
#    class/type values that already exist on those records.
INPUT_MODE=stream

# Directory in which to look for incoming flowcap files in &amp;quot;fcfiles&amp;quot;
# mode or for incoming SiLK files in &amp;quot;respool&amp;quot; mode
INCOMING_DIR=&lt;span class="cp"&gt;${&lt;/span&gt;&lt;span class="n"&gt;statedirectory&lt;/span&gt;&lt;span class="cp"&gt;}&lt;/span&gt;/incoming

# Directory to move input files to after successful processing.  When
# in &amp;quot;stream&amp;quot; mode, these are the files passed to any probe with a
# poll-directory directive.  When in &amp;quot;fcfiles&amp;quot; mode, these are the
# flowcap files.  When in &amp;quot;respool&amp;quot; mode, these are the SiLK Flow
# files.  If not set, the input files are not archived but are deleted
# instead.
ARCHIVE_DIR=&lt;span class="cp"&gt;${&lt;/span&gt;&lt;span class="n"&gt;statedirectory&lt;/span&gt;&lt;span class="cp"&gt;}&lt;/span&gt;/archive

# When using the ARCHIVE_DIR, normally files are stored in
# subdirectories of the ARCHIVE_DIR.  If this variable&amp;#39;s value is 1,
# files are stored in ARCHIVE_DIR itself, not in subdirectories of it.
FLAT_ARCHIVE=0

# Directory to move an input file into if there is a problem opening
# the file.  If this value is not set, rwflowpack will exit when it
# encounters a problem file.  When in &amp;quot;fcfiles&amp;quot; mode, these are the
# flowcap files.  When in &amp;quot;stream&amp;quot; mode, these are the files passed to
# any probe with a poll-directory directive.
ERROR_DIR=  #&lt;span class="cp"&gt;${&lt;/span&gt;&lt;span class="n"&gt;statedirectory&lt;/span&gt;&lt;span class="cp"&gt;}&lt;/span&gt;/error

# Data output mode.  Valid values are &amp;quot;local&amp;quot; and &amp;quot;remote&amp;quot;.  &amp;quot;local&amp;quot;
# writes the hourly data files to the local disk.  &amp;quot;remote&amp;quot; creates
# small files (called incremental files) that must be processed by
# rwflowappend to create the hourly files.
OUTPUT_MODE=local

# Directory in which the incremental files are written when the
# OUTPUT_MODE is &amp;quot;remote&amp;quot;.  Typically there is an rwsender deamon that
# polls this directory for new incremental files.
SENDER_DIR=&lt;span class="cp"&gt;${&lt;/span&gt;&lt;span class="n"&gt;statedirectory&lt;/span&gt;&lt;span class="cp"&gt;}&lt;/span&gt;/sender-incoming

# Temporary directory in which to build incremental files prior to
# handing them to rwsender.  Used only when OUTPUT_MODE is &amp;quot;remote&amp;quot;.
INCREMENTAL_DIR=&lt;span class="cp"&gt;${&lt;/span&gt;&lt;span class="n"&gt;statedirectory&lt;/span&gt;&lt;span class="cp"&gt;}&lt;/span&gt;/incremental


# The type of compression to use for packed files.  Left empty, the
# value chosen at compilation time will be used.  Valid values are
# &amp;quot;best&amp;quot; and &amp;quot;none&amp;quot;.  Other values are system-specific (the available
# values are listed in the description of the --compression-method
# switch in the output of rwflowpack --help).
COMPRESSION_TYPE=best

# Interval between attempts to check the INCOMING_DIR or
# poll-directory probe entries for new files, in seconds.  This may be
# left blank, and will default to 15.
POLLING_INTERVAL=

# Interval between periodic flushes of open SiLK Flow files to disk,
# in seconds.  This may be left blank, and will default to 120.
FLUSH_TIMEOUT=

# Maximum number of SiLK Flow files to have open for writing
# simultaneously.  This may be left blank, and will default to 64
FILE_CACHE_SIZE=

# Whether rwflowpack should use advisory write locks.  1=yes, 0=no.
# Set to zero if messages like &amp;quot;Cannot get a write lock on file&amp;quot;
# appear in rwflowpack&amp;#39;s log file.
FILE_LOCKING=1

# Whether rwflowpack should include the input and output SNMP
# interfaces and the next-hop-ip in the output files.  1=yes, 0=no.
# The default is no, and these values are not stored to save disk
# space.  (The input and output fields contain VLAN tags when the
# sensor.conf file contains the attribute &amp;quot;interface-values vlan&amp;quot;.)
PACK_INTERFACES=0


###

# The type of logging to use.  Valid values are &amp;quot;legacy&amp;quot; and &amp;quot;syslog&amp;quot;.
LOG_TYPE=syslog

# The lowest level of logging to actually log.  Valid values are:
# emerg, alert, crit, err, warning, notice, info, debug
LOG_LEVEL=info

# The full path of the directory where the log files will be written
# when LOG_TYPE is &amp;quot;legacy&amp;quot;.
LOG_DIR=/var/log

# The full path of the directory where the PID file will be written
PID_DIR=&lt;span class="cp"&gt;${&lt;/span&gt;&lt;span class="n"&gt;LOG_DIR&lt;/span&gt;&lt;span class="cp"&gt;}&lt;/span&gt;

# The user this program runs as; root permission is required only when
# rwflowpack listens on a privileged port.
USER=root
#USER=`whoami`  # run as user invoking the script

# Extra options to pass to rwflowpack
EXTRA_OPTIONS=
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;&lt;em&gt;/etc/init.d/rwflowback&lt;/em&gt; directory, the only change was to line 38 in
order to change to the configuration specified in the configure&amp;nbsp;statement.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;SCRIPT_CONFIG_LOCATION=&amp;quot;/etc/silk&amp;quot;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;With everything installed in their respective locations it is time to
move on to setting up the Cisco&amp;nbsp;device.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;Router(config)# ip cef 
Router(config)# ip flow-export source Loopback0 
Router(config)# ip flow-export version 5 
Router(config)# ip flow-export destination x.x.x.x 9990 
Router(config)# interface  f1/0 
Router(config-if)# ip flow ingress 
Router(config-if)# ip flow egress
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;I hope this helps. If you have any comments or questions, leave a
comment&amp;nbsp;below.&lt;/p&gt;</content><category term="cisco"></category><category term="linux"></category><category term="netflow"></category><category term="silk"></category></entry><entry><title>Setting Google Storage object ACL for authenticated downloads</title><link href="https://www.rsreese.com/setting-google-storage-object-acl-for-authenticated-downloads/" rel="alternate"></link><published>2011-07-17T03:06:00-04:00</published><updated>2011-07-17T03:06:00-04:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2011-07-17:/setting-google-storage-object-acl-for-authenticated-downloads/</id><summary type="html">Google’s gsutil is a great tool for pushing, retrieving and setting permissions on objects uploaded to Google Storage. I was reviewing the documentation on the Sharing and Collaboration page, specifically the Authenticated Browser Download section and realized there were a couple of small mistakes, err typos. I wanted to …</summary><content type="html">&lt;p&gt;Google&amp;#8217;s &lt;a href="http://code.google.com/apis/storage/docs/gsutil.html"&gt;gsutil&lt;/a&gt; is a great tool for pushing, retrieving and setting
permissions on objects uploaded to Google Storage. I was reviewing the
documentation on the &lt;a href="https://code.google.com/apis/storage/docs/collaboration.html#browser"&gt;Sharing and Collaboration&lt;/a&gt; page, specifically
the &lt;em&gt;Authenticated Browser Download&lt;/em&gt; section and realized there were a
couple of small mistakes, err typos. I wanted to give someone read
privileges to an object via their email address. The correct format is
posted in this &lt;a href="http://pastebin.com/3KFKwnVm"&gt;Paste&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;EmailAddress&lt;/strong&gt; tag needs to be closed and the &lt;strong&gt;Permission&lt;/strong&gt; tags
need to be moved outside of the &lt;strong&gt;Scope&lt;/strong&gt; tag. With all of this said I
later came across &lt;a href="https://code.google.com/apis/storage/docs/accesscontrol.html"&gt;Access Control&lt;/a&gt; page which is documented correctly.
Go&amp;nbsp;figure.&lt;/p&gt;</content><category term="acl"></category><category term="google storage"></category><category term="gsutil"></category></entry><entry><title>Running NIX Retina and Nessus vulnerability scans with least privileges</title><link href="https://www.rsreese.com/running-nix-retina-and-nessus-vulnerability-scans-with-least-privileges/" rel="alternate"></link><published>2011-06-17T02:46:00-04:00</published><updated>2011-06-17T02:46:00-04:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2011-06-17:/running-nix-retina-and-nessus-vulnerability-scans-with-least-privileges/</id><summary type="html">When you are running those vulnerability scans of Linux and UNIX hosts I hope that you are following best practices for keeping a host secure during the process. Both Retina and Nessus rely upon SSH in order to connect to a remote host and run a number of commands to …</summary><content type="html">&lt;p&gt;When you are running those vulnerability scans of Linux and &lt;span class="caps"&gt;UNIX&lt;/span&gt; hosts I
hope that you are following best practices for keeping a host secure
during the process. Both &lt;a href="http://www.eeye.com/Products/Retina/Network-Security-Scanner.aspx"&gt;Retina&lt;/a&gt; and &lt;a href="http://www.tenable.com/products/nessus"&gt;Nessus&lt;/a&gt; rely upon &lt;span class="caps"&gt;SSH&lt;/span&gt; in
order to connect to a remote host and run a number of commands to
compare the querys to their respective databases of known issues, vulns
and configuration faults. Removing the directive in the sshd_config
file to enable root login is definitely not best practice, and is
borderline &amp;#8220;hacking naked&amp;#8221;. Lucky for us both Tenable and eEye have
documented the methods for running scans with su or sudo (the latter&amp;nbsp;preferred).&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.eeye.com/Support/Knowledge-Base/Article.aspx?id=KB000883"&gt;Retina: How to enable &lt;span class="caps"&gt;SUDO&lt;/span&gt; support for&amp;nbsp;Retina&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blog.tenablesecurity.com/2010/05/nessus-spotlight-susudo-feature.html"&gt;Nessus Spotlight: su+sudo&amp;nbsp;Feature&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;As the Retina publication states, you may want to limit the commands
that the sudo user may run. To do this you can look at the Retina logs
on your Windows client; or after a successful scan with take a peek at
the &lt;span class="caps"&gt;NIX&lt;/span&gt; user history in order to determine what commands were run. This
could also be useful for scripting up a self-scan for a host that may
lack a &lt;span class="caps"&gt;SSH&lt;/span&gt; service. Another method may beside reviewing the scanners
logs might be to check the history of the secure or messages log to
determine what commands were run and successfully returned a&amp;nbsp;response.&lt;/p&gt;
&lt;p&gt;After determining what commands the host needs to correctly run a
credentialed scan you can limit the users &lt;em&gt;sudo&lt;/em&gt; privileges in the
&lt;em&gt;/etc/sudoers&lt;/em&gt; file. This allows users bob and alice to execut cmd0,
cmd1 and cmdn, though disables su and the ability to change to a shell
that may not log&amp;nbsp;correctly.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;Cmnd_Alias    SHELLS = /usr/bin/sh,  /usr/bin/csh,   
/usr/bin/ksh, /usr/local/bin/tcsh,   
/usr/bin/rsh, /usr/local/bin/zsh
Cmnd_Alias    RETINA = /usr/sbin/cmd0, /usr/sbin/cmd1, /usr/sbin/cmdn
User_Alias    RETINA_USERS = alice, bob
RETINA_USERS  ALL = !/usr/bin/su, !SHELLS, RETINA
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;As usual, &lt;span class="caps"&gt;YMMV&lt;/span&gt; so let me know if this is helpful or&amp;nbsp;misinforming.&lt;/p&gt;</content><category term="linux"></category><category term="vulnerability scanning"></category></entry><entry><title>Use Facebook CDN to host website photo gallerys</title><link href="https://www.rsreese.com/use-facebook-cdn-to-host-website-photo-gallerys/" rel="alternate"></link><published>2011-04-19T23:23:00-04:00</published><updated>2011-04-19T23:23:00-04:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2011-04-19:/use-facebook-cdn-to-host-website-photo-gallerys/</id><summary type="html">I was thinking about how to retrieve photos from Facebook photo gallery’s and came across a number of solutions. Most of the solutions were for blog or CMS and furthermore required caching your credentials in a database along with a few other hoops in order to access your albums …</summary><content type="html">&lt;p&gt;I was thinking about how to retrieve photos from Facebook photo
gallery&amp;#8217;s and came across a number of solutions. Most of the solutions
were for blog or &lt;span class="caps"&gt;CMS&lt;/span&gt; and furthermore required caching your credentials
in a database along with a few other hoops in order to access your
albums and display them on a third party site. I thought this was a bit
odd as if you want to share photos on your blog or site you should be
able to just make the album public and use Facebooks &lt;span class="caps"&gt;API&lt;/span&gt; to connect
since they are going to be public at that point. After poking around
this ended up being much easier than expected and it works with Facebook
Fan Pages which is where I think this would be most&amp;nbsp;useful.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;You need to create a Facebook &lt;a href="http://developers.facebook.com/"&gt;application account&lt;/a&gt; which will
    provide you with your &lt;strong&gt;appId&lt;/strong&gt; and &lt;strong&gt;secret&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Next you need to get the &lt;span class="caps"&gt;PHP&lt;/span&gt; &lt;span class="caps"&gt;SDK&lt;/span&gt; from &lt;a href="https://github.com/facebook/php-sdk/"&gt;GitHub&lt;/a&gt;. All you need is
    the facebook.php page but feel free to grab the &lt;span class="caps"&gt;ZIP&lt;/span&gt; and explore.
    There is an example to experiment&amp;nbsp;with.&lt;/li&gt;
&lt;li&gt;Lastly you can use the &lt;a href="https://code.google.com/p/reese/source/browse/trunk/facebook-cdn-photo-gallery.php"&gt;code&lt;/a&gt; provided on &lt;a href="https://code.google.com/"&gt;Google Code&lt;/a&gt; as a
    basic start to implementing a photo gallery on your&amp;nbsp;site.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The code displays thumbnails, source images along with name&amp;#8217;s
(caption&amp;#8217;s) below each image that have them and finally the source which
you can use to derive other goodies that you might want to use in you
gallery. Some examples are different size thumbnails, id, comments,&amp;nbsp;etc.&lt;/p&gt;
&lt;p&gt;*Note that the script does not parse double quotes in photo captions
well at this&amp;nbsp;point.&lt;/p&gt;
&lt;p&gt;If you notice any issues, room for improvement or features feel free to
leave a comment or post an issue over at the Google Code&amp;nbsp;page.&lt;/p&gt;</content><category term="facebook"></category><category term="photo gallery"></category><category term="php"></category></entry><entry><title>Blocking evil with the Enhanced Mitigation Experience Toolkit EMET</title><link href="https://www.rsreese.com/blocking-evil-with-the-enhanced-mitigation-experience-toolkit-emet/" rel="alternate"></link><published>2011-01-29T03:18:00-05:00</published><updated>2011-01-29T03:18:00-05:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2011-01-29:/blocking-evil-with-the-enhanced-mitigation-experience-toolkit-emet/</id><summary type="html">While experimenting with EMET I decided to put together a little presentation demonstrating how it can be used to prevent exploitation of a known threat to Acrobat Reader. The presentation first demonstrates the exploit using Metasploit, provides some high level analysis and then goes on to describe how EMET can …</summary><content type="html">&lt;p&gt;While experimenting with &lt;a href="https://www.microsoft.com/downloads/en/details.aspx?FamilyID=c6f0a6ee-05ac-4eb6-acd0-362559fd2f04"&gt;&lt;span class="caps"&gt;EMET&lt;/span&gt;&lt;/a&gt; I decided to put together a little
presentation demonstrating how it can be used to prevent exploitation of
a known threat to Acrobat Reader. The presentation first demonstrates
the exploit using Metasploit, provides some high level analysis and then
goes on to describe how &lt;span class="caps"&gt;EMET&lt;/span&gt; can mitigate the vulnerability. It may be a
little choppy to follow so feel free to provide any constructive
feedback. The presentation is available via &lt;a href="https://www.rsreese.com/assets/EMET_Reese_presentation_v5.pdf"&gt;&lt;span class="caps"&gt;PDF&lt;/span&gt;&lt;/a&gt;.&lt;/p&gt;</content><category term="acrobat reader"></category><category term="defense"></category><category term="emet"></category><category term="evil bits"></category><category term="exploits"></category><category term="metasploit"></category></entry><entry><title>Pseudo Gmail address obfuscation</title><link href="https://www.rsreese.com/pseudo-gmail-address-obfuscation/" rel="alternate"></link><published>2011-01-10T02:35:00-05:00</published><updated>2011-01-10T02:35:00-05:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2011-01-10:/pseudo-gmail-address-obfuscation/</id><summary type="html">I was hunting around for a way to create email aliases for mailing-lists and whatnot. It is a little disappointing to learn that there is not away to create true aliases with Google’s Gmail. You can create aliases if using Google’s hosted application service but I do not …</summary><content type="html">&lt;p&gt;I was hunting around for a way to create email aliases for mailing-lists
and whatnot. It is a little disappointing to learn that there is not
away to create true aliases with Google&amp;#8217;s Gmail. You can create aliases
if using Google&amp;#8217;s hosted application service but I do not use this for
my personal mail. Here are three interesting item&amp;#8217;s I came across;
Google&amp;#8217;s mail servers ignore period&amp;#8217;s for the username context,
googlemail.com may be used instead of gmail.com and finally you can
append notes after a plus&amp;nbsp;symbol.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;firstname.lastname@gmail.com&lt;/code&gt; may be written as
&lt;code&gt;first.name.last.name@gmail.com&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;firstname.lastname@gmail.com&lt;/code&gt; may be written as
&lt;code&gt;firstname.lastname@googlemail.com&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;firstname.lastname@gmail.com&lt;/code&gt; may be written as
&lt;code&gt;firstname.lastname+sometext@gmail.com&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;It&amp;#8217;s not really obfuscation but it may help confuse someone not the
wiser. Maybe one day Gmail will allow for true alias&amp;nbsp;creation.&lt;/p&gt;</content><category term="email"></category><category term="obfuscation"></category></entry><entry><title>Insecure Library Loading Could Allow Remote Code Execution</title><link href="https://www.rsreese.com/insecure-library-loading-could-allow-remote-code-execution/" rel="alternate"></link><published>2010-11-23T21:26:00-05:00</published><updated>2010-11-23T21:26:00-05:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2010-11-23:/insecure-library-loading-could-allow-remote-code-execution/</id><summary type="html">Note this is an older post that I am migrating from another blog I previously maintained. Metasploit has already provide a nice write up of the pwning, I mean testing the vector http://blog.metasploit.com/2010/08/exploiting-dll-hijacking-flaws.html. It does involve a bit of prep work but I …</summary><content type="html">&lt;p&gt;&lt;em&gt;Note this is an older post that I am migrating from another blog I
previously&amp;nbsp;maintained.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Metasploit has already provide a nice write up of the pwning, I mean
testing the vector
&lt;a href=""&gt;http://blog.metasploit.com/2010/08/exploiting-dll-hijacking-flaws.html&lt;/a&gt;.
It does involve a bit of prep work but I tested it on a fully patched
Windows &lt;span class="caps"&gt;XP&lt;/span&gt; sp3 host and it does provide you with the same privileges as
the user who executes the exploit remotely giving the attacker access to
the&amp;nbsp;system.&lt;/p&gt;
&lt;p&gt;So we want to be concerned with how to prevent evil doers from
exploiting this&amp;nbsp;vector.&lt;/p&gt;
&lt;p&gt;\1. Do not open any network shares or websites that you are unfamiliar
with, furthermore avoid executing unknown files from either. 2. Decide
which workaround you would like to use per
&lt;a href="http://www.microsoft.com/technet/security/advisory/2269637.mspx"&gt;http://www.microsoft.com/technet/security/advisory/2269637.mspx&lt;/a&gt;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Workaround #1 Disabling and stopping the Webclient services is the
    easiest method to prevent the attack but may cause other&amp;nbsp;problems.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Workaround #2 Blocking ports 139 and 445 may not be ideal to block
    due to file sharing and other problems that may&amp;nbsp;arise.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Workaround #3 Download and install the tool from Microsoft that
    allows control of the &lt;span class="caps"&gt;DLL&lt;/span&gt; search path algorithm from
    &lt;a href="http://support.microsoft.com/kb/2264107"&gt;http://support.microsoft.com/kb/2264107&lt;/a&gt; for your specific
    Microsoft distribution, i.e. Windows &lt;span class="caps"&gt;XP&lt;/span&gt;. Modify the registry key
    that turns on, off or specifies the action per
    &lt;a href="http://support.microsoft.com/kb/2264107"&gt;http://support.microsoft.com/kb/2264107&lt;/a&gt; section &lt;strong&gt;&amp;#8220;Example 1:
    How to disable loading DLLs from a WebDAV share for all applications
    that are installed on your local computer&amp;#8221;&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Okay, so in short there are two ideal ways to disable to attack, disable
the Webclient service or install the tool and modify the specific
registry&amp;nbsp;key.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Note many of us run docked and undocked, therefore we need to modify
    both controlset001 and controlset002 to cover both&amp;nbsp;situations.&lt;/p&gt;
&lt;p&gt;http://blog.metasploit.com/2010/08/exploiting-dll-hijacking-flaws.html&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</content><category term="defense"></category><category term="evil bits"></category><category term="exploits"></category></entry><entry><title>Keeping your hardware safe and avoiding the evil maid</title><link href="https://www.rsreese.com/keeping-your-hardware-safe-and-avoiding-the-evil-maid/" rel="alternate"></link><published>2010-11-23T21:17:00-05:00</published><updated>2010-11-23T21:17:00-05:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2010-11-23:/keeping-your-hardware-safe-and-avoiding-the-evil-maid/</id><summary type="html">This installment is about keeping your notebook and other technology items safe. I was recently asked what the Defcon locks were for that I have been distributing with the new notebooks. I jokingly said to keep people from taking your monitor and chair from your desk while your on travel …</summary><content type="html">&lt;p&gt;This installment is about keeping your notebook and other technology
items safe. I was recently asked what the Defcon locks were for that I
have been distributing with the new notebooks. I jokingly said to keep
people from taking your monitor and chair from your desk while your on
travel but there is a better reason I distribute&amp;nbsp;them.&lt;/p&gt;
&lt;p&gt;People assume having your hardware stolen is the ultimate way to
compromise your data. An adversary that is smart enough will know better
though. A system running TrueCrypt or similar encryption is a near
impossible target if powered off while you are away but a system running
encryption that powered on on, not so much. Passwords and keys to most
encryption are &lt;a href="http://en.wikipedia.org/wiki/TrueCrypt#Passwords_stored_in_memory"&gt;stored in memory&lt;/a&gt; while the system is running.
Recovering said keys is not an easy task but is possible. If you cannot
break the habit of leaving your device on when not around or putting it
standby because you cannot stand the boot up time then make sure you are
using strong passwords that a difficult to guess to avoid giving the
attacker the chance to use tools to capture memory and parse it for your
super secret&amp;nbsp;pass-phrase.&lt;/p&gt;
&lt;p&gt;Even this has it&amp;#8217;s downfalls though, there have been attacks that can
thwart the password mechanism on a device and run an attack such as
stealing the pass-phrase. An example is the &lt;a href="http://www.hermann-uwe.de/blog/physical-memory-attacks-via-firewire-dma-part-1-overview-and-mitigation"&gt;Firewire attack&lt;/a&gt; which
provides direct hardware access from some devices to your system. If the
attacker can do this then it is game over for your data as they can use
a tool to crack your system password. Fix, do not let an attacker walk
away with your device still powered on, i.e. use a lock when at clients
or at a hotel&amp;nbsp;room.&lt;/p&gt;
&lt;p&gt;The &lt;a href="http://theinvisiblethings.blogspot.com/2009/10/evil-maid-goes-after-truecrypt.html"&gt;evil maid attack&lt;/a&gt; is often not thought of. You are supporting a
remote client, come back to your room to check your mail and leave for
dinner leaving your notebook. While gone the evil-doer aka evil maid
visits your room to fluff your pillows and notices your notebook on the
table. Whether it&amp;#8217;s on or off a device that you probably won&amp;#8217;t notice is
plugged into your system and it records your pass-phrase when you type
it in. The evil maid returns to then steal the notebook as they now have
the passphrase to get your data. To avoid this one, pay attention to
rogue devices plugged into your hardware. Sounds simple but who would
check for a small &lt;span class="caps"&gt;USB&lt;/span&gt; device plugged into the back their host. Also use
a lock to keep the evil-doer from stealing the hardware after obtaining
the key after such an&amp;nbsp;attack.&lt;/p&gt;
&lt;p&gt;What am I trying to say&amp;nbsp;here?&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Use encryption, the performance hit is very small and the newest
    notebooks with the &amp;#8220;i&amp;#8221; series chipsets use hardware&amp;nbsp;encryption.&lt;/li&gt;
&lt;li&gt;Avoid leaving your device running if not around when at foreign
    locations, i.e. hotels, clients,&amp;nbsp;etc&amp;#8230;&lt;/li&gt;
&lt;li&gt;Use a lock to attach the notebook to a desk, chair, whatever. I know
    these are not exactly Fort Knox but it is a&amp;nbsp;deterrent.&lt;/li&gt;
&lt;li&gt;Epoxy ports (warning this may not be an available option for a
    corporate assets). Yes this is extreme but why do you think some
    companies enforce this on their desktop systems and/or&amp;nbsp;servers.&lt;/li&gt;
&lt;/ul&gt;</content><category term="evil bits"></category><category term="exploits"></category><category term="physical security"></category></entry><entry><title>Creating VMware VMDK files from DD images using Live View</title><link href="https://www.rsreese.com/creating-vmware-vmdk-files-from-dd-images-using-live-view/" rel="alternate"></link><published>2010-11-07T01:18:00-05:00</published><updated>2010-11-07T01:18:00-05:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2010-11-07:/creating-vmware-vmdk-files-from-dd-images-using-live-view/</id><summary type="html">While watching some Florida football today I decide to figure out how to mount/run a DD image in VMware Workstation. My image mounting skills were a little lacking so Google it was. I found a ton of great examples that seemed like they should work but the steps seemed …</summary><content type="html">&lt;p&gt;While watching some Florida football today I decide to figure out how to
mount/run a &lt;span class="caps"&gt;DD&lt;/span&gt; image in &lt;a href="http://http://www.vmware.com/products/workstation/"&gt;VMware Workstation&lt;/a&gt;. My image mounting skills
were a little lacking so Google it was. I found a ton of great examples
that seemed like they should work but the steps seemed a little
incomplete. To further complicate the task was I was trying to run two
partitions from the same&amp;nbsp;disk.&lt;/p&gt;
&lt;p&gt;The first method I found was to manually create the &lt;span class="caps"&gt;VMDK&lt;/span&gt; file from
scratch. This seemed promising when I found
[http://sanbarrow.com/vmdk/disktypes.html#partitionedDevice][] and even
better an AppSpot application
&lt;a href="http://www.schatzforensic.com.au/2006/p2v/"&gt;http://www.schatzforensic.com.au/2006/p2v/&lt;/a&gt; to produce the
configuration for me but determining the &lt;span class="caps"&gt;CHS&lt;/span&gt; values were not going very
well with the images I was working with so I kept&amp;nbsp;looking.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.techpathways.com/Demo.htm"&gt;ProDiscover&lt;/a&gt; looked rather promising
&lt;a href="https://irhowto.wordpress.com/2010/07/05/booting-a-dd-image-with-vmware/"&gt;https://irhowto.wordpress.com/2010/07/05/booting-a-dd-image-with-vmware/&lt;/a&gt;
but the &lt;span class="caps"&gt;VMDK&lt;/span&gt; files generated for the images did not seem correct and
sure enough the guest system would not&amp;nbsp;fire.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://liveview.sourceforge.net/"&gt;Live View&lt;/a&gt; was the next tool to try. Initial attempts to use it on a
Windows 7 x64 host failed so I moved the image and required tools to a
Windows &lt;span class="caps"&gt;XP&lt;/span&gt; host. There are several prerequisites for Live View which it
will prompt you for so heads&amp;nbsp;up.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;VMware Workstation or&amp;nbsp;Server&lt;/li&gt;
&lt;li&gt;Java or compatible &lt;span class="caps"&gt;JRE&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.vmware.com/support/developer/vddk/"&gt;Virtual Disk Development Kit (&lt;span class="caps"&gt;VDDK&lt;/span&gt;)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://liveview.sourceforge.net/"&gt;Live&amp;nbsp;View&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You will need to create a &lt;span class="caps"&gt;VMDK&lt;/span&gt; for each image that you want to use even
if it is for the same &lt;span class="caps"&gt;VM&lt;/span&gt; guest. The coolest part of it all is that you
can use the &lt;span class="caps"&gt;DD&lt;/span&gt; image in a read-only state and all write are saved to a
separate state/snapshot file. Very nice as it keeps from trashing the
original&amp;nbsp;image.&lt;/p&gt;</content><category term="dd image"></category><category term="live view"></category><category term="vmdk"></category><category term="vmware"></category></entry><entry><title>How I got started in information technology</title><link href="https://www.rsreese.com/how-i-got-started-in-information-technology/" rel="alternate"></link><published>2010-08-17T14:29:00-04:00</published><updated>2010-08-17T14:29:00-04:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2010-08-17:/how-i-got-started-in-information-technology/</id><summary type="html">Every once in a while someone asks me how I got started in working in the information technology realm. Usually someone that is not in the industry or they are interested in working with computers as a career and are not really sure where to start. I do not think …</summary><content type="html">&lt;p&gt;Every once in a while someone asks me how I got started in working in
the information technology realm. Usually someone that is not in the
industry or they are interested in working with computers as a career
and are not really sure where to start. I do not think I have been able
to come up with a great answer but here is how it has worked for me thus&amp;nbsp;far.&lt;/p&gt;
&lt;p&gt;I have always had a mechanical inclination. I was one of those kids that
would rather take apart their toys (read break) then play with them. I
originally had a love affair with cars, especially engines. I would have
one of my parent’s take me to the junk yard (before I could drive) just
so I could pull old V8’s and bring them home to disassemble them. This
was entertaining but then our family got a new computer. I had worked
with friend’s computers but was careful not to break them as I knew
their cost. You can imagine my dad’s face when he brought home our first
computer and shortly thereafter I had the internals of it laid out
across the floor. Lucky for me I somehow was able to put it back
together and it still worked. I was hooked as there seemed like an
endless amount of possibilities to keep me&amp;nbsp;occupied.&lt;/p&gt;
&lt;p&gt;I continued on my quest of learning more by installing other operating
systems such as Redhat 6 besides the Windows 95 install as a dual boot
installation. Not a very interesting feat now but at the time it was
amazing for me. Fast forward a few years and I had gotten various jobs
working for firms setting up and maintaining computer systems. I
eventually got bit but the security bug while working at a university. I
find the aspect of securing computer systems quite interesting as not
only are you concerned with how information systems are implemented but
also what vectors may be used to attack them and so much more. Enough
about that here’s what I told the last person that was interested in
getting into the technology scene. Opinions vary greatly&amp;nbsp;here.&lt;/p&gt;
&lt;p&gt;It depends upon what you see yourself doing in 10, 20 years from now.
Computer Science (&lt;span class="caps"&gt;CS&lt;/span&gt;) degrees are great and they usually cover the
spectrum when it comes to the world of computing. I was going to get a
&lt;span class="caps"&gt;CS&lt;/span&gt; degree but was undecided the first two years and by the time I pulled
it together I realized I would need two years of Calculus and Physics
before most universities would even consider me for their programs. I
instead went the Computer Information Science (&lt;span class="caps"&gt;CIS&lt;/span&gt;) route. This worked
well for me as they are well recognized and the prerequisites were less
demanding and time&amp;nbsp;consuming.&lt;/p&gt;
&lt;p&gt;Many universities now offer a number of programs such as Decision
Information Science (&lt;span class="caps"&gt;DIS&lt;/span&gt;), this example focuses on more of the business
perspective. I know one person whom has gone this route but they have
done well. Most jobs will say they want a technology oriented degree
though are not always specific. Regardless do your research. This
ultimately depends upon what you expect to do and where you want to
work. If you know the type of position you might see yourself in then
look a position descriptions and figure out what the firms desire in
that field. There are plenty of jobs out there but just more competition
for&amp;nbsp;them.&lt;/p&gt;
&lt;p&gt;Due to competition in the market I would definitely recommend three
things. One, if feasible, regardless of the bachelors program get a
masters, these seems to open more doors and some schools have 3/2
programs that allow you to pretty much get a masters and bachelors at
almost the same time. Two, get an internship and/or job working with
computers, helpdesk at a university or work for a small company
maintaining their network, etc. Besides education, experience is highly
regarded in the industry regardless of your concentration and this will
help you figure out what you want to do career wise. Three, look into
certifications such as a &lt;span class="caps"&gt;CCNA&lt;/span&gt;, Security+, &lt;span class="caps"&gt;MCSA&lt;/span&gt;. Even entry level
certifications may help get you in the door though this is debatable by&amp;nbsp;some.&lt;/p&gt;
&lt;p&gt;I will state that I know people that rely purely upon their experience
and others that are more academically focused. I do not think there is a
sure fire method but for me a combination of both has worked fairly&amp;nbsp;well.&lt;/p&gt;</content></entry><entry><title>Finally migrated from Blogger to WordPress</title><link href="https://www.rsreese.com/finally-migrated-from-blogger-to-wordpress/" rel="alternate"></link><published>2010-05-23T18:35:00-04:00</published><updated>2010-05-23T18:35:00-04:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2010-05-23:/finally-migrated-from-blogger-to-wordpress/</id><summary type="html">I haven’t posted in a while because Blogger finally did away with their FTP/SCP publishing ability meaning if I wanted to continue using Google’s Blogger platform I would have to allow them to host my content for me. I don’t mind this except there are small …</summary><content type="html">&lt;p&gt;I haven&amp;#8217;t posted in a while because Blogger finally did away with their
&lt;span class="caps"&gt;FTP&lt;/span&gt;/&lt;span class="caps"&gt;SCP&lt;/span&gt; publishing ability meaning if I wanted to continue using
Google&amp;#8217;s Blogger platform I would have to allow them to host my content
for me. I don&amp;#8217;t mind this except there are small annoyances such as
having to still use a third party host for files that are not part of a
blog post. I have also never been a real fan of their themes. I&amp;#8217;m not
much of a designer when it comes to websites, my focus is usually on the
technical operations and not making things aesthetically pleasing.
WordPress has Blogger beat hands down in this department as there are
thousands of freely available themes and plug-ins for their&amp;nbsp;platform.&lt;/p&gt;
&lt;p&gt;The flip-side is securing WordPress. There are countless known
vulnerabilities to the WordPress platform. There are ways to stay on top
of these. First use the general lock-down &lt;a href="http://codex.wordpress.org/Hardening_WordPress" title="suggestions"&gt;suggestions&lt;/a&gt; provided by
WordPress and other sites. Secondly or maybe primarily, stay up on new
releases that fix bugs and security vulnerabilities by subscribing to
the &lt;a href="http://codex.wordpress.org/Mailing_Lists#Announcement_Mailing_Lists" title="mailing-list"&gt;mailing-list&lt;/a&gt; or keeping an eye on their blog. Overall I look
forward to the new platform and hope you enjoy the content to&amp;nbsp;come.&lt;/p&gt;</content><category term="blogger"></category><category term="wordpress"></category></entry><entry><title>Redirect Blogger URL using Mod Rewrite and shell scripting fu</title><link href="https://www.rsreese.com/redirect-blogger-url-using-mod-rewrite-and-shell-scripting-fu/" rel="alternate"></link><published>2010-02-13T01:07:00-05:00</published><updated>2010-02-13T01:07:00-05:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2010-02-13:/redirect-blogger-url-using-mod-rewrite-and-shell-scripting-fu/</id><summary type="html">Blogger is doing away with the option to host your blog via your own host and migrating everything to the cloud. I wanted to have the option to continue hosting my blog on my own server even though as of now I am still hosting with Blogger. The main concern …</summary><content type="html">&lt;p&gt;Blogger is doing away with the &lt;a href="http://blogger-ftp.blogspot.com/"&gt;option&lt;/a&gt; to host your blog via your own
host and migrating everything to the cloud. I wanted to have the option
to continue hosting my blog on my own server even though as of now I am
still hosting with &lt;a href="http://www.blogger.com/"&gt;Blogger&lt;/a&gt;. The main concern I had was redirecting
URLs that blogger had created to a new blogging platform such as
&lt;a href="http://www.wordpress.com/"&gt;WordPress&lt;/a&gt;. I looked around and found several methods &lt;a href="http://joepoon.com/blog/2009/04/02/from-blogger-to-wordpress-without-breaking-the-internet/"&gt;here&lt;/a&gt;,
&lt;a href="http://www.seobook.com/migrate-blogger-powered-blog-wordpress"&gt;here&lt;/a&gt;, and &lt;a href="http://www.slicksurface.com/blog/2008-03/how-to-migrate-from-blogger-to-wordpress"&gt;here&lt;/a&gt; for redirecting one &lt;span class="caps"&gt;URL&lt;/span&gt; to another. The two
primary method were &lt;span class="caps"&gt;HTTP&lt;/span&gt; redirects by modifying the page header or
Apaches [mod_rewrite][]. I like Apache so I opted for the&amp;nbsp;latter.&lt;/p&gt;
&lt;p&gt;I only had about 60 posts so creating a few mod_rewrite rules is not a
big deal. There were a number bloggers had &lt;a href="http://blogger-ftp.blogspot.com/2010/02/for-blogs-that-are-no-longer-updated.html"&gt;complaints&lt;/a&gt; about Blogger
removing &lt;span class="caps"&gt;FTP&lt;/span&gt;/&lt;span class="caps"&gt;SFTP&lt;/span&gt; publishing capabilities and they were considering a
migration away from Blogger. This got me thinking about how to help
others in transferring thousands blog&amp;nbsp;entries.&lt;/p&gt;
&lt;p&gt;I decided to try to automate this process somewhat with a little
scripting fu. This could be scripted into a single script and if there
is enough interest, I will make it&amp;nbsp;happen.&lt;/p&gt;
&lt;p&gt;The first step is to import your Blogger posts into your WordPress
database. Blogger can export its posts but WordPress does not have a
native plug-in for importing the posts in the &lt;span class="caps"&gt;XML&lt;/span&gt; format that Blogger is
capable of exporting. WordPress can however import posts and comments
from a Blogger Blogspot hosted profile. Create a Blogspot host and
import the posts that you have backed up from your main profiles &lt;span class="caps"&gt;XML&lt;/span&gt;
file. Make sure to disable search engine indexing for the temporary site
so that you do not hurt your &lt;span class="caps"&gt;SEO&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;The second step is to import the posts into WordPress. This is
relatively easy to do, basically login to your WordPress administrative
tools and import the blogger posts from your Blogspot profile that you
created in the first step. I tried using the recommended &lt;a href="http://codex.wordpress.org/Importing_Content#Blogger"&gt;tools&lt;/a&gt; per
WordPress and a third party &lt;a href="http://justinsomnia.org/2006/10/maintain-permalinks-moving-from-blogger-to-wordpress/"&gt;tool&lt;/a&gt; but they did not work very well for&amp;nbsp;me.&lt;/p&gt;
&lt;p&gt;Now your WordPress install should have all of your content and comments
and your WordPress install is working correctly. This tutorial also
assumes you are using the following permalink format for your WordPress
posts, if not you will have to adjust this tutorial to your&amp;nbsp;liking:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;/%year%/%monthnum%/%postname%/
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;You will notice that your &lt;span class="caps"&gt;URL&lt;/span&gt; conforms to the WordPress install and not
to Bloggers. This means that when you migrate your &lt;span class="caps"&gt;DNS&lt;/span&gt; to point at your
shiny WordPress install all of the links that users have bookmarked and
the search engines have crawled will no longer be valid. Worse, this
could hurt your search engine rankings as it will take time for search
engines to realize the new content and during that time you will have
duplicate content floating around. Not an ideal&amp;nbsp;situation.&lt;/p&gt;
&lt;p&gt;Third step is to determine all of the URLs that your Blogger account was
using the &lt;span class="caps"&gt;XML&lt;/span&gt; file that you exported from your Blogger blogs profile.
This will produce a file with your Blogger file names. It should be the
same as the number of posts you have published on Blogger or in other
words imported to WordPress. Note you will need to change the &lt;span class="caps"&gt;XML&lt;/span&gt; file
name and domain name to match your&amp;nbsp;settings:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;# Produces blogger file names.
sed &amp;quot;s/\(href=&amp;#39;[^&amp;#39;]*&amp;#39;\)/\1\n/g&amp;quot; blog-02-04-2010.xml |   
grep &amp;quot;href=&amp;#39;http://www.rsreese.com/20.*html&amp;#39;&amp;quot; |   
sed &amp;quot;s+.*href=&amp;#39;http://www.domain.com/\(20[^&amp;#39;]*\)&amp;#39;.*+\1+&amp;quot; |   
sort -ut/ -k3 | xargs -I{} basename {} | sort -u &amp;gt; /tmp/blogger.txt
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Next you want to generate a similar listing from your WordPress install
that is populated with all of your Blogger content. This involves
logging into your MySQL install and exporting a little&amp;nbsp;data.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;mysql -u wordpress_user -p
mysql&amp;gt; USE wordpress_db;
mysql&amp;gt; SELECT post_name FROM wp_posts INTO OUTFILE &amp;#39;/tmp/wp.txt&amp;#39;;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Next you want to ensure that your post line up from the two files. In my
case I had some that were not sorted exactly right, this basically let
me know how much manipulating I would have to do. Paste this into a file
on your Linux and provide executable permissions such as &amp;#8216;chmod +x
filename&amp;#8217;. Then run the file &amp;#8216;/filename&amp;#8217;. Note you will need to specify
the paths to your wp.txt and blogger.txt in the small&amp;nbsp;script.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;paste blogger.txt wp.txt | while read Line
do set $Line
echo &amp;quot;This is from FileA: &amp;quot; $1
echo &amp;quot;This is from FileB: &amp;quot; $2
done
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Lastly lets actually generate the mod_rewrite rules for Apache. Again
when this runs the sort function may not match up the file names exactly
right so you may have to do some manual&amp;nbsp;manipulation.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;paste blogger.txt wp.txt | while read Line
do set $Line
echo &amp;#39;RewriteRule ^([0-9]{4})/([0-9]{1,2})/&amp;#39;$1&amp;#39;$ $1/$2/&amp;#39;$2&amp;#39;/ [NC,R=301,L]&amp;#39;
done
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;You probably want to redirect the output to a file so you can go in and
fix the values that have not sorted&amp;nbsp;correctly.&lt;/p&gt;
&lt;p&gt;The last part of the configuration here is a section from my Apache
configuration file. I have also included a little bit to redirect the
feeds though for me this was not very important as I syndicate through
&lt;a href="http://feedburner.google.com/"&gt;FeedBurner&lt;/a&gt; allowing me to modify my feed without effect&amp;nbsp;subscribers.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;# This has two of my rewrite rules, I have many more but kept it brief for readability.
&lt;span class="nt"&gt;&amp;lt;Directory&lt;/span&gt; &lt;span class="err"&gt;/var/www/apache2-default/wordpress&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
RewriteEngine OnRewriteBase /wordpress/
RewriteRule ^atom.xml$ feed/ [NC,R=301,L]
RewriteRule ^rss.xml$ feed/ [NC,R=301,L]
RewriteRule ^([0-9]{4})/([0-9]{1,2})/adding-character-to-line-using-perl.html$ $1/$2/adding-a-character-to-a-line-using-perl/ [NC,R=301,L]
RewriteRule ^([0-9]{4})/([0-9]{1,2})/authenicating-kerberos-against-active.html$ $1/$2/authenicating-kerberos-against-active-directory/ [NC,R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wordpress/index.php [L]&lt;span class="nt"&gt;&amp;lt;/Directory&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Finally you should test your setup to determine that all of the links&amp;nbsp;redirect.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;sed &amp;quot;s/\(href=&amp;#39;[^&amp;#39;]*&amp;#39;\)/\1\n/g&amp;quot; blog-02-07-2010.xml|   
grep &amp;quot;href=&amp;#39;http://www.rsreese.com/20.*html&amp;#39;&amp;quot; |   
sed &amp;quot;s+.*href=&amp;#39;\([^&amp;#39;]*\)&amp;#39;.*+\1+&amp;quot; |   
sort -ut/ -k3 &amp;gt; /tmp/full_blogger_urls.txt
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Next you can use wget to test the URLs to make sure they all redirect&amp;nbsp;correctly.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;wget -i /tmp/full_blogger_urls.txt
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;This tutorial is not an end all solution is not perfect by any means. It
still requires some manipulation of data but if you have a large number
of URLs to redirect then you may find it useful. Your mileage may vary
though if you have problems or recommendations than drop a&amp;nbsp;comment&amp;#8230;&lt;/p&gt;</content><category term="shell scripting"></category></entry><entry><title>A few tools that may help rid of malware</title><link href="https://www.rsreese.com/a-few-tools-that-may-help-rid-of-malware/" rel="alternate"></link><published>2010-02-09T03:22:00-05:00</published><updated>2010-02-09T03:22:00-05:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2010-02-09:/a-few-tools-that-may-help-rid-of-malware/</id><summary type="html">These tools may help rid a computer system of malware but be warned they can be very destructive to your system. In other words if you don’t know what you’re doing then backup what you can and take it to a professional. Ad-Aware - This seems to be a …</summary><content type="html">&lt;p&gt;These tools may help rid a computer system of malware but be warned they
can be very destructive to your system. In other words if you don&amp;#8217;t know
what you&amp;#8217;re doing then backup what you can and take it to a&amp;nbsp;professional.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.lavasoft.com/products/ad_aware_free.php"&gt;Ad-Aware&lt;/a&gt; - This seems to be a popular click and point&amp;nbsp;tool&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.safer-networking.org/en/download/index.html"&gt;Spybot - Search &lt;span class="amp"&gt;&amp;amp;&lt;/span&gt; Destroy&lt;/a&gt; - Same as&amp;nbsp;above&lt;/li&gt;
&lt;li&gt;&lt;a href="http://technet.microsoft.com/en-us/sysinternals/bb897445.aspx"&gt;RootkitRevealer&lt;/a&gt; - Older tool but still&amp;nbsp;useful&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.gmer.net/#files"&gt;&lt;span class="caps"&gt;GMER&lt;/span&gt;&lt;/a&gt; - Great manual tool but can cause more damage than good if
    you do not know what you are&amp;nbsp;doing.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://free.antivirus.com/hijackthis/"&gt;HijackThis&lt;/a&gt; - Similar to above, if you do not know what to remove
    manually then be careful as you could damage your&amp;nbsp;system.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://vil.nai.com/vil/stinger/"&gt;McAfee Labs Stinger&lt;/a&gt; - Detection tool from&amp;nbsp;McAfee&lt;/li&gt;
&lt;li&gt;&lt;a href="https://secure.sophos.com/products/free-tools/sophos-anti-rootkit/download/"&gt;Sophos Anti-Rootkit&lt;/a&gt; - Requires sign-up to download, annoying to
    say the&amp;nbsp;least&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Of course keep your current anti-spyware and virus installs and
definitions&amp;nbsp;up2date.&lt;/p&gt;</content><category term="malware"></category></entry><entry><title>Setting up maildrop with Courier MTA</title><link href="https://www.rsreese.com/setting-up-maildrop-with-courier-mta/" rel="alternate"></link><published>2010-02-08T05:05:00-05:00</published><updated>2010-02-08T05:05:00-05:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2010-02-08:/setting-up-maildrop-with-courier-mta/</id><summary type="html">Setting up maildrop with Courier MTA Before I get into the maildrop here are a few notes to myself for setting up Courier. Before running ./configure you should add ssl bin directory to your path To receive local mail indifferent of caps touch {your/etc/courier/dir}locallowercase Account postmaster …</summary><content type="html">&lt;p&gt;Setting up maildrop with Courier &lt;span class="caps"&gt;MTA&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Before I get into the maildrop here are a few notes to myself for setting
up&amp;nbsp;Courier.&lt;/p&gt;
&lt;p&gt;Before running ./configure you should add ssl bin directory to your
path&lt;br&gt;
To receive local mail indifferent of caps touch&amp;nbsp;{your/etc/courier/dir}locallowercase&lt;/p&gt;
&lt;p&gt;Account postmaster@ &lt;span class="caps"&gt;HAS&lt;/span&gt; to be set up as well in the
/usr/lib/courier/etc/aliases/system&amp;nbsp;file&lt;/p&gt;
&lt;p&gt;To tell courier about hosted&amp;nbsp;domains,&lt;/p&gt;
&lt;p&gt;add domain to,&amp;nbsp;/etc/courier/hosteddomains&lt;/p&gt;
&lt;p&gt;then,as root, run&amp;nbsp;makehosteddomains&lt;/p&gt;
&lt;p&gt;and to tell courier to accept esmtp connections for the&amp;nbsp;domain&lt;/p&gt;
&lt;p&gt;add domains to&amp;nbsp;/etc/courier/esmtpacceptmailfor.dir/domains&lt;/p&gt;
&lt;p&gt;then,as root, run&amp;nbsp;makeacceptmailfor&lt;/p&gt;
&lt;p&gt;Also, the email account postmaster@ &lt;span class="caps"&gt;HAS&lt;/span&gt; to be set up as&amp;nbsp;well.&lt;/p&gt;
&lt;p&gt;Here is the maildrop&amp;nbsp;stuff:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Edit the &amp;#8220;/usr/lib/courier/etc/maildroprc&amp;#8221; to have &amp;#8220;|
/usr/lib/courier/bin/maildrop&amp;#8221; as your delivery&amp;nbsp;method&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a &amp;#8220;$&lt;span class="caps"&gt;HOME&lt;/span&gt;/.mailfilter&amp;#8221; file to be read by maildrop, there is
no need for the most part of a &amp;#8220;.courier&amp;#8221; since mail drop is already
being&amp;nbsp;used!&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Make sure your &amp;#8220;/usr/lib/courier/etc/maildroprc&amp;#8221; doesn&amp;#8217;t kill the
install &lt;span class="caps"&gt;IE&lt;/span&gt;:&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;#attempt at a maildroprc file...  
if ( $SIZE &amp;lt; 26144 )  
{  
exception {  
xfilter &amp;quot;/usr/bin/spamassassin&amp;quot;  
}  
}  
if (/\^X-Spam-Flag: \*YES/)  
{  
exception {  
to &amp;quot;$HOME/Maildir/.Trash/&amp;quot;  
}  
}  
\#else  
\#{  
\# exception {  
\# to &amp;quot;$HOME/Maildir/&amp;quot;  
\# }  
\#}
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;The commented out part is no good since your &amp;#8220;.mailfilter&amp;#8221; will never be
read so &lt;span class="caps"&gt;DON&lt;/span&gt;&amp;#8217;T specifiy the default delivery since no matter what unless
specified other wise by an exit command will courier deliver to the
default &amp;#8220;$&lt;span class="caps"&gt;HOME&lt;/span&gt;/Maildir&amp;#8221; also goes for the .mailfilter, no matter where u
send the mail to there is no need to send it to the default location
unless you have some crazy kaos going on that is beyond my lame howto&amp;nbsp;=)&lt;/p&gt;
&lt;p&gt;\4. The contents of your &amp;#8220;.mailfilter should be something like the&amp;nbsp;following:&lt;/p&gt;
&lt;p&gt;&lt;span class="dquo"&gt;&amp;#8220;&lt;/span&gt;| /usr/lib/courier/bin/mailbot -t autoresponse -s &amp;#8216;AutoGoAwayMessage&amp;#8217;
-A &amp;#8216;From: test@prcdigital.com&amp;#8217; /usr/sbin/sendmail -f&amp;nbsp;&amp;#8220;&lt;/p&gt;
&lt;p&gt;A &amp;#8220;autoresponse&amp;#8221; file should be created and placed in the same $&lt;span class="caps"&gt;HOME&lt;/span&gt;
directory as the &amp;#8220;.mailfilter&amp;#8221; is located, though a universal file can
be created from multiple users to access if&amp;nbsp;desired.&lt;/p&gt;
&lt;p&gt;\5. &amp;#8220;chmod 600 .mailfilter&amp;nbsp;autoresponse&amp;#8221;&lt;/p&gt;
&lt;p&gt;Also the same user:group that is owner of the Maildir should also own
these two files so &amp;#8220;chown user:group .mailfilter&amp;nbsp;autoresponse&amp;#8221;&lt;/p&gt;
&lt;p&gt;or Once you get to maildrop, you don&amp;#8217;t want to bounce it. Your best bet
is to just drop it. Also, I would suggest using spamc/spamd if at all
possible. This is what I would&amp;nbsp;do:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;  if ( $SIZE &amp;lt; 204800 )  {      exception {          xfilter &amp;quot;/usr/bin/spamc&amp;quot;      }  }

  if ((/^X-Spam-Flag: YES/))  {      if ((/^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*/))      {          echo &amp;quot;***** Dropping 15+ Spam *****&amp;quot;          EXITCODE = 0          exit      }      else      {          to &amp;quot;$HOME/Maildir/.Trash/&amp;quot;      }  }  to &amp;quot;$HOME/Maildir/&amp;quot;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;You can get rid of the echo if you don&amp;#8217;t want an entry in the log when
it drops an&amp;nbsp;email.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;if ((/^X-Spam-Flag: YES/))
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Why double parentheses? This is what I am using and it is not working,
though it seemed to work until&amp;nbsp;recently:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;if (/^X-Spam-Level: *\*\*\*\*\*\*\*/){      exception {              to &amp;quot;/dev/null&amp;quot;      }}
&lt;/pre&gt;&lt;/div&gt;</content><category term="mail"></category><category term="linux"></category></entry><entry><title>Migrating from Blogger to WordPress</title><link href="https://www.rsreese.com/migrating-from-blogger-to-wordpress/" rel="alternate"></link><published>2010-02-04T01:06:00-05:00</published><updated>2010-02-04T01:06:00-05:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2010-02-04:/migrating-from-blogger-to-wordpress/</id><summary type="html">Blogger is removing the functionality to host your own “Blogger” content by disabling the FTP/SFTP functionality from their system. I’m considering their hosting solution or migrating to a WordPress solution. If I stick with Google’s Blogger hosting then bandwidth should not ever be an issue as they …</summary><content type="html">&lt;p&gt;Blogger is removing the functionality to host your own &amp;#8220;Blogger&amp;#8221; content
by &lt;a href="http://blogger-ftp.blogspot.com/2010/01/deprecating-ftp.html"&gt;disabling&lt;/a&gt; the &lt;span class="caps"&gt;FTP&lt;/span&gt;/&lt;span class="caps"&gt;SFTP&lt;/span&gt; functionality from their system. I&amp;#8217;m
considering their hosting solution or migrating to a WordPress&amp;nbsp;solution.&lt;/p&gt;
&lt;p&gt;If I stick with Google&amp;#8217;s Blogger hosting then bandwidth should not ever
be an issue as they have a distributed computing system. The only
downfall is that I&amp;#8217;ll probably have to use a sub-domain to host any
static files. If I move to hosting my own WordPress then I&amp;#8217;ll probably
have to increase my virtual host resources since &lt;span class="caps"&gt;PHP&lt;/span&gt; and MySQL will be
required therefore using more system resources. This also increases my
hosts vulnerability footprint. Not only am I essentially increasing
adding two services but WordPress has had its fair share of security&amp;nbsp;issues.&lt;/p&gt;
&lt;p&gt;If you want to stick with Blogger the simple alternative is just to
migrate to a hosted Blogspot and use &lt;a href="http://www.google.com/support/blogger/bin/answer.py?hl=en&amp;amp;answer=55373"&gt;custom domains&lt;/a&gt;. You can simply
point your &lt;span class="caps"&gt;DNS&lt;/span&gt; host domain.com or sub.domain.com to Google&amp;#8217;s &lt;span class="caps"&gt;DNS&lt;/span&gt; servers
and within a short amount of time you will be up and running again. With
this said there are a number of variables that come into&amp;nbsp;play.&lt;/p&gt;
&lt;p&gt;Google&amp;#8217;s Blogspot does not support subfolders, one alternative is to use
a &lt;span class="caps"&gt;URL&lt;/span&gt; redirection to point to the new host which means you will need to
search around for the code to insert into the header of your template to
accomplish this. Per the &lt;a href="http://blogger-ftp.blogspot.com/2010/01/migration-tool-overview.html"&gt;migration tool&lt;/a&gt; there is no sub-folder&amp;nbsp;support.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;domain.com/blog/ &amp;#8212;&gt; blog.domain.com&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Since Google would hosting your blog there really isn&amp;#8217;t a wonderful way
to handle this as there is not a provision to use Mod_Rewrite or
something similar though with the number of complaints Google has
received on their blog they may implement a&amp;nbsp;feature.&lt;/p&gt;
&lt;p&gt;If you are considering hosting with another solution such as Wordpress
then you have more options available to you depending on your hosting
solution. Wordpress has an integrated import function to import other
Blogging but you must first convert you existing hosted Blogger account
to a Blogspot solution. Blogger does have an export function but it
seems broken per these &lt;a href="http://blogger-ftp.blogspot.com/2010/02/for-blogs-that-are-no-longer-updated.html"&gt;posts&lt;/a&gt;. Wordpress also has custom &lt;span class="caps"&gt;URL&lt;/span&gt;
functionality so it would be easier to match the format that blogger was
using especially if you can utilize&amp;nbsp;Mod_Rewrite.&lt;/p&gt;
&lt;p&gt;Personally, I&amp;#8217;m still&amp;nbsp;undecided&amp;#8230;&lt;/p&gt;</content><category term="wordpress"></category></entry><entry><title>God Mode - Give Windows users an easier way to destory their computers</title><link href="https://www.rsreese.com/god-mode-give-windows-users-an-easier-way-to-destory-their-computers/" rel="alternate"></link><published>2010-01-06T03:45:00-05:00</published><updated>2010-01-06T03:45:00-05:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2010-01-06:/god-mode-give-windows-users-an-easier-way-to-destory-their-computers/</id><summary type="html">Windows 7 and Vista (latter can be buggy) has an interesting feature that allows quick access to allow kinds of administrative tools. To create God Mode simply create a new folder on your desktop and name it the following: GodMode.{ED7BA470-8E54-465E-825C-99712043E01C} Now you will have a quicker way to change …</summary><content type="html">&lt;p&gt;Windows 7 and Vista (latter can be buggy) has an interesting feature that allows quick access to allow kinds of administrative&amp;nbsp;tools.&lt;/p&gt;
&lt;p&gt;To create God Mode simply create a new folder on your desktop and name it the&amp;nbsp;following:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Now you will have a quicker way to change settings that will probably lead to the demise of your operating system. Have&amp;nbsp;fun.&lt;/p&gt;</content><category term="microsoft windows"></category></entry><entry><title>Google namebench helps find happy nameservers</title><link href="https://www.rsreese.com/google-namebench-helps-find-happy-nameservers/" rel="alternate"></link><published>2009-12-15T03:22:00-05:00</published><updated>2009-12-15T03:22:00-05:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2009-12-15:/google-namebench-helps-find-happy-nameservers/</id><summary type="html">I was recently checking name servers that I was using to resolve hosts on a network. After using tools such as ping, traceroute, and dig I decided to search around and found Google has a new tool called namebench. Intrigued I decided to give it a shot. There is support …</summary><content type="html">&lt;p&gt;I was recently checking name servers that I was using to resolve hosts
on a network. After using tools such as ping, traceroute, and dig I
decided to search around and found Google has a new tool called
&lt;a href="http://code.google.com/p/namebench/"&gt;namebench&lt;/a&gt;. Intrigued I decided to give it a shot. There is support
for several platforms including Linux and Microsoft Windows. I pulled
down a &lt;span class="caps"&gt;NIX&lt;/span&gt; copy and fired up the python script. By default in &lt;a href="http://code.google.com/p/namebench/w/list"&gt;&lt;span class="caps"&gt;CLI&lt;/span&gt;&lt;/a&gt;
the tool tests the top 10000 Alexa sites, as a note the &lt;a href="http://code.google.com/p/namebench/w/list"&gt;&lt;span class="caps"&gt;GUI&lt;/span&gt;&lt;/a&gt; tool
can test sites from your browsers cache. The tool compares your &lt;span class="caps"&gt;DNS&lt;/span&gt;
hosts to several top resolvers around the net including their &lt;a href="http://code.google.com/speed/public-dns/"&gt;own&lt;/a&gt;.
This was neat but I found the real usefulness was the ability to only
specify the name servers you want to test. Very cool &lt;span class="caps"&gt;IMO&lt;/span&gt;.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ ./namebench.py -O &lt;span class="m"&gt;68&lt;/span&gt;.87.73.242 &lt;span class="m"&gt;68&lt;/span&gt;.87.68.162 &lt;span class="m"&gt;68&lt;/span&gt;.87.74.162 &lt;span class="m"&gt;8&lt;/span&gt;.8.8.8 &lt;span class="m"&gt;8&lt;/span&gt;.8.4.4 &lt;span class="m"&gt;208&lt;/span&gt;.67.220.220
namebench &lt;span class="m"&gt;1&lt;/span&gt;.0.5 - data/alexa-top-10000-global.txt &lt;span class="o"&gt;(&lt;/span&gt;weighted&lt;span class="o"&gt;)&lt;/span&gt; on &lt;span class="m"&gt;2009&lt;/span&gt;-12-14 &lt;span class="m"&gt;22&lt;/span&gt;:09:40.248541
&lt;span class="nv"&gt;threads&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;40&lt;/span&gt; &lt;span class="nv"&gt;tests&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;200&lt;/span&gt; &lt;span class="nv"&gt;runs&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt; &lt;span class="nv"&gt;timeout&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt;.0 &lt;span class="nv"&gt;health_timeout&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;4&lt;/span&gt;.0 &lt;span class="nv"&gt;servers&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;10&lt;/span&gt;
------------------------------------------------------------------------------
- Checking connection quality...
- Connection appears healthy &lt;span class="o"&gt;(&lt;/span&gt;latency &lt;span class="m"&gt;55&lt;/span&gt;.15ms&lt;span class="o"&gt;)&lt;/span&gt;
- Building initial DNS cache &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="m"&gt;6&lt;/span&gt; nameservers &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="m"&gt;40&lt;/span&gt; threads&lt;span class="o"&gt;]&lt;/span&gt;
- Waiting &lt;span class="k"&gt;for&lt;/span&gt; health check threads &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="m"&gt;6&lt;/span&gt; servers: &lt;span class="m"&gt;0&lt;/span&gt;/6.6/6
.- &lt;span class="m"&gt;6&lt;/span&gt; of &lt;span class="m"&gt;6&lt;/span&gt; name servers are healthy
- Waiting &lt;span class="k"&gt;for&lt;/span&gt; wildcard check threads: &lt;span class="m"&gt;1&lt;/span&gt;/6.....6/6
.- Waiting 4s &lt;span class="k"&gt;for&lt;/span&gt; TTLs to decrement.
- Waiting &lt;span class="k"&gt;for&lt;/span&gt; cache collusion threads: &lt;span class="m"&gt;0&lt;/span&gt;/30.30/30
&lt;span class="m"&gt;30&lt;/span&gt;
Final list of nameservers considered:
------------------------------------------------------------------------------
&lt;span class="m"&gt;68&lt;/span&gt;.87.68.162    &lt;span class="m"&gt;68&lt;/span&gt;.87.68.162     &lt;span class="m"&gt;48&lt;/span&gt;  ms &lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;208&lt;/span&gt;.67.220.220  &lt;span class="m"&gt;208&lt;/span&gt;.67.220.220   &lt;span class="m"&gt;59&lt;/span&gt;  ms &lt;span class="p"&gt;|&lt;/span&gt; www.google.com. hijacked &lt;span class="o"&gt;(&lt;/span&gt;google.navigation.opendns.com.&lt;span class="o"&gt;)&lt;/span&gt;, NXDOMAIN Hijacking
&lt;span class="m"&gt;68&lt;/span&gt;.87.73.242    &lt;span class="m"&gt;68&lt;/span&gt;.87.73.242     &lt;span class="m"&gt;62&lt;/span&gt;  ms &lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;68&lt;/span&gt;.87.74.162    &lt;span class="m"&gt;68&lt;/span&gt;.87.74.162     &lt;span class="m"&gt;78&lt;/span&gt;  ms &lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;8&lt;/span&gt;.8.8.8         &lt;span class="m"&gt;8&lt;/span&gt;.8.8.8          &lt;span class="m"&gt;86&lt;/span&gt;  ms &lt;span class="p"&gt;|&lt;/span&gt;
&lt;span class="m"&gt;8&lt;/span&gt;.8.4.4         &lt;span class="m"&gt;8&lt;/span&gt;.8.4.4          &lt;span class="m"&gt;88&lt;/span&gt;  ms &lt;span class="p"&gt;|&lt;/span&gt;

- Reading &lt;span class="nb"&gt;test&lt;/span&gt; data from data/alexa-top-10000-global.txt
- Benchmarking &lt;span class="m"&gt;6&lt;/span&gt; server&lt;span class="o"&gt;(&lt;/span&gt;s&lt;span class="o"&gt;)&lt;/span&gt;, run &lt;span class="m"&gt;1&lt;/span&gt; of &lt;span class="m"&gt;1&lt;/span&gt;: &lt;span class="m"&gt;1&lt;/span&gt;/200.........10.........20.........30.........40.........50.........60.........70.........80.........90.........100.........110.........120.........130.........140.........150.........160.........170.........180.........190.........200/200
&lt;span class="m"&gt;200&lt;/span&gt;
- Rendering template: ascii.tmpl
- Saving rendered ascii output
Fastest individual response &lt;span class="o"&gt;(&lt;/span&gt;in milliseconds&lt;span class="o"&gt;)&lt;/span&gt;:
----------------------------------------------
&lt;span class="m"&gt;68&lt;/span&gt;.87.68.162     &lt;span class="c1"&gt;############################ 32.37295&lt;/span&gt;
&lt;span class="m"&gt;68&lt;/span&gt;.87.73.242     &lt;span class="c1"&gt;################################# 38.33604&lt;/span&gt;
&lt;span class="m"&gt;208&lt;/span&gt;.67.220.220   &lt;span class="c1"&gt;################################# 39.38794&lt;/span&gt;
&lt;span class="m"&gt;68&lt;/span&gt;.87.74.162     &lt;span class="c1"&gt;########################################## 49.34692&lt;/span&gt;
&lt;span class="m"&gt;8&lt;/span&gt;.8.4.4          &lt;span class="c1"&gt;##################################################### 63.43389&lt;/span&gt;
&lt;span class="m"&gt;8&lt;/span&gt;.8.8.8          &lt;span class="c1"&gt;##################################################### 63.49301&lt;/span&gt;

Mean response &lt;span class="o"&gt;(&lt;/span&gt;in milliseconds&lt;span class="o"&gt;)&lt;/span&gt;:
--------------------------------
&lt;span class="m"&gt;8&lt;/span&gt;.8.4.4          &lt;span class="c1"&gt;########################## 67.35&lt;/span&gt;
&lt;span class="m"&gt;68&lt;/span&gt;.87.73.242     &lt;span class="c1"&gt;################################## 90.54&lt;/span&gt;
&lt;span class="m"&gt;8&lt;/span&gt;.8.8.8          &lt;span class="c1"&gt;#################################### 95.24&lt;/span&gt;
&lt;span class="m"&gt;68&lt;/span&gt;.87.68.162     &lt;span class="c1"&gt;#################################### 95.31&lt;/span&gt;
&lt;span class="m"&gt;208&lt;/span&gt;.67.220.220   &lt;span class="c1"&gt;######################################### 108.85&lt;/span&gt;
&lt;span class="m"&gt;68&lt;/span&gt;.87.74.162     &lt;span class="c1"&gt;##################################################### 142.74&lt;/span&gt;

Response Distribution Chart URL &lt;span class="o"&gt;(&lt;/span&gt;200ms&lt;span class="o"&gt;)&lt;/span&gt;:
----------------------------------------
http://chart.apis.google.com/chart?cht&lt;span class="o"&gt;=&lt;/span&gt;lxy&lt;span class="p"&gt;&amp;amp;&lt;/span&gt;&lt;span class="nv"&gt;chs&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;720x410&lt;span class="p"&gt;&amp;amp;&lt;/span&gt;&lt;span class="nv"&gt;chxt&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;x,y&lt;span class="p"&gt;&amp;amp;&lt;/span&gt;&lt;span class="nv"&gt;chg&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;10&lt;/span&gt;,20&lt;span class="p"&gt;&amp;amp;&lt;/span&gt;&lt;span class="nv"&gt;chxr&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;,0,200&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;,0,100&lt;span class="p"&gt;&amp;amp;&lt;/span&gt;&lt;span class="nv"&gt;chd&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;t:0,20,20,20,21,21,21,24,27,49,59,67,116&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;,1,12,40,57,63,69,73,77,80,84,87,91&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;,16,17,17,18,19,25,26,29,35,39,51,77,95,102&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;,1,14,28,48,53,56,60,65,69,72,76,80,83,87&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;,19,20,20,20,21,21,23,24,26,36,56,69,90,112&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;,1,8,30,45,50,54,61,64,70,73,77,80,84,87&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;,25,25,25,26,27,45,46,49,51,57,71,77,91,116&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;,1,5,33,39,47,50,54,58,62,65,69,73,77,80&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;,32,32,32,33,33,34,34,35,38,48,53&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;,1,7,28,55,65,80,88,91,95,98,100&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;,32,32,32,33,33,34,34,34,37,41,50,63,78,126&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;,1,7,28,44,54,66,70,74,77,81,85,89,92,96&lt;span class="p"&gt;&amp;amp;&lt;/span&gt;&lt;span class="nv"&gt;chco&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;ff9900,1a00ff,80ff00,ff00e6,00e6ff,fae30a&lt;span class="p"&gt;&amp;amp;&lt;/span&gt;&lt;span class="nv"&gt;chxt&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;x,y,x,y&lt;span class="p"&gt;&amp;amp;&lt;/span&gt;&lt;span class="nv"&gt;chxl&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt;:&lt;span class="o"&gt;||&lt;/span&gt;Duration+in+ms&lt;span class="o"&gt;||&lt;/span&gt;&lt;span class="m"&gt;3&lt;/span&gt;:&lt;span class="o"&gt;||&lt;/span&gt;%25&lt;span class="p"&gt;|&amp;amp;&lt;/span&gt;&lt;span class="nv"&gt;chdl&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;208&lt;/span&gt;.67.220.220&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;68&lt;/span&gt;.87.68.162&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;68&lt;/span&gt;.87.73.242&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;68&lt;/span&gt;.87.74.162&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;8&lt;/span&gt;.8.4.4&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;8&lt;/span&gt;.8.8.8

Response Distribution Chart URL &lt;span class="o"&gt;(&lt;/span&gt;Full&lt;span class="o"&gt;)&lt;/span&gt;:
---------------------------------------
http://chart.apis.google.com/chart?cht&lt;span class="o"&gt;=&lt;/span&gt;lxy&lt;span class="p"&gt;&amp;amp;&lt;/span&gt;&lt;span class="nv"&gt;chs&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;720x410&lt;span class="p"&gt;&amp;amp;&lt;/span&gt;&lt;span class="nv"&gt;chxt&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;x,y&lt;span class="p"&gt;&amp;amp;&lt;/span&gt;&lt;span class="nv"&gt;chg&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;10&lt;/span&gt;,20&lt;span class="p"&gt;&amp;amp;&lt;/span&gt;&lt;span class="nv"&gt;chxr&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;,0,1333&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;,0,100&lt;span class="p"&gt;&amp;amp;&lt;/span&gt;&lt;span class="nv"&gt;chd&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;t:0,3,3,3,3,3,3,4,4,7,9,10,17,23,62,100&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;,1,12,40,57,63,69,73,77,80,84,87,91,94,98,100&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;,2,2,3,3,3,4,4,4,5,6,8,12,14,15,19,22,24,60&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;,1,14,28,48,53,56,60,65,69,72,76,80,83,87,90,94,97,100&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;,3,3,3,3,3,3,3,4,4,5,8,10,13,17,20,23,25,32&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;,1,8,30,45,50,54,61,64,70,73,77,80,84,87,91,94,98,100&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;,4,4,4,4,4,7,7,7,8,9,11,11,14,17,19,22,25,28,45,67&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;,1,5,33,39,47,50,54,58,62,65,69,73,77,80,84,88,91,95,98,100&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;,5,5,5,5,5,5,5,5,6,7,8&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;,1,7,28,55,65,80,88,91,95,98,100&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;,5,5,5,5,5,5,5,5,6,6,8,9,12,19,55,69&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;,1,7,28,44,54,66,70,74,77,81,85,89,92,96,99,100&lt;span class="p"&gt;&amp;amp;&lt;/span&gt;&lt;span class="nv"&gt;chco&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;ff9900,1a00ff,80ff00,ff00e6,00e6ff,fae30a&lt;span class="p"&gt;&amp;amp;&lt;/span&gt;&lt;span class="nv"&gt;chxt&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;x,y,x,y&lt;span class="p"&gt;&amp;amp;&lt;/span&gt;&lt;span class="nv"&gt;chxl&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt;:&lt;span class="o"&gt;||&lt;/span&gt;Duration+in+ms&lt;span class="o"&gt;||&lt;/span&gt;&lt;span class="m"&gt;3&lt;/span&gt;:&lt;span class="o"&gt;||&lt;/span&gt;%25&lt;span class="p"&gt;|&amp;amp;&lt;/span&gt;&lt;span class="nv"&gt;chdl&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;208&lt;/span&gt;.67.220.220&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;68&lt;/span&gt;.87.68.162&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;68&lt;/span&gt;.87.73.242&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;68&lt;/span&gt;.87.74.162&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;8&lt;/span&gt;.8.4.4&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="m"&gt;8&lt;/span&gt;.8.8.8

Recommended configuration &lt;span class="o"&gt;(&lt;/span&gt;fastest + nearest&lt;span class="o"&gt;)&lt;/span&gt;:
----------------------------------------------
nameserver &lt;span class="m"&gt;8&lt;/span&gt;.8.4.4         &lt;span class="c1"&gt;# 8.8.4.4&lt;/span&gt;
nameserver &lt;span class="m"&gt;68&lt;/span&gt;.87.68.162    &lt;span class="c1"&gt;# 68.87.68.162&lt;/span&gt;
nameserver &lt;span class="m"&gt;68&lt;/span&gt;.87.73.242    &lt;span class="c1"&gt;# 68.87.73.242&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;</content><category term="dns"></category><category term="google"></category></entry><entry><title>Problem with RAID volume larger then 2TB on Dell workstations</title><link href="https://www.rsreese.com/problem-with-raid-volume-larger-then-2tb-on-dell-workstations/" rel="alternate"></link><published>2009-10-21T14:35:00-04:00</published><updated>2009-10-21T14:35:00-04:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2009-10-21:/problem-with-raid-volume-larger-then-2tb-on-dell-workstations/</id><summary type="html">I ran into a interesting issue this weekend. I was setting up a RAID volume on a Optiplex and Precision workstations, which have three 1.5 Terabyte (TB) drives. I tried creating a single large RAID 5 volume but the Intel Matrix storage manger (8.5.2) would not set …</summary><content type="html">&lt;p&gt;I ran into a interesting issue this weekend. I was setting up a &lt;span class="caps"&gt;RAID&lt;/span&gt;
volume on a Optiplex and Precision workstations, which have three 1.5
Terabyte (&lt;span class="caps"&gt;TB&lt;/span&gt;) drives. I tried creating a single large &lt;span class="caps"&gt;RAID&lt;/span&gt; 5 volume but
the Intel Matrix storage manger (8.5.2) would not set the array to
bootable. After much trial I found I could create smaller volume 160
Gigabyte (&lt;span class="caps"&gt;GB&lt;/span&gt;) for the system which was bootable and another utilizing
the rest of the storage. My original plan was to create a large volume
and partition it using the &lt;span class="caps"&gt;OS&lt;/span&gt; but this worked just as well, so instead I
had two &lt;span class="caps"&gt;RAID&lt;/span&gt; 5 volumes. The only difference is the large volume is not
bootable and requires the small one with the &lt;span class="caps"&gt;OS&lt;/span&gt; on it to first be&amp;nbsp;mounted.&lt;/p&gt;</content><category term="raid"></category></entry><entry><title>Python File Uploader</title><link href="https://www.rsreese.com/python-file-uploader/" rel="alternate"></link><published>2009-10-17T14:21:00-04:00</published><updated>2009-10-17T14:21:00-04:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2009-10-17:/python-file-uploader/</id><summary type="html">I recently had a need to upload large files to a server via HTTP. Most of the solutions required tweaking the web server or PHP. Instead, I found a Python script that would write the data in chunks so it could handle large files. I modified the script to include …</summary><content type="html">&lt;p&gt;I recently had a need to upload large files to a server via &lt;span class="caps"&gt;HTTP&lt;/span&gt;. Most of the solutions required tweaking the web server or &lt;span class="caps"&gt;PHP&lt;/span&gt;. Instead, I found a &lt;a href="http://python.org/"&gt;Python&lt;/a&gt; script that would write the data in chunks so it could handle large files. I modified the script to include a few additional features which include reporting a hash to the user, appending a date and revision to the file. I did my testing with &lt;a href="http://apache.org/"&gt;Apache&lt;/a&gt; so your mileage may very with other httpd instances. The script is released under to GNUv3 so feel free to download a copy for your use or destruction. You can find the script at &lt;a href="https://github.com/rsreese/file-uploader"&gt;Github&lt;/a&gt;.&lt;/p&gt;</content><category term="python"></category></entry><entry><title>Trouble accessing Gmail or internal chat client</title><link href="https://www.rsreese.com/trouble-accessing-gmail-or-internal-chat-client/" rel="alternate"></link><published>2009-09-10T01:58:00-04:00</published><updated>2009-09-10T01:58:00-04:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2009-09-10:/trouble-accessing-gmail-or-internal-chat-client/</id><summary type="html">I have been in a couple of places which I needed to access my email and chat so here is a little fix to get around DNS fixes that redirect hosts to the localhost. Modify your hosts file to look like the following: C:\Windows\System32\drivers\etc\hosts 127 …</summary><content type="html">&lt;p&gt;I have been in a couple of places which I needed to access my email and chat so here is a little fix to get around &lt;span class="caps"&gt;DNS&lt;/span&gt; fixes that redirect hosts to the&amp;nbsp;localhost.&lt;/p&gt;
&lt;p&gt;Modify your hosts file to look like the&amp;nbsp;following:&lt;/p&gt;
&lt;p&gt;C:\Windows\System32\drivers\etc\hosts&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;127.0.0.1       localhost
74.125.79.17    mail.google.com
66.102.1.189    chatenabled.mail.google.com        #or 74.125.19.189 for non-Comcast.

# A friend recommended these, YMMV.
#209.85.135.17    mail.google.com
#72.14.204.189   chatenabled.mail.google.com
#72.14.204.189   talk.google.com
#72.14.204.189    talkx.l.google.com
#72.14.204.189    hostedtalkgadget.google.com
#72.14.204.189   talkgadget.google.com
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;This basically tell your system where these services are located instead of relying on a third party to instead let you&amp;nbsp;know.&lt;/p&gt;</content><category term="email"></category><category term="gmail"></category></entry><entry><title>Facebook gets linked account support</title><link href="https://www.rsreese.com/facebook-gets-linked-account-support/" rel="alternate"></link><published>2009-05-20T03:04:00-04:00</published><updated>2009-05-20T03:04:00-04:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2009-05-20:/facebook-gets-linked-account-support/</id><summary type="html">Now you can logon to your Facebook account through several providers such as Google, Myspace and OpenId which IMO is great (I’m lazy). Just go to Settings, Account Settings and Linked Accounts. You can even pick multiple providers. One cool part is my openID provider VeriSign can be setup …</summary><content type="html">&lt;p&gt;Now you can logon to your Facebook account through several providers
such as Google, Myspace and OpenId which &lt;span class="caps"&gt;IMO&lt;/span&gt; is great (I&amp;#8217;m lazy). Just
go to Settings, Account Settings and Linked Accounts. You can even pick
multiple providers. One cool part is my openID provider VeriSign can be
setup to use two factor authentication to help provide a little more
security amongst all of the chaos. See &lt;a href="https://pip.verisignlabs.com/"&gt;https://pip.verisignlabs.com&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Update 1 - As of now Google as a Linked Account is not logging me in
though &lt;span class="lgtxtBl"&gt;pip.verisignlabs.com is still working&amp;nbsp;well.&lt;/p&gt;
&lt;p&gt;Update 2 - My Google account will log me into FaceBook once I have
authenticated via Gmail.&lt;br&gt;
&lt;/span&gt;&lt;/p&gt;</content><category term="facebook"></category><category term="social networking"></category></entry><entry><title>Installing Sun Java on Debian Lenny</title><link href="https://www.rsreese.com/installing-sun-java-on-debian-lenny/" rel="alternate"></link><published>2009-05-15T15:04:00-04:00</published><updated>2009-05-15T15:04:00-04:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2009-05-15:/installing-sun-java-on-debian-lenny/</id><summary type="html">The Sun Java JDK is available in the Debian Lenny non-free repository, therefore you must modify /etc/apt/sources.list: $ sudo vi /etc/apt/sources.list Add non-free to the Debian Lenny repositories: deb http://mirrors.kernel.org/debian/ lenny main non-freedeb-src http://mirrors.kernel.org/debian/ lenny main non-free …</summary><content type="html">&lt;p&gt;The Sun Java &lt;span class="caps"&gt;JDK&lt;/span&gt; is available in the Debian Lenny non-free repository, therefore you must modify&amp;nbsp;/etc/apt/sources.list:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ sudo vi /etc/apt/sources.list
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Add non-free to the Debian Lenny&amp;nbsp;repositories:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="k"&gt;deb&lt;/span&gt; &lt;span class="s"&gt;http://mirrors.kernel.org/debian/&lt;/span&gt; &lt;span class="kp"&gt;lenny&lt;/span&gt; &lt;span class="kp"&gt;main&lt;/span&gt; &lt;span class="kp"&gt;non-freedeb-src&lt;/span&gt; &lt;span class="kp"&gt;http://mirrors.kernel.org/debian/&lt;/span&gt; &lt;span class="kp"&gt;lenny&lt;/span&gt; &lt;span class="kp"&gt;main&lt;/span&gt; &lt;span class="kp"&gt;non-free&lt;/span&gt;
&lt;span class="k"&gt;deb&lt;/span&gt; &lt;span class="s"&gt;http://security.debian.org/&lt;/span&gt; &lt;span class="kp"&gt;lenny/updates&lt;/span&gt; &lt;span class="kp"&gt;main&lt;/span&gt; &lt;span class="kp"&gt;non-freedeb-src&lt;/span&gt; &lt;span class="kp"&gt;http://security.debian.org/&lt;/span&gt; &lt;span class="kp"&gt;lenny/updates&lt;/span&gt; &lt;span class="kp"&gt;main&lt;/span&gt; &lt;span class="kp"&gt;non-free&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Run&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ sudo apt-get update
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Install the Java &lt;span class="caps"&gt;JDK&lt;/span&gt; as&amp;nbsp;follows:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ sudo apt-get install sun-java6-jdk
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Make it available system&amp;nbsp;wide:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ sudo update-java-alternatives -s java-6-sun &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;JAVA_HOME=&amp;quot;/usr/lib/jvm/java-6-sun&amp;quot;&amp;#39;&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt; tee -a /etc/environment
&lt;/pre&gt;&lt;/div&gt;</content><category term="java"></category><category term="linux"></category></entry><entry><title>Debian Backup Script</title><link href="https://www.rsreese.com/debian-backup-script/" rel="alternate"></link><published>2009-03-02T01:30:00-05:00</published><updated>2009-03-02T01:30:00-05:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2009-03-02:/debian-backup-script/</id><summary type="html">The script is located here. It can update the software repository, backup the file system, and send the backup to another machine via SSH. Feel free to try it out and let me know if you have any issues. Shell script to update Debian system via APT. Backup systems and …</summary><content type="html">&lt;p&gt;The script is located &lt;a href="https://github.com/rsreese/debian-update-script"&gt;here&lt;/a&gt;. It can update the software repository, backup the file system, and send the backup to another machine via &lt;span class="caps"&gt;SSH&lt;/span&gt;. Feel free to try it out and let me know if you have any&amp;nbsp;issues. &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Shell script to update Debian system via &lt;span class="caps"&gt;APT&lt;/span&gt;.  &lt;/li&gt;
&lt;li&gt;Backup systems and send the backups to remote&amp;nbsp;systems  &lt;/li&gt;
&lt;li&gt;MySQL&amp;nbsp;backup  &lt;/li&gt;
&lt;li&gt;Encrypted backups&amp;nbsp;available  &lt;/li&gt;
&lt;li&gt;System information like disc usage, network&amp;nbsp;traffic  &lt;/li&gt;
&lt;li&gt;Log file output from&amp;nbsp;syslog&lt;/li&gt;
&lt;/ul&gt;</content><category term="backups"></category><category term="linux"></category></entry><entry><title>A few simple computing tips</title><link href="https://www.rsreese.com/a-few-simple-computing-tips/" rel="alternate"></link><published>2009-02-10T01:46:00-05:00</published><updated>2009-02-10T01:46:00-05:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2009-02-10:/a-few-simple-computing-tips/</id><summary type="html">Here’s a short list of safe computing tips that may help you stay safe. \1. Passwords, use complex passwords and do not use the same password for MySpace/Facebook as you do for your banking website. This is an easy habit to get into so try to break the …</summary><content type="html">&lt;p&gt;Here&amp;#8217;s a short list of safe computing tips that may help you stay&amp;nbsp;safe.&lt;/p&gt;
&lt;p&gt;\1. Passwords, use complex passwords and do not use the same password
for MySpace/Facebook as you do for your banking website. This is an easy
habit to get into so try to break the mold and use something complex
that uses numbers, letters, and special&amp;nbsp;characters.&lt;/p&gt;
&lt;p&gt;\2. Encryption, this is a must for notebooks and other portable devices.
Most individuals do not think about it until the worst happens but how
bad would it suck to have your notebook or whatever stolen and then the
thief happen to be intelligent enough to data mine through you drive to
find credit card numbers or whatever other goodies they could use to
steal your identity. There are some good free encryption software
packages out there so do a little&amp;nbsp;research.&lt;/p&gt;
&lt;p&gt;\3. Avoid intercepted data. Most people do not think about how the data
gets from their web browser to it&amp;#8217;s destination but I can tell you a
majority of the time your data that is trans-versing networks that you
have no control over is probably unencrypted therefore not secure and up
for being intercepted. Pay attention to what you say over instant
messaging and other forms of communication as you would be very
surprised as to whom might be listening and worse capturing your&amp;nbsp;information.&lt;/p&gt;
&lt;p&gt;\4. Backups, the medium in which your data resides on more then likely
has a shelf life so a little thought in regards to backing up your data
can go a long way if data becomes corrupt, drive failure, or by
malicious&amp;nbsp;means.&lt;/p&gt;</content><category term="backups"></category><category term="passwords"></category></entry><entry><title>New RSS feed</title><link href="https://www.rsreese.com/new-rss-feed/" rel="alternate"></link><published>2009-01-23T04:19:00-05:00</published><updated>2009-01-23T04:19:00-05:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2009-01-23:/new-rss-feed/</id><summary type="html">Tinkering as usual I was check out my FeedBurner feeds for accuracy since I have heard through the grapevine that a number of users are having problems with incorrect feed statistics when using FeedBurner. My statistics seem to be fine (not like anyone subscribes anyhow :-). It was interesting that Google …</summary><content type="html">&lt;p&gt;Tinkering as usual I was check out my &lt;a href="http://www.feedburner.com/fb/a/home"&gt;FeedBurner&lt;/a&gt; feeds for accuracy
since I have heard through the grapevine that a number of users are
having problems with incorrect feed statistics when using FeedBurner. My
statistics seem to be fine (not like anyone subscribes anyhow :-). It
was interesting that Google has acquired FeedBurner and are planning on
migrating the &lt;span class="caps"&gt;FB&lt;/span&gt; user base to Google though I have yet to receive any
notification which was disappointing&amp;#8230; The migration was painless
enough and if you feel inclined my new feed is available at:
&lt;a href="http://feedproxy.google.com/rsreese"&gt;http://feedproxy.google.com/rsreese&lt;/a&gt;.&lt;/p&gt;</content><category term="feedburner"></category></entry><entry><title>TrueCrypt on my Dell notebook</title><link href="https://www.rsreese.com/truecrypt-on-my-dell-notebook/" rel="alternate"></link><published>2008-12-19T00:23:00-05:00</published><updated>2008-12-19T00:23:00-05:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2008-12-19:/truecrypt-on-my-dell-notebook/</id><summary type="html">So I recently acquired a new notebook and I of course wanted the notebook to be secure. When I say secure I’m not just talking about preventing someone from exploiting the notebook from the wild but the problem of physical security with regards to someone stealing it. There are …</summary><content type="html">&lt;p&gt;So I recently acquired a new notebook and I of course wanted the
notebook to be secure. When I say secure I&amp;#8217;m not just talking about
preventing someone from exploiting the notebook from the wild but the
problem of physical security with regards to someone stealing it. There
are a number of commercial tools out there to provide whole disk
encryption (&lt;span class="caps"&gt;WDE&lt;/span&gt;) but I really did not want to spend the money so I
decided to get &lt;a href="http://www.truecrypt.org/docs/?s=system-encryption"&gt;TrueCrypt&lt;/a&gt; a shot. I&amp;#8217;ve been using it for sometime to
encrypt data on a few backup drives I have but never a system drive. The
&lt;a href="http://www.truecrypt.org/docs/?s=system-encryption"&gt;process&lt;/a&gt; is completely painless. I decided to stick with the
&lt;a href="http://www.truecrypt.org/docs/?s=aes"&gt;&lt;span class="caps"&gt;AES&lt;/span&gt;&lt;/a&gt; algorithm since it&amp;#8217;s less hardware intense but be aware there
are stronger encryption schemes available from the product. I also
recommend making a backup disk and testing it! Secondly do &lt;span class="caps"&gt;NOT&lt;/span&gt; lose your
key or you will not get into the system so it may be ideal to make
backups and place them on another medium just in&amp;nbsp;case&amp;#8230;&lt;/p&gt;
&lt;p&gt;At this point I&amp;#8217;m rather happy with TrueCrypt the performance is great
and how cool is it having the piece of mind that if someone decides to
take your hardware, it is currently impossible for them to retrieve your&amp;nbsp;data.&lt;/p&gt;</content><category term="encryption"></category><category term="truecrypt"></category></entry><entry><title>Using session-monitor to span ports as an aggregation tap</title><link href="https://www.rsreese.com/using-session-monitor-to-span-ports-as-an-aggregation-tap/" rel="alternate"></link><published>2008-10-17T20:13:00-04:00</published><updated>2008-10-17T20:13:00-04:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2008-10-17:/using-session-monitor-to-span-ports-as-an-aggregation-tap/</id><summary type="html">Like most I do not have the funds to purchase a $1000 port aggregation tap for my IDS to monitor traffic so instead I just used a 2950 Cisco Switch: ! interface FastEthernet0/1 switchport access vlan 100 duplex full ! interface FastEthernet0/2 switchport access vlan 100 duplex full ! interface FastEthernet0 …</summary><content type="html">&lt;p&gt;Like most I do not have the funds to purchase a $1000 port aggregation
tap for my &lt;span class="caps"&gt;IDS&lt;/span&gt; to monitor traffic so instead I just used a 2950 Cisco&amp;nbsp;Switch:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;
&lt;span class="kr"&gt;interface&lt;/span&gt; &lt;span class="nx"&gt;FastEthernet0&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;
&lt;span class="nx"&gt;switchport&lt;/span&gt; &lt;span class="nx"&gt;access&lt;/span&gt; &lt;span class="nx"&gt;vlan&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;
&lt;span class="nx"&gt;duplex&lt;/span&gt; &lt;span class="nx"&gt;full&lt;/span&gt;
&lt;span class="o"&gt;!&lt;/span&gt;
&lt;span class="kr"&gt;interface&lt;/span&gt; &lt;span class="nx"&gt;FastEthernet0&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;
&lt;span class="nx"&gt;switchport&lt;/span&gt; &lt;span class="nx"&gt;access&lt;/span&gt; &lt;span class="nx"&gt;vlan&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;
&lt;span class="nx"&gt;duplex&lt;/span&gt; &lt;span class="nx"&gt;full&lt;/span&gt;
&lt;span class="o"&gt;!&lt;/span&gt;
&lt;span class="kr"&gt;interface&lt;/span&gt; &lt;span class="nx"&gt;FastEthernet0&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;
&lt;span class="o"&gt;!&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;so the first two ports are where the traffic comes in and back out to
the destination device, the third will go to my network sensor. Next
let us setup the port&amp;nbsp;spanning.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;!
monitor session 1 source interface Fa0/1
monitor session 1 destination interface Fa0/3
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Note that you may check other options such as spanning multiple ports or
even&amp;nbsp;vlans.&lt;/p&gt;</content><category term="ids"></category><category term="network tap"></category></entry><entry><title>Using metasploit to pwn MS06-067</title><link href="https://www.rsreese.com/using-metasploit-to-pwn-ms06-067/" rel="alternate"></link><published>2008-10-10T00:02:00-04:00</published><updated>2008-10-10T00:02:00-04:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2008-10-10:/using-metasploit-to-pwn-ms06-067/</id><summary type="html">In a graduate course I was taking, our professor wanted us to tool around with the Metasploit project. This tool makes quick work of exploiting vulnerabilities. After the client takes the opens the link, I ran ‘ipconfig’ to ensure I had remote connectivity. Here a shell that I ran ‘ipconfig …</summary><content type="html">&lt;p&gt;In a graduate course I was taking, our professor wanted us to tool around with the &lt;a href="http://www.metasploit.com/"&gt;Metasploit&lt;/a&gt; project. This tool makes quick work of exploiting vulnerabilities. After the client takes the opens the link, I ran &amp;#8216;ipconfig&amp;#8217; to ensure I had remote&amp;nbsp;connectivity.&lt;/p&gt;
&lt;p&gt;&lt;img alt="image1" src="https://www.rsreese.com/assets/SPVI4KP-725225.PNG"&gt;&lt;/p&gt;
&lt;p&gt;Here a shell that I ran &amp;#8216;ipconfig&amp;#8217; on just to confirm the&amp;nbsp;operation.&lt;/p&gt;
&lt;p&gt;&lt;img alt="image3" src="https://www.rsreese.com/assets/SPVI4KO-777718.PNG"&gt;&lt;/p&gt;</content><category term="exploits"></category><category term="metasploit"></category></entry><entry><title>Erase slack space on Microsoft Vista</title><link href="https://www.rsreese.com/erase-slack-space-on-microsoft-vista/" rel="alternate"></link><published>2008-10-03T04:34:00-04:00</published><updated>2008-10-03T04:34:00-04:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2008-10-03:/erase-slack-space-on-microsoft-vista/</id><summary type="html">A lot of information may be stored on a drives slack space. If you want to get rid of these artifacts then run the usual tools to clean up the system like ‘Disk Cleanup’, ‘Defrag’, etc.. and then run the following command. C:\Users\Crypto&gt;cipher.exe /w:C: To …</summary><content type="html">&lt;p&gt;A lot of information may be stored on a drives &lt;a href="http://en.wikipedia.org/wiki/Fragmentation_%28computer%29"&gt;slack space&lt;/a&gt;. If you
want to get rid of these artifacts then run the usual tools to clean up
the system like &amp;#8216;Disk Cleanup&amp;#8217;, &amp;#8216;Defrag&amp;#8217;, etc.. and then run the
following&amp;nbsp;command.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;C:\Users\Crypto&amp;gt;cipher.exe /w:C:  
To remove as much data as possible, please close all other applications while
running CIPHER /W.
Writing 0x00...................................................................................................
Writing 0xFF...................................................................................................
Writing Random Numbers.........................................................................................
&lt;/pre&gt;&lt;/div&gt;</content></entry><entry><title>Gentoo Linux auto update script</title><link href="https://www.rsreese.com/gentoo-linux-auto-update-script/" rel="alternate"></link><published>2008-09-08T04:14:00-04:00</published><updated>2008-09-08T04:14:00-04:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2008-09-08:/gentoo-linux-auto-update-script/</id><summary type="html">A script that I had been using for sometime to update my Gentoo servers needed a few additions in my opinion. I spoke to the original developer of the script and he allowed me to make additions to the script and post them here on Google’s code hosting server …</summary><content type="html">&lt;p&gt;A script that I had been using for sometime to update my Gentoo servers
needed a few additions in my opinion. I spoke to the &lt;a href="http://monkey-house-org.blogspot.com/2007/06/gentoo-auto-update-scripts.html"&gt;original
developer&lt;/a&gt; of the script and he allowed me to make additions to the
script and post them &lt;a href="http://code.google.com/p/gentoo-update-script/"&gt;here&lt;/a&gt; on Google&amp;#8217;s code hosting server. The
following is a basic description of the script. So if you&amp;#8217;re looking for
something to update your Gentoo boxes then cruise over and pickup a&amp;nbsp;copy.&lt;/p&gt;
&lt;p&gt;&lt;span class="dquo"&gt;&amp;#8220;&lt;/span&gt;Shell script for Gentoo Linux to preform nightly system administration
tasks from a cron job. This is reminiscent of OpenBSD&amp;#8217;s /etc/daily,
weekly, monthly scripts. Includes auto updating for Nikto, Snort sigs,
and Nessus plugins. Also includes MySQL dump support, file system
backups, and remote backups via &lt;span class="caps"&gt;SSH&lt;/span&gt;/rysnc.&amp;#8221;&lt;/p&gt;</content><category term="shell scripting"></category></entry><entry><title>Mounting drives/volumes read-only in Microsoft Windows (Vista)</title><link href="https://www.rsreese.com/mounting-drivesvolumes-read-only-in-microsoft-windows-vista/" rel="alternate"></link><published>2008-08-05T21:35:00-04:00</published><updated>2008-08-05T21:35:00-04:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2008-08-05:/mounting-drivesvolumes-read-only-in-microsoft-windows-vista/</id><summary type="html">I needed to analyze a drive for a company that suspects an ex-employee may have taken corporate material (training exercise or else I would use a hardware write blocker and follow a chain of custody). I do not have a write blocker and rather then fire up a copy of …</summary><content type="html">&lt;p&gt;I needed to analyze a drive for a company that suspects an ex-employee
may have taken corporate material (training exercise or else I would use
a hardware write blocker and follow a chain of custody). I do not have a
write blocker and rather then fire up a copy of Helix or a similar tool
a my spare machine (which is painfully slow) I would rather perform
analysis on my workstation. Most of this information was derived from
this &lt;a href="http://www.microsoft.com/communities/newsgroups/list/en-us/default.aspx?dg=microsoft.public.windows.file_system&amp;amp;tid=4b1a14f7-6bd2-4c9f-ae64-df57c35712bf&amp;amp;cat=&amp;amp;lang=&amp;amp;cr=&amp;amp;sloc=&amp;amp;p=1"&gt;post&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;First step is to disable auto mounting of devices in Microsoft Vista by
running &amp;#8216;cmd&amp;#8217; in an administrative user context and then execute
&amp;#8216;mountvol /N&amp;#8217; to enable readonly mounting of newly attached drives and&amp;nbsp;volumes.&lt;/p&gt;
&lt;p&gt;&lt;img alt="image" src="https://www.rsreese.com/assets/mountvol-729035.jpg"&gt;&lt;/p&gt;
&lt;p&gt;Here is how to list the drives and&amp;nbsp;volumes:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;DISKPART&amp;gt; list disk
Disk ###  Status      Size     Free     Dyn  Gpt
--------  ----------  -------  -------  ---  ---
Disk 0    Online       233 GB      0 B
Disk 1    Online       932 GB      0 B        *
Disk 2    Online       932 GB      0 B        *
Disk 3    No Media        0 B      0 B
Disk 4    Online      3911 MB      0 B

DISKPART&amp;gt; list vol
Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
----------  ---  -----------  -----  ----------  -------  ---------  --------
Volume 0     E                       DVD-ROM         0 B  No Media
Volume 1     H   BLACK_DAHLI  UDF    DVD-ROM     3214 MB  Healthy
Volume 2     F   U3 System    CDFS   CD-ROM         8 MB  Healthy
Volume 3     C                NTFS   Partition    233 GB  Healthy    System
Volume 4     D   data         NTFS   Partition    931 GB  Healthy
Volume 5                             Partition    931 GB  Healthy
Volume 6     G                       Removable       0 B  No Media
Volume 7     I                FAT32  Removable   3911 MB  Healthy
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;&lt;img alt="image2" src="https://www.rsreese.com/assets/readonly-removable-714947.jpg"&gt;&lt;/p&gt;
&lt;p&gt;So I decided to try a spare drive in the system and I found that when attempting to mount a TrueCrypt volume I got an error telling me that auto-mount is not support and I would have to re-enable&amp;nbsp;it.&lt;/p&gt;
&lt;p&gt;&lt;img alt="image3" src="https://www.rsreese.com/assets/truecrypt-nomount-795930.jpg"&gt;&lt;/p&gt;
&lt;p&gt;Continuing on my quest I was able to mount a spare hard drive volume read only, note you may also set the whole disk to read&amp;nbsp;only.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;DISKPART&amp;gt; select volume 5

Volume 5 is the selected volume.

DISKPART&amp;gt; att vol set readonly

Volume attributes set successfully.

DISKPART&amp;gt; detail vol

Disk ###  Status      Size     Free     Dyn  Gpt
--------  ----------  -------  -------  ---  ---
* Disk 2    Online       932 GB      0 B        *

Read-only              : Yes
Hidden                 : No
No Default Drive Letter: Yes
Shadow Copy            : No
Dismounted             : Yes
BitLocker Encrypted    : No
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;The next step will clear the read only&amp;nbsp;status.&lt;/p&gt;
&lt;p&gt;&lt;span class="caps"&gt;DISKPART&lt;/span&gt;&gt; att vol clear readonly&lt;br&gt;
Volume attributes cleared&amp;nbsp;successfully.&lt;/p&gt;
&lt;p&gt;Do not forget you may want to enable auto mounting&amp;nbsp;again.&lt;/p&gt;
&lt;p&gt;C:\Windows\system32&gt;mountvol&amp;nbsp;/N&lt;/p&gt;
&lt;p&gt;A second and much easier alternative for &lt;span class="caps"&gt;USB&lt;/span&gt; devices is a small
application that changes a registry entry called &lt;a href="http://www.irongeek.com/i.php?page=security/thumbscrew-software-usb-write-blocker"&gt;ThumbScrew&lt;/a&gt;. It
alters a registry entry and though there is no guarantee that windows
still will not access the drive it is a quick fix for this scenario. My
plan is to use both methods. First disable the registry setting and then
using drive part set the read only&amp;nbsp;flag.&lt;/p&gt;
&lt;p&gt;If you have any ideas about mounting drives in a Windows environment
then please feel free to contact me and tell me about&amp;nbsp;it.&lt;/p&gt;</content><category term="windows"></category><category term="forensics"></category></entry><entry><title>Converting Microsoft OS to VMWare Guest</title><link href="https://www.rsreese.com/converting-microsoft-os-to-vmware-guest/" rel="alternate"></link><published>2008-07-30T01:03:00-04:00</published><updated>2008-07-30T01:03:00-04:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2008-07-30:/converting-microsoft-os-to-vmware-guest/</id><summary type="html">A friend had two notebooks running Microsoft XP Home and Professional editions in which the notebooks were no longer functional but the hard drives were in good shape so I recommend running them in a VM guest. I knew I could use VMWare converter tool that was freely available and …</summary><content type="html">&lt;p&gt;A friend had two notebooks running Microsoft &lt;span class="caps"&gt;XP&lt;/span&gt; Home and Professional
editions in which the notebooks were no longer functional but the hard
drives were in good shape so I recommend running them in a &lt;span class="caps"&gt;VM&lt;/span&gt; guest. I
knew I could use VMWare converter tool that was freely available and it
supports converting from live hosts and images created from several
software programs. I was disappointed to find that VMWares converter
would not convert from Ghost enterprise (*.gho) images, but the latest
version of Symantec Norton Ghost 14.0 would so I created images of the&amp;nbsp;drives.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screen Shot" src="https://www.rsreese.com/assets/recoverypoint-733882.jpg"&gt;&lt;/p&gt;
&lt;p&gt;After the images were created I next fired up VMWares converter and let perform its&amp;nbsp;magic.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Screen Shot" src="https://www.rsreese.com/assets/vmconvert-734505.jpg"&gt;&lt;/p&gt;
&lt;p&gt;This operation performed flawlessly. I ran both notebook
images with two hitches, I had to reactivate both &lt;span class="caps"&gt;XP&lt;/span&gt; installations
because running the guests inside VMWare workstation caused the
operating system to assume it was running a different hardware but this
wasn not a big deal. The second problem was trying to run the guest
operating systems in VMWares free server product. I received an error
message that the guest were created with more capabilities then what
VMWare server could handle so the friend decided to purchase the
workstation product in order to run the&amp;nbsp;products.&lt;/p&gt;</content><category term="windows"></category><category term="vmware"></category></entry><entry><title>Converting Microsoft Vista from one version to another</title><link href="https://www.rsreese.com/converting-microsoft-vista-from-one-version-to-another/" rel="alternate"></link><published>2008-07-19T04:37:00-04:00</published><updated>2008-07-19T04:37:00-04:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2008-07-19:/converting-microsoft-vista-from-one-version-to-another/</id><summary type="html">A desktop that I had which was used for work recently would not activate because it required connectivity to the companies KMS server which I would connect to via VPN to complete but since I no longer work there that is out of the question. Since the Vista OS was …</summary><content type="html">&lt;p&gt;A desktop that I had which was used for work recently would not activate
because it required connectivity to the companies &lt;span class="caps"&gt;KMS&lt;/span&gt; server which I
would connect to via &lt;span class="caps"&gt;VPN&lt;/span&gt; to complete but since I no longer work there
that is out of the question. Since the Vista &lt;span class="caps"&gt;OS&lt;/span&gt; was an enterprise version
I had no way to purchase a license for it. I did however have a Vista
Business license that is legit so I wanted to migrate to it from the
version of Vista&amp;nbsp;Enterprise.&lt;/p&gt;
&lt;p&gt;First make sure that everything near and dear is backed up in case
something goes&amp;nbsp;screwy.&lt;/p&gt;
&lt;p&gt;Before inserting the Windows Vista &lt;span class="caps"&gt;CD&lt;/span&gt;&lt;br&gt;
Go to, Start, Run: and type: regedit.exe&lt;br&gt;
Go to HKEY_LOCAL_MACHINE\&lt;span class="caps"&gt;SOFTWARE&lt;/span&gt;\Microsoft\Windows
&lt;span class="caps"&gt;NT&lt;/span&gt;\CurrentVersion&lt;br&gt;
Change the key : ProductName from &amp;#8220;Windows Vista ™ Enterprise” to
“Windows Vista ™ Business”&lt;br&gt;
Change the key: EditionID from &amp;#8220;Enterprise&amp;#8221; to&amp;nbsp;“Business”&lt;/p&gt;
&lt;p&gt;Do not&amp;nbsp;restart&lt;/p&gt;
&lt;p&gt;Now insert Windows Vista &lt;span class="caps"&gt;CD&lt;/span&gt; and start upgrading (the option Upgrade will
not be graded out&amp;nbsp;anymore)&lt;/p&gt;
&lt;p&gt;A copy of program/drivers had to be reinstalled but much easier solution
for me then reinstalling everything which is usually a week long process
it seems like&amp;nbsp;now.&lt;/p&gt;</content><category term="windows"></category></entry><entry><title>Domain registrars spamming sub-domains?</title><link href="https://www.rsreese.com/domain-registrars-spamming-sub-domains/" rel="alternate"></link><published>2008-07-03T02:31:00-04:00</published><updated>2008-07-03T02:31:00-04:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2008-07-03:/domain-registrars-spamming-sub-domains/</id><summary type="html">In the process of setting up some virtual servers (slices) from www.slicehost.com I had to move the name servers around along with a migration to Google web apps. A user called complaining that they could not access the web-mail service. The user was trying to access www.mail …</summary><content type="html">&lt;p&gt;In the process of setting up some virtual servers (slices) from
&lt;a href="http://www.slicehost.com"&gt;www.slicehost.com&lt;/a&gt; I had to move the name servers around along with a
migration to Google web apps. A user called complaining that they could
not access the web-mail service. The user was trying to access
www.mail.domain.com instead of mail.domain.com which a &lt;span class="caps"&gt;DNS&lt;/span&gt; record had
yet to be setup for and we weren&amp;#8217;t planning on it. To our surprise there
was a page there though, a place holder with some nasty pop-ups. We
immediately added a record for this entry to kill it but it makes me
wonder how many other sub-domains have been compromised? The registrar
was &lt;a href="http://www.godaddy.com"&gt;www.godaddy.com&lt;/a&gt;, we will be migrating to a new one very&amp;nbsp;soon.&lt;/p&gt;</content><category term="registrar"></category></entry><entry><title>Encrypting a secondary drive (PGP or TrueCrypt)</title><link href="https://www.rsreese.com/encrypting-a-secondary-drive-pgp-or-truecrypt/" rel="alternate"></link><published>2008-05-15T00:05:00-04:00</published><updated>2008-05-15T00:05:00-04:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2008-05-15:/encrypting-a-secondary-drive-pgp-or-truecrypt/</id><summary type="html">In this post I am going to share my experiences with encrypting a secondary drive in a Windows Vista environment. The hardware is a Dell Optiplex core 2 duo. I will be encrypting a 1 terabyte Hitachi drive which I use primarily for storage. The first piece of software I …</summary><content type="html">&lt;p&gt;In this post I am going to share my experiences with encrypting a
secondary drive in a Windows Vista&amp;nbsp;environment.&lt;/p&gt;
&lt;p&gt;The hardware is a Dell Optiplex core 2 duo. I will be encrypting a 1
terabyte Hitachi drive which I use primarily for&amp;nbsp;storage.&lt;/p&gt;
&lt;p&gt;The first piece of software I tried is &lt;a href="http://www.pgp.com"&gt;&lt;span class="caps"&gt;PGP&lt;/span&gt; Desktop&lt;/a&gt;. When setting up
the drives the first thing I noticed when partitioning them through
windows is I have a choice of boot record formats. As of this post &lt;span class="caps"&gt;PGP&lt;/span&gt;
Desktop did not even see a partition when a drive was initialized as
&lt;a href="http://en.wikipedia.org/wiki/GUID_Partition_Table"&gt;&lt;span class="caps"&gt;GPT&lt;/span&gt;&lt;/a&gt; though it did not have a problem with the standard &lt;a href="http://en.wikipedia.org/wiki/Mbr"&gt;&lt;span class="caps"&gt;MBR&lt;/span&gt;&lt;/a&gt; type.
I also attempted encrypting as a &lt;span class="caps"&gt;MBR&lt;/span&gt; type and then converting it to &lt;span class="caps"&gt;GPT&lt;/span&gt;.
&lt;span class="caps"&gt;PGP&lt;/span&gt; Desktop removed its encryption status when I did this therefore I
would not recommend trying that ;-). This concerned me since I am
planning on implementing a raid solution and do not want to be limited to
2 terabytes by the drive table type. Regardless I went with the &lt;span class="caps"&gt;MBR&lt;/span&gt;
style in order to allow &lt;span class="caps"&gt;PGP&lt;/span&gt; Desktop to play nicely. I imagine their
product will support the newer format in the future. Encrypting a
terabyte of data took all of the 12 hours for &lt;span class="caps"&gt;AES&lt;/span&gt;-256 which is what the
tell-tell meter said it would. Once encrypted it acted just like a
regular drive and upon restarting the Vista &lt;span class="caps"&gt;OS&lt;/span&gt; it prompted for a
pass-phrase. Pretty simple and&amp;nbsp;clean.&lt;/p&gt;
&lt;p&gt;On a side note when I broke &lt;span class="caps"&gt;PGP&lt;/span&gt; desktop encryption on the drive I had to
do the following to remove the bootguard since it resides on the boot&amp;nbsp;drive:&lt;/p&gt;
&lt;p&gt;Decrypting from a Command&amp;nbsp;Line&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;From the command line, type pgpwde &amp;#8212;decrypt &amp;#8212;disk 0 (or the disk
in question) &amp;#8212;passphrase &amp;#8220;enter passphrase here within double quotes&amp;#8221;
and press the enter key. The disk will then decrypt. The &lt;span class="caps"&gt;PGP&lt;/span&gt; Whole Disk
status icon will be turning around in the system tray to show you
decryption is in&amp;nbsp;progress:&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Once decryption is complete, see if the disk is still instrumented
by bootguard by typing the &amp;#8212;status command listed above. If the drive
is not encrypted, the hard drive should boot normally. If the drive is
still instrumented, but no highwater, proceed to the next&amp;nbsp;steps.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;a href="http://www.truecrypt.org/"&gt;Truecrypt&lt;/a&gt; was my next contestant. This appeals because of the great
support that many open source solutions provide from the community.
There are several algorithm options with TrueCrypt. I decide to go with
the &lt;span class="caps"&gt;AES&lt;/span&gt;-Serpent combination but benchmark was a little off though. When
creating the volume it also took around 10 hours for the terabyte volume
averaging about 25 &lt;span class="caps"&gt;MB&lt;/span&gt;/s which means the &lt;span class="caps"&gt;AES&lt;/span&gt; solo algorithm probably
would have taken half of the&amp;nbsp;time.&lt;/p&gt;
&lt;p&gt;I had some problems with the Truecrypt setup as well. The first round I
was warned about existing partitions so I deleted everything and let &lt;span class="caps"&gt;TC&lt;/span&gt;
encrypt the device (drive) instead of a partition which didn&amp;#8217;t work so
well. I learned it is recommended to encrypt a partition instead of the
whole physical drive so I used the disk management snap-in via Vista&amp;#8217;s
Administrative Tools to first create the partition using the &lt;span class="caps"&gt;GPT&lt;/span&gt; style
partition and let TrueCrypt format the drive using &lt;span class="caps"&gt;NTFS&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;I have decided to stick with TrueCrypt over &lt;span class="caps"&gt;PGP&lt;/span&gt; Desktop because it&amp;#8217;s
free and it let me use the &lt;span class="caps"&gt;GPT&lt;/span&gt; style partitioning scheme. There are
benefits to using &lt;span class="caps"&gt;PGP&lt;/span&gt;&amp;#8217;s suite because it also includes email and instant
messaging encryption tools amongst others but there is a fee for using
the software beyond the demo&amp;nbsp;period.&lt;/p&gt;</content><category term="encryption"></category><category term="truecrypt"></category></entry><entry><title>Force Outlook to open all email in plain text</title><link href="https://www.rsreese.com/force-outlook-to-open-all-email-in-plain-text/" rel="alternate"></link><published>2008-02-12T03:51:00-05:00</published><updated>2008-02-12T03:51:00-05:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2008-02-12:/force-outlook-to-open-all-email-in-plain-text/</id><summary type="html">For reference. Strip HTML email in Outlook into plain text Content: First, this is secure as many of the worms and bugs rely on HTML script code. One good example could be the needless advertisements or images sent inside spam (junk) emails. When you so much as view an email …</summary><content type="html">&lt;p&gt;For&amp;nbsp;reference.&lt;/p&gt;
&lt;p&gt;Strip &lt;span class="caps"&gt;HTML&lt;/span&gt; email in Outlook into plain text Content: First, this is
secure as many of the worms and bugs rely on &lt;span class="caps"&gt;HTML&lt;/span&gt; script code. One good
example could be the needless advertisements or images sent inside spam
(junk) emails. When you so much as view an email inside your email
software, the senders webserver gets a timestamp of you having accessed
the image. This of course does not happen with plain text, because
there&amp;#8217;s no image, so there is no inadvertent&amp;nbsp;access?.&lt;/p&gt;
&lt;p&gt;Second, it is also a bit faster to download and view email that doesn&amp;#8217;t
have all the unnecessary frills of &lt;span class="caps"&gt;HTML&lt;/span&gt; email (tables, bold, italics&amp;nbsp;etc).&lt;/p&gt;
&lt;p&gt;Start | Run | regedit Find this key:
HKEY_CURRENT_USER\Software\Microsoft\Office\&lt;br&gt;
10.0\Outlook\Options\Mail On the Edit menu, point to New, and then
click DWord Value. With the new Dword value selected, type ReadAsPlain.
Double-click the new value to open it. In the Value Data box, type 1,
and then click &lt;span class="caps"&gt;OK&lt;/span&gt;. Click &lt;span class="caps"&gt;OK&lt;/span&gt;, and then quit Registry Editor. Just to be
sure, close Outlook and restart it. From now on, all your &lt;span class="caps"&gt;HTML&lt;/span&gt; email
messages will show up as simple text. After you turn on the Read as
Plain Text? feature, users notice the following&amp;nbsp;changes:&lt;/p&gt;
&lt;p&gt;The changes are applied to the preview pane and open messages. Pictures
become attachments to avoid loss. Digitally signed messages are not&amp;nbsp;affected.&lt;/p&gt;</content><category term="microsoft windows"></category></entry><entry><title>Disable fast user switching on Vista</title><link href="https://www.rsreese.com/disable-fast-user-switching-on-vista/" rel="alternate"></link><published>2008-02-12T03:49:00-05:00</published><updated>2008-02-12T03:49:00-05:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2008-02-12:/disable-fast-user-switching-on-vista/</id><summary type="html">In Vista (unlike Windows XP), Fast User Switching works if you’re on a network domain. To turn off Fast User Switching, choose Start, type gpedit.msc in the Search box, and then press Enter. (If a security prompt appears, type an administrator password or confirm the action.) In the …</summary><content type="html">&lt;p&gt;In Vista (unlike Windows &lt;span class="caps"&gt;XP&lt;/span&gt;), Fast User Switching works if you’re on a
network domain. To turn off Fast User Switching, choose Start, type
gpedit.msc in the Search box, and then press Enter. (If a security
prompt appears, type an administrator password or confirm the action.)
In the Group Policy Object Editor,&amp;nbsp;choose&lt;/p&gt;
&lt;p&gt;Local Computer Policy &gt; Computer Configuration &gt; Administrative Templates &gt; System &gt; Logon &gt;  enable Hide Entry Points for Fast User Switching &gt; &lt;span class="caps"&gt;OK&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;To find out who else is logged on to your computer: 
1. Right-click an empty area of the taskbar and choose Task Manager. or Press Ctrl+Shift+Esc. 
2. Click the Users tab to view users and their&amp;nbsp;status&lt;/p&gt;</content><category term="microsoft windows"></category></entry><entry><title>Kicking a user off a linux system</title><link href="https://www.rsreese.com/kicking-a-user-off-a-linux-system/" rel="alternate"></link><published>2008-02-12T03:46:00-05:00</published><updated>2008-02-12T03:46:00-05:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2008-02-12:/kicking-a-user-off-a-linux-system/</id><summary type="html">This might break something the user is doing. You have been warned. last -i1 baduser | awk '{print $3;exit}' | xargs -p --replace iptables -A INPUT -s {} -j drop if [ "`who | grep $1`" != "" ] ; then sid=`ps -jU $1 | awk '{print $3}' | tail -1`" kill -HUP $sid echo "$1 was logged in …</summary><content type="html">&lt;p&gt;This might break something the user is doing. You have been&amp;nbsp;warned.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;last -i1 baduser | awk &amp;#39;{print $3;exit}&amp;#39; | xargs -p --replace iptables -A INPUT -s {} -j drop if [ &amp;quot;`who | grep $1`&amp;quot; != &amp;quot;&amp;quot; ] ; then sid=`ps -jU $1 | awk &amp;#39;{print $3}&amp;#39; | tail -1`&amp;quot; kill -HUP $sid echo &amp;quot;$1 was logged in. Just booted $1 out.&amp;quot; fi ps -u username | grep -v PID | awk &amp;#39;{print $1}&amp;#39; | xargs kill kill $(ps -u username | grep -v PID | awk &amp;#39;{print $1}&amp;#39;) 
&lt;/pre&gt;&lt;/div&gt;</content><category term="linux"></category></entry><entry><title>Authenicating kerberos against active directory</title><link href="https://www.rsreese.com/authenicating-kerberos-against-active-directory/" rel="alternate"></link><published>2008-02-12T03:37:00-05:00</published><updated>2008-02-12T03:37:00-05:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2008-02-12:/authenicating-kerberos-against-active-directory/</id><summary type="html">Your /etc/pam.d/system-auth is created with the command “authconfig” on a RHEL5 machine though you may have to manually edit it with other distributions: #%PAM-1.0# This file is auto-generated. # User changes will be destroyed the next time authconfig is run. auth required /lib/security/$ISA/pam_env.so …</summary><content type="html">&lt;p&gt;Your /etc/pam.d/system-auth is created with the command &amp;#8220;authconfig&amp;#8221; on
a &lt;span class="caps"&gt;RHEL5&lt;/span&gt; machine though you may have to manually edit it with other&amp;nbsp;distributions:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;#%PAM-1.0# This file is auto-generated.
# User changes will be destroyed the next time authconfig is run.
auth required /lib/security/$ISA/pam_env.so
auth sufficient /lib/security/$ISA/pam_unix.so like
auth nullokauth sufficient /lib/security/$ISA/pam_krb5.so use_first_pass
auth required /lib/security/$ISA/pam_deny.so
account required /lib/security/$ISA/pam_unix.so broken_shadow
account sufficient /lib/security/$ISA/pam_succeed_if.so uid &amp;lt; 100 quiet
account [default=bad success=ok user_unknown=ignore] /lib/security/$ISA/pam_krb5.so
account required /lib/security/$ISA/pam_permit.so
password requisite /lib/security/$ISA/pam_cracklib.so retry=3
password sufficient /lib/security/$ISA/pam_unix.so nullok use_authtok md5 shadow
password sufficient /lib/security/$ISA/pam_krb5.so use_authtok
password required /lib/security/$ISA/pam_deny.so
session required /lib/security/$ISA/pam_limits.so
session required /lib/security/$ISA/pam_unix.so
session optional /lib/security/$ISA/pam_krb5.so
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Your /etc/krb5.conf should look something like this. Your system time
must be accurate or else it will not work&amp;nbsp;correctly.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;[logging] default = FILE:/var/log/krb5libs.log kdc = FILE:/var/log/krb5kdc.log admin_server = FILE:/var/log/kadmind.log[libdefaults] default_realm = AD.DOMAIN.EDUclockskew = 300 dns_lookup_realm = false dns_lookup_kdc = false ticket_lifetime = 24h forwardable = yes[realms]UFL.EDU = { kdc = DC01.AD.DOMAIN.EDU default_domain = DOMAIN.EDU }AD.DOMAIN.EDU = { kdc = ad.domain.edu admin_server = ad.domain.edu }[domain_realm] .domain.edu = DOMAIN.EDU domain.edu = DOMAIN.EDU[kdc] profile = /var/kerberos/krb5kdc/kdc.conf[appdefaults] pam = { debug = false ticket_lifetime = 36000 renew_lifetime = 36000 forwardable = true krb4_convert = false }
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Next you need run kinit to make sure that you can contact the kerberos
server, if it returns nothing then you should be&amp;nbsp;good.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ kinitPassword &lt;span class="k"&gt;for&lt;/span&gt; rsreese@AD.DOMAIN.EDU: blahblah
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Next setup two cron entries to keep the time up to date and kinit
alive:&lt;br&gt;
$ sudo crontab&amp;nbsp;-e&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;0 23 * * 1,3,5 /usr/sbin/ntpdate time.nrc.ca0 */4 * * * kinit -R
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;The /etc/samba/smb.conf file needs to be&amp;nbsp;setup.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;# grep -Ev &amp;#39;#|;|^$&amp;#39; /etc/samba/smb.conf[global] workgroup = UFAD realm = AD.DOMAIN.EDU server string = SRVV-SERV hosts allow = 10.242. 10.228. load printers = no log file = /var/log/samba/%m.log max log size = 50 security = ads idmap uid = 10000 - 20000 idmap gid = 10000 - 20000winbind enum users=yeswinbind enum groups=yes template homedir = /home/%U template shell = /bin/bashclient use spnego = yes winbind use default domain = no encrypt passwords = yes smb passwd file = /etc/samba/smbpasswd socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192 local master = no dns proxy = no[homes] comment = %U Home Directory browseable = no path = %H valid users = %U writable = yes create mode = 0664 directory mode = 0775[printers] comment = All Printers path = /var/spool/samba browseable = no guest ok = no writable = no printable = yes
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Now add the computer object to the domain via the Active directory
&amp;#8220;Users and&amp;nbsp;Computers&amp;#8221;&lt;/p&gt;
&lt;p&gt;You need to join the linux machine to the domain. First create an
account on the domain for the machine as mentioned in the beginning or
this will fail.&lt;br&gt;
# net ads join -U&amp;nbsp;administrator&lt;/p&gt;
&lt;p&gt;SElinux needs to be told to let Samba play nicely&lt;br&gt;
# setsebool -P&amp;nbsp;samba_enable_home_dirs=1&lt;/p&gt;
&lt;p&gt;\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~&lt;span class="caps"&gt;NOT&lt;/span&gt;
&lt;span class="caps"&gt;NEEDED&lt;/span&gt;\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~&lt;br&gt;
The /etc/ldap.conf looks like&amp;nbsp;this:&lt;/p&gt;
&lt;p&gt;host 10.241.28.100&lt;br&gt;
base dc=domain,dc=edu&lt;br&gt;
uri ldap://ad.domain.edu/&lt;br&gt;
binddn rsreese@domain.edu&lt;br&gt;
bindpw&lt;br&gt;
scope sub&lt;br&gt;
pam_filter objectclass=User&lt;br&gt;
pam_login_attribute sAMAccountName&lt;br&gt;
pam_lookup_policy yes&lt;br&gt;
nss_base_passwd dc=edu?sub&lt;br&gt;
nss_base_shadow dc=edu?sub&lt;br&gt;
nss_base_group dc=edu?sub&lt;br&gt;
nss_map_objectclass posixAccount user&lt;br&gt;
nss_map_objectclass shadowAccount user&lt;br&gt;
nss_map_attribute uid sAMAccountName&lt;br&gt;
nss_map_attribute homeDirectory unixHomeDirectory&lt;br&gt;
nss_map_attribute shadowLastChange pwdLastSet&lt;br&gt;
nss_map_objectclass posixGroup group&lt;br&gt;
nss_map_attribute uniqueMember member&lt;br&gt;
pam_login_attribute sAMAccountName&lt;br&gt;
pam_filter objectclass=User&lt;br&gt;
pam_password ad&lt;br&gt;
ssl no&lt;br&gt;
tls_cacertdir /etc/openldap/cacerts&lt;br&gt;
pam_password&amp;nbsp;md5&lt;/p&gt;
&lt;p&gt;\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~&lt;span class="caps"&gt;NOT&lt;/span&gt;
&lt;span class="caps"&gt;NEEDED&lt;/span&gt;\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~&lt;br&gt;
Next I edit the /etc/nsswitch.conf to add ldap&amp;nbsp;support:&lt;/p&gt;
&lt;p&gt;passwd: files ldap&lt;br&gt;
shadow: files&lt;br&gt;
group: files ldap&lt;br&gt;
hosts: files dns&lt;br&gt;
bootparams: nisplus [&lt;span class="caps"&gt;NOTFOUND&lt;/span&gt;=return] files&lt;br&gt;
ethers: files&lt;br&gt;
netmasks: files&lt;br&gt;
networks: files&lt;br&gt;
protocols: files&lt;br&gt;
rpc: files&lt;br&gt;
services: files&lt;br&gt;
netgroup: files&lt;br&gt;
publickey: nisplus&lt;br&gt;
automount: files&lt;br&gt;
aliases: files&amp;nbsp;nisplus&lt;/p&gt;</content><category term="authentication"></category><category term="active directory"></category><category term="linux"></category></entry><entry><title>Configuring sendmail to accept mail</title><link href="https://www.rsreese.com/configuring-sendmail-to-accept-mail/" rel="alternate"></link><published>2008-02-12T03:34:00-05:00</published><updated>2008-02-12T03:34:00-05:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2008-02-12:/configuring-sendmail-to-accept-mail/</id><summary type="html">if you get ( doing a netstat -an more ) tcp 0 0 127.0.0.1:25 0.0.0.0:\* LISTEN Then your sendmail server is configured to accept connections from localhost only. To change this behavior, you need to edit /etc/mail/sendmail.mc. Find the line that starts …</summary><content type="html">&lt;p&gt;if you get ( doing a netstat -an more&amp;nbsp;)&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;tcp 0 0 127.0.0.1:25 0.0.0.0:\* LISTEN
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Then your sendmail server is configured to accept connections from localhost&amp;nbsp;only.&lt;/p&gt;
&lt;p&gt;To change this behavior, you need to edit /etc/mail/sendmail.mc. Find the line that starts with DAEMON_OPTIONS ( suggest vi +/DAEMON_OPTIONS sendmail.mc ) and edit the field &lt;code&gt;Addr=&lt;/code&gt; to change it to your &lt;span class="caps"&gt;IP&lt;/span&gt;&amp;nbsp;Address.&lt;/p&gt;
&lt;p&gt;Then go down approx. 7 lines and comment out the line that&amp;nbsp;reads:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;FEATURE(\`accept\_unresolveable\_domains&amp;#39;)dnl
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Next, exit vi (or whatever editor you use) and&amp;nbsp;do&amp;#8230;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;m4 /etc/mail/sendmail.mc \&amp;gt; /etc/sendmail.cf
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Restart sendmail, and you should be able to receive mail from other&amp;nbsp;mhosts&lt;/p&gt;</content><category term="mail"></category></entry><entry><title>Edit group policy on remote computer</title><link href="https://www.rsreese.com/edit-group-policy-on-remote-computer/" rel="alternate"></link><published>2008-02-12T03:32:00-05:00</published><updated>2008-02-12T03:32:00-05:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2008-02-12:/edit-group-policy-on-remote-computer/</id><summary type="html">Want to open up the MMC of a local Group Policy on a remote machine? Simply go to Start Run and type: gpedit.msc /gpcomputer: Computername</summary><content type="html">&lt;p&gt;Want to open up the &lt;span class="caps"&gt;MMC&lt;/span&gt; of a local Group Policy on a remote&amp;nbsp;machine?&lt;/p&gt;
&lt;p&gt;Simply go to Start Run and&amp;nbsp;type:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;gpedit.msc /gpcomputer: Computername
&lt;/pre&gt;&lt;/div&gt;</content><category term="group policy"></category><category term="microsoft windows"></category></entry><entry><title>Running processes in the background on Linux</title><link href="https://www.rsreese.com/running-processes-in-the-background-on-linux/" rel="alternate"></link><published>2008-02-12T03:30:00-05:00</published><updated>2008-02-12T03:30:00-05:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2008-02-12:/running-processes-in-the-background-on-linux/</id><summary type="html">If you just want your program to simply run in the background, launch it with a “&amp;” at the end of the command from the shell. However, if it expects to use stdout, stdin, or stderr, it will stop — so these must all be redirected to files or pipes. This will …</summary><content type="html">&lt;p&gt;If you just want your program to simply run in the background, launch it
with a &amp;#8220;&amp;amp;&amp;#8221; at the end of the command from the shell. However, if it
expects to use stdout, stdin, or stderr, it will stop &amp;#8212; so these must
all be redirected to files or&amp;nbsp;pipes.&lt;/p&gt;
&lt;p&gt;This will still leave it attached to the terminal and process group of
the shell, however. Thus you will not be able to log out of the command
prompt with the background jobs unless you detach them. To get around
this you can use the &amp;#8220;nohup&amp;#8221; and/or &amp;#8220;setsid&amp;#8221; commands when launching&amp;nbsp;it.&lt;/p&gt;
&lt;p&gt;If you want your program to daemonize itself (rather than relying on the
user to do it when invoking it), then you will have to read some unix
programming books about the steps involved. For example, Perl&amp;#8217;s
Proc::Daemon does the&amp;nbsp;following:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Fork a child and exit the parent&amp;nbsp;process.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Become a session leader (which detaches the program from the
controlling&amp;nbsp;terminal).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Fork another child process and exit first child. This prevents the
potential of acquiring a controlling&amp;nbsp;terminal.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Change the current working directory to&amp;nbsp;&amp;#8220;/&amp;#8221;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Clear the file creation&amp;nbsp;mask.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Close all open file&amp;nbsp;descriptors.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;</content><category term="linux"></category></entry><entry><title>Adding a character to a line using Perl</title><link href="https://www.rsreese.com/adding-a-character-to-a-line-using-perl/" rel="alternate"></link><published>2008-02-04T06:46:00-05:00</published><updated>2008-02-04T06:46:00-05:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2008-02-04:/adding-a-character-to-a-line-using-perl/</id><summary type="html">perl -p -i -e 's/(.)$/$1$1/g' filename This changed my nonsense file: ghggk dethaks gjfkdld fyduftsdu flkgjd kflgjlk flkgjl f into a slightly different nonsense file: ghggkk dethakss gjfkdldd fyduftsduu flkgjd kflgjlk flkgjl ff</summary><content type="html">&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;perl&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt; &lt;span class="s"&gt;&amp;#39;s/(.)$/$1$1/g&amp;#39;&lt;/span&gt; &lt;span class="n"&gt;filename&lt;/span&gt; &lt;span class="n"&gt;This&lt;/span&gt; &lt;span class="n"&gt;changed&lt;/span&gt; &lt;span class="k"&gt;my&lt;/span&gt; &lt;span class="n"&gt;nonsense&lt;/span&gt; &lt;span class="n"&gt;file:&lt;/span&gt; &lt;span class="n"&gt;ghggk&lt;/span&gt; &lt;span class="n"&gt;dethaks&lt;/span&gt; &lt;span class="n"&gt;gjfkdld&lt;/span&gt; &lt;span class="n"&gt;fyduftsdu&lt;/span&gt; &lt;span class="n"&gt;flkgjd&lt;/span&gt; &lt;span class="n"&gt;kflgjlk&lt;/span&gt; &lt;span class="n"&gt;flkgjl&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt; &lt;span class="n"&gt;into&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="n"&gt;slightly&lt;/span&gt; &lt;span class="n"&gt;different&lt;/span&gt; &lt;span class="n"&gt;nonsense&lt;/span&gt; &lt;span class="n"&gt;file:&lt;/span&gt; &lt;span class="n"&gt;ghggkk&lt;/span&gt; &lt;span class="n"&gt;dethakss&lt;/span&gt; &lt;span class="n"&gt;gjfkdldd&lt;/span&gt; &lt;span class="n"&gt;fyduftsduu&lt;/span&gt; &lt;span class="n"&gt;flkgjd&lt;/span&gt; &lt;span class="n"&gt;kflgjlk&lt;/span&gt; &lt;span class="n"&gt;flkgjl&lt;/span&gt; &lt;span class="n"&gt;ff&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;</content></entry><entry><title>Getting Samba to play nicely with SELinux on RHEL</title><link href="https://www.rsreese.com/getting-samba-to-play-nicely-with-selinux-on-rhel/" rel="alternate"></link><published>2008-02-04T06:31:00-05:00</published><updated>2008-02-04T06:31:00-05:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2008-02-04:/getting-samba-to-play-nicely-with-selinux-on-rhel/</id><summary type="html">This helpful bit was written by Don Meyer. I am a little too stubborn for a quick fix like this, so I went the route of adding the specific rules needed to allow SMB/Winbindd to run without throwing AVC errors. I am doing this on RHEL4 boxes, which install …</summary><content type="html">&lt;p&gt;This helpful bit was written by Don&amp;nbsp;Meyer.&lt;/p&gt;
&lt;p&gt;I am a little too stubborn for a quick fix like this, so I went the&lt;br&gt;
route of adding the specific rules needed to allow &lt;span class="caps"&gt;SMB&lt;/span&gt;/Winbindd to&lt;br&gt;
run without throwing &lt;span class="caps"&gt;AVC&lt;/span&gt; errors. I am doing this on &lt;span class="caps"&gt;RHEL4&lt;/span&gt; boxes,&lt;br&gt;
which install with SElinux enforcing targeted by default &amp;#8212; this&lt;br&gt;
allows me to leave SElinux active for its additional&amp;nbsp;protections.&lt;/p&gt;
&lt;p&gt;Doing it this way requires a little extra work,&amp;nbsp;though&amp;#8230;&lt;/p&gt;
&lt;p&gt;First, you need to install the selinux-policy-targeted-sources&lt;br&gt;
package, if not already&amp;nbsp;installed.&lt;/p&gt;
&lt;p&gt;When I build the RPMs from the source tarball, the first upgrade from&lt;br&gt;
the default &lt;span class="caps"&gt;RHEL4&lt;/span&gt; packages changes the tdb directory from&lt;br&gt;
/var/cache/samba/ to /var/lib/samba/. This is accomplished by&lt;br&gt;
creating /var/lib/samba/ &amp;#8212; Naturally, this royally mucks up the&lt;br&gt;
SElinux labelings/permissions. So, immediately after the first&lt;br&gt;
upgrade from &lt;span class="caps"&gt;RHEL4&lt;/span&gt; samba packages, (before starting either smb or&lt;br&gt;
winbind) I need to do the&amp;nbsp;following:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;#chcon -Rt samba_var_t /var/lib/samba
#mkdir /var/lib/samba/winbindd_privileged/
#chcon -t winbind_var_run_t /var/lib/samba/winbindd_privileged/
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Then, I drop the following file into the directory&lt;br&gt;&amp;nbsp;/etc/selinux/targeted/src/policy/domains/misc/:&lt;/p&gt;
&lt;p&gt;winbind_add.te:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nt"&gt;allow&lt;/span&gt; &lt;span class="nt"&gt;winbind_t&lt;/span&gt; &lt;span class="nt"&gt;etc_runtime_t&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nd"&gt;file&lt;/span&gt; &lt;span class="nt"&gt;read&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="nt"&gt;allow&lt;/span&gt; &lt;span class="nt"&gt;winbind_t&lt;/span&gt; &lt;span class="nt"&gt;proc_t&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nd"&gt;file&lt;/span&gt; &lt;span class="nt"&gt;read&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="nt"&gt;allow&lt;/span&gt; &lt;span class="nt"&gt;winbind_t&lt;/span&gt; &lt;span class="nt"&gt;etc_t&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nd"&gt;file&lt;/span&gt; &lt;span class="nt"&gt;write&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="nt"&gt;allow&lt;/span&gt; &lt;span class="nt"&gt;winbind_t&lt;/span&gt; &lt;span class="nt"&gt;samba_etc_t&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nd"&gt;file&lt;/span&gt; &lt;span class="nt"&gt;write&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="nt"&gt;allow&lt;/span&gt; &lt;span class="nt"&gt;winbind_t&lt;/span&gt; &lt;span class="nt"&gt;initrc_t&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nd"&gt;process&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="err"&gt;signal&lt;/span&gt; &lt;span class="err"&gt;signull&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="nt"&gt;allow&lt;/span&gt; &lt;span class="nt"&gt;winbind_t&lt;/span&gt; &lt;span class="nt"&gt;initrc_var_run_t&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nd"&gt;file&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="err"&gt;lock&lt;/span&gt; &lt;span class="err"&gt;read&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="nt"&gt;allow&lt;/span&gt; &lt;span class="nt"&gt;winbind_t&lt;/span&gt; &lt;span class="nt"&gt;var_lib_t&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nd"&gt;dir&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="err"&gt;search&lt;/span&gt; &lt;span class="err"&gt;getattr&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="nt"&gt;allow&lt;/span&gt; &lt;span class="nt"&gt;winbind_t&lt;/span&gt; &lt;span class="nt"&gt;var_lib_t&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nd"&gt;dir&lt;/span&gt; &lt;span class="nt"&gt;search&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="nt"&gt;allow&lt;/span&gt; &lt;span class="nt"&gt;winbind_t&lt;/span&gt; &lt;span class="nt"&gt;samba_log_t&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nd"&gt;dir&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="err"&gt;create&lt;/span&gt; &lt;span class="err"&gt;setattr&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="nt"&gt;allow&lt;/span&gt; &lt;span class="nt"&gt;winbind_t&lt;/span&gt; &lt;span class="nt"&gt;unconfined_t&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nd"&gt;fifo_file&lt;/span&gt; &lt;span class="nt"&gt;read&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="nt"&gt;allow&lt;/span&gt; &lt;span class="nt"&gt;winbind_t&lt;/span&gt; &lt;span class="nt"&gt;var_lib_t&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nd"&gt;dir&lt;/span&gt; &lt;span class="nt"&gt;search&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;This file is what I currently need to add to the default SElinux&lt;br&gt;
configuration to get Samba 3.0.23pre1 to work. What is needed seems&lt;br&gt;
to change with each new version of Samba&amp;#8230; (The default SElinux&lt;br&gt;
ruleset for 3.0.10-1.3E.6 can be found in&lt;br&gt;&amp;nbsp;&amp;#8220;/etc/selinux/targeted/src/policy/domains/program/winbind.te&amp;#8221;.)&lt;/p&gt;
&lt;p&gt;Finally, after this &amp;#8220;extra&amp;#8221; policy file is in place, you should chdir&lt;br&gt;
to &amp;#8220;/etc/selinux/targeted/src/policy/&amp;#8221;, and run the following&amp;nbsp;command:&lt;/p&gt;
&lt;p&gt;#make&amp;nbsp;load&lt;/p&gt;
&lt;p&gt;After this, you should be able to start/restart the smb &lt;span class="amp"&gt;&amp;amp;&lt;/span&gt; winbind&lt;br&gt;
services without&amp;nbsp;complaints.&lt;/p&gt;
&lt;p&gt;Now, some might ask &amp;#8220;How do you derive these additional&amp;nbsp;rules?&amp;#8221;&lt;/p&gt;
&lt;p&gt;On a clean install, I install the packages, make the necessary mods,&lt;br&gt;
and then set SElinux to&amp;nbsp;non-enforcing:&lt;/p&gt;
&lt;p&gt;#setenforce&amp;nbsp;0&lt;/p&gt;
&lt;p&gt;I then start &amp;#8220;tail -f /var/log/messages &gt; /tmp/samba_avc.log&amp;#8221; in a&lt;br&gt;
separate&amp;nbsp;console.&lt;/p&gt;
&lt;p&gt;Next, I start the smb &lt;span class="amp"&gt;&amp;amp;&lt;/span&gt; winbind services and get the running&lt;br&gt;
properly. Running in non-enforcing mode allows all the error&lt;br&gt;
messages to be generated in the logs, but the operations are allowed&lt;br&gt;
to complete successfully. Once the services are running, I do a&lt;br&gt;
couple user queries to prime the winbind system and have it sync with&lt;br&gt;
the &lt;span class="caps"&gt;AD&lt;/span&gt;, etc. I then terminate the tail in the other console, and run&lt;br&gt;
the following&amp;nbsp;command:&lt;/p&gt;
&lt;p&gt;#audit2allow -i&amp;nbsp;/tmp/samba_avc.log&lt;/p&gt;
&lt;p&gt;This outputs (to stdout) the additional rules necessary to allow all&lt;br&gt;
of the operations that generated &lt;span class="caps"&gt;AVC&lt;/span&gt; error messages in the log&lt;br&gt;
excerpt. This should be what is necessary to get everything running&lt;br&gt;
&amp;#8212; I copy these rules into the file I call winbind_add.te in&lt;br&gt;
&amp;#8220;/etc/selinux/targeted/src/domains/misc/&amp;#8221;, and run the &amp;#8220;make load&amp;#8221;&lt;br&gt;
command to force the system to reload the SElinux&amp;nbsp;rules.&lt;/p&gt;
&lt;p&gt;Finally, I can shut down the smb &lt;span class="amp"&gt;&amp;amp;&lt;/span&gt; winbind services, run &amp;#8220;setenforce&lt;br&gt;
1&amp;#8221; to re-enable SElinux enforcing mode, and then restart smb &amp;amp;&lt;br&gt;
winbind. If all goes well, this should not generate any &lt;span class="caps"&gt;AVC&lt;/span&gt;&amp;nbsp;errors&amp;#8230;&lt;/p&gt;</content><category term="linux"></category></entry><entry><title>Remove index.php from wiki URL</title><link href="https://www.rsreese.com/remove-index-php-from-wiki-url/" rel="alternate"></link><published>2008-02-04T06:22:00-05:00</published><updated>2008-02-04T06:22:00-05:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2008-02-04:/remove-index-php-from-wiki-url/</id><summary type="html">In httpd.conf: Alias /wiki/index.php /home/rsreese/richardsreese/htdocs/w/index.php Alias /wiki /home/rsreese/richardsreese/htdocs/w/index.php In Localsetting.php: $wgScriptPath = "/w"; $wgScript = "$wgScriptPath/index.php"; $wgRedirectScript = "$wgScriptPath/redirect.php"; # For more information on customizing the URLs please see: # http://meta.wikimedia.org/wiki …</summary><content type="html">&lt;p&gt;In&amp;nbsp;httpd.conf:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;Alias /wiki/index.php /home/rsreese/richardsreese/htdocs/w/index.php  
Alias /wiki /home/rsreese/richardsreese/htdocs/w/index.php
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;In&amp;nbsp;Localsetting.php:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$wgScriptPath = &amp;quot;/w&amp;quot;;  
$wgScript = &amp;quot;$wgScriptPath/index.php&amp;quot;;  
$wgRedirectScript = &amp;quot;$wgScriptPath/redirect.php&amp;quot;;

# For more information on customizing the URLs please see:  
# http://meta.wikimedia.org/wiki/Eliminating\_index.php\_from\_the\_url  
# If using PHP as a CGI module, the ?title= style usually must be used.  

#$wgArticlePath = &amp;quot;$wgScript/$1&amp;quot;;  
$wgArticlePath = &amp;quot;/wiki/$1&amp;quot;;
&lt;/pre&gt;&lt;/div&gt;</content></entry><entry><title>Courier Vacation Notice</title><link href="https://www.rsreese.com/courier-vacation-notice/" rel="alternate"></link><published>2008-02-04T06:09:00-05:00</published><updated>2008-02-04T06:09:00-05:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2008-02-04:/courier-vacation-notice/</id><summary type="html">cc "| /usr/lib/courier/bin/mailbot -t autoresponse -s 'AutoAwayMessage' -A 'From: test@somedomain.com' /usr/sbin/sendmail -f ''"cc "!user@somedomain.edu"cc "./Maildir" EXITCODE = 0 exit</summary><content type="html">&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;cc &amp;quot;| /usr/lib/courier/bin/mailbot -t autoresponse -s &amp;#39;AutoAwayMessage&amp;#39; -A &amp;#39;From: test@somedomain.com&amp;#39; /usr/sbin/sendmail -f &amp;#39;&amp;#39;&amp;quot;cc &amp;quot;!user@somedomain.edu&amp;quot;cc &amp;quot;./Maildir&amp;quot;
EXITCODE = 0
exit
&lt;/pre&gt;&lt;/div&gt;</content></entry><entry><title>Compare Directory Contents on Linux computer</title><link href="https://www.rsreese.com/compare-directory-contents-on-linux-computer/" rel="alternate"></link><published>2008-02-01T02:02:00-05:00</published><updated>2008-02-01T02:02:00-05:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2008-02-01:/compare-directory-contents-on-linux-computer/</id><summary type="html">#/bin/bash DIR_1=$1 DIR_2=$2 #check dir diffs ls -1 $DIR_1 &gt;/tmp/diff.1 ls -1 $DIR_2 &gt;/tmp/diff.2 echo "Check Dir differences:" diff /tmp/diff.1 /tmp/diff.2 &amp;&amp; echo "Dir's have the same files" #check files differences echo "check files differences:" for file in `cat …</summary><content type="html">&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="c1"&gt;#/bin/bash&lt;/span&gt;
&lt;span class="nv"&gt;DIR_1&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;
&lt;span class="nv"&gt;DIR_2&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$2&lt;/span&gt;

&lt;span class="c1"&gt;#check dir diffs&lt;/span&gt;

ls -1 &lt;span class="nv"&gt;$DIR_1&lt;/span&gt; &amp;gt;/tmp/diff.1
ls -1 &lt;span class="nv"&gt;$DIR_2&lt;/span&gt; &amp;gt;/tmp/diff.2

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;Check Dir differences:&amp;quot;&lt;/span&gt;
diff /tmp/diff.1 /tmp/diff.2 &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;Dir&amp;#39;s have the same files&amp;quot;&lt;/span&gt;

&lt;span class="c1"&gt;#check files differences&lt;/span&gt;

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;check files differences:&amp;quot;&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; file in &lt;span class="sb"&gt;`&lt;/span&gt;cat /tmp/diff.1 /tmp/diff.2&lt;span class="p"&gt;|&lt;/span&gt;uniq&lt;span class="sb"&gt;`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
diff &lt;span class="nv"&gt;$DIR_1&lt;/span&gt;/&lt;span class="nv"&gt;$file&lt;/span&gt; &lt;span class="nv"&gt;$DIR_2&lt;/span&gt;/&lt;span class="nv"&gt;$file&lt;/span&gt; &lt;span class="m"&gt;2&lt;/span&gt;&amp;gt;/dev/null
&lt;span class="k"&gt;done&lt;/span&gt;

rm /tmp/diff.1 /tmp/diff.2
&lt;/pre&gt;&lt;/div&gt;</content></entry><entry><title>NFS howto with static ports</title><link href="https://www.rsreese.com/nfs-howto-with-static-ports/" rel="alternate"></link><published>2008-01-31T06:43:00-05:00</published><updated>2008-01-31T06:43:00-05:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2008-01-31:/nfs-howto-with-static-ports/</id><summary type="html">First I am going to edit the /etc/sysconfig/nfs to specify the ports I want to run on. STATD_PORT=4000 STATD_OUTGOING_PORT=4004 LOCKD_TCPPORT=4001 LOCKD_UDPPORT=4001 MOUNTD_PORT=4002 Next I want to edit the /etc/hosts.allow to only allow specific hosts to access the resource. nfs:192.168 …</summary><content type="html">&lt;p&gt;First I am going to edit the /etc/sysconfig/nfs to specify the ports I
want to run&amp;nbsp;on.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;STATD_PORT=4000
STATD_OUTGOING_PORT=4004
LOCKD_TCPPORT=4001
LOCKD_UDPPORT=4001
MOUNTD_PORT=4002
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Next I want to edit the /etc/hosts.allow to only allow specific hosts to
access the&amp;nbsp;resource.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;nfs&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="mf"&gt;192.168&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Finally lets allow some stuff to come in through our &lt;span class="caps"&gt;IP&lt;/span&gt; tables rules at&amp;nbsp;/etc/sysconfig/iptables&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;*filter
:INPUT DROP [0:0]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [0:0]
:RH-Firewall-1-INPUT - [0:0]
-A INPUT -j RH-Firewall-1-INPUT
-A RH-Firewall-1-INPUT -i lo -j ACCEPT
-A RH-Firewall-1-INPUT -p icmp --icmp-type any -j ACCEPT
-A RH-Firewall-1-INPUT -p 50 -j ACCEPT
-A RH-Firewall-1-INPUT -p 51 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp --dport 5353 -d 224.0.0.251 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp -m udp --dport 631 -j ACCEPT
#-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 631 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 137:139 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 111 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 2049 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 4000:4004 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 55443 -j ACCEPT
-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-port-unreachable
COMMIT
&lt;/pre&gt;&lt;/div&gt;</content></entry><entry><title>Multi-Touch Techonolgy - The new interface of computing</title><link href="https://www.rsreese.com/multi-touch-techonolgy-the-new-interface-of-computing/" rel="alternate"></link><published>2007-05-30T17:08:00-04:00</published><updated>2007-05-30T17:08:00-04:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2007-05-30:/multi-touch-techonolgy-the-new-interface-of-computing/</id><summary type="html">This video shows some of the capabilities of this system.</summary><content type="html">&lt;p&gt;This video shows some of the capabilities of this&amp;nbsp;system.&lt;/p&gt;
&lt;p&gt;&lt;object width="416" height="342" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"&gt;&lt;param name="pluginspage" value="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version="&gt;&lt;/param&gt;&lt;param name="src" value="http://services.brightcove.com/services/viewer/federated_f8/271552687"&gt;&lt;/param&gt;&lt;param name="swliveconnect" value="true"&gt;&lt;/param&gt;&lt;param name="seamlesstabbing" value="false"&gt;&lt;/param&gt;&lt;param name="base" value="http://admin.brightcove.com"&gt;&lt;/param&gt;&lt;param name="flashvars" value="videoId=933742930&amp;amp;playerId=271552687&amp;amp;viewerSecureGatewayURL=https://services.brightcove.com/services/amfgateway&amp;amp;servicesURL=http://services.brightcove.com/services&amp;amp;cdnURL=http://admin.brightcove.com&amp;amp;domain=embed&amp;amp;autoStart=false&amp;amp;"&gt;&lt;/param&gt;&lt;embed width="416" height="342" type="application/x-shockwave-flash" src="http://services.brightcove.com/services/viewer/federated_f8/271552687" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=" swliveconnect="true" seamlesstabbing="false" base="http://admin.brightcove.com" flashvars="videoId=933742930&amp;amp;playerId=271552687&amp;amp;viewerSecureGatewayURL=https://services.brightcove.com/services/amfgateway&amp;amp;servicesURL=http://services.brightcove.com/services&amp;amp;cdnURL=http://admin.brightcove.com&amp;amp;domain=embed&amp;amp;autoStart=false&amp;amp;"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/p&gt;</content></entry><entry><title>SQL injection attack on a PostgreSQL database (t_jiaozhu)</title><link href="https://www.rsreese.com/sql-injection-attack-on-a-postgresql-database-t_jiaozhu/" rel="alternate"></link><published>2007-03-28T15:22:00-04:00</published><updated>2007-03-28T15:22:00-04:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2007-03-28:/sql-injection-attack-on-a-postgresql-database-t_jiaozhu/</id><summary type="html">A web server running Apache 2 and PostgreSQL was successfully compromised using a SQL injection vulnerability. I first noticed there was a new table in one of our PostgreSQL databases named ‘t_jiaozhu’. public t\_jiaozhu table postgres The table wasn not something that myself or our developer had created so …</summary><content type="html">&lt;p&gt;A web server running Apache 2 and &lt;a href="http://www.postgresql.org/"&gt;PostgreSQL&lt;/a&gt; was successfully
compromised using a &lt;span class="caps"&gt;SQL&lt;/span&gt; injection vulnerability. I first noticed there
was a new table in one of our PostgreSQL databases named&amp;nbsp;&amp;#8216;t_jiaozhu&amp;#8217;.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;public t\_jiaozhu table postgres
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;The table wasn not something that myself or our developer had created so I
immediately went into &lt;span class="caps"&gt;WTF&lt;/span&gt; mode. First I googled for the term &amp;#8216;t_jiazhu&amp;#8217;
and found that there was only one English result that mentioned &lt;span class="caps"&gt;SQL&lt;/span&gt;
injection attacks with the previously mentioned table name. At this
point we searched the PostgreSQL log files but did not turn up much but
with the advice of our local security engineer. We checked out the
Apache web server log files and found the&amp;nbsp;attack.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="err"&gt;#&lt;/span&gt; &lt;span class="nt"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;t&lt;/span&gt;&lt;span class="err"&gt;\&lt;/span&gt;&lt;span class="nt"&gt;_jiaozhu&lt;/span&gt; &lt;span class="err"&gt;\&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="nt"&gt;fred-access&lt;/span&gt;&lt;span class="err"&gt;\&lt;/span&gt;&lt;span class="nt"&gt;_log&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nd"&gt;219&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;153&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;131&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;99&lt;/span&gt; &lt;span class="nt"&gt;-&lt;/span&gt; &lt;span class="nt"&gt;-&lt;/span&gt; &lt;span class="cp"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;25&lt;/span&gt;&lt;span class="p"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;Mar&lt;/span&gt;&lt;span class="p"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;2007&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;11&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;59&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;32&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;0400&lt;/span&gt;&lt;span class="cp"&gt;]&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;HEAD /showemploymentopportunity.php?id=38;create%20table%20t\_jiaozhu(jiaozhu%20varchar(200)) HTTP/1.1&amp;quot;&lt;/span&gt; &lt;span class="nt"&gt;200&lt;/span&gt; &lt;span class="nt"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;-&amp;quot;&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;Mozilla/3.0 (compatible; Indy Library)&amp;quot;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;The engineer also came up with a possibility that the &lt;span class="caps"&gt;IP&lt;/span&gt; in which the
attack came from may have been a bot using an &lt;a href="http://en.wikipedia.org/wiki/Intrusion-detection_system"&gt;&lt;span class="caps"&gt;IDS&lt;/span&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;span class="dquo"&gt;&amp;#8220;&lt;/span&gt;After the table was created, there were several hits from that &lt;span class="caps"&gt;IP&lt;/span&gt;
that had the following user agent &amp;#8220;Mozilla/3.0 (compatible; Indy
Library)&amp;#8221;. A little digging shows that it might be a Chinese&amp;nbsp;spambot.&amp;#8221;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Our developer quickly discovered that we were not checking variables that
were being passed. A quick addition of code fixed the&amp;nbsp;problem.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;if (!is\_numeric($id))  
  $id = 0;
&lt;/pre&gt;&lt;/div&gt;</content><category term="exploits"></category></entry><entry><title>Running UAC and some other tricks to keep your computer running smoothly</title><link href="https://www.rsreese.com/running-uac-and-some-other-tricks-to-keep-your-computer-running-smoothly/" rel="alternate"></link><published>2007-03-07T04:47:00-05:00</published><updated>2007-03-07T04:47:00-05:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2007-03-07:/running-uac-and-some-other-tricks-to-keep-your-computer-running-smoothly/</id><summary type="html">Most users I know run Microsoft products. A few of you may benefit from some basic tips to keep your computer out of BestBuy or your local computer vendor for repairs. The first and probably most important is also the most difficult to get people to abide by. Use UAC …</summary><content type="html">&lt;p&gt;Most users I know run &lt;a href="http://www.microsoft.com/"&gt;Microsoft&lt;/a&gt; products. A few of you may
benefit from some basic tips to keep your computer out of &lt;a href="http://www.bestbuy.com/"&gt;BestBuy&lt;/a&gt; or
your local computer vendor for repairs. The first and probably most
important is also the most difficult to get people to abide by. Use
&lt;a href="http://technet.microsoft.com/en-us/windowsvista/aa906021.aspx"&gt;&lt;span class="caps"&gt;UAC&lt;/span&gt;&lt;/a&gt; (user access controls). By default Windows &lt;span class="caps"&gt;XP&lt;/span&gt; uses the
administrator account which is convenient when an operating system is
first loaded but most users load all of their programs on a &lt;span class="caps"&gt;PC&lt;/span&gt; in just a
short time. After you get everything installed run as a &amp;#8216;user&amp;#8217; account
and not an administrative context. This will prevent most spy ware and
viruses from trashing your system. Even if you accidentally download
some malware it will most likely at the worst trash the user profile but
not the system which is a pretty easy&amp;nbsp;fix.&lt;/p&gt;
&lt;p&gt;Vista by default has &lt;span class="caps"&gt;UAC&lt;/span&gt; turned on. This is annoying at first but is a
positive action by Microsoft in order to cut down on end-users trashing
their systems. &lt;span class="caps"&gt;UAC&lt;/span&gt; may be disabled but I wouldn&amp;#8217;t recommend it. A
majority of computers that become compromised with spy ware is because
malware or viruses entered through a profile that had administrative
privileges and then self&amp;nbsp;installed.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://en.wikipedia.org/wiki/Antivirus_software"&gt;Antivirus&lt;/a&gt; must be installed. Most computers I come across don&amp;#8217;t have
it installed or it&amp;#8217;s so out of date it might as well not be installed.
It&amp;#8217;s a small fee to pay or even &lt;a href="http://free.grisoft.com/doc/1"&gt;free&lt;/a&gt; to avoid the headache of
infecting your computer or worse other&amp;nbsp;computers.&lt;/p&gt;
&lt;p&gt;Scripting attacks may be prevented by staying out of crappy sites. One
problem is some popular sites still seem to host ads from vendors that
are known to install malware. Using a &lt;a href="http://www.spywarewarrior.com/uiuc/resource.htm#IESPYAD"&gt;registry&lt;/a&gt; based block lists is
a quick and free way to avoid these&amp;nbsp;pitfalls.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://en.wikipedia.org/wiki/Peer-to-peer"&gt;Peer2Peer&lt;/a&gt; software is another way to trash a system. Installing
poorly written software for the purpose of downloading music and whatnot
is a pretty sure fire way to hose a system. While in college most of the
computers I have seen that run poorly are because a Napster type of
software was installed and some of the files downloaded from the network
were virus ridden. The peer sharing software themselves sometimes have
ad-ware built in for the purpose of bombarding your computer with trash.
So the alternative sucks but pay for it using iTunes or something along
those&amp;nbsp;lines.&lt;/p&gt;
&lt;p&gt;With regards to email, if it looks too good to be true then it probably is. Do not click on links or download images from it, just delete and/or report it as &lt;a href="http://en.wikipedia.org/wiki/Spam_%28electronic%29"&gt;spam&lt;/a&gt;.&lt;/p&gt;</content></entry><entry><title>Running Terminal Server on Windows 2003 Server</title><link href="https://www.rsreese.com/running-terminal-server-on-windows-2003-server/" rel="alternate"></link><published>2007-02-08T05:33:00-05:00</published><updated>2007-02-08T05:33:00-05:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2007-02-08:/running-terminal-server-on-windows-2003-server/</id><summary type="html">Vista has been a decent Operating System so far but there are still a large number of software vendors who were not prepared for the OS. A number of statistical software packages are at this point not supported so I decided to implement a Terminal Server for users to access …</summary><content type="html">&lt;p&gt;Vista has been a decent Operating System so far but there are still a large number of software vendors who were not prepared for the &lt;span class="caps"&gt;OS&lt;/span&gt;. A number of statistical software packages are at this point not supported so I decided to implement a Terminal Server for users to access. The terminal server is not being deployed only as a quick fix to manufacturers short comings in software development. I have made the server available on a &lt;span class="caps"&gt;VPN&lt;/span&gt; for users to work from home where they do not have access to applications that are usually required to run on a &lt;span class="caps"&gt;LAN&lt;/span&gt;. Maintenance, licensing, and performance are some of the other&amp;nbsp;benefits.&lt;/p&gt;
&lt;p&gt;The first trick to setting up the terminal server was licensing. Since we are not running a cluster of terminal servers the license model was simple. I was able to set the terminal server to be a license server for its self which saved me from having to setup another machine to be a license server. Next was a journey over to &lt;span class="caps"&gt;CDW&lt;/span&gt; in order to purchase some terminal server licenses. When setting up the server there are two license modes, per device and per user. I went with per user because I wanted several hundred users to be able to login without having several hundred&amp;nbsp;licenses.&lt;/p&gt;
&lt;p&gt;Next was to setup security on the server so that only the groups I wanted would be able to login. Group policies were also implemented so that folder redirection and additional security features could be employed. The users must login through a vpn from remote locations though with most of our users have fast Internet connections so the vpn didn not really cause additional latency. Documentation was the final product to be constructed. As with any documentation I have gotten feedback to help write enough information so that all of the users are able to be instructed how to connect to our server and run applications&amp;nbsp;remotely.&lt;/p&gt;</content></entry><entry><title>Using Common Sense to Secure your Information</title><link href="https://www.rsreese.com/using-common-sense-to-secure-your-information/" rel="alternate"></link><published>2006-12-20T05:53:00-05:00</published><updated>2006-12-20T05:53:00-05:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2006-12-20:/using-common-sense-to-secure-your-information/</id><summary type="html">Every day technology creates efficiency for millions of people. With all of the benefits that technology provides there are also many pitfalls that come with convenience. Online vendors make it easy for people to purchase goods at reasonable prices when compared to brick and mortar stores. There are many good …</summary><content type="html">&lt;p&gt;Every day technology creates efficiency for millions of people. With all of the benefits that technology provides there are also many pitfalls that come with convenience. Online vendors make it easy for people to purchase goods at reasonable prices when compared to brick and mortar stores. There are many good companies to do business with but there are also a lot of shady vendors. There are some pretty easy ways to spot the malicious&amp;nbsp;vendors.&lt;/p&gt;
&lt;p&gt;A site that looks poorly designed can be a sign of a site that was put together with haste just to be taken down shortly after a few people are ripped off. Searching for reviews of the company that people have expressed there opinions similar to what &lt;a href="http://www.ebay.com"&gt;eBay&lt;/a&gt; has in the form of feedback may help you decide. Also companies that are serious about business will no doubt have thoroughly thought about security and usually their&amp;nbsp;reputation.&lt;/p&gt;
&lt;p&gt;Do not use sites from &lt;a href="http://en.wikipedia.org/wiki/Spam_(electronic)"&gt;&lt;span class="caps"&gt;SPAM&lt;/span&gt;&lt;/a&gt; or other illegitimate sources. &lt;a href="http://en.wikipedia.org/wiki/Phishing"&gt;Phishing&lt;/a&gt; sites are a sure fire way to have your identity stolen and you do not want that to happen. Make sure the site uses an &lt;a href="http://en.wikipedia.org/wiki/Secure_Sockets_Layer"&gt;&lt;span class="caps"&gt;SSL&lt;/span&gt;&lt;/a&gt; certificate in order to encrypt your information, this is a must have. Do not use the same password for your various logins at different sites. Use at least 8 characters if not more and make sure to include some random characters which make &lt;a href="http://en.wikipedia.org/wiki/Password_cracking"&gt;cracking&lt;/a&gt; a password much more difficult. Know that there are sites that you may login to that may not use &lt;span class="caps"&gt;SSL&lt;/span&gt; certificates so your password may be picked up using a traffic sniffer. Also wireless networks are an easy way to lose information. Be weary of people listening on the wire with &lt;a href="http://en.wikipedia.org/wiki/Packet_sniffer"&gt;traffic sniffers&lt;/a&gt;. Do not send important information via email and instant messengers since they are almost always sent in clear text. Review you credit at least once a year, you may not even know that you a victim of online or identity theft until it has already&amp;nbsp;happened.&lt;/p&gt;
&lt;p&gt;There are a number of resources online to help you from online fraud. A simple Google search can help you find these&amp;nbsp;resources.&lt;/p&gt;</content></entry><entry><title>Microsoft Vista and Office 2007 Initial Review</title><link href="https://www.rsreese.com/microsoft-vista-and-office-2007-initial-review/" rel="alternate"></link><published>2006-12-12T03:58:00-05:00</published><updated>2006-12-12T03:58:00-05:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2006-12-12:/microsoft-vista-and-office-2007-initial-review/</id><summary type="html">I recently got my hands on a copy of Microsoft’s latest offering in the form of desktop software, Vista and Office 2007. I have also acquired some new 64 bit Core 2 Duo Dell computers in order to test the new software for deployment though I have also been …</summary><content type="html">&lt;p&gt;I recently got my hands on a copy of &lt;a href="http://www.microsoft.com/"&gt;Microsoft’s&lt;/a&gt; latest offering in
the form of desktop software, &lt;a href="http://www.microsoft.com/windowsvista/"&gt;Vista&lt;/a&gt; and &lt;a href="http://office.microsoft.com/en-us/products/default.aspx?ofcresset=1"&gt;Office 2007&lt;/a&gt;. I have also
acquired some new 64 bit &lt;a href="http://www.intel.com/products/processor/core2duo/index.htm"&gt;Core 2 Duo&lt;/a&gt; Dell computers in order to test
the new software for deployment though I have also been testing the new
offerings on older hardware in order to determine which machines will
need to be depreciated in the next year or&amp;nbsp;two.&lt;/p&gt;
&lt;p&gt;First I went ahead installed Office 2007 on my Windows &lt;span class="caps"&gt;XP&lt;/span&gt; desktop. As
with most Office installs I was able to customize an install file so
that I can skip on the license agreements, serial number and all of the
other annoying stuff. I’m pretty impressed overall with the office
install. The look of Office has been improved to use a ‘ribbon’
interface which is to improve productivity. Many users have already had
issues using the “Office Button” which incorporates many of the
functions that “file” button previously did. This is a common hang up
with major releases from a software vendor; end-users will have to take
time to become acclimated with the new functions. A trick feature I just
picked up on recently was just hitting the “alt” key will highlight the
shortcut’s to all of the current functions on the “ribbon”&amp;nbsp;toolbar.&lt;/p&gt;
&lt;p&gt;Vista was next on the list for testing. From the start I figured the
install would be large since we had to rip the &lt;a href="http://en.wikipedia.org/wiki/ISO_image"&gt;&lt;span class="caps"&gt;ISO&lt;/span&gt; image&lt;/a&gt; to a
&lt;a href="http://en.wikipedia.org/wiki/DVD"&gt;&lt;span class="caps"&gt;DVD&lt;/span&gt;&lt;/a&gt;. We started off with a 1.8 &lt;a href="http://www.amd.com/us-en/"&gt;&lt;span class="caps"&gt;AMD&lt;/span&gt;&lt;/a&gt; with 512 &lt;span class="caps"&gt;MB&lt;/span&gt; of system memory.
I knew running a video card with 64 &lt;span class="caps"&gt;MB&lt;/span&gt; of memory would limit the
operating systems’ capability graphics wise but I needed a real world
baseline in which Vista could run without aggrevating end-users with
slowly responding applications. The install was very simple although I
did provide a answer file so I wouldn’t have to bother with serial
numbers and whatnot. Once Vista was up and running I was happy with the
performance overall for the base install. Next I added a beta version of
&lt;a href="http://www.mcafee.com/us/"&gt;McAfee&lt;/a&gt; antivirus for Vista, Office 2007, and some statistical
software such as &lt;span class="caps"&gt;SAS&lt;/span&gt;, Gams, Guass, and Limdep. The machine did slowdown
somewhat mainly due to background services and the lack of memory didn’t
help things much but this did give me a baseline for which machines
would be able to handle Vista performance&amp;nbsp;wise.&lt;/p&gt;
&lt;p&gt;Next was the 64 bit Vista install on 2.4 GHz Core 2 Duo chips, 1
gigabyte of memory, and 512 &lt;span class="caps"&gt;MB&lt;/span&gt; of video memory. These machines are
amazing, Vista of course allows for the full blown user interface
including Aero which provides for some pretty cool eye candy. I was able
to load this machine down and it wasn’t phased at all. For a $1000
dollars (not including monitor) these machines are going to be the way
to go for user’s that want the full Vista&amp;nbsp;experience.&lt;/p&gt;
&lt;p&gt;The final test to make Vista useable was to add it to the domain. I was
able to add the machines to the domain without a hiccup. Setting up
Outlook with the &lt;a href="http://www.microsoft.com/exchange/default.mspx"&gt;Exchange&lt;/a&gt; server was even easier since it picked up
the domain credentials from the currently logged in user. That is where
the fun ended. Vista employs &lt;a href="http://technet.microsoft.com/en-us/windowsvista/aa906021.aspx"&gt;User Access Controls&lt;/a&gt; (&lt;span class="caps"&gt;UAC&lt;/span&gt;) so the
domain policy’s made software installation rather annoying at least. The
lab computers were even worse because we log users in as guests so
profiles are not stored eating up drive space. Vista applies the group
policies to all accounts, even accounts that are not on the domain so
the only fix was to move a computer out of the &lt;a href="http://en.wikipedia.org/wiki/Organizational_Unit"&gt;organizational unit&lt;/a&gt;
(&lt;span class="caps"&gt;OU&lt;/span&gt;) before installing software so the restrictions aren’t there and
then moving it back in when&amp;nbsp;done.&lt;/p&gt;
&lt;p&gt;In summary I am impressed with Vista (with the right hardware) but have
a lot of tooling to do in order to find all of the benefits. I figure a
desktop computer with a 2 GHz processor, 512 Mb system memory, and 128
Mb video memory should be the baseline for&amp;nbsp;us.&lt;/p&gt;</content></entry><entry><title>Copyrighted Music and Movies</title><link href="https://www.rsreese.com/copyrighted-music-and-movies/" rel="alternate"></link><published>2006-10-18T05:06:00-04:00</published><updated>2006-10-18T05:06:00-04:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2006-10-18:/copyrighted-music-and-movies/</id><summary type="html">Ever since the Napster rise and fall there has been an on going debate in regards to copyrighted material being shared across networks with peer to peer (P2P) applications and popular social networking websites. I know from my school and work that technology exists that may analyze network traffic and …</summary><content type="html">&lt;p&gt;Ever since the Napster rise and fall there has been an on going debate
in regards to copyrighted material being shared across networks with
peer to peer (&lt;span class="caps"&gt;P2P&lt;/span&gt;) applications and popular social networking websites.
I know from my school and work that technology exists that may analyze
network traffic and determine what content travels through a connection.
The content may be stopped if deemed a violation of copyrighted materials. For example, if a student is transferring a song or video from home to their email account so they may upload it to their Ipod. Corporate employees may be exempt from many of the free speech debates that arise. Universitys on the other hand, at least public universitys have large student bodies to please, and furthermore these students have rights. The technology can be very expensive if a &lt;a href="http://www.eff.org/share/?f=audible_magic.html"&gt;third
party&lt;/a&gt; is used to thwart sharing of copyrighted&amp;nbsp;materials.&lt;/p&gt;
&lt;p&gt;Another hot topic are the social networking sites such as
&lt;a href="http://myspace.com"&gt;myspace.com&lt;/a&gt; and &lt;a href="http://youtube.com"&gt;youtube.com&lt;/a&gt; which contain quite a bit of
copyrighted material. The content is placed on the sites and shared by
the person users but ultimately the site is distributing the music. The
music and videos help a lot of newer bands that are just starting gain
popularity without spending tons of money on advertising. The same
technology that may be used on college and corporate network may also be
used on the networks that have web servers that distribute non-copyrighted material in order to find items that should not be&amp;nbsp;shared.&lt;/p&gt;
&lt;p&gt;A final interesting note for those who do not pay attention to the news
(of any sort), &lt;a href="http://google.com"&gt;google.com&lt;/a&gt;purchased youtube.com. This move for Google
is a huge step since they spent 1.85 billion dollars on youTube which is
already having issues due to the amount of copyrighted material that
the artists are complaining&amp;nbsp;about.&lt;/p&gt;</content></entry><entry><title>What is Web 2.0</title><link href="https://www.rsreese.com/what-is-web-2-0/" rel="alternate"></link><published>2006-04-18T19:24:00-04:00</published><updated>2006-04-18T19:24:00-04:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2006-04-18:/what-is-web-2-0/</id><summary type="html">An article describing the slow migration to what some call Web 2.0</summary><content type="html">&lt;p&gt;An &lt;a href="http://www.oreillynet.com/pub/a/oreilly/tim/news/2005/09/30/what-is-web-20.html?page=1"&gt;article&lt;/a&gt; describing the slow migration to what some call Web&amp;nbsp;2.0&lt;/p&gt;</content></entry><entry><title>Botnets that make money but at whos expense</title><link href="https://www.rsreese.com/botnets-that-make-money-but-at-whos-expense/" rel="alternate"></link><published>2006-03-22T19:08:00-05:00</published><updated>2006-03-22T19:08:00-05:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2006-03-22:/botnets-that-make-money-but-at-whos-expense/</id><summary type="html">Witlog claims he do not use his botnet for illegal purposes, only “for fun.” I found that claim pretty hard to believe given a) the income he could make installing ad-serving software on each computer under his control, combined with b) the risk he is taking of getting caught breaking …</summary><content type="html">&lt;p&gt;Witlog claims he do not use his botnet for illegal purposes, only &amp;#8220;for
fun.&amp;#8221; I found that claim pretty hard to believe given a) the income he
could make installing ad-serving software on each computer under his
control, combined with b) the risk he is taking of getting caught
breaking into so many computers. The kid I wrote about in the &lt;a href="http://www.washingtonpost.com/wp-dyn/content/article/2006/02/14/AR2006021401342.html"&gt;Post
magazine story on the connection between botnets and spyware&lt;/a&gt; was
making $6,000 to $10,000 per month installing adware on a botnet half
the size of the one Witlog claims to&amp;nbsp;have.&lt;/p&gt;</content></entry><entry><title>New phishing techniques to fool online users</title><link href="https://www.rsreese.com/new-phishing-techniques-to-fool-online-users/" rel="alternate"></link><published>2006-02-14T07:04:00-05:00</published><updated>2006-02-14T07:04:00-05:00</updated><author><name>Stephen Reese</name></author><id>tag:www.rsreese.com,2006-02-14:/new-phishing-techniques-to-fool-online-users/</id><summary type="html">People are becoming aware of the insecurities posed by online shopping, browsing, and even messaging. The days of email that are obviously spam due to misspelled words and links that contain ip addresses instead of dns names are moving to a new level. The following post describes the process in …</summary><content type="html">&lt;p&gt;People are becoming aware of the insecurities posed by online shopping, browsing, and even messaging. The days of email that are obviously spam due to misspelled words and links that contain ip addresses instead of dns names are moving to a new level. The following &lt;a href="http://blog.washingtonpost.com/securityfix/2006/02/the_new_face_of_phishing_1.html"&gt;post&lt;/a&gt; describes the process in which a &lt;span class="caps"&gt;SSL&lt;/span&gt; certificate was used to trick users into entering confidential information, a tatic previously not used&amp;nbsp;before.  &lt;/p&gt;</content></entry></feed>