<?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>BIT ENGINE // BLOG</title>
	<atom:link href="http://blog.bitengine.ca/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://blog.bitengine.ca</link>
	<description>Infrastructure / Security / Operating Systems / Web Applications</description>
	<lastBuildDate>Thu, 08 Jul 2010 20:59:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Cisco VPN with Certificate Authentication on Ubuntu 10.04 Lucid</title>
		<link>http://blog.bitengine.ca/?p=107</link>
		<comments>http://blog.bitengine.ca/?p=107#comments</comments>
		<pubDate>Thu, 08 Jul 2010 20:56:57 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Information Security]]></category>
		<category><![CDATA[Unix/Linux]]></category>

		<guid isPermaLink="false">http://blog.bitengine.ca/?p=107</guid>
		<description><![CDATA[A quick web search on the subject reveals the Cisco VPN client for  Linux kinda sucks. Installing and configuring it is a pain and often problematic and sometimes it causes kernel panics/system lock-ups. Nevertheless, it is (as far as I can tell, anyway) needed if you have to authenticate to the VPN with certificates. Here&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<div id="_mcePaste">
<div id="_mcePaste">A quick web search on the subject reveals the Cisco VPN client for  Linux kinda sucks. Installing and configuring it is a pain and often problematic and sometimes it causes kernel panics/system lock-ups. Nevertheless, it is (as far as I can tell, anyway) needed if you have to authenticate to the VPN with certificates. Here&#8217;s how it&#8217;s done.</div>
<div id="_mcePaste"></div>
<div id="_mcePaste">First, update your system:</div>
<div id="_mcePaste"></div>
<div id="_mcePaste">sudo apt-get update &amp;&amp; sudo apt-get dist-upgrade</div>
<div id="_mcePaste"></div>
<div id="_mcePaste">Then, download the Linux Cisco VPN client.</div>
<div id="_mcePaste"></div>
<div id="_mcePaste">Download this patch.</div>
<div id="_mcePaste"></div>
<div id="_mcePaste">Unpack the client source code:</div>
<div id="_mcePaste"></div>
<div id="_mcePaste">tar -xvzf vpnclient-linux-x86_64-4.8.02.0030-k9.tar.gz</div>
<div id="_mcePaste"></div>
<div id="_mcePaste">Copy the patch file to the VPN client install directory:</div>
<div id="_mcePaste"></div>
<div id="_mcePaste">cp vpnclient-linux.2.6.31.diff vpnclient</div>
<div id="_mcePaste"></div>
<div id="_mcePaste">Apply the patch:</div>
<div id="_mcePaste"></div>
<div id="_mcePaste">cd vpnclient</div>
<div id="_mcePaste"></div>
<div id="_mcePaste">patch &lt; vpnclient-linux.2.6.31.diff</div>
<div id="_mcePaste"></div>
<div id="_mcePaste">Run the install script:</div>
<div id="_mcePaste"></div>
<div id="_mcePaste">sudo ./vpn_install</div>
<div id="_mcePaste"></div>
<div id="_mcePaste">The VPN client should now be installed and you should not have gotten any errors during the compile.</div>
<div id="_mcePaste"></div>
<div id="_mcePaste">Start the VPN client service:</div>
<div id="_mcePaste"></div>
<div id="_mcePaste">sudo /etc/init.d/vpnclient_init start</div>
<div id="_mcePaste"></div>
<div id="_mcePaste">Copy your PCF files (Cisco VPN profiles) to /etc/opt/cisco-vpnclient/Profiles/</div>
<div id="_mcePaste"></div>
<div id="_mcePaste">If you have any VPN connections that do not use certificates, now is a good time to try them.</div>
<div id="_mcePaste"></div>
<div id="_mcePaste">To connect to a VPN with Cisco  VPN client:</div>
<div id="_mcePaste"></div>
<div id="_mcePaste">vpnclient connect profilename (where profilename is the file name before the &#8220;.pcf&#8221; bit.</div>
<div id="_mcePaste"></div>
<div id="_mcePaste">Make sure that works. If it doesn&#8217;t troubleshoot until you get that part working before proceeding.</div>
<div id="_mcePaste"></div>
<div id="_mcePaste">Certificate must be in .cer format. Convert certificate to .cer format if not done already and copy to to /etc/opt/cisco-vpnclient/Certificates/</div>
<div id="_mcePaste"></div>
<div id="_mcePaste">Import your certificate:</div>
<div id="_mcePaste">cisco_cert_mgr -U -op import</div>
<div id="_mcePaste"></div>
<div id="_mcePaste">Then follow the prompts.</div>
<div id="_mcePaste"></div>
<div id="_mcePaste">After importing, ensure the certificate appears in your certificate store:</div>
<div id="_mcePaste"></div>
<div id="_mcePaste">cisco_cert_mgr -U -op list</div>
<div id="_mcePaste"></div>
<div id="_mcePaste">If your certificate doesn&#8217;t appear in that list, try again, noting any errors.</div>
<div id="_mcePaste"></div>
<div id="_mcePaste">Try connecting to your VPN with certificates now.</div>
<div id="_mcePaste"></div>
<div id="_mcePaste">vpnclient connect profilename (where profilename is the file name before the &#8220;.pcf&#8221; bit.</div>
<div id="_mcePaste"></div>
<div id="_mcePaste">When prompted for a password, make sure you are using the password you set for the certificate locally, *not* the one you may have set when you created the certificate, otherwise, it won&#8217;t work.</div>
<div id="_mcePaste"></div>
<div id="_mcePaste">Hopefully it works! If not, the unfortunate thing is that the Cisco VPN client has very vague error messages. Make sure the certificates are in the store and you have not gotten any errors during the installation/configuration process. If you did, go back to those for clues as to what might be wrong.</div>
<div id="_mcePaste"></div>
<div id="_mcePaste">The following sites/blogs were very helpful in drafting this post:</div>
<div id="_mcePaste"></div>
<div id="_mcePaste">http://leifmadsen.wordpress.com/2009/11/27/cisco-vpn-client-on-ubuntu-karmic-9-10/</div>
<div id="_mcePaste">http://ilapstech.blogspot.com/2009/09/cisco-vpn-client-on-karmic-koala.html</div>
<div id="_mcePaste">http://www.lamnk.com/blog/vpn/how-to-install-cisco-vpn-client-on-ubuntu-jaunty-jackalope-and-karmic-koala-64-bit/</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.bitengine.ca/?feed=rss2&amp;p=107</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>EFF&#8217;s Browser Tracking Experiment</title>
		<link>http://blog.bitengine.ca/?p=91</link>
		<comments>http://blog.bitengine.ca/?p=91#comments</comments>
		<pubDate>Sun, 07 Feb 2010 18:08:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[et cetera]]></category>
		<category><![CDATA[browser tracking]]></category>
		<category><![CDATA[browser tracking experiment]]></category>
		<category><![CDATA[cyber rights]]></category>
		<category><![CDATA[eff]]></category>
		<category><![CDATA[electronic frontier foundation]]></category>
		<category><![CDATA[human rights]]></category>

		<guid isPermaLink="false">http://blog.bitengine.ca/?p=91</guid>
		<description><![CDATA[Digital freedom fighters, EFF, are running a neat study on browser &#8220;uniqueness&#8221; to see how many different combinations of browser identification bits are out there and how easy it might be to fingerprint and track them. The theory goes that bad guys can use this information to track innocent people without their knowledge. From the [...]]]></description>
			<content:encoded><![CDATA[<p>Digital freedom fighters, EFF, are running a neat study on browser &#8220;uniqueness&#8221; to see how many different combinations of browser identification bits are out there and how easy it might be to fingerprint and track them. The theory goes that bad guys can use this information to track innocent people without their knowledge.</p>
<p>From the EFF&#8217;s brower tracking message,</p>
<p><!-- p, li { white-space: pre-wrap; } --></p>
<p style="margin: 0px; text-indent: 0px;"><!--StartFragment-->&#8220;When you visit a website, you are allowing that site to access a lot of information about your computer. Combined, this information can create a kind of fingerprint — a signature that could be used to identify you and your computer. But how effective would this kind of online tracking be?</p>
<p style="margin: 0px; text-indent: 0px;">
<p style="margin: 0px; text-indent: 0px;">
<p style="margin: 0px; text-indent: 0px;">
<p style="margin: 0px; text-indent: 0px;">
<p style="margin: 0px; text-indent: 0px;">EFF is running an experiment to find out. Visit http://panopticlick.eff.org to learn how unique your browser is and if you can be tracked.&#8221;</p>
<p style="margin: 0px; text-indent: 0px;">
<p style="margin: 0px; text-indent: 0px;">
<p style="margin: 0px; text-indent: 0px;">
<p style="margin: 0px; text-indent: 0px;">
<p style="margin: 0px; text-indent: 0px;">
<p style="margin: 0px; text-indent: 0px;">It takes literally 30 seconds or less to visit EFF&#8217;s survey site, &#8220;personally identifiable information&#8221; is not logged, and it&#8217;s one more step toward digital freedom so go ahead and participate!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bitengine.ca/?feed=rss2&amp;p=91</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Rescue Data From a LUKS Encrypted Filesystem</title>
		<link>http://blog.bitengine.ca/?p=72</link>
		<comments>http://blog.bitengine.ca/?p=72#comments</comments>
		<pubDate>Thu, 24 Sep 2009 23:29:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[et cetera]]></category>
		<category><![CDATA[encrypted filesystem]]></category>
		<category><![CDATA[encrypted lvm]]></category>
		<category><![CDATA[full disk encryption]]></category>
		<category><![CDATA[full drive encryption]]></category>
		<category><![CDATA[Information Security]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[LUKS recovery]]></category>
		<category><![CDATA[recover]]></category>
		<category><![CDATA[recover LUKS]]></category>
		<category><![CDATA[recovery]]></category>
		<category><![CDATA[rescue]]></category>
		<category><![CDATA[rescue luks]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[ubuntu encrypted filesystem]]></category>
		<category><![CDATA[Unix/Linux / Tag: debian encrypted filesystem]]></category>

		<guid isPermaLink="false">http://blog.bitengine.ca/?p=72</guid>
		<description><![CDATA[With 10,000 laptops stolen from airports alone each year, data encryption is an absolute must. What happens, then, if your fully encrypted  system crashes and won&#8217;t boot? Here, we&#8217;re going to cover how you would go about recovering that data if it is encrypted with LUKS. LUKS is an encryption standard most commonly used on [...]]]></description>
			<content:encoded><![CDATA[<p>With 10,000 laptops stolen from airports alone each year, data encryption is an absolute must. What happens, then, if your fully encrypted  system crashes and won&#8217;t boot? Here, we&#8217;re going to cover how you would go about recovering that data if it is encrypted with LUKS.</p>
<p>LUKS is an encryption standard most commonly used on Linux but can be used on other systems. It is the basis of Ubuntu/Debian&#8217;s (as well as others&#8217;) filesystem encryption, which can be installed using the alternate installation disc.</p>
<p>What you need:</p>
<p>The LUKS passphrase (Without that, you are out of  [ahem] luck. Otherwise, what would be the point of encryption.)   <img src='http://blog.bitengine.ca/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Something to copy your data to like a USB drive or another machine on your network. I recommend this even if you are planning on fixing/rescuing your OS. This way your data is backed-up and safe no matter what happens afterwards.</p>
<p>A &#8220;live CD&#8221; like the Ubuntu desktop installation disc or a Debian installation disc.</p>
<p>The process:</p>
<p>- Boot the crashed machine with a &#8220;live CD&#8221; such as Ubuntu 4.09 or the Debian installation disc in recovery mode. When I did this on my own drive, I used an Ubuntu live CD. If you are using the Debian installation media, boot into rescue mode.</p>
<p>Become root to simplify things more:</p>
<p>sudo su -     (if using the Ubuntu CD)</p>
<p>su -                (if using pretty much anything else)</p>
<p>Install the needed LVM and encryption tools:</p>
<p>apt-get update<br />
apt-get install cryptsetup</p>
<p>Check to see what your device names are:</p>
<p>fdisk -l</p>
<p>You&#8217;ll see something like:</p>
<p>Disk /dev/sda: 160.0 GB, 160041885696 bytes<br />
255 heads, 63 sectors/track, 19457 cylinders<br />
Units = cylinders of 16065 * 512 = 8225280 bytes<br />
Disk identifier: 0x41ab2316</p>
<p>Device Boot      Start         End      Blocks   Id  System<br />
/dev/sda1   *           1       18701   150215751   83  Linux<br />
/dev/sda2           18702       19457     6072570    5  Extended<br />
/dev/sda5           18702       19457     6072538+  82  Linux swap / Solaris</p>
<p>Take a look at your LUKS header information here to ensure you&#8217;re going after the right one:</p>
<p>cryptsetup -v luksDump /dev/sda1</p>
<p>The first several lines of output should look something like this:</p>
<p>LUKS header information for /dev/sdb1</p>
<p>Version:        1<br />
Cipher name:    aes<br />
Cipher mode:    cbc-essiv:sha256<br />
Hash spec:      sha1<br />
Payload offset: 2056<br />
MK bits:        256</p>
<p>If you ran luksDump on a partition not encrypted with LUKS, you&#8217;ll get a message like, &#8220;Command failed: /dev/sda1 is not a LUKS partition&#8221;</p>
<p>If that&#8217;s the right device, then go ahead and unlock it:</p>
<p>cryptsetup -v luksOpen /dev/sda1 sda1_crypt</p>
<p>The system should prompt you for a password and after entering it, you should see something like:</p>
<p>key slot 0 unlocked.<br />
Command successful.</p>
<p>See which volumes are available:</p>
<p>lvdisplay</p>
<p>Enable your logical volume. It is probably the same as the machine&#8217;s host name:</p>
<p>vgchange -a y volumename</p>
<p>Mount your filesystem:</p>
<p>mount -t ext4 /dev/volumename/root /mnt</p>
<p>Hopefully you can read your file system at this stage. If so, grab your files and back them up.</p>
<p>If the filesystem is corrupt and you can&#8217;t mount it, you can try the following. Your data may be lost if the filesystem is wrecked but it&#8217;s worth trying a few things to retrieve it.</p>
<p>Be sure the filesystem is <strong>not mounted</strong> when you do this. Also be sure to use the <strong>proper type of fsck</strong> (fsck or fsck.ext4) for your filesystem type. BIT ENGINE takes absolutely no responsibility for what happens when you perform these tasks &#8212; even if you follow them exactly as specified.</p>
<p>To identify where back-up superblocks are</p>
<p>dumpe2fs /dev/devicename | grep superblock</p>
<p>If your filesystem type is ext2 or ext3:</p>
<p>fsck -b 32768 /dev/devicename  (substitute 32768 for a back-up superblock in the list from the output of the previous line)</p>
<p>If your filesystem type is ext4:</p>
<p>fsck.ext4 -b 32768 -y /dev/devicename</p>
<p>Hopefully, that fixes any errors. Try mounting again:</p>
<p>mount -t ext4 /dev/volumename/root /mnt</p>
<p>If your journal is messed, you can try:</p>
<p>tune2fs -j</p>
<p>Then try mounting again:</p>
<p>mount -t ext4 /dev/volumename/root /mnt</p>
<p>In my situation, my filesystem and journal were corrupt. After running fsck.ext4 (I run ext4, obviously) and tune2fs -j, I was able to mount it and search /mnt/lost+found for files (find /mnt/lost+found/ -name *.odf should get you there, substituting odf for whichever file type you need). Fortunately for me, all my important data was backed up and I was going through this as a test run in case I needed to do it in the future.</p>
<p>The biggest lesson here is one that can not be overstated: <strong>always back-up</strong> your critical data! Keep back-ups current and to a secure medium.</p>
<p>This how-to was created with a lot of help from <a title="Rescue encrypted Debian System" href="http://wiki.debian.org/DebianInstaller/Rescue/Crypto" target="_blank">this document</a> and a little help from <a title="Recover Corrupted Partition From A Bad Superblock" href="http://www.cyberciti.biz/faq/recover-bad-superblock-from-corrupted-partition/" target="_blank">this one</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bitengine.ca/?feed=rss2&amp;p=72</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using ngrep</title>
		<link>http://blog.bitengine.ca/?p=66</link>
		<comments>http://blog.bitengine.ca/?p=66#comments</comments>
		<pubDate>Wed, 02 Sep 2009 23:31:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[et cetera]]></category>
		<category><![CDATA[Information Security]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[network analysis]]></category>
		<category><![CDATA[network analyzer]]></category>
		<category><![CDATA[ngrep]]></category>
		<category><![CDATA[packet sniffer]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://blog.bitengine.ca/?p=66</guid>
		<description><![CDATA[From the man page, &#8220;ngrep  strives  to provide most of GNU grep&#8217;s common features, applying them to the network layer.  ngrep is a pcap-aware tool that will allow you  to specify extended regular expressions to match against data pay?loads of packets.  It currently recognizes TCP,  UDP  and  ICMP  across Ethernet, PPP, SLIP, FDDI and null [...]]]></description>
			<content:encoded><![CDATA[<p>From the man page, &#8220;ngrep  strives  to provide most of GNU grep&#8217;s common features, applying them to the network layer.  ngrep is a pcap-aware tool that will allow you  to specify extended regular expressions to match against data pay?loads of packets.  It currently recognizes TCP,  UDP  and  ICMP  across Ethernet, PPP, SLIP, FDDI and null interfaces, and understands bpf filter logic in the same fashion as more common  packet  sniffing  tools, such as tcpdump(8) and snoop(1).&#8221;</p>
<p>Perhaps the most significant difference between ngrep and tcpdump is that ngrep can analyze packet payloads whereas tcpdump only looks at packet headers and such.</p>
<p>ngrep is incredibly powerful and useful in finding out what&#8217;s happening on your network. The best way to show you want ngrep can do and how it&#8217;s done is by example. See some below.</p>
<p>Watching all traffic on the default interface:</p>
<div style="border-width: 1px;">
<div>
<pre>ngrep -itq -W byline</pre>
</div>
</div>
<p>Watching all traffic on eth1:</p>
<div style="border-width: 1px;">
<div>
<pre>ngrep -d eth1 -itq -W byline</pre>
</div>
</div>
<p>Watching all traffic on the default interface while searching for the string &#8220;testing&#8221;.</p>
<div style="border-width: 1px;">
<div>
<pre>ngrep -itq -W byline testing</pre>
</div>
</div>
<p>Watching all traffic on the default interface originating from 192.168.1.1:</p>
<div style="border-width: 1px;">
<div>
<pre>ngrep -itq -W byline src 192.168.1.1</pre>
</div>
</div>
<p>Watching all traffic on the default interface destined for 192.168.1.2:</p>
<div style="border-width: 1px;">
<div>
<pre>ngrep -itq -W byline dst 192.168.1.2</pre>
</div>
</div>
<p>Watching all traffic on the default interface with the gateway of 192.168.1.100</p>
<div style="border-width: 1px;">
<div>
<pre>ngrep -itq -W byline gateway 192.168.1.100

See more examples at <a>http://ngrep.sourceforge.net/usage.html
</a>
Also check the man page for many more neat possibilities.</pre>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.bitengine.ca/?feed=rss2&amp;p=66</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using tcpdump</title>
		<link>http://blog.bitengine.ca/?p=58</link>
		<comments>http://blog.bitengine.ca/?p=58#comments</comments>
		<pubDate>Tue, 25 Aug 2009 18:28:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[et cetera]]></category>
		<category><![CDATA[network analysis]]></category>
		<category><![CDATA[network troubleshooting]]></category>
		<category><![CDATA[packet analysis]]></category>
		<category><![CDATA[packet header]]></category>
		<category><![CDATA[packet sniffer]]></category>
		<category><![CDATA[tcpdump]]></category>
		<category><![CDATA[traffic analysis]]></category>

		<guid isPermaLink="false">http://blog.bitengine.ca/?p=58</guid>
		<description><![CDATA[tcpdump is an advanced command-line based packet sniffer. It is another one of those standard Unix utilities that really comes in handy when troubleshooting (it has greatly helped me many times) network issues and can teach you a good bit on how networking works. tcpdump is installed on most Unix machines. If not, you can [...]]]></description>
			<content:encoded><![CDATA[<p>tcpdump is an advanced command-line based packet sniffer. It is another one of those standard Unix utilities that really comes in handy when troubleshooting (it has greatly helped me many times) network issues and can teach you a good bit on how networking works.</p>
<p>tcpdump is installed on most Unix machines. If not, you can easily get it using the system&#8217;s package manager (i.e. up2date tcpdump, yum install tcpdump, or apt-get install tcpdump).</p>
<p>Also, you&#8217;ll probably need to be the root user when running tcpdump.</p>
<p>From the man page: &#8220;Tcpdump  prints  out a description of the contents of packets on a network interface that match the boolean expression.&#8221;</p>
<p>Here, we&#8217;ll go over some basic operations and brifly explain them.</p>
<p>The most simple operation is probably:</p>
<div style="border-width: 1px;">
<div>
<pre>tcpdump -i eth0</pre>
</div>
</div>
<p>Where the i argument specifies the interface to listen on, which is in this case, eth0. This type of scan is very broad and basically says, &#8220;report all traffic passing though eth0.&#8221; So using tcpdump like this we can see everything on all ports going to or from our local machine on eth0.</p>
<p>That&#8217;s pretty nice but to make tcpdump really useful, we need more:</p>
<div style="border-width: 1px;">
<div>
<pre>tcpdump -i eth0 host hostname.domain.com</pre>
</div>
</div>
<p>With the above line, we can see the same traffic but filtered by host. In this case we&#8217;d be seeing traffic to and from hostname.domain.com on all ports of eth0. You can use IP addresses instead of host names as well.</p>
<p>But what if we&#8217;re only interested in one port? Then:</p>
<div style="border-width: 1px;">
<div>
<pre>tcpdump -i eth0 host hostname.domain.com and port 21</pre>
</div>
</div>
<p>or</p>
<div style="border-width: 1px;">
<div>
<pre>tcpdump eth0 host hostname.domain.com and port ftp</pre>
</div>
</div>
<p>But what if we&#8217;re interested in all ports except one port?! Then:</p>
<div style="border-width: 1px;">
<div>
<pre>tcpdump -i eth0 host hostname.domain.com not port 22</pre>
</div>
</div>
<p>The above line might be useful if you are ssh&#8217;d into a machine you want to see traffic on &#8212; the ssh traffic would really muddy the output unless you filtered it out.</p>
<p>You can also get even more fine-grained and fancy by doing something like</p>
<div style="border-width: 1px;">
<div>
<pre>tcpdump -i eth0 host src hostname.domain.com and dst host2.domain.com and port 21</pre>
</div>
</div>
<p>As you probably guessed, src means observe data sent from the specified node and dst means observe data recieved by the specified node.</p>
<p>In troubleshooting, it&#8217;s often helpful to see the link-level headers, which includes MAC addresses of those in on the conversation (-e argument). I usually also put the verbosity at -v or -vv (even more verbosity for the -vv option). So a line with those options might look like this:</p>
<div style="border-width: 1px;">
<div>
<pre>tcpdump -vv -e -i eth0 host hostname.domain.com</pre>
</div>
</div>
<p>Sometimes, you will need to save the output of tcpdump to a file. This is easy since you can do all the usual Unix operations with tcpdump:</p>
<div style="border-width: 1px;">
<div>
<pre>tcpdump -i eth0 host hostname.domain.com &gt; filename</pre>
</div>
</div>
<p>You can use grep as well:</p>
<div style="border-width: 1px;">
<div>
<pre>tcpdump -i eth0 host hostname.domain.com | grep expression &gt; filename</pre>
</div>
</div>
<p>Using the -w argument is another way of writing output to a file.</p>
<p>Hopefully that is a good start. There are many more options and uses for this outstanding networking staple. Experiment and check the man page to see lots of other really cool stuff.</p>
<p>The tcpdump man page and <a rel="nofollow" href="http://www.hep.ucl.ac.uk/%7Eytl/monitoring/tcpdump_01.html">http://www.hep.ucl.ac.uk/~ytl/monitoring/tcpdump_01.html</a> were used as reference for writing this article.</p>
<p>Note: tcpdump only displays information about packets and traffic and packet headers. To see packet payloads, try tcpflow or wireshark.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bitengine.ca/?feed=rss2&amp;p=58</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Canadian Copyright Consultations</title>
		<link>http://blog.bitengine.ca/?p=51</link>
		<comments>http://blog.bitengine.ca/?p=51#comments</comments>
		<pubDate>Tue, 18 Aug 2009 07:30:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[et cetera]]></category>
		<category><![CDATA[canada]]></category>
		<category><![CDATA[canadian copyright]]></category>
		<category><![CDATA[consulation]]></category>
		<category><![CDATA[government of canada]]></category>
		<category><![CDATA[human rights]]></category>
		<category><![CDATA[legal]]></category>
		<category><![CDATA[media copyleft]]></category>
		<category><![CDATA[new media]]></category>
		<category><![CDATA[rights]]></category>

		<guid isPermaLink="false">http://blog.bitengine.ca/?p=51</guid>
		<description><![CDATA[There has been a lot of talk in Canada and elsewhere about our copyright law and if/how it should be changed. I recently responded to the federal government&#8217;s request for public input. I would have liked to say more to them about this but I thought it best not to turn the consultation to a [...]]]></description>
			<content:encoded><![CDATA[<p>There has been a lot of talk in Canada and elsewhere about our copyright law and if/how it should be changed. I recently responded to the federal government&#8217;s request for public input. I would have liked to say more to them about this but I thought it best not to turn the consultation to a dissertation. <img src='http://blog.bitengine.ca/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   They posed five questions pertaining to issues of copyright. See my answers below and if you have an opinion on this, you can even weigh in by visiting http://copyright.econsultation.ca/topics-sujets/show-montrer/18 and submitting your answers to the questions there via the e-mail address provided.</p>
<p><strong>How do Canada’s copyright laws affect you? How should existing laws be modernized?</strong></p>
<p>First, I am not yet convinced such laws need to be changed. Canada&#8217;s copyright laws affect all Canadians. We all read books, visit web sites, enjoy music, films, and so forth. If laws do need to be changed in any way, it should be though feedback from Canadian consumers (as with this survey and other forms of feedback); artists, and authors, as well as experts on copyright, such as Michael Geist (<a href="http://www.michaelgeist.ca/">www.michaelgeist.ca</a>). Copyright law should not be written or changed according to any demands from CRIA, the RIAA, MPAA, or the US government but rather exclusively according to the best interests of Canadian consumers.</p>
<p><strong>Based on Canadian values and interests, how should copyright changes be made in order to withstand the test of time?</strong></p>
<p>Unfortunately, it is likely impossible copyright laws can be written to still be relevant many years from now. Times change and legislation needs revisiting from time to time. Thirty years ago, who could have predicted the mass adoption of technologies present today such as the Internet (in its present form), digital media, and MP3 players, and the capabilities they bring to people?</p>
<p><strong>What sorts of copyright changes do you believe would best foster innovation and creativity in Canada?</strong></p>
<p>I believe an open and flexible system with an emphasis on Creative Commons (or similar) (<a href="http://creativecommons.ca/">http://creativecommons.ca/</a> , <a href="http://creativecommons.org/">http://creativecommons.org/</a>) licensing. Prices should be kept low, restrictions on material, such as DRM should be discouraged or outlawed, and consumer rights such as fair use should be tantamount.</p>
<p><strong>What sorts of copyright changes do you believe would best foster competition and investment in Canada?</strong></p>
<p>We must create a climate where information is easily and cheaply available and available in the forms consumers would like to use it in. Technology should be embraced &#8212; not fought &#8212; as the new, efficient medium for storing and transmitting media such as music and film. Thanks to the power of the Internet, artists no longer need to be discovered and &#8220;get signed.&#8221; They can now publish their own music themselves and keep more of the proceeds than if they entered a contract with a record label. Most importantly, artists retain all the rights to their work when they publish content themselves instead of turning ownership of their material over to a record company. If the entertainment industries are permitted to continue on their current trajectory as I suggest, artists will earn more money and rights, consumers will have better quality, cheaper products and more rights, the marketplace will have much needed healthy competition, and there will be many small yet successful businesses involved instead of a few giant ones. Corporate record and film companies know this and that is why they are fighting tooth and nail to eliminate competition and innovation as much as they can. Their continued dominance depends on continued use of an obsolete monopolistic system where they hold all the power. The major record labels have run into problems lately not because of a lack of tools available to them but because of a failure to leverage the ones they had. The market fundamentally changed and they failed to act and meet market demands. When they did act, they did horribly &#8212; how could a practise of suing your customers (as was done by the RIAA in the US) not end badly?</p>
<p><strong>What kinds of changes would best position Canada as a leader in the global, digital economy?</strong></p>
<p>To be a leader in the global, digital economy, we must embrace current and innovate new technology; completely embrace freedom for individual people and operate according to their best interests (not those of corporations or their interest groups); and we need to be in touch with consumer needs and trends so we can continue to lead in the future by accommodating those needs.</p>
<p>Mike</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bitengine.ca/?feed=rss2&amp;p=51</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>KDE 4.3 Works for Me</title>
		<link>http://blog.bitengine.ca/?p=47</link>
		<comments>http://blog.bitengine.ca/?p=47#comments</comments>
		<pubDate>Tue, 18 Aug 2009 07:19:13 +0000</pubDate>
		<dc:creator>mike</dc:creator>
		
		<guid isPermaLink="false">http://blog.bitengine.ca/?p=47</guid>
		<description><![CDATA[I went ahead and upgraded KDE on my Kubuntu 9.04 work machine a few weeks ago and am pretty sure we can finally safely say the new KDE is ready for prime time. I&#8217;ve had some problems with the older releases in the 4.x series (even 4.2) and all the major issues appear to be [...]]]></description>
			<content:encoded><![CDATA[<p>I went ahead and upgraded KDE on my Kubuntu 9.04 work machine a few weeks ago and am pretty sure we can finally safely say the new KDE is ready for prime time. I&#8217;ve had some problems with the older releases in the 4.x series (even 4.2) and all the major issues appear to be gone. I&#8217;m even running 4.3 regularly on an alpha build of Kubuntu 9.10 and honestly can&#8217;t think of any desktop-related quirks at all on either system! Take a look for yourself &#8212; http://www.kde.org/announcements/4.3/index.php</p>
<p>Great work KDE team!</p>
<p>-Mike</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bitengine.ca/?feed=rss2&amp;p=47</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SELinux Basics: Disable SELinux</title>
		<link>http://blog.bitengine.ca/?p=40</link>
		<comments>http://blog.bitengine.ca/?p=40#comments</comments>
		<pubDate>Tue, 30 Jun 2009 23:42:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[et cetera]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[disable selinux]]></category>
		<category><![CDATA[enforcing]]></category>
		<category><![CDATA[fedora permissive mode]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[permissive]]></category>
		<category><![CDATA[red hat]]></category>
		<category><![CDATA[se linux]]></category>
		<category><![CDATA[selinux]]></category>
		<category><![CDATA[sestatus]]></category>
		<category><![CDATA[setenforce]]></category>

		<guid isPermaLink="false">http://blog.bitengine.ca/?p=40</guid>
		<description><![CDATA[SELinux is a great framework for securing systems but sometimes it can really get in the way of making things work properly if it&#8217;s not set up just so. Often, it&#8217;s a good idea to at least set SELinux to permissive (not enforcing) mode if you are troubleshooting a problem potentially caused by its operation. [...]]]></description>
			<content:encoded><![CDATA[<p>SELinux is a great framework for securing systems but sometimes it can really get in the way of making things work properly if it&#8217;s not set up just so. Often, it&#8217;s a good idea to at least set SELinux to permissive (not enforcing) mode if you are troubleshooting a problem potentially caused by its operation. When in permissive mode, SELinux will not interrupt anything on the system at all, it will only log breaches of it&#8217;s set policies.</p>
<p>This document is just for the absolute basics of SELinux and particularly, how to set it to permissive mode or disable it if you wish. More information can be found at <a rel="nofollow" href="http://fedoraproject.org/wiki/SELinux">http://fedoraproject.org/wiki/SELinux</a></p>
<p>To see the status of SELinux:</p>
<div style="border-width: 1px;">
<div>
<pre>sestatus</pre>
</div>
</div>
<p>You&#8217;ll see something like this:</p>
<div style="border-width: 1px;">
<div>
<pre>SELinux status:                 enabled
SELinuxfs mount:                /selinux
Current mode:                   enforcing
Mode from config file:          enforcing
Policy version:                 21
Policy from config file:        targeted</pre>
</div>
</div>
<p>The mode, enforcing, means that it is enforcing SELinux policy.</p>
<p>You can change the mode by using the setenforce command.</p>
<p>To disable enforcement:</p>
<div style="border-width: 1px;">
<div>
<pre>setenforce 0</pre>
</div>
</div>
<p>To enable enforcement:</p>
<div style="border-width: 1px;">
<div>
<pre>setenforce 1</pre>
</div>
</div>
<p>Once enforcement is disabled, SELinux will no longer actively operate on the system. It will only warn in a log file when the set policy is violated so it should not interfere with the normal operation of the machine while in this state.</p>
<p>To completely disable SELinux, edit /etc/selinux/config and set the SELINUX= parameter to disabled. There are some comments in that file to provide hints on this. After editing the file, you must reboot for it to take effect.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bitengine.ca/?feed=rss2&amp;p=40</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web Application Vulnerability Assessment with Paros</title>
		<link>http://blog.bitengine.ca/?p=29</link>
		<comments>http://blog.bitengine.ca/?p=29#comments</comments>
		<pubDate>Mon, 29 Jun 2009 20:50:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[et cetera]]></category>
		<category><![CDATA[application security auditing]]></category>
		<category><![CDATA[auditing]]></category>
		<category><![CDATA[ethical hacking]]></category>
		<category><![CDATA[paros]]></category>
		<category><![CDATA[paros proxy]]></category>
		<category><![CDATA[security auditing]]></category>
		<category><![CDATA[security testing]]></category>
		<category><![CDATA[web application security auditing]]></category>

		<guid isPermaLink="false">http://blog.bitengine.ca/?p=29</guid>
		<description><![CDATA[Project description at insecure.org, &#8220;A Java based web proxy for assessing web application vulnerability. It supports editing/viewing HTTP/HTTPS messages on-the-fly to change items such as cookies and form fields. It includes a web traffic recorder, web spider, hash calculator, and a scanner for testing common web application attacks such as SQL injection and cross-site scripting.&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p>Project description at insecure.org, &#8220;A Java based web proxy for assessing web application vulnerability. It supports editing/viewing HTTP/HTTPS messages on-the-fly to change items such as cookies and form fields. It includes a web traffic recorder, web spider, hash calculator, and a scanner for testing common web application attacks such as SQL injection and cross-site scripting.&#8221;</p>
<h3>Installing and Running Paros</h3>
<p>No installation is necessary since Paros is a full Java application. Just download it (<a rel="nofollow" href="http://www.parosproxy.org/download.shtml">http://www.parosproxy.org/download.shtml</a>) and run the jar file. In Unix, just do this:</p>
<div style="border-width: 1px;">
<div>
<pre>java -jar paros.jar</pre>
</div>
</div>
<p>In Windows, you can just double-click on it or do whatever it is you Windows people do.     <img src='http://blog.bitengine.ca/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong><span style="color: #ff6600;">Disclaimer:</span></strong> Only run Paros on systems you own or have permission to scan! You have been warned &#8212; don&#8217;t blame us if you get in trouble doing something you shouldn&#8217;t.</p>
<h3><a name="WebApplicationVulnerabilityAssessmentwithParos-UsingParos"></a>Using Paros</h3>
<p>Once you start up the application, you will be presented with a Java GUI. Paros, like ratproxy, WebScarab, Burp Suite, and others, uses its own proxy server to capture and analyze traffic going back and forth between the client and server. Paros&#8217; proxy runs on port 8080. I (Mike) have an entry in my FoxyProxy firefox add-on for Burp and Paros proxies since they use the same host and port. I highly recommend using FoxyProxy when using Paros or any of these proxy-based tools.</p>
<ul>
<li>Start Paros.</li>
<li>Start Firefox.</li>
<li>Set your web browser to use the Paros proxy server.</li>
<li>Visit the site you want to scan in your web browser.</li>
<li>A tree with the target site should appear in the Sites pane of the Paros window.</li>
<li>Right-click on your target site.</li>
<li>Click Spider.</li>
<li>Click OK.</li>
<li>Wait for the Paros spider to crawl the site</li>
<li>Once the spider is done, Click on the target site in the Sites pane to select it.</li>
<li>Click Analyse &gt; Scan (*not* Scan All!)</li>
<li>Once the analyser is done, you will get a dialogue box stating it is complete. A report might automatically appear on screen but it never happens for me so go to the directory that &#8220;analysis complete&#8221; box specifies to see the scan results.</li>
</ul>
<h3>Examining the Results</h3>
<p>Paros will generate an HTML report after it performs an analysis. Open the report in a web browser to see the output, which is fairly self-explanatory.</p>
<p>At the top of the report will be a summary of alerts telling the reader how many of each risk/ severity level issues it has found. Below this summary, will be the list of security items with high-risk items appearing closer to the top. Each item has a brief description; a URL where the issue may be reproduced; parameters passed to the application (if applicable); &#8220;other information,&#8221; which can be a sort of type the issue may be, such as &#8220;SQL;&#8221; a list of possible solutions or suggestions; and some external references to check for more information.</p>
<h3>Additional Paros Tools</h3>
<p>Paros also contains the following tools:</p>
<ul>
<li>A very slick filter that can log GET and POST requests, watch for cookies and set-cookie strings (may favourite feature), change HTTP headers and bodies, and more.</li>
<li>An encoder/ decoder, useful for decoding/ encoding cookies, and possibly other hashed data (even that captured with other tools). Click Tools &gt; Encode/ Decode.</li>
<li>A manual request editor so you can manipulate and inject data into requests made by Paros.</li>
<li>An updating tool.</li>
</ul>
<h3>Further Reading</h3>
<p>Official documentation can be downloaded at <a rel="nofollow" href="http://www.parosproxy.org/download.shtml">http://www.parosproxy.org/download.shtml</a>. There is a good amount of information on Paros elsewhere on the web, found with a quick Google search.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bitengine.ca/?feed=rss2&amp;p=29</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Connecting to an OCS (Communicator) IM Server in Linux</title>
		<link>http://blog.bitengine.ca/?p=25</link>
		<comments>http://blog.bitengine.ca/?p=25#comments</comments>
		<pubDate>Mon, 29 Jun 2009 20:19:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[et cetera]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[IM]]></category>
		<category><![CDATA[LCS]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Live Communication Server]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[microsoft communicator]]></category>
		<category><![CDATA[MS]]></category>
		<category><![CDATA[OCS]]></category>
		<category><![CDATA[Office Communication Server]]></category>
		<category><![CDATA[pidgin]]></category>
		<category><![CDATA[sipe]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://blog.bitengine.ca/?p=25</guid>
		<description><![CDATA[There is great news for those of us who have to log into Office Communications Server (formerly Live Communications Server) at work &#8212; the SIPE project has resumed and has released a very functional version (now at 1.5). SIPE is a plug-in for Pidgin, allowing it to log in and exchange messages on an LCS [...]]]></description>
			<content:encoded><![CDATA[<p>There is great news for those of us who have to log into Office Communications Server (formerly Live Communications Server) at work &#8212; the SIPE project has resumed and has released a very functional version (now at 1.5).</p>
<p>SIPE is a plug-in for Pidgin, allowing it to log in and exchange messages on an LCS server (Communicator server).</p>
<p><a href="https://sourceforge.net/projects/sipe/" target="_blank">https://sourceforge.net/projects/sipe/</a></p>
<p>Installing SIPE is more of an &#8220;advanced user&#8221; operation as it currently must be compiled. Lucky Ubuntu 9.04 (Jaunty) users can install SIPE simply by running &#8220;sudo apt-get install pidgin-sipe) at the command line. I believe packages for Red Hat/Fedora/CentOS are not yet available in their yum repositories.</p>
<p>Visit the SIPE project page and forums (<a href="https://sourceforge.net/forum/forum.php?forum_id=688534" target="_blank">https://sourceforge.net/forum/forum.php?forum_id=688534</a>) for more information as well as installation instructions.</p>
<p>Basically, the install procedure is like this:</p>
<p>sudo apt-get install pkg-config libglib2.0-dev libgtk2.0-dev pidgin-dev libpurple-dev libtool intltool comerr-dev</p>
<p>Then do the following:<br />
tar -xjvf pidgin-sipe-*.tar.bz2<br />
cd pidgin-sipe-*<br />
./configure &#8211;prefix=/usr<br />
make</p>
<p>sudo make install or run make install as root.</p>
<p>I&#8217;m quite sure you also need the build-essential meta package to compile the code if using Ubuntu or similar.</p>
<p>If you have any questions or need any more information, post to the SIPE forum (after reading all the readmes and information already provided of course. ). http://sipe.sourceforge.net/install/ has more installation instructions, including those using the developer&#8217;s unofficial Ubuntu repository and installing from the latest git commits.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bitengine.ca/?feed=rss2&amp;p=25</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
