<?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>Phocean.net / Computer Security &#187; Debian</title>
	<atom:link href="http://www.phocean.net/tag/debian/feed" rel="self" type="application/rss+xml" />
	<link>http://www.phocean.net</link>
	<description>&#34;A defense that hedgehogs possess is the ability to roll into a tight ball, causing all of the spines to point outwards.&#34; -- Wikipedia</description>
	<lastBuildDate>Wed, 30 Nov 2011 22:02:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>OpenSSL : CVE-2009-3555 security fix and mod_ssl client authentication breakage</title>
		<link>http://www.phocean.net/2009/11/28/openssl-cve-2009-3555-security-fix-and-mod_ssl-client-authentication-breakage.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=openssl-cve-2009-3555-security-fix-and-mod_ssl-client-authentication-breakage</link>
		<comments>http://www.phocean.net/2009/11/28/openssl-cve-2009-3555-security-fix-and-mod_ssl-client-authentication-breakage.html#comments</comments>
		<pubDate>Sat, 28 Nov 2009 16:08:50 +0000</pubDate>
		<dc:creator>phocean</dc:creator>
				<category><![CDATA[Admin]]></category>
		<category><![CDATA[Cryptography]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[openSUSE]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[System]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[SSL]]></category>
		<category><![CDATA[Vulnerability]]></category>

		<guid isPermaLink="false">http://www.phocean.net/?p=524</guid>
		<description><![CDATA[A security advisory on OpenSSL has recently been published. Details are there and there. It is vulnerable to a MiTM attack where the attacker can intercept and retrieve the credential to a trusted HTTPS website, by intercepting the session cookie sent back to the client. A proof of concept of an attack against Twitter was [...]]]></description>
			<content:encoded><![CDATA[<p>A security advisory on OpenSSL has recently been published. Details are <a title="CVE-2009-3555" href="http://secunia.com/advisories/cve_reference/CVE-2009-3555/">there</a> and <a title="renegociation vulnerability" href="http://www.securegoose.org/2009/11/tls-renegotiation-vulnerability-cve.html">there</a>.</p>
<p>It is vulnerable to a <strong>MiTM attack </strong>where the attacker can intercept and retrieve the credential to a trusted HTTPS website, by intercepting the session cookie sent back to the client.</p>
<p>A proof of concept of an attack against Twitter was made.</p>
<p>Fine. But so far, <strong>the answer was to just disable any renegociation</strong>.</p>
<p>This actually causes some issues with SSL session timeout and totally broke client authentication.</p>
<p>I got into problems because of the latter. I am using client authentication for some location of my web server, and I recently could not connect anymore to these with the following log in apache :</p>
<pre class="brush: plain; title: ; notranslate">[Tue Nov 24 16:56:15 2009] [debug] ssl_engine_kernel.c(1912): OpenSSL:Exit: error in SSLv3 read client hello A
[Tue Nov 24 16:56:15 2009] [error] [client x.x.x.x] Re-negotiation handshake failed: Not accepted by client!?</pre>
<p>I first was not aware of the openssl patch and tried almost anything possible. My focus was, of course, on the certificate and the client.<br />
But, a nice guy on IRC #suse,<strong> Stittel</strong>, had a good hunch and suggested me to look at the CVE-2009-3555 fix.</p>
<p>After more tests, it was quickly confirmed to work well with older versions of OpenSSL (as shipped in Debian Lenny).<br />
Finally, I downgraded the OpenSSL version on my openSUSE box to a version prior to the CVE-2009-3555 fix and it just worked fine.</p>
<p>Then, I dig into it and found a lot of interesting reports <a href="https://bugzilla.redhat.com/show_bug.cgi?id=533125" target="_blank">there</a> and <a href="http://old.nabble.com/TLS-renegotiation-disabling-:-mod_ssl-and-OpenSSL--0.9.8l-td26285568.html" target="_blank">there</a>. So far it is a real mess.<br />
In short, the breakage will stay as long as browsers don&#8217;t also include a patch to avoid renegotiation.<br />
So far, I could not find a browser that does include a patch.<br />
If anyone reading it knows a version that does it, please let me know.</p>
<p>Meanwhile, you have actually the choice between :</p>
<ul>
<li>low security by deactivating client authentication on your server</li>
<li>low security by keeping a vulnerable version of OpenSSL</li>
</ul>
<p>As my server is not very exposed, I chose the latter, but that&#8217;s not satisfying.  It is not recommended, but if like me you need to use client authentication with mod_ssl on openSUSE 11.2, do :</p>
<pre class="brush: bash; title: ; notranslate">% zypper install --from repo-oss openssl openssl-certs libopenssl0_9_8 libopenssl0_9_8-32bit</pre>
<p>where repo-oss is the alias to the 11.2 release (without updates) on your system.</p>
<p>What a brutal way to fix an issues without much notification and consideration to the users ! Even the log message is wrong and just confusing the administrator&#8230;</p>
<p><em>PS 1 : thanks again to Stittel for the good hint (I hope you will come by here) and to the always nice and helpful #suse channel in general <img src='http://www.phocean.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </em></p>
<p><em>PS 2 : <a href="https://bugzilla.novell.com/show_bug.cgi?id=558176" target="_blank">bug reported</a> on openSUSE bugzilla</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.phocean.net/2009/11/28/openssl-cve-2009-3555-security-fix-and-mod_ssl-client-authentication-breakage.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>openSUSE 11.1 and /boot on RAID 1</title>
		<link>http://www.phocean.net/2009/10/21/opensuse-11-1-and-boot-on-raid-1.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=opensuse-11-1-and-boot-on-raid-1</link>
		<comments>http://www.phocean.net/2009/10/21/opensuse-11-1-and-boot-on-raid-1.html#comments</comments>
		<pubDate>Wed, 21 Oct 2009 18:06:27 +0000</pubDate>
		<dc:creator>phocean</dc:creator>
				<category><![CDATA[Admin]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[openSUSE]]></category>
		<category><![CDATA[System]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Grub]]></category>
		<category><![CDATA[RAID]]></category>

		<guid isPermaLink="false">http://www.phocean.net/?p=489</guid>
		<description><![CDATA[I tried yesterday to set up a home server with two disks in a RAID 1 array. My intention was to have everything on the RAID volume, including /boot, so that if a disk crash, I still can boot on the second one. That&#8217;s the way I think it should work anyway, despite the number [...]]]></description>
			<content:encoded><![CDATA[<p>I tried yesterday to set up a home server with two disks in a RAID 1 array.</p>
<p>My intention was to have everything on the RAID volume, including /boot, so that if a disk crash, I still can boot on the second one.<br />
That&#8217;s the way I think it should work anyway, despite the number of tutorials or forum posts advising not to do so.</p>
<p>The openSUSE partitionner, during the installation process, warned me that having /boot on the RAID 1 array may not work with grub.<br />
And indeed, at the end of the installation, I could not be able to set grub properly :</p>
<ul>
<li>the installer seemed to be lost, writing wrong devices in the various grub config file like menu.lst and grub.conf</li>
<li>I tried to use the manual edition mode offered by the installer, but either because I missed something or there is a bug somewhere, I could never save my modifications.</li>
</ul>
<p>Conclusion : there was a no go.</p>
<p>I became curious to see how a few other distributions could handle it.</p>
<p>At first, I thought they would all fail, because I have always found the openSUSE installer to be the best out there.</p>
<p>So I took a <strong>Debian Lenny</strong> CD, which is my second favorite distribution, and looked at it. The Debian installer is straightforward, but the partionner has always lacked of flexibility. It is fine when you are doing something pretty standard, but you get quickly limited when you want to do something more complicated.<br />
There, no way to have /boot on a RAID volume, and the interface was really painful to use. Any mistake almost oblige you for sure to restart all from scratch.</p>
<p>Then, I looked at <strong>Fedora 11</strong>&#8230; without expecting much. The last time I tried it on a machine, it just froze every time it read the disk configuration.<br />
<strong>But&#8230; surprise ! All I wanted was supported out of the box</strong>. The partionner was as pleasant to use as the one of openSUSE, and setting grub on /dev/md0 was just a matter of checking a box.</p>
<p>I have been quite impressed this time and Fedora will stay on this machine for a while.</p>
<p>I haven&#8217;t tested <strong>openSUSE 11.2</strong> yet because the purpose of this machine is to be a server, so I care about stability.</p>
<p>But I will, and I wish it can support this feature also, or that it will be the case some day.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phocean.net/2009/10/21/opensuse-11-1-and-boot-on-raid-1.html/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>SHA-1 vulnerable : consider SHA-2</title>
		<link>http://www.phocean.net/2009/05/10/sha-1-vulnerable-consider-sha-2.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=sha-1-vulnerable-consider-sha-2</link>
		<comments>http://www.phocean.net/2009/05/10/sha-1-vulnerable-consider-sha-2.html#comments</comments>
		<pubDate>Sun, 10 May 2009 07:58:50 +0000</pubDate>
		<dc:creator>phocean</dc:creator>
				<category><![CDATA[Cryptography]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[hash]]></category>
		<category><![CDATA[MD5]]></category>
		<category><![CDATA[RSA]]></category>
		<category><![CDATA[SHA-1]]></category>
		<category><![CDATA[SHA-2]]></category>
		<category><![CDATA[SHA-3]]></category>

		<guid isPermaLink="false">http://www.phocean.net/?p=358</guid>
		<description><![CDATA[Not long after md5, the computation progress has made another victim. Last week, it was made public that the SHA-1 hash function should be now considered vulnerable. The discovery bring up that the computation to create a collision hash has been dramaticaly reduced. As a consequence, the SHA-1 function can&#8217;t warranty anymore the uniquity &#8211; [...]]]></description>
			<content:encoded><![CDATA[<p>Not long after <a title="md5 vulnerability" href="http://www.phocean.net/2009/01/02/md5-in-your-ssl-certificate-no-need-to-panic.html">md5</a>, the computation progress has made another victim.</p>
<p>Last week, it was made public that the SHA-1 hash function should be now considered vulnerable. The discovery bring up that the computation to create a collision hash has been dramaticaly reduced. As a consequence, the SHA-1 function can&#8217;t warranty anymore the uniquity &#8211; and so the integrity &#8211; of the hashed object.</p>
<p>There are a few ressources :</p>
<ul>
<li><a title="Eurocrypt SHA-1 presentation" href="http://eurocrypt2009rump.cr.yp.to/837a0a8086fa6ca714249409ddfae43d.pdf">short PDF presentation</a> of the recent foundings</li>
<li><a title="NIST comments on SHA-1" href="http://csrc.nist.gov/groups/ST/hash/statement.html" target="_blank">NIST comments</a> about it</li>
</ul>
<p>This is the natural evolution of cryptography. Stronger cryptography is required against stronger CPU power. In this race, it is now suggested to migrate to SHA-2 whose digest lenghts range from 224 to 512 bits (instead of 160 bits for SHA-1). And until next time, where we will be urged to migrate to <a title="SHA-3" href="http://csrc.nist.gov/groups/ST/hash/sha-3/index.html" target="_blank">SHA-3</a> <img src='http://www.phocean.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Debian, whose infrastructure was based on SHA-1 (package management, development) is quickly migrating all its keys right now. The <a title="Debian pgp upgrade procedure" href="http://www.debian-administration.org/users/dkg/weblog/48" target="_blank">procedure</a> the Debian people should follow implies a transition period, where the new key will be signed with the former key, until the latter is revoked. Thus until all peers are updated too, to avoid breaking all the signing infrastruture.</p>
<p>Myself, I ugraded my keys from DSA/1024 bits to RSA/4096 bits (with SHA-2 hashing), so it should be ok for a while. You will find <a title="pgp key" href="http://www.phocean.net/pgp_key.txt">my new key</a> here or linked from the <a href="http://www.phocean.net/contact-me" target="_self">contact page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phocean.net/2009/05/10/sha-1-vulnerable-consider-sha-2.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Connecting your GNS3 labs to the real network</title>
		<link>http://www.phocean.net/2009/03/01/connecting-your-gns3-labs-to-the-real-network.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=connecting-your-gns3-labs-to-the-real-network</link>
		<comments>http://www.phocean.net/2009/03/01/connecting-your-gns3-labs-to-the-real-network.html#comments</comments>
		<pubDate>Sun, 01 Mar 2009 02:02:21 +0000</pubDate>
		<dc:creator>phocean</dc:creator>
				<category><![CDATA[Cisco]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[openSUSE]]></category>
		<category><![CDATA[bridge]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[dummy]]></category>
		<category><![CDATA[gns3]]></category>

		<guid isPermaLink="false">http://www.phocean.net/?p=334</guid>
		<description><![CDATA[There is a nice video tutorial to get your GNS3 lab connected to your physical network. However, it requires you to use a real network card with a fixed IP for doing that. This is not really handy if, llike me, you use GNS3 on a laptop whose connectivity is frequently switching between cable and [...]]]></description>
			<content:encoded><![CDATA[<p>There is a <a title="GNS3 bridge to the physical network" href="http://www.blindhog.net/linux-bridging-for-gns3-lan-communications/" target="_blank">nice video tutorial</a> to get your GNS3 lab connected to your physical network.</p>
<p>However, it requires you to use a real network card with a fixed IP for doing that. This is not really handy if, llike me, you use GNS3 on a laptop whose connectivity is frequently switching between cable and wireless, and on different subnets.</p>
<p>I started to look for something more convenient like a virtual interface.</p>
<p>I first thought about declaring a virtual IP on eth0, but no way : briding is layer 2 (based on MAC address), you can&#8217;t add eth0:0 to a bridge.</p>
<p>Then I found the very handy <strong><em>dummy</em></strong> interface.</p>
<p>Load the module :</p>
<pre class="brush: plain; title: ; notranslate">% sudo modprobe dummy
% lsmod | grep dummy
dummy                   3192  0
% ifconfig dummy0
dummy0    Link encap:Ethernet  HWaddr AE:89:91:BD:61:87
BROADCAST NOARP  MTU:1500  Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:0
RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)</pre>
<p>To have the module loaded at boot time, do :</p>
<p><em>In debian :</em></p>
<pre class="brush: plain; title: ; notranslate">% echo dummy &gt;&gt; /etc/modules</pre>
<p><em>In openSUSE, edit this line in <strong>/etc/sysconfig/kernel </strong>:</em></p>
<pre class="brush: plain; title: ; notranslate">MODULES_LOADED_ON_BOOT=&quot;dummy&quot;</pre>
<p>Then, you could go on with the tutorial linked above, replacing <strong><em>eth0</em></strong> with <em><strong>dummy0</strong></em>, or use the script I made :</p>
<pre class="brush: plain; title: ; notranslate">#!/bin/sh

/bin/tunctl -t tap0
/sbin/ifconfig tap0 0.0.0.0 promisc up
/sbin/ifconfig dummy0 0.0.0.0 promisc up
/sbin/brctl addbr br0
/sbin/brctl addif br0 tap0
/sbin/brctl addif br0 dummy0
/sbin/ifconfig br0 10.10.10.99/24 up
/path/to/GNS3-0.6-src/gns3</pre>
<p>You may also insert this line if you want to interconnect your lab network with your other networks (it activates kernel&#8217;s IP forwarding) :</p>
<pre class="brush: bash; title: ; notranslate">echo 1 &gt; /proc/sys/net/ipv4/ip_forward</pre>
<p>I saved it <strong><em>/usr/local/bin/gns</em> </strong>and created a pretty shortcut for the application browser of Gnome :</p>
<pre class="brush: plain; title: ; notranslate">% cat /usr/share/applications/gns3.desktop
[Desktop Entry]
X-SuSE-translate=true
Encoding=UTF-8
Name=gns3
GenericName=Cisco routers emulator
Exec=/usr/local/bin/gns-start
Terminal=false
Type=Application
X-KDE-SubstituteUID=true
Icon=gnome-window-manager
Categories=GNOME;Network;</pre>
<p>This shortcut will prompt you for the root password (unfortunately, when dealing with tap interface, GNS3 requires root access &#8211; security could be tighten with SELinux or AppArmor) and launch GNS3 with most of the network stuff prepared.</p>
<p>Just in case you want to clear that all quickly, there is the <strong><em>gns-stop</em></strong> script :</p>
<pre class="brush: plain; title: ; notranslate">#!/bin/sh
ifconfig br0 down
brctl delif br0 tap0
brctl delif br0 eth0
brctl delbr br0
tunctl -d tap0</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.phocean.net/2009/03/01/connecting-your-gns3-labs-to-the-real-network.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>VMWare Workstation 6.5</title>
		<link>http://www.phocean.net/2008/10/05/vmware-workstation-65.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=vmware-workstation-65</link>
		<comments>http://www.phocean.net/2008/10/05/vmware-workstation-65.html#comments</comments>
		<pubDate>Sun, 05 Oct 2008 16:46:40 +0000</pubDate>
		<dc:creator>phocean</dc:creator>
				<category><![CDATA[Desktop]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[System]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Gnome]]></category>
		<category><![CDATA[kernel 2.6.26]]></category>
		<category><![CDATA[Unity]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[vmware-any-any]]></category>

		<guid isPermaLink="false">http://www.phocean.net/?p=249</guid>
		<description><![CDATA[I have just upgraded WMWare from version 6.04 to 6.5, and I have to say that it has very nice new features. The first surprising thing was the file I downloaded. It is now not anymore a tar.gz archive but a .bundle file. After downloading, as root, just make it executable or start it with [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;">I have just upgraded WMWare from version 6.04 to 6.5, and I have to say that it has very nice new features.</p>
<p style="text-align: left;">The first surprising thing was the file I downloaded. It is now not anymore a tar.gz archive but a .bundle file.</p>
<p style="text-align: left;">After downloading, as root, just make it executable or start it with sh :</p>
<pre class="brush: plain; title: ; notranslate">% sh VMware-Workstation-6.5.0-118166.x86_64.bundle</pre>
<p style="text-align: left;">It now starts a graphic installer, that takes care of everything. All the compilation process is now hidden to the user.</p>
<p style="text-align: left;">I was expecting the compilation to fail and that I would have to look for a patch to run on my edge Linux kernel. Indeed, I just compiled 2.6.26 kernel (64 bits) a few days ago.</p>
<p style="text-align: left;">But nothing like that. the process went smoothly.</p>
<p style="text-align: left;">However, I was still prudent. Even after a compiling, previous versions almost always required some patch to get full networking to work.</p>
<p style="text-align: left;">So I gave a try and launch one of my virtual machines. Surprise : all worked out of the box !</p>
<p style="text-align: left;">For the first time, I even did not need any vmware-any-any patch or any network patched vmmon and vmnet modules to get wifi networking operational.</p>
<p style="text-align: left;">I also quickly noticed some very nice and fancy features :</p>
<ul style="text-align: left;">
<li><strong>3D graphics support</strong></li>
<li><strong>more</strong> <strong>devices supported</strong> : fingerprint reader device, audio driver for Vista, &#8230;</li>
<li>a <strong>graphical virtual network settings</strong> editor : this utility had been for ages on the Windows version and finally will make your easier on Linux</li>
</ul>
<p style="text-align: left;">At last, but not least, the <strong>Unity</strong> display mode.</p>
<p style="text-align: left;">Though I am not a Mac user, I believe this can be compared to VMWare Fusion. Anyway, it allows you to display the virtual machines programs within your X session.</p>
<p style="text-align: left;">Look at this screenshot :</p>
<p style="text-align: center;"><a href="http://www.phocean.net/wp-content/uploads/2008/10/capture-11.png"><img class="size-medium wp-image-255" title="VMWare Workstation 6.5 and Unity" src="http://www.phocean.net/wp-content/uploads/2008/10/capture-11-300x187.png" alt="VMWare Workstation 6.5 and Unity" width="300" height="187" /></a></p>
<p style="text-align: left;">The result is quite spectacular. On my Gnome desktop, I am now able to display some windows from Windows XP and Windows Vista.</p>
<p style="text-align: left;">Well, this is not yet perfectly smooth or artifact free, but this is already really usable and responsive enough to be used intensively.</p>
<p style="text-align: left;">Another limit is the operating system support. So far, among my virtual machines, I was able to do it with Windows systems but not Open Solaris for instance.</p>
<p style="text-align: left;">There must have been more improvements, more or less visible, that I am not aware of. I won&#8217;t go for a full review.</p>
<p style="text-align: left;">I just wanted to insist that if you are a VMWare user,  you really should consider to upgrade for the <strong>complete support of the latest kernel</strong> and the <strong>Unity</strong> feature.</p>
<p style="text-align: left;">It seems that VMWare has listened to the Linux users, or at least is taking it more seriously. Not that they are nice, but the competitors are close (Virtual box, KVM, Xen&#8230;) !</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phocean.net/2008/10/05/vmware-workstation-65.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How-to : Mod-security 2 set-up for Apache 2</title>
		<link>http://www.phocean.net/2008/07/13/how-to-mod-security-2-set-up-for-apache-2.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-mod-security-2-set-up-for-apache-2</link>
		<comments>http://www.phocean.net/2008/07/13/how-to-mod-security-2-set-up-for-apache-2.html#comments</comments>
		<pubDate>Sun, 13 Jul 2008 01:13:54 +0000</pubDate>
		<dc:creator>phocean</dc:creator>
				<category><![CDATA[Admin]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[mod-security]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[regxp]]></category>

		<guid isPermaLink="false">http://www.phocean.net/?p=114</guid>
		<description><![CDATA[Mod-security is a security proxy for Apache. It adds a frontal layer filtering unwanted clients, malformed packets and malicious requests. It is especially usefull if your website is dynamic, involving php, sql, javascript, etc. With such a complex environment, as you can never be sure that your website is not vulnerable or up-to-date enough, something [...]]]></description>
			<content:encoded><![CDATA[<p>Mod-security is a security proxy for Apache. It adds a frontal layer filtering unwanted clients, malformed packets and malicious requests.</p>
<p>It is especially usefull if your website is dynamic, involving php, sql, javascript, etc. With such a complex environment, as you can never be sure that your website is not vulnerable or up-to-date enough, something like mod-security provides an interesting extra-security layer.<br />
<span id="more-114"></span></p>
<p>Due to license issues, mod-security is no more shipped with Debian &#8211; it was until Debian Sarge.</p>
<p>Fortunately, the Debian maintainer continue to provide some packages on his website.</p>
<p>So, the easy way to set up mod-security on your Debian system is to add this line in your <strong>/etc/apt/source.list</strong> file :</p>
<pre lang="bash">$ echo "deb http://etc.inittab.org/~agi/debian/libapache-mod-security2/ etch/" >> /etc/apt/source.list</pre>
<p>
Then type in the usual sequence :</p>
<pre lang="bash">$ aptitude update &#038;&#038; aptitude install libapache-mod-security2</pre>
<p>You could also download the source from <a title="mod-security" href="http://www.modsecurity.org/download/index.html">the official website</a>.<br />
<br />
Once it is done, comes the configuration part. The configuration is critical because any mistake on it will make it at best useless, or at worst blocking your website.<br />
You have the choice between creating your rules from scratch or getting some ready made.<br />
Creating your rules will require a lot of time and expertise in the http protocol, php, sql, and any other service that you offer with Apache.<br />
That was not really my case, so I started to look for some ready made rules on google. I could not get good ones. Most of tutorial gives only some very basic and incomplete rules : useless. I found a good paper, notably containing some specific rules for WordPress, but the rules were written for mod-security v1 whereas it is now in its second version.<br />
Oh, did I forget to tell you ? Most of the syntax was changed between the two versions !!! Not very nice, even if it was worth doing it.</p>
<p>Finally, I came to find a way with the rules provided by this website, <a title="Go Root ? mod-security rules" href="http://gotroot.com/tiki-index.php?page=Setup+of+mod_security">Got Root ?</a>. They provide quite up-to-date rules, with a delay of 30 days subscription-free, which is quite acceptable for what I want to do. After all, Php exploits and Sql injection technics don&#8217;t change every day.</p>
<p>The rules are also complete and spread over several files, one for each category in : generic rules, blacklist, usergents, proxies, rootkits&#8230;</p>
<p>We can fetch them with a little script. They suggest to add it as a cron job, but you <strong><em>should not</em></strong>, except if you don&#8217;t mind that your website becomes unavailable ! These rules always require testing, some of them may be broken or require customizing&#8230; be careful and always check what&#8217;s inside the rule files !</p>
<p>Here is the small script, <strong>modsec.sh</strong>, that I made to retrieve the rules and put them in the right directory :</p>
<pre lang="bash">#!/bin/sh

wget http://www.gotroot.com/downloads/ftp/mod_security/2.0/apache2/apache2-gotrootrules-modsec2.0-latest.tar.gz
if [ -e apache2-gotrootrules-modsec2.0-latest.tar.gz ]
then
tar -xzvf apache2-gotrootrules-modsec2.0-latest.tar.gz -C /etc/apache2/modsecurity/
fi
rm apache2-gotrootrules-modsec2.0-latest.tar.gz
/etc/init.d/apache2 restart</pre>
<p>
Make it executable and run it :</p>
<pre lang="bash"># chmod +x modsec.sh
$ ./modsec.sh</pre>
<p>
Now, let&#8217;s edit the <strong>/etc/apache2/apache2.conf </strong>file.</p>
<p>Just before these lines (probably at the bottom of the file) :</p>
<pre lang="bash"># Include the virtual host configurations:
Include /etc/apache2/sites-enabled/</pre>
<p>
Add these :</p>
<pre lang="bash">#Turn the filtering engine On or Off
SecRuleEngine On
SecRequestBodyAccess On
SecResponseBodyAccess Off

# Handling of file uploads
# TODO Choose a folder private to Apache.
# SecUploadDir /opt/apache-frontend/tmp/
SecUploadKeepFiles Off

# Maximum request body size we will
# accept for buffering
SecRequestBodyLimit 131072
# Store up to 128 KB in memory
SecRequestBodyInMemoryLimit 131072
# Buffer response bodies of up to
# 512 KB in length
SecResponseBodyLimit 524288

SecDebugLog /var/log/apache2/modsec_debug.log
SecDebugLogLevel 0
# Serial audit log
SecAuditEngine RelevantOnly
SecAuditLogRelevantStatus ^5
SecAuditLogParts ABIFHZ
SecAuditLogType Serial
SecAuditLog /var/log/apache2/modsec_audit.log

#should mod_security inspect POST payloads
#SecRuleScanPOST On

# by default log and deny suspicious requests with HTTP status 500
SecDefaultAction log,auditlog,deny,status:403,phase:2,t:none

#First, add in your exclusion rules:
#These MUST come first!
Include /etc/apache2/modsecurity/exclude.conf

#Application protection rules
Include /etc/apache2/modsecurity/rules.conf

#Comment spam rules
Include /etc/apache2/modsecurity/blacklist.conf

#Bad hosts, bad proxies and other bad players
Include /etc/apache2/modsecurity/blacklist2.conf

#Bad clients, known bogus useragents and other signs of malware
Include /etc/apache2/modsecurity/useragents.conf

#Known bad software, rootkits and other malware
Include /etc/apache2/modsecurity/rootkits.conf

#Signatures to prevent proxying through your server
#only rule these rules if your server is NOT a proxy
#Include /etc/apache2/modsecurity/proxy.conf

#Additional rules for Apache 2.x ONLY!  Do not add this line if you use Apache 1.x
Include /etc/apache2/modsecurity/apache2-rules.conf</pre>
<p>As you can see, we just include the rule files we just downloaded. You can easily activate or deactivate some to fit your needs.</p>
<p>You will probably notice that there is a performance impact after activating mod-security &#8211; not so big to me, but it also depends on your traffic. It is up to you to optimize the number of activated rules to make it faster.</p>
<p>If some page appear to be blocked, check the<strong> /var/log/apache2/error.log </strong>for something like :</p>
<pre lang="text">[Fri Jul 11 19:33:08 2008] [error] [client 192.168.222.21] ModSecurity: Access
denied with code 500 (phase 2). Match of "rx ^HTTP/(0\\\\.9|1\\\\.0|1\\\\.1|1\\
\\.2)$" against "REQUEST_PROTOCOL" required. [<strong>id "340000"</strong>] [msg "Bad HTTP Proto
col"] [severity "ALERT"] [hostname "www.phocean.net"] [uri "/"] [unique_id "72F
mG38AAAEAACa@AVUAAAAA"]</pre>
<p>The ID number of the blocking rule is given. Just grep to find the faulty rule and correct / deactivate it :</p>
<pre lang="bash">$ grep 340000 /etc/apache2/modsecurity</pre>
<p>Regxp knowledge required ! <img src='http://www.phocean.net/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.phocean.net/2008/07/13/how-to-mod-security-2-set-up-for-apache-2.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The SSL/SSH disaster</title>
		<link>http://www.phocean.net/2008/05/15/the-sslssh-disaster.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=the-sslssh-disaster</link>
		<comments>http://www.phocean.net/2008/05/15/the-sslssh-disaster.html#comments</comments>
		<pubDate>Thu, 15 May 2008 16:23:22 +0000</pubDate>
		<dc:creator>phocean</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[OpenVPN]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[SSL]]></category>
		<category><![CDATA[Vulnerability]]></category>

		<guid isPermaLink="false">http://www.phocean.net/?p=106</guid>
		<description><![CDATA[Due to the recent security hole discovered in Debian, which has also concerned various distributions &#8211; of course including Ubuntu &#8211; for 2 years, I simply closed all my SSH and OpenVPN accesses. I have had no time so far to check all the keys on my server. I prefer to stay on the safe [...]]]></description>
			<content:encoded><![CDATA[<p>Due to the recent security hole discovered in Debian, which has also concerned various distributions &#8211; of course including Ubuntu &#8211; for 2 years, I simply closed all my SSH and OpenVPN accesses.</p>
<p>I have had no time so far to check all the keys on my server. I prefer to stay on the safe side, though I have some reason to believe that my keys might not be so vulnerable : I generated them a long time ago, maybe before the Debian maintainer sad mistake.</p>
<p>It is going to be pretty easy now, for those who are motivated, to get access to the ssh server running keys generated during the 2 last years&#8230;</p>
<p>I recommend <a title="ssl and ssh weakness" href="http://blog.drinsama.de/erich/en/linux/2008051401-consequences-of-sslssh-weakness.html" target="_blank">this article</a> which summarize pretty well the situation. You may also use <a title="downkd.pl" href="http://security.debian.org/project/extra/dowkd/dowkd.pl.gz">this tool</a>, which checks if your keys are vulnerable :</p>
<pre class="brush: plain; title: ; notranslate">$  perl dowkd.pl file ~/.ssh/*.pub</pre>
<p>It find it funny to think that I chose to use certificates for security (avoiding brute force attacks).<br />
What&#8217;s less funny is the pure disaster for the reputation of Debian.</p>
<p>I already noticed in the past that some companies switched their servers from Debian to Red Hat because of such security problems. They claimed about some security holes being patch much too slowly and about the lack of official support to rely on in such a crisis.<br />
This kind of news is not going to enforce trust from companies.</p>
<p>I myself will think twice in the future about what system to use when I design my networks.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phocean.net/2008/05/15/the-sslssh-disaster.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Totem : black screen issue affecting all your XVideo output</title>
		<link>http://www.phocean.net/2008/02/13/totem-black-screen-issue-affecting-all-your-xvideo-output.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=totem-black-screen-issue-affecting-all-your-xvideo-output</link>
		<comments>http://www.phocean.net/2008/02/13/totem-black-screen-issue-affecting-all-your-xvideo-output.html#comments</comments>
		<pubDate>Wed, 13 Feb 2008 11:05:02 +0000</pubDate>
		<dc:creator>phocean</dc:creator>
				<category><![CDATA[Desktop]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Nvidia]]></category>
		<category><![CDATA[Totem]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://www.phocean.net/?p=96</guid>
		<description><![CDATA[I confirm the black screen issue with Totem. Actually it changes the contrast for all the environment, and of course using Mplayer or the gstreamer test program just after also gave back a black screen. Therefore I had been convinced it was a driver issue (reporting a bug to Nvidia and posting on this forum), [...]]]></description>
			<content:encoded><![CDATA[<p>I confirm <a title="black screen issue with Totem" href="http://www.phocean.net/openID/phocean">the black screen issue with Totem</a>.</p>
<p>Actually it changes the contrast for all the environment, and of course using Mplayer or the gstreamer test program just after also gave back a black screen.</p>
<p>Therefore I had been convinced it was a driver issue (reporting a bug to Nvidia and <a href="http://www.nvnews.net/vbulletin/showthread.php?t=107830&amp;highlight=totem">posting on this forum</a>), until I find the contrast setting of Totem was the cause of all that mess.</p>
<p>Note that I am right now using Debian Lenny.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phocean.net/2008/02/13/totem-black-screen-issue-affecting-all-your-xvideo-output.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to connect to a Cisco device using the serial port on Linux</title>
		<link>http://www.phocean.net/2007/11/13/how-to-connect-to-a-cisco-device-using-the-serial-port-on-linux.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-connect-to-a-cisco-device-using-the-serial-port-on-linux</link>
		<comments>http://www.phocean.net/2007/11/13/how-to-connect-to-a-cisco-device-using-the-serial-port-on-linux.html#comments</comments>
		<pubDate>Tue, 13 Nov 2007 10:41:35 +0000</pubDate>
		<dc:creator>phocean</dc:creator>
				<category><![CDATA[Cisco]]></category>
		<category><![CDATA[Firewalling]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Minicom]]></category>
		<category><![CDATA[Pix]]></category>
		<category><![CDATA[serial port]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.phocean.net/?p=84</guid>
		<description><![CDATA[Using the serial port is still necessary to manage some devices, when it is reseted to factory defaults. It could be also a security choice&#8230; Nowadays many computers &#8211; and especially laptops don&#8217;t have anymore a built-in serial port. Not a problem, there are many cheap serial-usb converters like this. As an alternative to the [...]]]></description>
			<content:encoded><![CDATA[<p>Using the serial port is still necessary to manage some devices, when it is reseted to factory defaults. It could be also a security choice&#8230;</p>
<p>Nowadays many computers &#8211; and especially laptops don&#8217;t have anymore a built-in serial port.  Not a problem, there are many cheap serial-usb converters <a href="http://www.usbgear.com/USB-1S1PQ.html" target="_blank">like this</a>.</p>
<p>As an alternative to the Hyperterminal of Microsoft, there is Minicom on Linux.</p>
<p>It is very easy to install and configure :</p>
<pre class="brush: plain; title: ; notranslate">$ apt-get install minicom lrzsz</pre>
<p>Before going further, you need to know what is the corresponding Linux device for the port where you plugged the router. As I used an usb adapter, my device was <strong>/dev/ttyUSB0</strong>. Otherwise, it will probably be one of the <strong>/dev/ttyS*</strong> devices.<br />
Checking the <strong>dmesg</strong> output while you plug the device will give you the right device to use.</p>
<p>Now start minicom this way to edit the configuration :</p>
<pre class="brush: plain; title: ; notranslate">$ minicom -s</pre>
<p>In the menu, select <em>Serial Port Configuration</em> and  :</p>
<ul>
<li> press A and update the serial port path with the one you found in dmesg</li>
<li>press E and then C to change the speed to 9600</li>
<li>press F to switch off the hardware flow control</li>
<li>select <em>Save the configuration as&#8230;</em> and name it as, let&#8217;s say, &#8220;cisco&#8221;</li>
</ul>
<p>You should be able to connect right now. Next time, just start Minicom like this :</p>
<pre class="brush: plain; title: ; notranslate">$ minicom cisco</pre>
<p>That&#8217;s it !</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phocean.net/2007/11/13/how-to-connect-to-a-cisco-device-using-the-serial-port-on-linux.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>PulseAudio on Debian Testing</title>
		<link>http://www.phocean.net/2007/11/11/pulseaudio-on-debian-testing.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=pulseaudio-on-debian-testing</link>
		<comments>http://www.phocean.net/2007/11/11/pulseaudio-on-debian-testing.html#comments</comments>
		<pubDate>Sun, 11 Nov 2007 01:36:43 +0000</pubDate>
		<dc:creator>phocean</dc:creator>
				<category><![CDATA[Desktop]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Pulseaudio]]></category>
		<category><![CDATA[Sound]]></category>

		<guid isPermaLink="false">http://www.phocean.net/?p=83</guid>
		<description><![CDATA[I just replaced ESD by the new sound server Pulseaudio. Pulseaudio brings up some great improvements and is already chipped by Fedora 8. Getting it to work on my Debian Testing was very easy : However there were two issues to face : no more sound with Flash and Skype. To solve the flash issue, [...]]]></description>
			<content:encoded><![CDATA[<p>I just replaced ESD by the new sound server <a title="PulseAudio" href="http://pulseaudio.org/" target="_blank">Pulseaudio</a>.</p>
<p>Pulseaudio brings up some great improvements and is already chipped by Fedora 8.</p>
<p>Getting it to work on my Debian Testing was very easy :</p>
<pre class="brush: plain; title: ; notranslate">$ aptitude install pulseaudio pulseaudio-esound-compat pulseaudio-module-gconf pulseaudio-module-hal pulseaudio-module-jack pulseaudio-module-x11 pulseaudio-module-zeroconf pulseaudio-utils libasound2-plugins</pre>
<p>However there were two issues to face :  no more sound with Flash and Skype.</p>
<p>To solve the flash issue, you have to download and set up <a title="pulseAudio flash support" href="http://http://pulseaudio.vdbonline.net/libflashsupport/libflashsupport_1.0~2219-1_i386.deb" target="_blank">this package</a> (more information or sources on <a title="PulseAudio and Flash" href="http://http://pulseaudio.revolutionlinux.com/PulseAudio" target="_blank">this page</a>).</p>
<p>Concerning the Skype problem, you have to create &#8211; or edit if existing &#8211; an <strong>/etc/asound.conf</strong> file as follows :</p>
<pre class="brush: plain; title: ; notranslate">pcm.card0 {
type hw
card 0
}

pcm.dmixer {
type dmix
ipc_key 1025
slave {
pcm &quot;hw:0,0&quot;
period_time 0
period_size 2048
buffer_size 32768
rate 48000
}
bindings {
0 0
1 1
}
}

pcm.skype {
type asym

playback.pcm &quot;dmixer&quot;
capture.pcm &quot;card0&quot;
}

pcm.!default {
type plug
slave.pcm &quot;skype&quot;
}
</pre>
<p>Then, restart alsa-utils :</p>
<pre class="brush: plain; title: ; notranslate">$ /etc/init.d/alsa-utils restart</pre>
<p>Finally, just select &#8220;skype&#8221; as sound device in the Skype preferences and it should work.  I hope it will help !</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phocean.net/2007/11/11/pulseaudio-on-debian-testing.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

