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

<channel>
	<title>Sakana.fr - A sysadmin&#039;s blog &#187; Security</title>
	<atom:link href="http://www.sakana.fr/blog/category/security/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sakana.fr/blog</link>
	<description>On the fly saving of few useful (?) tech tips</description>
	<lastBuildDate>Thu, 26 Jan 2012 15:30:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>SSH : Multiplexing connections</title>
		<link>http://www.sakana.fr/blog/2009/04/28/ssh-multiplexing-connections/</link>
		<comments>http://www.sakana.fr/blog/2009/04/28/ssh-multiplexing-connections/#comments</comments>
		<pubDate>Tue, 28 Apr 2009 19:52:27 +0000</pubDate>
		<dc:creator>Stephane Kattoor</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[openssh]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://www.sakana.fr/blog/?p=253</guid>
		<description><![CDATA[There is a feature in OpenSSH since v3.9 which allows multiple SSH connections with the same caracteristics (host, port, remote login) to be made through a single TCP connection. This is useful because you&#8217;ll have to authenticate only once, and besides the new SSH connections will be much faster to establish. Enabling connections multiplexing is [...]<p><a href="http://www.sakana.fr/blog/2009/04/28/ssh-multiplexing-connections/">SSH : Multiplexing connections</a> is a post from: <a href="http://www.sakana.fr/blog">Tech@Sakana - A sysadmin's blog</a></p>
]]></description>
			<content:encoded><![CDATA[<p>There is a feature in OpenSSH since v3.9 which allows multiple SSH connections with the same caracteristics (host, port, remote login) to be made through a single TCP connection. This is useful because you&#8217;ll have to authenticate only once, and besides the new SSH connections will be much faster to establish.<br />
<span id="more-253"></span></p>
<p>Enabling connections multiplexing is actually just a matter of 2 options to set. I find it practical and easy to set them globally by editing my ~/.ssh/config and adding the following lines :</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p253code2'); return false;">View Code</a> CONFIG</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p2532"><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code" id="p253code2"><pre class="config" style="font-family:monospace;">Host *
	ControlMaster auto
	ControlPath ~/.ssh/sockets/ssh-socket-%r-%h-%p</pre></td></tr></table></div>

<p>These settings apply for any hosts, but you could enable it selectively if needed. &#8220;ControlMaster auto&#8221; will start a master connection and create the control socket if none exist yet. The control socket will be created in the path specified by the ControlPath directive. This socket is used by the ssh client to create a new SSH connection over an already existing master connection.</p>
<p>It is recommended that the socket name contains the hostname (%h), the port (%p) and the remote username (%r), to avoid using an inappropriate control socket when establishing a new connection.</p>
<p>The path where the control sockets are created are to be correctly protected (the directory permissions should be something like 0700 and the sockets themselves 0600) because if the sockets are accessible, they can be used to establish connection as the user who created the master connection.</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-4571688872511149";
/* 728x90, created 10/17/09 */
google_ad_slot = "0784069657";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<p><a href="http://www.sakana.fr/blog/2009/04/28/ssh-multiplexing-connections/">SSH : Multiplexing connections</a> is a post from: <a href="http://www.sakana.fr/blog">Tech@Sakana - A sysadmin's blog</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sakana.fr/blog/2009/04/28/ssh-multiplexing-connections/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Securing automated rsync over SSH</title>
		<link>http://www.sakana.fr/blog/2008/05/07/securing-automated-rsync-over-ssh/</link>
		<comments>http://www.sakana.fr/blog/2008/05/07/securing-automated-rsync-over-ssh/#comments</comments>
		<pubDate>Wed, 07 May 2008 20:54:04 +0000</pubDate>
		<dc:creator>Stephane Kattoor</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[authorized_keys]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[rsync]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://www.sakana.fr/blog/?p=154</guid>
		<description><![CDATA[Quoting the RSYNC homepage : &#8220;rsync is an open source utility that provides fast incremental file transfer.&#8221; To make rsync both secure and automated (i.e : non-interactive), you can use SSH as the transport and set up a key pair. This is what will be discussed in this post, along with a few improvements. Basic [...]<p><a href="http://www.sakana.fr/blog/2008/05/07/securing-automated-rsync-over-ssh/">Securing automated rsync over SSH</a> is a post from: <a href="http://www.sakana.fr/blog">Tech@Sakana - A sysadmin's blog</a></p>
]]></description>
			<content:encoded><![CDATA[<p>Quoting the <a title="Rsync homepage" href="http://samba.anu.edu.au/rsync/" target="_blank">RSYNC homepage</a> : &#8220;rsync is an open source utility that provides fast incremental file transfer.&#8221;</p>
<p>To make rsync both secure and automated (i.e : non-interactive), you can use SSH as the transport and set up a key pair. This is what will be discussed in this post, along with a few improvements.</p>
<p><span id="more-154"></span></p>
<h3>Basic rsync + ssh</h3>
<p>Let&#8217;s first ensure that rsync works correctly over ssh :<br />
<pre><code>spaghetti% rsync -avz -e ssh --delete Documents prodigy:/tmp
Password: 
building file list ... done
Documents/
Documents/Letters/
Documents/Letters/Santa.odt
[...]
spaghetti% </code></pre></p>
<p>As for the options : <strong>-avz</strong> is for the verbose archive gzip compressed mode. This transfers your files and directories recursively, preserving most of their attributes (date, owner, group, and so on). <strong>&#8211;delete</strong> will make rsync to delete the files in the target directory if they don&#8217;t exist anymore in the source directory. All in all, you should end up with the target and source directories synchronized.</p>
<p>As we are specifying <strong>-e ssh</strong>, all the data are transfered over a secured ciphered SSH session.</p>
<p>Notice that it did ask for the password which is unsuitable for automation/scripting purposes. Let&#8217;s take care of that.</p>
<h3>Setting up an SSH key pair</h3>
<p>First let&#8217;s create the key pair :<br />
<pre><code>spaghetti% ssh-keygen -t rsa&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Generating public/private rsa key pair.
Enter file in which to save the key (/home/kattoo/.ssh/id_rsa): testRsync
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in testRsync.
Your public key has been saved in testRsync.pub.
The key fingerprint is:
7a:7f:16:dd:99:06:02:3f:d8:cb:ac:10:91:7b:f5:79 kattoo@spaghetti
spaghetti%</code></pre></p>
<p>Remember to keep the passphrase <strong>empty</strong>, otherwise you&#8217;ll have to type in that passphrase anytime you&#8217;ll want to use that key pair, which defeats the automation goal.</p>
<p>We now have the 2 files testRsync which is the private key, and testRsync.pub which is the public key.</p>
<p>To be able to connect with SSH to the remote host using this key pair, we need to add the public key in the ~/.ssh/authorized_keys file on the remote host. We can use the ssh-copy-id utility for this purpose :<br />
<pre><code>spaghetti% ssh-copy-id -i testRsync prodigy
Password: 
Now try logging into the machine, with &quot;ssh &#039;prodigy&#039;&quot;, and check in:
&nbsp;&nbsp;.ssh/authorized_keys
to make sure we haven&#039;t added extra keys that you weren&#039;t expecting.
spaghetti% </code></pre></p>
<p>Let&#8217;s give it a try :<br />
<pre><code>spaghetti% ssh -i ~/.ssh/testRsync prodigy
Last login: Wed May&nbsp;&nbsp;7 21:41:04 2008 from spaghetti.sakan
Sun Microsystems Inc.&nbsp;&nbsp; SunOS 5.10&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Generic January 2005
$ </code></pre></p>
<p>All right, ssh is able to connect without any password to the remote host.</p>
<p>And now, let&#8217;s glue this back to rsync :<br />
<pre><code>spaghetti% rsync -avz -e &quot;ssh -i /home/kattoo/.ssh/testRsync&quot; --delete Documents prodigy:/tmp
building file list ... done
[...]
spaghetti% </code></pre></p>
<p>No password was asked, which is good for our automation purposes, but not so great on a security standpoint. Let&#8217;s improve this.</p>
<h3>Securing this automated rsync over ssh</h3>
<p>The major problem so far is that if your account is compromised on the local machine, so is your account on the remote machine, since the malicious user could connect there without having to guess any password.</p>
<p>Fortunately SSH offers the possibility to limit the use of a key pair. Let&#8217;s have a look at the authorized_keys that we have previously configured on the remote host :<br />
<pre><code>$ cat /home/kattoo/.ssh/authorized_keys
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAzS6C[...]== kattoo@spaghetti
$</code></pre></p>
<p>This actually allows this key pair to be used to connect from the local host to the remote host without any limitation, when all we want this key pair to do is the rsync transfer.</p>
<p>Let&#8217;s have a more detailed look at what happens (ssh-wise) when we do the rsync :<br />
<pre><code>spaghetti% rsync -avz -e &quot;ssh -vi /home/kattoo/.ssh/testRsync&quot; --delete Documents prodigy:/tmp
OpenSSH_4.7p1 Debian-8ubuntu1, OpenSSL 0.9.8g 19 Oct 2007
[...]
debug1: Offering public key: /home/kattoo/.ssh/testRsync
[...]
debug1: Authentication succeeded (publickey).
[...]
debug1: Sending command: rsync --server -vlogDtprz --delete . /tmp
[...]
building file list ... done
[...]
spaghetti% </code></pre></p>
<p>Notice that I&#8217;ve added the flag <strong>-v</strong> to ssh, to add verbose logging (I&#8217;ve removed most of the output lines of SSH to keep only what we are interested in).</p>
<p>What we see is that we first connect with the key pair we have installed, and then a command (<tt>rsync --server -vlogDtprz --delete . /tmp</tt>) is executed on the remote host.</p>
<p>If this key pair was only able to launch that very command and nothing else, then we&#8217;d be fairly secure. Let&#8217;s do that, and edit the ~/.ssh/authorized_keys to make it look like this :<br />
<pre><code>prodigy% cat /home/kattoo/.ssh/authorized_keys 
command=&quot;/usr/local/bin/rsync --server -vlogDtprz --delete . /tmp&quot; ssh-rsa AAAAB3NzaC1yc2EAAA[...] kattoo@spaghetti
prodigy%</code></pre></p>
<p>By adding the <tt>command=</tt> part, we now restrict this key pair to only execute this specific command. No risk that a malicious user could use this unprotected key to gain a shell access to the remote computer or to execute another command.</p>
<p>You can go farther and add &#8220;no-pty&#8221;, &#8220;no-agent-forwarding&#8221;, &#8220;no-port-forwarding&#8221; to further limit the key pair like this :<br />
<pre><code>prodigy% cat /home/kattoo/.ssh/authorized_keys 
command=&quot;/usr/local/bin/rsync --server -vlogDtprz --delete . /tmp&quot;,no-pty,no-agent-forwarding,no-port-forwarding ssh-rsa AAAAB3NzaC1y[...] kattoo@spaghetti
prodigy% </code></pre><br />
(note : this is supposed to be 1 single line)</p>
<p>Let&#8217;s go back to rsync with a verbose ssh to see how it now looks like :<br />
<pre><code>spaghetti% rsync -avz -e &quot;ssh -vi /home/kattoo/.ssh/testRsync&quot; --delete Documents prodigy:/tmp
OpenSSH_4.7p1 Debian-8ubuntu1, OpenSSL 0.9.8g 19 Oct 2007
[...]
debug1: Offering public key: /home/kattoo/.ssh/testRsync
debug1: Remote: Forced command: /usr/local/bin/rsync --server -vlogDtprz --delete . /tmp
debug1: Remote: Pty allocation disabled.
debug1: Remote: Agent forwarding disabled.
debug1: Remote: Port forwarding disabled.
[...]
debug1: Remote: Forced command: /usr/local/bin/rsync --server -vlogDtprz --delete . /tmp
debug1: Remote: Pty allocation disabled.
debug1: Remote: Agent forwarding disabled.
debug1: Remote: Port forwarding disabled.
debug1: Authentication succeeded (publickey).
[...]
debug1: Sending command: rsync --server -vlogDtprz --delete . /tmp
debug1: Remote: Missing locale support for LANG=en_US.UTF-8
building file list ... done
[...]
spaghetti% </code></pre></p>
<p>Rsync now runs passwordless and there&#8217;s no risk that this can be exploited to get access to the remote host beyond rsync.</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-4571688872511149";
/* 728x90, created 10/17/09 */
google_ad_slot = "0784069657";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<p><a href="http://www.sakana.fr/blog/2008/05/07/securing-automated-rsync-over-ssh/">Securing automated rsync over SSH</a> is a post from: <a href="http://www.sakana.fr/blog">Tech@Sakana - A sysadmin's blog</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sakana.fr/blog/2008/05/07/securing-automated-rsync-over-ssh/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Network Security : Being the Man In The Middle using ARP</title>
		<link>http://www.sakana.fr/blog/2008/05/01/network-security-being-the-man-in-the-middle-using-arp/</link>
		<comments>http://www.sakana.fr/blog/2008/05/01/network-security-being-the-man-in-the-middle-using-arp/#comments</comments>
		<pubDate>Thu, 01 May 2008 17:37:58 +0000</pubDate>
		<dc:creator>Stephane Kattoor</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[arp]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[man in the middle]]></category>
		<category><![CDATA[networking]]></category>

		<guid isPermaLink="false">http://www.sakana.fr/blog/?p=150</guid>
		<description><![CDATA[This post presents what is the attack known as &#8220;ARP Man in the Middle&#8221; which is basically a way for a malicious user to sniff network traffic on a fully switched network. If you don&#8217;t know this attack yet, go on reading. What is ARP In short, ARP is the protocole which is used by [...]<p><a href="http://www.sakana.fr/blog/2008/05/01/network-security-being-the-man-in-the-middle-using-arp/">Network Security : Being the Man In The Middle using ARP</a> is a post from: <a href="http://www.sakana.fr/blog">Tech@Sakana - A sysadmin's blog</a></p>
]]></description>
			<content:encoded><![CDATA[<p>This post presents what is the attack known as &#8220;ARP Man in the Middle&#8221; which is basically a way for a malicious user to <strong>sniff network traffic on a fully switched network</strong>. If you don&#8217;t know this attack yet, go on reading.</p>
<p> <span id="more-150"></span></p>
<h3>What is ARP</h3>
<p>In short, <a title="ARP on Wikipedia" href="http://http//en.wikipedia.org/wiki/Address_Resolution_Protocol" target="_blank">ARP</a> is the protocole which is used by a computer to resolve a MAC address (i.e : the hardware address of a network interface) from an IP address on the same network.</p>
<p>Basically, when a computer A needs to reach another computer B on the same network knowing only its IP address, it will broadcast an ARP packet meaning &#8220;who has the IP W.X.Y.Z ?&#8221; and when B, whose IP address is W.X.Y.Z, gets this ARP packet, it will answer to A &#8220;W.X.Y.Z is at a:b:c:d:e:f&#8221; the latter being B&#8217;s own MAC address.</p>
<p>From now on, A knows the hardware address of B (A will store this entry with the IP address of B in its so called ARP table for a while) and can subsequently communicate with it.</p>
<p>It is good to know what is &#8220;Gratuitous ARP&#8221; too. It is basically a broadcasted ARP packet saying &#8220;Hello, here&#8217;s my IP address : A.B.C.D and this is my MAC address : aa:bb:cc:dd:ee:ff&#8221;. This is used to update the ARP tables of the computers of the same network, and is usually when a computer boots, to announce itself on the network (to prevent / detect potential IP address conflicts). This is useful if you reboot a server after having for example changed a faulty network interface (so anyone should be notified of the hardware address change).</p>
<h3>The ARP Man In The Middle attack</h3>
<p>This attack is known as the ARP Man In the Middle because the malicious user will try to insert himself between A and B to eavesdrop all communications in between.</p>
<p>ARP doesn&#8217;t implement any kind of authentication. When A asks for the MAC address of B&#8217;s IP, it is of course expected that only B will answer. But nothing prevents a malicious computer C to answer with its own MAC address and if it manages to answer faster than B (for example because B is a fairly loaded server or (even worse) router) then A will logically assume that the IP of B is assigned to C and will send to C all the traffic which should legitimately have been sent to B.</p>
<p> Of course anyone can send a gratuitous ARP pretending to be someone else, but Gratuitous ARP is a broadcast packet, so anyone will see it, including B, which will usually complain (check the logs) that someone is trying to use the same IP address. Moreover, this broadcast packet could be detected by an IDS which would raise an alert.</p>
<p>Wether it is by answering the ARP request faster than the legitimate B or by issuing a Gratuitous ARP pretending to be B, C is now getting all the traffic that A intended to be delivered to B.</p>
<p>Of course this will be quickly discovered if C doesn&#8217;t provide the same services as B (for example if a user sitting at computer A expected to connect to a web site on B and the website doesn&#8217;t exist on C), but if C is clever enough, it will forward the packets it got from A to B and pass back the packets from B to A, analyzing them in between.</p>
<p>This is why this attack is known as the &#8220;ARP Man In the Middle&#8221; : the computer C is actually in the middle of all the traffic passing between A and B and is free to collect all kind of private information, passwords, session IDs, etc.</p>
<h3>Key point</h3>
<p>You might have heard that a network switch is better than a hub from a security point of view because a hub will repeat packets on all the ports (so a malicious user can sniff packets intended to others) while a switch will only transmit a packet on the port where the recipient is connected.</p>
<p>With the ARP man in the middle attack, you can sniff packets not intended for your computer, even on a fully switched network.</p>
<h3>Protecting yourself</h3>
<p>To avoid this attack, you can statically enter entries in the ARP tables, but this quickly becomes an administrative nightmare. And some standard ARP mechanisms will fail (such as Gratuitous ARP which is precisely supposed to allow to update ARP tables entries for example when you change the network card of a server).</p>
<p>It is anyway a best approach to consider that any communication can be sniffed, and that anything of value should be ciphered using proper cryptographic tools (SSH, HTTPS, SSL/TLS, VPN and so on). This way, maybe your information will be intercepted, but it won&#8217;t be of any value to the malicious user.</p>
<p>Don&#8217;t even think about using insecure protocols  such as telnet, http, ftp, and others where the passwords are in the clear, thinking &#8220;it&#8217;s ok, I am on a switched network so no one else but the legitimate target will get these packets&#8221; ! If you do have to connect on an unsecure application, try to set some sort of tunnel (again, ssh, vpn, ipsec or other) so that the communication won&#8217;t go in the clear.</p>
<p><!--adsense--></p>
<p><a href="http://www.sakana.fr/blog/2008/05/01/network-security-being-the-man-in-the-middle-using-arp/">Network Security : Being the Man In The Middle using ARP</a> is a post from: <a href="http://www.sakana.fr/blog">Tech@Sakana - A sysadmin's blog</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sakana.fr/blog/2008/05/01/network-security-being-the-man-in-the-middle-using-arp/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>MSN : get rid of Backdoor.Generic3.SAT</title>
		<link>http://www.sakana.fr/blog/2008/03/24/msn-get-rid-of-backdoorgeneric3sat/</link>
		<comments>http://www.sakana.fr/blog/2008/03/24/msn-get-rid-of-backdoorgeneric3sat/#comments</comments>
		<pubDate>Mon, 24 Mar 2008 11:18:58 +0000</pubDate>
		<dc:creator>Stephane Kattoor</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Backdoor.Generic3.SAT]]></category>
		<category><![CDATA[msn]]></category>
		<category><![CDATA[virus]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.sakana.fr/blog/2008/03/24/msn-get-rid-of-backdoorgeneric3sat/</guid>
		<description><![CDATA[If you got this virus (or know someone who did), and it is spreading to all of your MSN contacts with something like the following message : hey&#160;&#160; How are you???? this is ur pic rite?! http://www.msn- gallery.com/gallery.php?user=some_nickname.jpg or in French something like : http://msn-friends. iquebec.com/?photo=some_nickname ta tof fais koi sur ce site :P Then [...]<p><a href="http://www.sakana.fr/blog/2008/03/24/msn-get-rid-of-backdoorgeneric3sat/">MSN : get rid of Backdoor.Generic3.SAT</a> is a post from: <a href="http://www.sakana.fr/blog">Tech@Sakana - A sysadmin's blog</a></p>
]]></description>
			<content:encoded><![CDATA[<p>If you got this virus (or know someone who did), and it is spreading to all of your MSN contacts with something like the following message :</p>
<p><pre><code>hey&nbsp;&nbsp; How are you???? this is ur pic rite?!
http://www.msn- gallery.com/gallery.php?user=some_nickname.jpg</code></pre></p>
<p>or in French something like :</p>
<p><pre><code>http://msn-friends. iquebec.com/?photo=some_nickname
ta tof fais koi sur ce site :P</code></pre></p>
<p>Then you can use the following article (there is a removal tool) to get rid of it : <a href="http://www.technibble.com/how-to-remove-msn-virus-project-1-generic2exo-backdoorgeneric3sat/" title="http://www.technibble.com/how-to-remove-msn-virus-project-1-generic2exo-backdoorgeneric3sat/" target="_blank">How to Remove MSN Virus Project 1/ Generic2.EXO / Backdoor.Generic3.SAT</a></p>
<p>Thanks to <a href="http://www.v-nessa.net/2008/03/23/someones-got-the-internet-aids/trackback" title="v-nessa.net : Someone’s Got the Internet AIDS…">v-nessa.net</a> for having shared this !<br />
<!--adsense--></p>
<p><a href="http://www.sakana.fr/blog/2008/03/24/msn-get-rid-of-backdoorgeneric3sat/">MSN : get rid of Backdoor.Generic3.SAT</a> is a post from: <a href="http://www.sakana.fr/blog">Tech@Sakana - A sysadmin's blog</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sakana.fr/blog/2008/03/24/msn-get-rid-of-backdoorgeneric3sat/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Web Security : What are XSS?</title>
		<link>http://www.sakana.fr/blog/2007/11/25/web-security-what-are-xss/</link>
		<comments>http://www.sakana.fr/blog/2007/11/25/web-security-what-are-xss/#comments</comments>
		<pubDate>Sun, 25 Nov 2007 14:52:32 +0000</pubDate>
		<dc:creator>Stephane Kattoor</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[cross site scripting]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[xss]]></category>

		<guid isPermaLink="false">http://www.sakana.fr/blog/2007/11/25/web-security-what-are-xss/</guid>
		<description><![CDATA[XSS (Cross Site Scripting) are a kind of attacks which are fairly popular these days and could target anyone, but are not nearly well known from most people. In this post, I&#8217;ll try to give a short explanation of what they are. XSS : the principle Simply put, a XSS (or Cross Site Scripting, not [...]<p><a href="http://www.sakana.fr/blog/2007/11/25/web-security-what-are-xss/">Web Security : What are XSS?</a> is a post from: <a href="http://www.sakana.fr/blog">Tech@Sakana - A sysadmin's blog</a></p>
]]></description>
			<content:encoded><![CDATA[<p><strong>XSS</strong> (Cross Site Scripting) are a kind of attacks which are fairly popular these days and could target anyone, but are not nearly well known from most people.</p>
<p>In this post, I&#8217;ll try to give a short explanation of what they are.</p>
<p><span id="more-120"></span></p>
<h4>XSS : the principle</h4>
<p>Simply put, a XSS (or Cross Site Scripting, not to confuse with CSS, Cascading Style Sheets) happens when a website accepts user contributed content (ex : posts, message on a forum, comments, nicknames, profile informations, &#8230;) and then displays it without proper validation or filtering.</p>
<p>A malicious user could then submit a content including javascript, which would in turn get executed by any user displaying this content in his browser.</p>
<h4>XSS : An example</h4>
<p>For an example, imagine a social networking website where javascript would be improperly filtered out of the user profiles.</p>
<p>Now imagine that a malicious user would setup his profile to contain a javascript piece of code which would add himself as a friend of someone viewing his profile.</p>
<p>A legit user would then authenticate himself on the social networking website, and browse profiles, passing by the malicious one, which would add the malicious user as a friend.</p>
<p>Well this is not just a fictious example. <a href="http://www.betanews.com/article/CrossSite_Scripting_Worm_Hits_MySpace/1129232391" title="BetaNews on " target="_blank">Something even worse happened</a>.</p>
<p>Now imagine that the purpose is not to add someone as your buddy but to steal a session cookie to your banking website &#8230; freaky ?</p>
<h4>XSS : What to do ?</h4>
<p>As the developer of a web site where users are allowed to submit content, the lesson is simple : <em>never trust user submitted content</em>.</p>
<p>Any such content must be correctly filtered to remove any potential harmful characters. All languages used to develop web applications provide a function to escape HTML tags, which can be of  great help to avoid XSS.</p>
<p><!--adsense--></p>
<p><a href="http://www.sakana.fr/blog/2007/11/25/web-security-what-are-xss/">Web Security : What are XSS?</a> is a post from: <a href="http://www.sakana.fr/blog">Tech@Sakana - A sysadmin's blog</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sakana.fr/blog/2007/11/25/web-security-what-are-xss/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

