<?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>ChristopherKois.Com</title>
	<atom:link href="http://www.christopherkois.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.christopherkois.com</link>
	<description></description>
	<lastBuildDate>Thu, 26 Aug 2010 02:30:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>vTiger Customizations &#8211; Part 1: Hashing passwords in the vTiger Customer Portal</title>
		<link>http://www.christopherkois.com/?p=544&amp;utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=vtiger-customizations-part-1-hashing-passwords-in-the-vtiger-customer-portal</link>
		<comments>http://www.christopherkois.com/?p=544#comments</comments>
		<pubDate>Thu, 26 Aug 2010 02:05:11 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[CRM]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Information Security]]></category>
		<category><![CDATA[vtiger CRM]]></category>
		<category><![CDATA[Customer Portal]]></category>
		<category><![CDATA[MD5]]></category>
		<category><![CDATA[Password Hash]]></category>
		<category><![CDATA[vtiger]]></category>

		<guid isPermaLink="false">http://www.christopherkois.com/?p=544</guid>
		<description><![CDATA[I preface this post with the title Part 1 in the subject, because I plan to post more information on customizations to vTiger as I find things that I feel are useful to more people than just myself. NOTE: This modification was done on vTiger CRM 5.2.0 RC. The final release version 5.2.0 is due [...]]]></description>
			<content:encoded><![CDATA[<p>I preface this post with the title Part 1 in the subject, because I  plan to post more information on customizations to vTiger as I find things that I feel are useful to more people than just myself.  NOTE: This modification was done on vTiger CRM 5.2.0 RC.  The final release version 5.2.0 is due out by the end of August, 2010.</p>
<p>I&#8217;ve been playing with the Customer Portal extension for vTiger. One thing I noticed, it stores customer passwords in cleartext in the vtiger_portalinfo table.  I&#8217;m not keen on the idea of not implementing password hashing for an internet-facing deployment of a &#8220;Customer Portal&#8221; extension on a production CRM system.  Hash algorithms have been around for a VERY long time and are easy to use.   Furthermore, the regular users table utilized password hashing with salts, which could easily be mimicked for the Customer Portal module.</p>
<p>Now, this is NOT a new find.  This information was reported  about a month ago by someone else on the <a href="http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/6781" target="_blank">Trac site for vTiger.</a> But, vTiger is open source so I decided to just make the change myself.  From an architecture stand point, I see a couple of different ways this change could be implemented.  I chose a course that I felt would be easy to modify and still offer an appropriate level of security of the passwords in the database.  To implement this, there are 3 &#8220;actions&#8221; in the code that need to be modified:</p>
<p>1.) Creation of portal users in vTiger CRM<br />
2.) Changing portal user passwords in the Customer Portal<br />
3.) Authentication of portal users to the Customer Portal</p>
<p>We&#8217;re going to use MD5, because it&#8217;s quick and easy, and I see that vTiger uses it for the vtiger_users table.  Unfortunately, the vtiger_portalinfo.user_password is only 30 characters, so we&#8217;ll need to make it larger.  Log into your mysql database for vtigercrm and run this statement: <code>ALTER TABLE vtiger_portalinfo MODIFY user_password VARCHAR(32);</code></p>
<p>Now, we need to update the code:</p>
<p><strong><span style="text-decoration: underline;">1.) Update the Create Customer Portal Users code in vtigercrm/modules/Contacts/Save.php (add this line: $user_hash = strtolower(md5($password));  #  AND update $params &#8211; As seen below):<br />
</span></strong> Line: 188</p>
<p>-if($insert == &#8216;true&#8217;)<br />
-{<br />
-$password = makeRandomPassword();<br />
<em><strong> $user_hash = strtolower(md5($password));   // ADD THIS LINE</strong></em><br />
-$sql = &#8220;insert into vtiger_portalinfo values(?,?,?,?,?,?,?,?)&#8221;;<br />
<em><strong>$params = array($focus-&gt;id, $username, $user_hash, &#8216;C&#8217;, &#8217;0000-00-00 00:00:00&#8242;, &#8217;0000-00-00 00:00:00&#8242;, &#8217;0000-00-00 00:00:00&#8242;, 1);   // UPDATE THIS LINE</strong></em><br />
-$adb-&gt;pquery($sql, $params);<br />
-}<br />
-</p>
<p><strong><span style="text-decoration: underline;">2.) </span><span style="text-decoration: underline;">Update the Change Password functions</span></strong><strong><br />
<span style="text-decoration: underline;"> a.) Update the change_password function</span></strong><span style="text-decoration: underline;"> in vtigercrm/soap/customerportal.php (add this line: $password = strtolower(md5($password));  &#8211;&gt; As seen below):</span><br />
Start Line: 1030</p>
<p>-if(!empty($list[0]['id'])){<br />
-return array(&#8216;MORE_THAN_ONE_USER&#8217;);<br />
-}<br />
<em><strong> $password = strtolower(md5($password));   // ADD THIS LINE</strong></em><br />
-$sql = &#8220;update vtiger_portalinfo set user_password=? where id=? and user_name=?&#8221;;<br />
-$result = $adb-&gt;pquery($sql, array($password, $id, $username));</p>
<p><span style="text-decoration: underline;"><strong>b.) Update the SavePassword function </strong>in vtigercrm/customerportal/HelpDesk/Utils.php</span><br />
Line: 111</p>
<p><em><strong>if(strtolower(md5($oldpw)) == $result[0]['user_password'])   // UPDATE THIS LINE<br />
</strong></em></p>
<p><span style="text-decoration: underline;"><strong>c.) Add these lines to the send_mail_for_password function</strong><strong> in </strong>vtigercrm/soap/customerportal.php</span><br />
Line: 1094</p>
<p>-$from = $adb-&gt;query_result($from_res,0,&#8217;email1&#8242;);</p>
<p><strong>$password = makeRandomPassword();   // ADD THIS LINE<br />
$user_hash = strtolower(md5($password));</strong><strong> // ADD THIS LINE</strong><br />
<strong> $sql = &#8220;update vtiger_portalinfo set user_password=? where user_name=?&#8221;; </strong><strong> // ADD THIS LINE</strong><br />
<strong> $adb-&gt;pquery($sql, array($user_hash, $user_name)); </strong><strong> // ADD THIS LINE</strong></p>
<p>-$contents = $mod_strings['LBL_LOGIN_DETAILS']</p>
<p>-</p>
<p><span style="text-decoration: underline;"><strong>3.) Update the Authentication of user functions<br />
a.) Update the authenticate_user function in vtigercrm/soap/customerportal.php (add this line: $password = strtolower(md5($password));  &#8211;&gt; As seen below):<br />
</strong></span> Start Line: 962</p>
<p><em><strong>$password = strtolower(md5($password));   // ADD THIS LINE<br />
</strong></em>-$username = $adb-&gt;sql_escape_string($username);<br />
-$password = $adb-&gt;sql_escape_string($password);</p>
<p><span style="text-decoration: underline;"><strong>b.) Update the final user/password check </strong>in vtigercrm/customerportal/CustomerAuthenticate.php<strong>:<br />
</strong></span>Start Line: 49</p>
<p><strong>if(strtolower($result[0]['user_name']) == strtolower($username) &amp;&amp; strtolower($result[0]['user_password']) == strtolower(md5($password)))   // UPDATE THIS LINE<br />
</strong></p>
<p><strong><br />
</strong></p>
<p>That&#8217;s it!  Of course, if you have been using the Customer Portal prior to this update, you will need to hash all the passwords in the vtiger_portalinfo table.  To do that, login to the mysql database for vtigercrm and run this query:<code> UPDATE vtiger_portalinfo SET user_password = md5(user_password);</code></p>
<p>About 10 lines of code and 2 database updates later, you have your portal passwords hashed!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.christopherkois.com/?feed=rss2&amp;p=544</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing vTiger on Ubuntu v10.04 from source</title>
		<link>http://www.christopherkois.com/?p=512&amp;utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=installing-vtiger-on-ubuntu-v10-04-from-source</link>
		<comments>http://www.christopherkois.com/?p=512#comments</comments>
		<pubDate>Thu, 29 Jul 2010 01:49:28 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[CRM]]></category>

		<guid isPermaLink="false">http://www.christopherkois.com/?p=512</guid>
		<description><![CDATA[SugarCRM version 6 was released early this month, and it looks pretty nice.  The problem is that the new user interface is reserved for the Professional and Enterprise Editions of SugarCRM.  This seems to be part of a trend with many open source projects: give the community a taste of the product but the really [...]]]></description>
			<content:encoded><![CDATA[<p>SugarCRM version 6 was <a href="http://www.sugarcrm.com/forums/showthread.php?t=62545" target="_blank">released</a> early this month, and it looks pretty nice.  The problem is that the new user interface is reserved for the Professional and Enterprise Editions of SugarCRM.  This seems to be part of a trend with many open source projects: give the community a taste of the product but the really good features are to be reserved for the versions that you pay for.  I understand why an open source company would decide to go down this route and it&#8217;s not a bad business model really.  But, when you <a href="http://www.sugarcrm.com/crm/products/editions.html" target="_blank">charge $360/year/user</a>, that&#8217;s when I begin to lose interest.  So for a Sales company of 50 Sales reps to use the Professional Edition of SugarCRM, they would need to shell out $18,000 per year.  That&#8217;s pre-hardware cost.  I have nothing against SugarCRM (actually I like it as a product).  However, the cost is just too high to justify when comparable alternatives exist.</p>
<p>After SugarCRM, the next open source CRM that everyone talks about is <a href="http://www.vtiger.com/" target="_blank">vTiger</a>.  vTiger actually advertises with the tag line of &#8220;Tired of kinda, sorta Open Source?&#8221;.  After all of the positive recommendations, I decided that it&#8217;s time to give it a serious try.  In the past, everytime I&#8217;ve tried getting vTiger to work using the precompiled .bin file, it didn&#8217;t work right for me.  So I decided to take a crack at it from source, which turned out to be pretty easy.  Below is a step-by-step howto for install vTiger on Ubuntu v10.04 from source.  NOTE: This is simply a tutorial for getting vTiger CRM up and running.  Make sure to read <a href="http://wiki.vtiger.com/index.php/User_Documentation" target="_blank">vTiger&#8217;s User Documentation</a> on how to properly set the permissions to the files to appropriately lock it down prior to deployment</p>
<p><em><strong>1.) Download the vTiger source</strong></em></p>
<p>wget http://sourceforge.net/projects/vtigercrm/files/vtiger%20CRM%205.2.0%20VB2/vtigercrm-5.2.0-vb2.tar.gz/download</p>
<p><em><strong>2.) Install all the required libraries, MySQL, and PHP via APT</strong></em></p>
<p>sudo apt-get install binutils cpp flex gcc libarchive-zip-perl libc6-dev libcompress-zlib-perl libpcre3 libpopt-dev lynx m4 make  ncftp nmap openssl perl perl-modules unzip zip zlib1g-dev autoconf automake1.9 libtool bison autotools-dev gcc libpng12-dev libjpeg62-dev libfreetype6-dev libssl-dev libxml2-dev libxml2 apache2 php5-mysql libapache2-mod-php5 mysql-server php5-gd php5-imap</p>
<p><em><strong>3.) Configure Apache: /etc/apache2/sites-available/default (this is just a basic Apache, you can customize for your own purposes)</strong></em></p>
<p>&lt;VirtualHost *:80&gt;<br />
ServerName tiger.mydomain.com<br />
DocumentRoot /var/www</p>
<p># Possible values include: debug, info, notice, warn, error, crit,<br />
# alert, emerg.<br />
LogLevel warn<br />
ErrorLog /var/log/apache2/error.log<br />
CustomLog /var/log/apache2/access.log combined<br />
ServerSignature Off</p>
<p>&lt;/VirtualHost&gt;</p>
<p><em><strong>4.) Give the access to these files: sudo chmod -R a+rw</strong></em></p>
<p>sudo chmod -R a+rw config.inc.php<br />
sudo chmod -R a+rw tabdata.php<br />
sudo chmod -R a+rw install.php<br />
sudo chmod -R a+rw parent_tabdata.php<br />
sudo chmod -R a+rw cache<br />
sudo chmod -R a+rw cache/images/<br />
sudo chmod -R a+rw cache/import/<br />
sudo chmod -R a+rw storage/<br />
sudo chmod -R a+rw install/<br />
sudo chmod -R a+rw user_privileges/<br />
sudo chmod -R a+rw Smarty/cache/<br />
sudo chmod -R a+rw Smarty/templates_c/<br />
sudo chmod -R a+rw modules/Emails/templates/<br />
sudo chmod -R a+rw modules/<br />
sudo chmod -R a+rw cron/modules/<br />
sudo chmod -R a+rw test/vtlib/<br />
sudo chmod -R a+rw backup/<br />
sudo chmod -R a+rw Smarty/templates/modules/<br />
sudo chmod -R a+rw test/wordtemplatedownload/<br />
sudo chmod -R a+rw test/product/<br />
sudo chmod -R a+rw test/user/<br />
sudo chmod -R a+rw test/contact/<br />
sudo chmod -R a+rw test/logo/<br />
sudo chmod -R a+rw logs/<br />
sudo chmod -R a+rw modules/Webmails/tmp/</p>
<p><em><strong>5.) Open a browser and go to the vTiger URL: http://vtiger.mydomain.com</strong></em></p>
<p>Start the Installation process by going to the new vtiger URL that you created.</p>
<p><em><strong>6.) Update /etc/php5/apache2/php.ini (make appropriate modifications, restart apache, check again)</strong></em></p>
<p>When you open the a browser and begin the install process, it will tell you the recommended settings for PHP (<a href="http://www.linuxquestions.org/questions/linux-software-2/vtiger-installation-on-a-ubuntu-server-v9-04-a-735979/" target="_blank">this forum post</a> has many of the changes that need to be made).  After modifying the php.ini file, restart apache and click &#8220;Check again&#8221;.  Everything should show up as ready.</p>
<p>If preinstall items still show up as missing, restart apache.  If the database will be on the same machine as vTiger, you can set the database host as localhost and maker sure to create a new db user:</p>
<p># mysql -u root -p<br />
mysql&gt; CREATE DATABASE vtiger_db DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;<br />
mysql&gt; GRANT ALL ON vtiger_db.* TO &#8216;vtigeruser&#8217;@'localhost&#8217; IDENTIFIED BY &#8216;SET_PASSWORD_HERE&#8217;;</p>
<p><em><span style="text-decoration: underline;"><strong>Installing the Customer Portal Plugin to vTiger</strong></span></em></p>
<p>So, after trying out vTiger for a bit, I wanted to test drive the customer portal plugin.  This looked like a very simple install according to the <a href="http://wiki.vtiger.com/index.php/Vtiger_Customer_Portal_User_Guide" target="_blank">vTiger Customer Portal User Guide</a>, and it would have been had I disabled Deprecated warnings from PHP.  It&#8217;s 3 simple steps:</p>
<p>From the Wiki:</p>
<blockquote><p>1. Download the vtiger_Customer_Portal_4_2.zip file from the <a title="http://prdownloads.sourceforge.net/vtigercrm/vtiger_Customer_Portal_4_2.zip?download" rel="nofollow" href="http://prdownloads.sourceforge.net/vtigercrm/vtiger_Customer_Portal_4_2.zip?download">http://prdownloads.sourceforge.net/vtigercrm/vtiger_Customer_Portal_4_2.zip?download</a></p>
<p>2.Extract the vtiger_Customer_Portal_4_2.zip file to an  appropriate location in your Web site. After extracting the file  structure will be &lt;Web Site&gt;/vtigerCRM/customerportal/&lt;Portal  related Files&gt;. You can also modify the directory structure as per  your Web site file conventions.</p>
<p>3. Modify the PortalConfig.php file present under vtigerCRM/customerportal/ as given below:</p>
<p>Server_Path: Specify the absolute path (URL) of the vtiger CRM server. For example, if your vtiger CRM server is running at <a title="http://vtigercrm.com/demo" rel="nofollow" href="http://vtigercrm.com/demo">http://vtigercrm.com/demo</a> means you need to specify the Server_Path as given below:</p>
<pre>$Server_Path = "<a title="http://vtigercrm.com/demo" rel="nofollow" href="http://vtigercrm.com/demo">http://vtigercrm.com/demo</a>";
</pre>
<p>Authenticate_Path: Specify the absolute path (URL) of the vtiger  Customer Portal directory in your Web site. For example, if you have  extracted the vtiger Customer Portal related files in to your Web site  at <a title="http://vtiger.com/demo/portal" rel="nofollow" href="http://vtiger.com/demo/portal">http://vtiger.com/demo/portal</a> means you need to specify the value for Authenticate_Path parameter as given below:</p>
<pre>$Authenticate_Path = "<a title="http://vtiger.com/demo/portal" rel="nofollow" href="http://vtiger.com/demo/portal">http://vtiger.com/demo/portal</a>";
</pre>
<p>Now save the PortalConfig.php file.</p></blockquote>
<p>Now, at this point, everything should be ready.  I created a test customer portal account without any issue, but when attempting to login, I received this error: &#8220;Could not connect to server. Please contact the administrator.&#8221;  After spending some time on the forums and trying out different things (<a href="http://forums.vtiger.com/viewtopic.php?t=23258" target="_blank">here</a> and <a href="http://forums.vtiger.com/viewtopic.php?t=18902" target="_blank">here</a>, and various others), I started looking directly at the code.  Specifically, /customerportal/CustomerAuthenticate.php, which has a nice little block of code commented out with the following comment above the code block:  <em> </em></p>
<p><em>//Uncomment the following lines to get the error message in login screen itself.</em></p>
<p>Excellent.  I uncomment the block and see this error: XML error parsing SOAP payload on line 2: Not well-formed (invalid token).  After some more forum searching, I finally just opened the URL in a browser and found that the error was being thrown because Apache was returning Deprecated warning messages for some of the functions in the PHP libraries.  Then it was just a matter of updating /etc/php5/apache2/php.ini:</p>
<p><em>error_reporting = E_ALL &amp; ~E_NOTICE &amp; ~E_DEPRECATED</em></p>
<p>Restart Apache and everything should be all set!  NOTE:  If you were following along exactly, make sure to re-comment out that block of code in /customerportal/CustomerAuthenticate.php that returned the error.</p>
<p>I still haven&#8217;t decided if I am settling with vTiger or if I will be going with something else.  However, I went through the trouble of getting it up and running on Ubuntu and didn&#8217;t see any good tutorials on how to do this (except one good forum post), so I thought I&#8217;d share the howto.  I hope this helps!</p>
<p>References:</p>
<p>- <a href="http://news.slashdot.org/story/10/07/13/2358224/SugarCRM-6-Released-But-Is-It-Open-Source" target="_blank">Slashdot: SugarCRM 6 Released, But Is It Open Source?</a><br />
- <a href="http://wiki.vtiger.com/index.php/vtiger510:Installation_on_Linux" target="_blank">vTiger 510 Installation on Linux</a><br />
- <a href="http://www.linuxquestions.org/questions/linux-software-2/vtiger-installation-on-a-ubuntu-server-v9-04-a-735979/" target="_blank">vTiger Installation on Ubuntu v9.04</a><br />
- <a href="http://wiki.vtiger.com/index.php/Vtiger_CRM_-_Installation_Manual" target="_blank">vTiger CRM Installation Manual</a><br />
- <a href="http://duntuk.com/how-disable-php-53-deprecated-errors" target="_blank">How to disable PHP 5.3 Deprecated errors</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.christopherkois.com/?feed=rss2&amp;p=512</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Breaking the &#8220;encryption algorithm&#8221; for Microsoft Dynamics GP &#8211; Dexterity Encryption</title>
		<link>http://www.christopherkois.com/?p=448&amp;utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=breaking-the-encryption-algorithm-for-microsoft-dynamics-gp-dexterity-encryption</link>
		<comments>http://www.christopherkois.com/?p=448#comments</comments>
		<pubDate>Fri, 21 May 2010 05:50:29 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Dynamics GP]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Information Security]]></category>
		<category><![CDATA[Dynamics]]></category>
		<category><![CDATA[Encryption]]></category>
		<category><![CDATA[Microsoft]]></category>

		<guid isPermaLink="false">http://www.christopherkois.com/?p=448</guid>
		<description><![CDATA[FULL DISCLOSURE &#8211; I HAVE UPDATED THE ORIGINAL POST AND HAVE ADDED COMMENTS IN ITALIC AND RETRACTED OTHERS WITH A STRIKETHROUGH I use the term &#8220;encryption&#8221; loosely in this article. As you read on, you&#8217;ll realize why&#8230; I&#8217;ve been doing some work on a plugin for Microsoft Dynamics GP, which is an accounting system aimed [...]]]></description>
			<content:encoded><![CDATA[<p>FULL DISCLOSURE &#8211; I HAVE UPDATED THE ORIGINAL POST AND HAVE ADDED COMMENTS IN ITALIC AND RETRACTED OTHERS WITH A STRIKETHROUGH</p>
<p>I use the term &#8220;encryption&#8221; loosely in this article.  As you read on, you&#8217;ll realize why&#8230;</p>
<p>I&#8217;ve been doing some work on a plugin for <a href="http://www.microsoft.com/dynamics/en/us/products/gp-overview.aspx" target="_blank">Microsoft Dynamics GP</a>, which is an accounting system aimed at Medium sized to Large businesses.  To give you an idea of what type of application this is: There are companies that pay somewhere around $10,000-$15,000 to consultants or VARS (Value Added Resellers) to implement a Microsoft Dynamics GP solution for their business.  Many of the VARs have their own plugins and solutions for Microsoft Dynamics GP, usually written in .NET or <a href="http://en.wikipedia.org/wiki/Dexterity_programming_language" target="_blank">Dexterity</a>.  The process of installing and maintaining GP is an industry all it&#8217;s own and it&#8217;s not cheap for a company to maintain this accounting system.</p>
<p>I&#8217;ve been searching for the &#8220;encryption algorithm&#8221; or at least some way other way to &#8220;encrypt&#8221; data in GP in some other way than within Dexterity code.  I was really hoping that there would be some .NET library that would do this for me, but I was never able to find anything that would help me do this.  So, I became interested in what type of &#8220;encryption&#8221; this is.  Somewhere (I can&#8217;t remember where) I found something that indicated that the it&#8217;s a symmetric key encryption algorithm.  The message boards were not much help either.  Anywhere I went, I basically saw this same type of statement, <a href="http://www.eggheadcafe.com/software/aspnet/33042377/odbc-dsn-dynamics-gp-syst.aspx" target="_blank">&#8220;the encryption algorithm is a closely guarded secret&#8221;.</a></p>
<p>Today, while doing some testing, I noticed something with data that we were saving to a field which utilizes the GP &#8220;encryption&#8221;.  The plugin I was testing puts data in an encrypted field (not that it needs to because it&#8217;s not sensitive in nature), and I was testing with the same values each time.  As I would expect, I saw the same data stored in the field in the database for each row in the table.  However, I noticed that one of the entries was different, by 2 characters.  That seemed very odd to me.  After looking at it some more and conducting some more tests, it looks like I simply miskeyed my test data, but it prompted me to take another look at this.</p>
<p>After trying a couple different combinations of test data, it became very obvious that changing only one character in the test data appeared to only alter 2 characters of the encrypted data.  So I ran through a battery of tests, and came up with this:</p>
<p>&#8217;1&#8242;=&#8217;DF&#8217;, &#8217;2&#8242;=&#8217;DC&#8217;, &#8217;3&#8242;=&#8217;DD&#8217;, &#8217;4&#8242;=&#8217;DA&#8217;, &#8217;5&#8242;=&#8217;DB&#8217;, &#8217;6&#8242;=&#8217;D8&#8242;, &#8217;7&#8242;=&#8217;D9&#8242;, &#8217;8&#8242;=&#8217;D6&#8242;,<br />
&#8217;9&#8242;=&#8217;D7&#8242;, &#8216;A&#8217;='AF&#8217;, &#8216;B&#8217;='AC&#8217;, &#8216;C&#8217;='AD&#8217;, &#8216;D&#8217;='AA&#8217;, &#8216;E&#8217;='AB&#8217;, &#8216;F&#8217;='A8&#8242;, &#8216;G&#8217;='A9&#8242;,<br />
&#8216;H&#8217;='A6&#8242;, &#8216;I&#8217;='A7&#8242;, &#8216;J&#8217;='A4&#8242;, &#8216;K&#8217;='A5&#8242;, &#8216;L&#8217;='A2&#8242;, &#8216;M&#8217;='A3&#8242;, &#8216;N&#8217;='A0&#8242;, &#8216;O&#8217;='A1&#8242;,<br />
&#8216;P&#8217;='BE&#8217;, &#8216;Q&#8217;='BF&#8217;, &#8216;R&#8217;='BC&#8217;, &#8216;S&#8217;='BD&#8217;, &#8216;T&#8217;='BA&#8217;, &#8216;U&#8217;='BB&#8217;, &#8216;V&#8217;='B8&#8242;, &#8216;W&#8217;='B9&#8242;,<br />
&#8216;X&#8217;='B6&#8242;, &#8216;Y&#8217;='B7&#8242;, &#8216;Z&#8217;='B4&#8242;, &#8216;a&#8217;=&#8217;8F&#8217;, &#8216;b&#8217;=&#8217;8C&#8217;, &#8216;c&#8217;=&#8217;8D&#8217;, &#8216;d&#8217;=&#8217;8A&#8217;, &#8216;e&#8217;=&#8217;8B&#8217;,<br />
&#8216;f&#8217;=&#8217;88&#8242;, &#8216;g&#8217;=&#8217;89&#8242;, &#8216;h&#8217;=&#8217;86&#8242;, &#8216;i&#8217;=&#8217;87&#8242;, &#8216;j&#8217;=&#8217;84&#8242;, &#8216;k&#8217;=&#8217;85&#8242;, &#8216;l&#8217;=&#8217;82&#8242;, &#8216;m&#8217;=&#8217;83&#8242;,<br />
&#8216;n&#8217;=&#8217;80&#8242;, &#8216;o&#8217;=&#8217;81&#8242;, &#8216;p&#8217;=&#8217;9E&#8217;, &#8216;q&#8217;=&#8217;9F&#8217;, &#8216;r&#8217;=&#8217;9C&#8217;, &#8216;s&#8217;=&#8217;9D&#8217;, &#8216;t&#8217;=&#8217;9A&#8217;, &#8216;u&#8217;=&#8217;9B&#8217;,<br />
&#8216;v&#8217;=&#8217;98&#8242;, &#8216;w&#8217;=&#8217;99&#8242;, &#8216;x&#8217;=&#8217;96&#8242;, &#8216;y&#8217;=&#8217;97&#8242;, &#8216;z&#8217;=&#8217;94&#8242;, &#8216;!&#8217;='CF&#8217;, &#8216;@&#8217;='AE&#8217;, &#8216;#&#8217;='CD&#8217;,<br />
&#8216;$&#8217;='CA&#8217;, &#8216;%&#8217;='CB&#8217;, &#8216;^&#8217;='B0&#8242;, &#8216;&amp;&#8217;='C8&#8242;, &#8216;*&#8217;='C4&#8242;, &#8216;(&#8216;=&#8217;C6&#8242;, &#8216;)&#8217;='C7&#8242;, &#8216; &#8216;=&#8217;CE&#8217;,<br />
&#8221;=&#8217;20&#8242;, &#8221;=&#8217;00&#8242;,&#8217;-'=&#8217;C3&#8242;, &#8216;_&#8217;='B1&#8242;, &#8216;=&#8217;='D3&#8242;, &#8216;+&#8217;='C5&#8242;, &#8216;['='B5', ']&#8216;=&#8217;B3&#8242;,<br />
&#8216;{&#8216;=&#8217;95&#8242;, &#8216;}&#8217;=&#8217;93&#8242;, &#8216;\&#8217;='B2&#8242;, &#8216;|&#8217;=&#8217;92&#8242;, &#8216;;&#8217;='D5&#8242;, &#8216;:&#8217;='D4&#8242;, &#8221;&#8221;=&#8217;C9&#8242;, &#8216;&#8221;&#8216;=&#8217;CC&#8217;,<br />
&#8216;=&#8217;='C2&#8242;, &#8216;&lt;&#8217;='D2&#8242;, &#8216;.&#8217;='C0&#8242;, &#8216;&gt;&#8217;='D0&#8242;, &#8216;/&#8217;='C1&#8242;, &#8216;?&#8217;='D1&#8242;, &#8216;`&#8217;=&#8217;8E&#8217;, &#8216;~&#8217;=&#8217;90&#8242;</p>
<p>Yep, it&#8217;s basically your run-of-the-mill Substitution cipher.  The worst part, there&#8217;s evidence all over the place that this was a VERY weak encryption algorithm for awhile, but nobody seemed to pay any attention to it when people were asking how they could reset passwords of users in the database (<a href="https://community.dynamics.com/blogs/gpmohammad/comments/33220.aspx" target="_blank">Post 1</a> &#8211; <a href="http://www.microsoftdynamicsforums.com/forums/forum_posts.asp?TID=1647" target="_blank">Post 2</a>)</p>
<p>I did some more searching, because there is ABSOLUTELY NO WAY THAT I AM THE ONLY ONE THAT SAW THIS&#8230;  I found a good write up on the MSDN blogs that explains pretty well how the GP encryption was used (<a href="http://blogs.msdn.com/developingfordynamicsgp/archive/2008/10/02/why-does-microsoft-dynamics-gp-encrypt-passwords.aspx" target="_blank">here</a>).</p>
<p>The article is evidence to support a theory that I have, which is after GP moved to SQL server authentication, the encryption method didn&#8217;t seem to be needed any longer so they never replaced.  I don&#8217;t know if the word was released to developers and integrators that the &#8220;encryption algorithm&#8221; wasn&#8217;t ideal for storage of sensitive information, but I don&#8217;t know how many plugins or customizations use it either.</p>
<p>EXCEPT&#8230;.  Microsoft still uses it for their GP system password, which is the password needed to get to the Security Roles/Tasks and all the User Security related forms while in GP.  What&#8217;s even worse, if you create a new user, you have to give the user explicit rights to the company or companies you want the user to access, but you DON&#8217;T HAVE TO GIVE ACCESS TO THE DYNAMICS DATABASE.  <span style="text-decoration: line-through;">What that means is if you create a base user in GP, that user can log into the SQL server and run select AND INSERT statements on tables containing the &#8220;encrypted&#8221; GP System password and Security Roles&#8230;  Not good&#8230;</span> <em>I must correct this and clarify.  By default, GP gives the user access to the DYNAMICS database but the user CANNOT login to the SQL server using SQL Enterprise Manager.  Here&#8217;s what happened: I reset the LESSONUSER&#8217;s passwords with SQL Enterprise Manager and afterward I was able to login to SQL Enterprise Manager with the LESSONUSER&#8217;s credentials.  Some flag most have been updated when I reset the password &#8211; I need to investigate this further (this was all done in a Test environment).  This was a BIG oversight on my part and I apologize for this.  I really should have tested this out more before posting that statement. (Thank you Mark and others that pointed this out to me).</em></p>
<p>I created a function that you can use to decrypt GP &#8220;encrypted&#8221; data.  You can find it <a href="http://www.christopherkois.com/wp-content/uploads/2010/05/fn_decrypt_value.txt" target="_blank">here</a> <em>(link is working again)</em>.  If you create the function on the SQL server, you can then retrieve the Master password by running this query:</p>
<pre>select dbo.[fn_Decrypt_Value] (PASSWORD, 16) from DYNAMICS.dbo.SY02400</pre>
<p><em>Another point I need to clarify, as Mark pointed out, this master password is just a secondary password that is OPTIONAL. </em><em>THIS PASSWORD DOES NOT GIVE YOU ACCESS TO GP.</em><em> If you have this password set, the user attempting to access the Security Roles/User Forms will need to enter it.  This is not a very secure way to store this password, but it is not the primary form of authentication to GP.</em></p>
<p>I did ALOT of searching to see if anyone had reported this in the past, but I found no indication of this ever being found.  I don&#8217;t know if this is a &#8220;REAL&#8221; discovery, but I would think it&#8217;s worth knowing.  I hope you found this informative!</p>
<p><em>This was originally meant to be a disclosure that the Microsoft Dynamics GP Dexterity Encryption algorithm was weak and has been broken.  The retracted statement was an oversight on my part and I&#8217;m sorry for this.</em></p>
<p>Other References:</p>
<p><a href="http://www.streetdirectory.com/travel_guide/122860/microsoft/microsoft_dynamics_gp_table_structure_overview.html" target="_blank">Microsoft Dynamics GP Table Structure Overview</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.christopherkois.com/?feed=rss2&amp;p=448</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Reading a user&#8217;s web history via CSS</title>
		<link>http://www.christopherkois.com/?p=426&amp;utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=reading-a-users-web-history-via-css</link>
		<comments>http://www.christopherkois.com/?p=426#comments</comments>
		<pubDate>Thu, 20 May 2010 01:36:20 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Information Security]]></category>
		<category><![CDATA[Internet Privacy]]></category>

		<guid isPermaLink="false">http://www.christopherkois.com/?p=426</guid>
		<description><![CDATA[Slashdot ran an interesting story titled: &#8220;76% Web Users Affected by Browser History Stealing&#8220;. NoScript alone can&#8217;t save you from this one. The truly amazing part is that it&#8217;s been around for 10 years and it&#8217;s STILL a known problem with modern web browsers. There&#8217;s a great proof-of-concept site here which will conduct the history [...]]]></description>
			<content:encoded><![CDATA[<p>Slashdot ran an interesting story titled: &#8220;<a href="http://yro.slashdot.org/story/10/05/19/1425240/76-Web-Users-Affected-By-Browser-History-Stealing" target="_blank">76% Web Users Affected by Browser History Stealing</a>&#8220;.  <a href="http://noscript.net/" target="_blank">NoScript</a> alone can&#8217;t save you from this one.  The truly amazing part is that it&#8217;s been around for 10 years and it&#8217;s STILL a known problem with modern web browsers.</p>
<p>There&#8217;s a great proof-of-concept site <a href="http://whattheinternetknowsaboutyou.com" target="_blank">here</a> which will conduct the history leak on your browser.  There&#8217;s 2 ways it can do this: Javascript and CSS.  I&#8217;ve been aware of the Javascript method for years, but I&#8217;ve only heard about a possible way of doing this with CSS (I&#8217;ve never seen it in action before).  That&#8217;s the part I found really cool.</p>
<p>From <a href="http://whattheinternetknowsaboutyou.com" target="_blank"></a><a href="http://whattheinternetknowsaboutyou.com/docs/details.html" target="_blank">http://whattheinternetknowsaboutyou.com/docs/details.html</a> with regard to conducting this using CSS:</p>
<blockquote><p><em>Using the :visited pseudoclass on a elements, it is possible to specify a background-url attribute which will make a request to the server if a particular link has been visited. We can thus achieve the same goal of determining visited links without using Javascript. For example:</em></p></blockquote>
<blockquote>
<pre>
<pre><em>&lt;style&gt;
	a#link1:visited { background-image: url(/log?link1_was_visited); }
	a#link2:visited { background-image: url(/log?link2_was_visited); }
&lt;/style&gt;
&lt;a href="http://google.com" id="link1"&gt;
&lt;a href="http://yahoo.com" id="link2"&gt; </em></pre>
</pre>
</blockquote>
<p>The site even does a write up on solutions to help avoid this (<a href="http://whattheinternetknowsaboutyou.com/docs/solutions.html" target="_blank">here</a>):<br />
For a quick fix: Firefox or Chrome users, you have private browsing mode or incognito mode respectively.</p>
<p>If you run Internet Explorer (which you should never do), there&#8217;s not a whole lot you can do aside from disabling CSS, which will break most websites today.  For prevention methods in IE, Microsoft has an MSDN article for you <a href="http://blogs.msdn.com/ieinternals/archive/2009/06/17/CSSHistoryProbing.aspx" target="_blank">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.christopherkois.com/?feed=rss2&amp;p=426</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Wireless Pineapple &#8211; Karma on the FON with Jasager</title>
		<link>http://www.christopherkois.com/?p=233&amp;utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=the-wireless-pineapple-karma-on-the-fon-with-jasager</link>
		<comments>http://www.christopherkois.com/?p=233#comments</comments>
		<pubDate>Tue, 04 May 2010 02:39:41 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Information Security]]></category>
		<category><![CDATA[Wireless Security]]></category>
		<category><![CDATA[FON]]></category>
		<category><![CDATA[Jasager]]></category>

		<guid isPermaLink="false">http://www.christopherkois.com/?p=233</guid>
		<description><![CDATA[After many episodes featuring the wireless pineapple on Hak5, I decide that it is time to get one and try it out (I&#8217;m way late getting to this one &#8211; about 4 years late). I actually won 2 auctions for the FON on EBay so I bought 2 of them. Anyway, I was going to [...]]]></description>
			<content:encoded><![CDATA[<p>After many episodes featuring the wireless pineapple on <a href="http://www.hak5.org" target="_blank">Hak5</a>, I decide that it is time to get one and try it out (I&#8217;m way late getting to this one &#8211; about 4 years late).  I actually won 2 auctions for the FON on EBay so I bought 2 of them.</p>
<p>Anyway, I was going to write a HOWTO for this, but I came across <a href="http://www.darrenkitchen.net/jasager-step-by-step-unlocking-install-guide" target="_blank">Darren Kitchen&#8217;s Jasager HOWTO</a>, which is a very comprehensive, step-by-step walkthrough with screenshots, and I felt that there is no need to write a HOWTO after using his.  If you are just starting out with the FON and you are looking for a good HOWTO to get Jasager up and running, I would recommend that you start <a href="http://www.darrenkitchen.net/jasager-step-by-step-unlocking-install-guide" target="_blank">here</a>.  The only thing I can add to the HOWTO, on Step 10, I needed to use single quotes instead of double quotes for the command issued to patch the Redboot config:</p>
<blockquote><p>From<em>: mtd -e “RedBoot config” write out.hex “RedBoot config”</em><br />
To<em>: mtd -e &#8216;RedBoot config&#8217; write out.hex &#8216;RedBoot config&#8217;</em></p></blockquote>
<p>The FON is a TON of a fun to play around with.  If you play around with it enough, it&#8217;s almost inevitable that you will probably brick it at least once.  The <a href="http://www.h-i-r.net" target="_blank">HiR Information Report</a> has a great write up on how to un-brick the FON with a link to a script that will help you connect to the FON through telnet (if you kept it enabled).  <a href="http://www.h-i-r.net/2008/10/la-fonera-lab-fon-un-bricking-howto.html" target="_blank">Here</a> is a link to the article and the <a href="http://www.digininja.org/files/redboot.pl" target="_blank">redboot.pl script</a> from Digininja&#8217;s site.</p>
<p>Of course, if you need to do this, you will need to setup a TFTP server on your machine connecting to the FON to copy over the firmware.</p>
<p><a href="http://www.ubuntugeek.com/howto-setup-advanced-tftp-server-in-ubuntu.html" target="_blank">Here</a> is a good HOWTO for setting up a TFTP server in Ubuntu.  NOTE: If you are running a version of Ubuntu 9.04 or later, you may need to add the &#8220;&#8211;daemon&#8221; option to /etc/default/atftpd in order for the <em><strong>sudo invoke-rc.d atftpd start</strong></em> command to work.</p>
<p>NOTE: This is NOT a new exploit by any means.  <a href="http://www.nmrc.org/pub/advise/20060114.txt" target="_blank">Here</a> is a link to an advisory released back in January of 2006.  And Microsoft was notified well in advance before the advisory was released.  From the advisory: &#8220;<em>Microsoft was contacted on October 13, 2005. After numerous exchanges of emails and a conference call, Microsoft was able to reproduce and isolate the issue within their software. As there are multiple and easy-to-implement workarounds for the issue, Microsoft has scheduled to include the fix in the next service packs</em>.&#8221;</p>
<p>The only &#8220;good&#8221; thing that I can say about this exploit is that doesn&#8217;t appear to affect newer versions of Windows (like Vista or Windows 7).  Of course, that won&#8217;t stop a user from manually connecting to a Wireless AP with the same name&#8230;  But that&#8217;s really a different issue altogether&#8230;</p>
<p>Here are the workarounds:</p>
<pre>Workaround #1:
 Disable wireless when not in use.

Workaround #2:
 Use an alternate Wireless Client Manager, (e.g. for an integrated Intel Wifi
 connector, use Intel PROSet/Wireless) as all others tested do not seem to
 have the problem (this testing was not all-inclusive).

Workaround #3 (recommended):
 1. Click on the Wireless option in the System Tray and open the Wireless
    Network Connection window.
 2. Click on "Change advanced settings".
 3. In the Wireless Network Connection Properties window, click on the Wireless
    Networks tab.
 4. Click on the Advanced button.
 5. Click on "Access point (infrastructure) networks only"
 This workaround prevents you from connecting to any ad-hoc network in the
 first place.</pre>
<p>Sources:</p>
<p><a href="http://www.nmrc.org/pub/advise/20060114.txt" target="_blank">1.) Microsoft Windows Silent Adhoc Network Advertisement</a></p>
<p><a href="http://www.matthewneely.com/storage/slides/Neely-Tool_Talk-Jasager_and_Karmetasploit.pdf" target="_blank">2.) Tool Talk: Jasager and Karmetasploit</a></p>
<p><a href="http://www.windowsitpro.com/article/wireless-technology2/bad-karma-for-wi-fi-on-windows-.aspx" target="_blank">3.) Bad Karma for Wi-Fi on Windows?</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.christopherkois.com/?feed=rss2&amp;p=233</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scanning Adobe Flash Files with SWFScan</title>
		<link>http://www.christopherkois.com/?p=351&amp;utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=scanning-adobe-flash-files-with-swfscan</link>
		<comments>http://www.christopherkois.com/?p=351#comments</comments>
		<pubDate>Tue, 27 Apr 2010 01:10:05 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Information Security]]></category>

		<guid isPermaLink="false">http://www.christopherkois.com/?p=351</guid>
		<description><![CDATA[I was lucky enough to attend the 1st ever Thotcon on Friday. There was a pretty good gathering with talks ranging from GNU Radio Hacking, to Computer Forensic Tool Failures, to Social Engineering (which is usually my personal favorite). One of the talks that really stuck out to me was titled Dr. Evil&#8217;s Guide to [...]]]></description>
			<content:encoded><![CDATA[<p>I was lucky enough to attend the 1st ever <a href="http://www.thotcon.org" target="_blank">Thotcon</a> on Friday.  There was a pretty good gathering with talks ranging from GNU Radio Hacking, to Computer Forensic Tool Failures, to Social Engineering (which is usually my personal favorite).  One of the talks that really stuck out to me was titled Dr. Evil&#8217;s Guide to Web 2.0 given by <a href="http://twitter.com/rafallos" target="_blank">Rafal Los</a>.  Rafal demonstrated a tool called <a href="https://h30406.www3.hp.com/campaigns/2009/wwcampaign/1-5TUVE/index.php?key=swf" target="_blank">SWFScan</a> available from HP.  By using this tool, a prospective attacker could download a flash app, decompile it, and analyze the code for possible security holes.  Sounds like any other client server attack tool, right?  It is, but the REALLY interesting part is how careless &#8220;developers of flash sites&#8221; are with giving database credentials and other sensitive information directly in the code.</p>
<p>Rafal did a good job in pointing out that the majority of people using Flash are marketing people with just enough technical knowledge to use Flash to create web sites.  The flash tools make it very simple for them to drag and drop objects on a screen, while not paying any attention to or keeping in mind any potential security vulnerabilities of allowing the client access to the compiled code.  Furthermore, when a database is involved, you are basically giving the client the digital keys to the castle without even thinking about the implications.</p>
<p>Before the talk, Rafal had told attendees of the conference (via Twitter) to bring their laptops to participate in a &#8220;game&#8221; during the talk.  At the beginning of his talk, he told everyone to download the SWFScan tool and start searching for vulnerable flash files.  I was in the audience sitting very close to a guy who pointed out a website where a login and password with what appeared to be Administrative credentials could clearly be read in the decompiled flash code.  It took the guy about 20 minutes to find this.  Also, during the talk someone else found a website making open-ended database calls to a webservice, through unencrypted HTTP, within the flash code, described <a href="http://www.communities.hp.com/securitysoftware/blogs/rafal/archive/2010/04/26/episode-22-quot-web-services-super-secret-quot.aspx" target="_blank">here</a> in this article written by Rafal.  I was absolutely sold on this being a massive problem after I heard all this.</p>
<p>I really wish this was difficult for someone to do&#8230;  I really wish I could say that only someone with solid technical knowledge of Flash could perform theses attacks&#8230;  Unfortunately, as Rafal pointed out in his talk, anyone who downloads a Flash decompiler tool, knows how to do a Google Search, and can READ can perform an attack on a vulnerable Flash site.  A couple months back, I saw a <a href="http://it.slashdot.org/story/09/12/29/1435259/Adobe-Flash-To-Be-Top-Hacker-Target-In-2010" target="_blank">Slashdot article that stated: &#8220;Adobe Flash To Be Top Hacker Target in 2010&#8243;</a>.  After Rafal&#8217;s talk, I would agree with that assessment.  If you run any flash on your website, I would HIGHLY recommend that you download the tool and analyze the code for any potential security issues.</p>
<p>BTW, props to Rafal Los, all the other speakers at Thotcon, and the guys that organized the conference.  You guys were awesome!  Furthermore, it was great to finally see a hacking conference in Chicago.  We were long overdue!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.christopherkois.com/?feed=rss2&amp;p=351</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Classic games never die &#8211; The original Quake on Linux</title>
		<link>http://www.christopherkois.com/?p=304&amp;utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=classic-games-never-die-the-original-quake-on-linux</link>
		<comments>http://www.christopherkois.com/?p=304#comments</comments>
		<pubDate>Sat, 13 Mar 2010 05:29:37 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Gaming]]></category>
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.christopherkois.com/?p=304</guid>
		<description><![CDATA[Every computer/modded pseudo-gaming system I have ever owned has run some version of the original Quake at some point.  It&#8217;s a classic game that I have beaten in single player mode a countless amount of times and have invested an insane amount of hours in the multiplayer side of the game (I&#8217;m embarrassed to even [...]]]></description>
			<content:encoded><![CDATA[<p>Every computer/modded pseudo-gaming system I have ever owned has run some version of the original Quake at some point.  It&#8217;s a classic game that I have beaten in single player mode a countless amount of times and have invested an insane amount of hours in the multiplayer side of the game (I&#8217;m embarrassed to even come up with a number of hours total).  The original Quake is one of those first person shooter games that I hold near and dear to my heart.  I get nostalgic every now and again and that nostalgia leads to me installing the game on whatever PC/laptop that I&#8217;m currently using to bank some more hours into the game.</p>
<p>Besides the nostalgia factors of wanting to play the game, another reason I absolutely love the game is that the hardware requirements for playing the game are very minimal.  Because of this, I can play Quake on almost anything that I ever come across.  I currently use an on old Thinkpad X23 as basically a netbook.  The X23&#8242;s size allows me to carry it anywhere without it being a burden during travel.  I currently run Ubuntu 9.10 on this 8 year old laptop without any issues.  This laptop runs a Pentium III 800 mhz processor with only 600 MB of RAM (the processor is pretty obsolete by today&#8217;s standards).  But, it&#8217;s still good enough to play Quake.  For me, that&#8217;s awesome.</p>
<p>Quake on Ubuntu is very easy to get going:</p>
<p><strong>1.) Install DOSBox and the SDL-Net lib from apt</strong></p>
<blockquote><p><em><strong>sudo apt-get install dosbox libsdl-net1.2</strong></em></p></blockquote>
<p><strong>2.) Download and copy quakespasm to the /usr/local/games/quake directory</strong></p>
<blockquote><p><em><strong>sudo mkdir /usr/local/games/quake</strong></em><br />
<em><strong>sudo cp quakespasm /usr/local/games/quake/quake</strong></em></p></blockquote>
<p><strong>3.) Download the Quake shareware zip from idSoftware and run it in DOSBox</strong></p>
<blockquote><p><em><strong>cd /home/username/Downloads/</strong></em><br />
<em><strong>mkdir quake106</strong></em><br />
<em><strong>cp quake106.zip quake106/.</strong></em><br />
<em><strong>cd quake106</strong></em><br />
<em><strong>unzip quake106.zip</strong></em></p></blockquote>
<p>Now, run DOSBox from the command line: <em><strong>dosbox</strong></em></p>
<p>In DOSBox, mount the folder where the unzipped quake files are and run the install:</p>
<blockquote><p><em><strong>mount c /home/usernane/Downloads/quake106/</strong></em><br />
<em><strong>C:</strong></em><br />
<em><strong>install.bat<br />
</strong></em></p></blockquote>
<p>Install the files in whatever directory you want (probably will be C:\QUAKE_SW).  Wait until it finishes.  Now, at this point, you could run Quake straight from DOSBox, although it&#8217;s not really optimal for graphics and sound (but, in my case runs just fine).</p>
<p>NOTE: If you want to run DOSBox in full screen mode, press <em>Alt + Enter</em></p>
<p><strong>4.) Copy quake files to /usr/local/games/quake</strong></p>
<blockquote><p><em><strong>sudo mkdir /usr/local/games/quake/id1</strong></em><br />
<em><strong>sudo cp /home/username/Downloads/quake106/QUAKE_SW/ID1/PAK0.PAK /usr/local/games/quake/id1/pak0.pak<br />
</strong></em></p></blockquote>
<p>Linux Quake requires (most) filenames to be in lowercase.  If you get an error similar to &#8220;<strong>Error: W_LoadWadFile: couldn&#8217;t load gfx.wad</strong>&#8221; it means the game can&#8217;t find the data files, possibly because they are not all lowercase.  Make sure you have the subdirectory &#8220;id1&#8243; (not &#8220;ID1&#8243;) containing the files &#8220;pak0.pak&#8221; and &#8220;pak1.pak&#8221;.</p>
<p>NOTE: There are MANY Quake ports to Linux besides <a href="http://sourceforge.net/projects/quakespasm/" target="_blank">Quakespasm</a>: <a href="http://ezquake.sourceforge.net/" target="_blank">EZQuake</a>, <a href="http://quakeone.com/proquake/" target="_blank">ProQuake</a>, <a href="http://tenebrae.sourceforge.net/" target="_blank">Tenebrae</a>, etc.  I just chose one, but they are all just about equally as easy to install.</p>
<p>There you have it.  Enjoy some original Quake on Linux!</p>
<p><span style="text-decoration: underline;"><em>Sources:</em></span><br />
<a href="http://tldp.org/HOWTO/Quake-HOWTO.html" target="_blank">1.) Linux Quake HOWTO</a><br />
<a href="http://sourceforge.net/projects/quakespasm/" target="_blank">2.) Quakespasm on SourceForge</a><br />
<a href="http://www.idsoftware.com/games/quake/quake/index.php?game_section=demo" target="_blank">3.) Quake from id Software</a><br />
<a href="https://help.ubuntu.com/community/DOSBox" target="_blank">4.) Ubuntu Community &#8211; DosBox</a><br />
<a href="http://www.dosbox.com/wiki/Basic_Setup_and_Installation_of_DosBox" target="_blank">5.) Basic Setup and Installation of DosBox</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.christopherkois.com/?feed=rss2&amp;p=304</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Watch Revision3 shows on PS3/XBox 360/XBMC in HD</title>
		<link>http://www.christopherkois.com/?p=261&amp;utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=watch-revision3-shows-on-ps3xbox-360xbmc-in-hd</link>
		<comments>http://www.christopherkois.com/?p=261#comments</comments>
		<pubDate>Wed, 10 Mar 2010 03:19:44 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Media Center]]></category>

		<guid isPermaLink="false">http://www.christopherkois.com/?p=261</guid>
		<description><![CDATA[I&#8217;m a big fan of Revision3 programming. I really wanted to be able to watch their shows on any media center client (including gaming console media center clients), but I couldn&#8217;t find a website that would play Revision3 content in the PS3 web browser. The easiest way (that I know of) to watch Revision3 programming [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m a big fan of <a href="http://www.revision3.com/" target="_blank">Revision3</a> programming.  I really wanted to be able to watch their shows on any media center client (including gaming console media center clients), but I couldn&#8217;t find a website that would play Revision3 content in the PS3 web browser.  The easiest way (that I know of) to watch Revision3 programming and download new content as it is released is by subscribing to Revision3 shows via RSS feeds or through iTunes.  Whenever a new show is released, a link to the show is released via the RSS feed and iTunes will automatically download the podcast.  iTunes works good for Windows and Mac users, but Apple doesn&#8217;t have an iTunes application that runs on Linux.  However, there are several podcast aggregators for Linux that utilize RSS feeds to download the podcasts and save them to you local computer.  Once downloaded, you can stream the media to your media center client using <a href="http://mediatomb.cc/" target="_blank">Mediatomb</a>.  Mediatomb is a free uPnP Media Server application that runs on Linux and Mac OS X.</p>
<p>I actually use 2 media server applications: Mediatomb and <a href="http://ushare.geexbox.org/" target="_blank">uShare</a>.  uShare is another free UPnP A/V &amp; DLNA Media Server that runs on Linux.  It&#8217;s fairly easy to setup.  I have found that there are some things that uShare won&#8217;t play, but Mediatomb will and vice versa. In general, I found uShare to be very temperamental. Maybe it was something I configured wrong or the version of uShare that I am running (I am running the ushare package from the apt repository for Ubuntu Karmic), but I would constantly receive errors in the upper right corner of the screen while streaming content from my media server (the media would continue playing like nothing happened, I would just see DLNA errors in the upper right corner). Also, uShare would not play Revision3 MP4 podcasts out-of-the-box (I would have to transcode them into mpeg-1). On top of all of that, uShare didn&#8217;t recognize when new content was added to the stream folder without a restart of the ushare service (Mediatomb picks it up eventually since it appears to be indexing the content in the background). For instance, if I downloaded a new Revision3 show, my media center client would not see it until the uShare service was stopped and started again on the media server running uShare. After all these headaches and a few others, I decided to try other options for Revision3 programming.</p>
<p><a href="http://ushare.geexbox.org/" target="_blank"></a></p>
<p>NOTE: For XBMC, you don&#8217;t need to download the podcasts if you don&#8217;t want to.  You can stream the content directly from the Internet using the <a href="http://forum.xbmc.org/showthread.php?t=42458" target="_blank">Revision3 Video plugin for XBMC</a>.  However, if you want to download the podcasts, <a href="http://wiki.xbmc.org/index.php?title=UPnP_Sharing" target="_blank">XBMC works with uShare</a> and <a href="http://www.eeextra.com/linux/how-to-transform-the-eeebox-into-a-multimedia-server.html" target="_blank">Mediatomb</a>.</p>
<p>Here&#8217;s how to install Podget in Ubuntu and stream Revision3 podcasts to your media center client using Mediatomb:</p>
<p><strong>1.) Install podget and Mediatomb<br />
</strong></p>
<p><em><strong>sudo apt-get install podget mediatomb<br />
</strong></em></p>
<p><strong>2.) Configure podget</strong></p>
<p>Run podget to setup rc and serverlist files from your home directory:</p>
<p><em><strong>cd</strong></em><br />
<strong><em>podget</em></strong> ==&gt; (Once it starts to download a podcast, you can kill the podget process, or you can wait until it finishes &#8211; whatever you want)</p>
<p>Setup location of downloaded podcasts:</p>
<p><em><strong>pico .podget/podgetrc</strong></em></p>
<p><em>dir_library=/home/username/POD </em> ==&gt; Change if you want them saved somewhere else<br />
<em>most_recent=1</em> ==&gt; Default is 0, which downloads ALL new material.  I set it to download the most recent episode of each show.<br />
<em>cleanup=1</em> ==&gt; Default is 0, which will keep download podcasts indefinitely (if you have enough space and want to keep the podcasts forever, keep this at 0)<br />
<em>cleanup_days=30</em> ==&gt; Default is 7 &#8211; 30 days is approximately 4 weeks worth of programming, which should be good enough.</p>
<p>(<em>Ctrl+X</em>)    ==&gt; To save and exit out of pico</p>
<p>Setup podcasts to download:</p>
<p><em><strong>pico .podget/serverlist</strong></em></p>
<p>Comment out the shows that you don&#8217;t want and add the Revision3 shows that you want to download.  All of the Revision3 shows appear to have this format in an RSS feed: <em>http://revision3.com/showname/feed/fileformat</em></p>
<p><em>showname=hak5,diggnation,scamschool,filmriot,rofl,tekzilla</em><br />
<em>fileformat=MP4-Small,MP4-Large,MP4-hd30,MP4-High-Definition</em></p>
<p>Here are some examples that I used to download the shows in HD:</p>
<blockquote><p><em>http://revision3.com/hak5/feed/MP4-High-Definition Revision3 Hak5</em><br />
<em>http://revision3.com/diggnation/feed/</em><em>MP4-High-Definition</em><em> Revision3 Diggnation</em><br />
<em>http://revision3.com/scamschool/feed/</em><em>MP4-High-Definition</em><em> Revision3 Scam_School</em><br />
<em>http://revision3.com/filmriot/feed/</em><em>MP4-High-Definition</em><em> Revision3 Film_Riot</em><br />
<em>http://revision3.com/rofl/feed/</em><em>MP4-High-Definition</em><em> Revision3 ROFL</em></p></blockquote>
<p>(<em>Ctrl+X</em>)    ==&gt; To save and exit out of pico</p>
<p><strong>3.) Configure Mediatomb<br />
</strong></p>
<p>Edit Meditomb config file: <em><strong>sudo pico /etc/mediatomb/config.xml</strong></em></p>
<p>Depending on the media center client you are using, you will need to make the following edits to the config file (<a href="https://help.ubuntu.com/community/MediaTomb" target="_blank">source</a>):</p>
<p><!-- 		@page { margin: 0.79in } 		P { margin-bottom: 0.08in } 		H2 { margin-bottom: 0.08in } --></p>
<h2><span style="font-size: small;">Playstation 3 (PS3) Compatibility</span></h2>
<pre>   &lt;protocolInfo extend="yes"/&gt;&lt;!-- For PS3 support change to "yes" --&gt;
   &lt;!-- Uncomment the line below for PS3 divx support --&gt;
    &lt;map from="avi" to="video/divx"/&gt;</pre>
<h2><span style="font-size: small;">D-Link Media Player Compatibility</span></h2>
<pre>   &lt;!--
       Uncomment the lines below to get rid of jerky avi playback on the
       DSM320 or to enable subtitles support on the DSM units
    --&gt;
    &lt;custom-http-headers&gt;
      &lt;add header="X-User-Agent: redsonic"/&gt;
    &lt;/custom-http-headers&gt;

    &lt;manufacturerURL&gt;redsonic.com&lt;/manufacturerURL&gt;
    &lt;modelNumber&gt;105&lt;/modelNumber&gt;
        &lt;!-- Uncomment the line below for D-Link DSM / ZyXEL DMA-1000 --&gt;
        &lt;map from="avi" to="video/avi"/&gt;</pre>
<h2><span style="font-size: small;">ZyXEL DMA-1000 Compatibility</span></h2>
<pre>        &lt;!-- Uncomment the line below for D-Link DSM / ZyXEL DMA-1000 --&gt;
        &lt;map from="avi" to="video/avi"/&gt;</pre>
<p>&#8211;<br />
<strong>** When you are finished: </strong>(<em>Ctrl+X</em>)    ==&gt; To save and exit out of pico</p>
<p>Stop and Start Mediatomb:</p>
<p><em><strong>sudo /etc/init.d/mediatomb stop</strong></em><br />
<em><strong>sudo </strong></em><em><strong>/etc/init.d/</strong></em><em><strong>mediatomb start</strong></em></p>
<p>Open a web browser and navigate to: http://localhost:49152    ==&gt; Mediatomb may have put this on 49152, 49153, or 49154 (I have seen all of those used).</p>
<p>Click the <em><strong>Filesystem</strong></em> option on the left side.  Navigate to where the podcasts are downloaded: <em><strong>/home/username/POD</strong></em></p>
<p>Click the <em><strong>+</strong></em> on the right side to add the directory to Mediatomb.</p>
<p><strong>5.) Setup a cron job to check for new podcasts and download them</strong></p>
<p><em><strong>crontab -e</strong></em></p>
<p>This will open an editor to create a cron job.  Here&#8217;s an example of a cron job that you can setup:</p>
<p># Once a day at 4:15 AM<br />
15 04 * * * /usr/bin/podget -s<br />
# Every 6 hours on the hour<br />
0 */4 * * * /usr/bin/podget -s</p>
<p>Exit out of the crontab and run podget to start downloading the content: <strong>/usr/bin/podget -s<br />
</strong></p>
<p>There you have it.  You can download the Revision3 shows to your PC and stream them in HD to any media center client that works with Mediatomb.</p>
<p>I should note that this is not just specific to Revision3 shows.  There are many shows distributed as podcasts that you could do this with.  Revision3 produces my favorite shows on the Internet so I used them as the example for this HOWTO.</p>
<p>Sources:</p>
<p><a href="http://podget.sourceforge.net" target="_blank">1.) Podget: A Simple Podcast aggregator</a></p>
<p><a href="https://help.ubuntu.com/community/MediaTomb" target="_blank">2.) Mediatomb &#8211; Community Ubuntu Documentation</a></p>
<p><a href="https://help.ubuntu.com/community/Xbox360Media" target="_blank">3.) XBox 360 Media Sharing</a></p>
<p><a href="http://lousycoder.com/blog/index.php?/archives/73-Podget-howto.html" target="_blank">4.) Podget howto</a></p>
<p><a href="http://ubuntuforums.org/showthread.php?t=1208961" target="_blank">5.) uShare streaming to PS3 Howto</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.christopherkois.com/?feed=rss2&amp;p=261</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Tunneling your traffic through SSH</title>
		<link>http://www.christopherkois.com/?p=235&amp;utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=tunneling-your-traffic-through-ssh</link>
		<comments>http://www.christopherkois.com/?p=235#comments</comments>
		<pubDate>Thu, 04 Mar 2010 01:49:59 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Information Security]]></category>
		<category><![CDATA[Internet Privacy]]></category>
		<category><![CDATA[Wireless Security]]></category>

		<guid isPermaLink="false">http://www.christopherkois.com/?p=235</guid>
		<description><![CDATA[Whenever you are away from home and are using a free or open access internet connection, you are taking many risks that you might not be aware of.  For instance, capturing web traffic of users at an open WIFI hotspot is insanely easy to do using aircrack-ng.  Furthermore, there are various ways to orchestrate a [...]]]></description>
			<content:encoded><![CDATA[<p>Whenever you are away from home and are using a free or open access internet connection, you are taking many risks that you might not be aware of.  For instance, capturing web traffic of users at an open WIFI hotspot is insanely easy to do using <a href="http://www.christopherkois.com/?p=219" target="_blank">aircrack-ng</a>.  Furthermore, there are various ways to orchestrate a man-in-the-middle attack on both wireless and wired connections (<a href="http://www.hak5.org/episodes/episode-401-wi-fi-pineapples" target="_blank">WIFI Pineapple</a>, <a href="http://www.irongeek.com/i.php?page=security/arpspoof" target="_blank">ARP poisoning</a>, <a href="http://www.digininja.org/metasploit/dns_dhcp_beta.php" target="_blank">DHCP Exhaustion</a>, etc.)  These attacks are fairly simple to implement and the victim will never know that they are being attacked.  The lesson to be learned is that any network that is &#8220;out of your control&#8221; is to be considered &#8220;hostile&#8221;.</p>
<p>If you need to use a hostile network to connect to the internet, you should tunnel your web traffic through a &#8220;trusted&#8221; network, such as your home network.  There are 2 ways that you could do this: VPN or SSH.  It&#8217;s easier to setup SSH on a machine at home and doesn&#8217;t require the end user to have a private certificate, so it&#8217;s the most convenient to use too.  By tunneling your traffic through SSH, you are eliminating the possibility of someone conducting a man-in-the-middle attack and capturing your web traffic.  I would highly recommend tunneling your traffic through a &#8220;trusted&#8221; network whenever you must use a &#8220;hostile&#8221; network to access the internet, such as WIFI hot spot or free internet access at a hotel.</p>
<p>Here&#8217;s how you can tunnel your traffic:</p>
<p><strong>1.) SSH to your trusted network</strong></p>
<p><em>ssh -fND localhost:$PORT username@my_trusted_network.com<br />
</em></p>
<p>This creates a tunnel to your trusted network (<em>my_trusted_network.com</em>) with your credentials (<em>username</em>) that only your own machine can use (<em>localhost</em>) on the port specified (<em>$PORT</em>).  Once you are logged in, the SSH process will be in the background and the SSH tunnel to your trusted network is established.</p>
<p><strong>2.) Configure Firefox to use the SSH tunnel for web traffic<br />
</strong></p>
<p>Open Firefox, at the top menu bar click Edit &#8211;&gt; Preferences.  Click the Advanced option at the top.  Select the network tab and click the Settings button next to &#8220;Configure how Firefox connects to the Internet&#8221;.</p>
<p>Select &#8220;Manual proxy configuration&#8221;.  In the SOCKS Host text field, enter <strong><em>localhost</em></strong> and in the Port text field, enter whatever port you specified in $PORT when you established your SSH connection.  Click <em><strong>OK</strong></em> to close the Connections Settings window, and then click <strong><em>Close</em></strong> to close the Firefox Preferences window.  Your web traffic in Firefox will now be tunneled through your trusted network.</p>
<p><strong>3.) Configure Firefox to use SSH tunnel for DNS</strong></p>
<p>Even though you are using SSH to tunnel your web traffic, you are still vulnerable to a DNS man-in-the-middle attack.  Also, if your DNS requests aren&#8217;t tunneled, the operator of the hostile network can still see where you are navigating to on the web when your client makes DNS requests to resolve hostnames to IP addresses.  For these reasons (and for many others), it&#8217;s a good idea to tunnel DNS through your SSH tunnel too.</p>
<p>In the Firefox URL address bar, enter <strong><em>about:config</em></strong>.  At this point, you may receive a warning from Firefox, which you will need to click through to get to the next step.  In the Filter text field, enter <em><strong>network.proxy.socks_remote_dns</strong></em>.  Double-click on the network.proxy.socks_remote_dns entry to set the value to <em><strong>true.</strong></em></p>
<p><strong>4.) Verify that both your web traffic and DNS are being tunneled through your SSH connection</strong></p>
<p>To verify, run tcpdump:</p>
<p><em><strong>tcpdump -i &lt;interface&gt; -v</strong></em></p>
<p>Verify that all network packets from Firefox are being sent through your SSH connection.</p>
<p>Sources:</p>
<p>1.) <a href="http://wiki.freaks-unidos.net/weblogs/azul/firefox-ssh-tunnel" target="_blank">Tunneling Firefox traffic over SSH</a></p>
<p>2.) <a href="http://ubuntu-tutorials.com/2008/06/18/tunnel-web-and-dns-traffic-over-ssh/" target="_blank">Tunnel Web and DNS Traffic Over SSH</a></p>
<p>3.) <a href="http://www.makeuseof.com/tag/how-to-tunnel-traffic-with-ssh/" target="_blank">How to Tunnel Web Traffic with SSH Secure Shell</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.christopherkois.com/?feed=rss2&amp;p=235</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Aircrack-ng on Ubuntu</title>
		<link>http://www.christopherkois.com/?p=219&amp;utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=aircrack-ng-on-ubuntu</link>
		<comments>http://www.christopherkois.com/?p=219#comments</comments>
		<pubDate>Fri, 26 Feb 2010 00:35:54 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Internet Privacy]]></category>
		<category><![CDATA[Technology Politics]]></category>
		<category><![CDATA[Wireless Security]]></category>

		<guid isPermaLink="false">http://www.christopherkois.com/?p=219</guid>
		<description><![CDATA[I&#8217;ve seen and read about all the cool things that someone can do with aircrack-ng to do cracking/pentesting of your own wireless network. I knew that it was fairly easy to do all of this, but I never had a wireless card with an Atheros chipset, or at least a chipset that you could use [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve seen and read about all the cool things that someone can do with <a href="http://www.aircrack-ng.org/" target="_blank">aircrack-ng</a> to do cracking/pentesting of your own wireless network.  I knew that it was fairly easy to do all of this, but I never had a wireless card with an Atheros chipset, or at least a chipset that you could use easily with madwifi (or I was just to lazy to try it out).  I recently purchased a Cisco Aironet PCMCIA card online for around $10.  This card uses an Atheros chipset.  My next step was to get aircrack up and running on my Ubuntu laptop.  This was insanely easy.  Here&#8217;s what you need to do (run the commands as root):</p>
<p>First, install aircrack-ng:</p>
<p><em>apt-get install aircrack-ng</em></p>
<p>Next, you will need to install the drivers specific to your wireless card for madwifi and patch the kernel:</p>
<pre> ifconfig ath0 down
 ifconfig wifi0 down
 svn -r 4073 checkout http://svn.madwifi-project.org/madwifi/trunk/ madwifi-ng
 cd madwifi-ng
 wget http://patches.aircrack-ng.org/madwifi-ng-r4073.patch
 patch -N -p 1 -i madwifi-ng-r4073.patch
 ./scripts/madwifi-unload
 make
 make install
 depmod -ae
 modprobe ath_pci</pre>
<p>ERROR NOTE: If at any point you get an error like this:</p>
<p><em>/lib/modules/2.6.22-14-server/build is missing, please set KERNELPATH.  Stop.</em></p>
<p>Simply run this command and then continue with the instuctions:</p>
<p><em>apt-get install linux-headers-$(uname -r)</em></p>
<p>Now you can start using the aircrack-ng tools tool monitor wireless traffic:</p>
<ul>
<li><strong>1. Enable monitoring with &#8220;airmon-ng&#8221;:</strong>
<div><em>sudo airmon-ng start </em></div>
</li>
</ul>
<ul>
<li><strong>2. Packet capturing with &#8220;airodump-ng&#8221;:</strong>
<div>
<div><em>sudo airodump-ng &#8211;channel  &#8211;write </em></div>
</div>
</li>
<li><strong>Packet capturing with &#8220;airodump-ng&#8221; </strong><strong>(to collect data from target network only and hence increase performance):</strong>
<div>
<div><em>sudo airodump-ng &#8211;channel  &#8211;bssid 00:09:5B:D7:43:A8 &#8211;write </em></div>
</div>
<p><span style="color: darkolivegreen;"><span style="text-decoration: underline;"><strong>NOTE:</strong></span><br />
&#8211;channel&#8230; Select preferred channel; optional, however, channel hopping severely impacts and thus slows down collection process.<br />
&#8211;bssid&#8230; MAC address of target access point; optional, however, specifying access point will improve performance of collection process.<br />
&#8211;write&#8230; Preferred file name; mandatory field (in our case).</span></li>
</ul>
<p>NOTE: if you are not seeing any traffic while in monitor mode, run:</p>
<p><em>airmon-ng check</em></p>
<p>If any processes are returned, you may need to kill them (they might be interfering with the device).  After you kill the processes, you might need to stop monitor mode on any interfaces you created with airmon-ng and then restart airmon-ng (after stopping, start back at the &#8220;Enable monitoring&#8221; directions above).  There are 2 ways to stop airmon-ng: One is to pull out the PCMCIA card and plug it back in.  The other is to issue this command:</p>
<p><em>airmon-ng stop</em></p>
<p>Once you have airmon-ng up and running, you should see the access points that are sending out Beacons, as well as the clients that are connecting to the access points, or who are looking for their &#8220;trusted&#8221; access points that they have connected to in the past.  <a href="http://www.aircrack-ng.org/doku.php?id=airodump-ng" target="_blank">Here</a> is a good chart that explains each of the data fields that you will see.</p>
<p><span style="text-decoration: underline;"><strong>IMPORTANT NOTE</strong></span>:  The legality of capturing wireless traffic (encrypted or unencrypted) from a wireless network (business or personal) without explicit consent of both the sender and receiver may be illegal.  From what I read, this appears to be a legally &#8220;gray&#8221; area.  There are specific local, state, and federal wiretap laws against interception of communication, analog or electronic, that an individual might need to adhere to.  However, most of the rulings/legislation that I have seen were targeted at businesses listening in on employee activities during work hours, when the employee was using company equipment. <a href="http://en.wikipedia.org/wiki/IEEE_802.11" target="_blank">802.11 Wireless communication</a> uses a radio frequency, that one could argue should be held up to similar laws and restrictions as amateur radio.  One could also argue that 802.11 communication should have it&#8217;s own set of laws and regulations that users would need to adhere to.</p>
<p>If you are targeting your own network to capture wireless traffic for research and/or educational purposes, you shouldn&#8217;t be breaking any laws that I am aware of (since you are technically both the sender and recipient of the electronic communication).  For capturing traffic on other networks. the laws on one-party/two-party consent might apply (again, applying wiretap laws to 802.11 wireless communication might vary on your location).  I am not a lawyer and I do not dispense legal advice so proceed with caution.  I merely find this a very interesting topic for discussion.  Here are some links that I found related to the topic of the legality of capturing wireless traffic:</p>
<p><a href="http://www.slideshare.net/phanleson/l14-more-wireless-hacking-cracking-wired-equivalent-privacy-wep" target="_blank">Cracking WEP</a></p>
<p><a href="http://www.maxi-pedia.com/how+to+crack+WEP+with+intel+PRO+wireless+3945ABG" target="_blank">How to crack WEP</a></p>
<p><a href="http://brownfieldlaw.com/index.cfm?fa=publications.libArticle&amp;artid=5ACC07A2-BDB9-4A10-575C90591F4B9029" target="_blank">Monitoring Employee Communications under Federal and Illinois Law</a></p>
<p>Here are the sources that I used in order to write this HOWTO:</p>
<p><a href="http://www.aircrack-ng.org/doku.php?id=getting_started" target="_blank">1.) Aircrack getting started</a></p>
<p><a href="http://www.aircrack-ng.org/doku.php?id=madwifi-ng" target="_blank">2.) Madwifi-ng howto from Aircrack-ng</a></p>
<p><a href="http://ubuntuforums.org/showthread.php?t=528276" target="_blank">3.) Ubuntu HOWTO: Aircrack-ng (Simple Guide)</a></p>
<p><a href="http://ubuntuforums.org/showthread.php?t=587085" target="_blank">4.) Kernel server build missing error fix</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.christopherkois.com/?feed=rss2&amp;p=219</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
