<?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>Rough Sea Games &#187; Web security</title>
	<atom:link href="http://blog.rough-sea.com/category/programming/websecurity/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.rough-sea.com</link>
	<description>Indie game development</description>
	<lastBuildDate>Sun, 29 Jan 2012 12:19:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
<image>
			<title>Rough Sea Games</title>
			<url>/wp-content/uploads/2008/10/rsg_rss-feed.jpg</url>
			<link>http://blog.rough-sea.com</link>
			<width>144</width>
			<height>95</height>
			<description>Indie game development</description>
		</image>		<item>
		<title>Secure your Webserver (part 2- A)</title>
		<link>http://blog.rough-sea.com/2009/07/secure-your-webserver-part-2-a/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=secure-your-webserver-part-2-a</link>
		<comments>http://blog.rough-sea.com/2009/07/secure-your-webserver-part-2-a/#comments</comments>
		<pubDate>Mon, 20 Jul 2009 08:12:59 +0000</pubDate>
		<dc:creator>Ole</dc:creator>
				<category><![CDATA[Server Administration]]></category>
		<category><![CDATA[Web security]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[Userrights]]></category>
		<category><![CDATA[Webserver]]></category>

		<guid isPermaLink="false">http://blog.rough-sea.com/?p=512</guid>
		<description><![CDATA[<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.rough-sea.com%2F2009%2F07%2Fsecure-your-webserver-part-2-a%2F"> <img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.rough-sea.com%2F2009%2F07%2Fsecure-your-webserver-part-2-a%2F&#38;style=compact&#38;b=2" height="61" width="50" /> </a> <p>Hello everybody,</p> <p>Finally you are able to read Part 2 of &#8220;Secure your Webserver&#8221;. Part 2 will be about Linux, Webserver and the other important services.</p> <p>As I mentioned in Part 1, I will not write about Windows, MacOS or  other operating systems, because the most common &#8230; </p><p><a class="more-link block-button" href="http://blog.rough-sea.com/2009/07/secure-your-webserver-part-2-a/">Continue reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.rough-sea.com%2F2009%2F07%2Fsecure-your-webserver-part-2-a%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.rough-sea.com%2F2009%2F07%2Fsecure-your-webserver-part-2-a%2F&amp;style=compact&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Hello everybody,</p>
<p>Finally you are able to read Part 2 of &#8220;Secure your Webserver&#8221;. Part 2 will be about Linux, Webserver and the other important services.</p>
<p>As I mentioned in Part 1, I will not write about Windows, MacOS or  other operating systems, because the most common one for a webserver  is Unix / Linux. Part 2 will have a part A and B. Today I am going to write about distributions,  user managament, user rights, secure shell and their enormous importance for security.</p>
<p>Before you start, choose the right distribution of Linux for your aims.  There are a lot of Linux versions (distributions) on the market. Most of them are free or have a free community edition. The most common free distributions are CentOS, Debian, Fedora, Gentoo, OpenSuse, Mandriva and Ubuntu. Of course there are also commercial destributions like Red Hat Linux Enterprises (RHEL) or Suse Linux Enterprises.</p>
<p>In general all these distributions are fine for a webserver. Their differences are minor and more a personal choice than a real technical question. A NEWBIE should maybe use OpenSUSE, Ubuntu or Fedora, as the support of the community seems to be bigger for them. Commercial products are usually superior to free distributions in their support system. They grant better support via phone, etc.</p>
<p>After you have chosen the right distrubtion for your purpose and installed it on your server machine, it is time to think about security.</p>
<p>1. User-Management and Shell-Access. (Secure Shell Daemon)</p>
<p>Linux security is mostly based on user rights. User rights are essential to the security concept of Unix and Linux systems. Usually all distributions are very strict and separate services (daemons), users, administrators, essential services like a webserver, MTA &amp; MDA (Mail Transfer Agent &amp; Mail Delivery Agent) into different groups and users.</p>
<p>All these groups and users have different write and read accesses. Usually groups are created to give a bunch of users the same rights. Therefore groups can make your administrator&#8217;s life far easier.</p>
<p>The most important &#8220;user&#8221; is called root. Root is the highest ranked user on a system. The &#8220;root user&#8221; has full read and write access. In the Windows world it would be the &#8220;Administrator&#8221;.  This is the reason why it is not smart to use the root user in your everyday work. The root user should only be used for system critical and important parts. In all other cases it is wise to use a &#8220;normal&#8221; user, which you have created.<br />
It is also possible to run root commands via your user account. Important commands for this purpose are &#8220;sudo&#8221; and &#8220;su&#8221;. Sudo runs a command line with a special user. The command su makes it possible to log in as another user via your own user shell. Of course you need the right password of the user to perform these actions.</p>
<p><a rel="attachment wp-att-926" href="http://blog.rough-sea.com/2009/07/secure-your-webserver-part-2-a/x11_ssh_tunnelling/"><img class="alignleft size-thumbnail wp-image-926" title="X11_ssh_tunnelling" src="http://blog.rough-sea.com/wp-content/uploads/2009/07/X11_ssh_tunnelling-150x150.png" alt="X11_ssh_tunnelling" width="275" height="275" /></a>It is common for Linux to allow remote login via secure shell (SSH), especially if your webserver is not reachable for you in person, e.g. a dedicated server in a data centre of your webhost. All connections via SSH are encrypted.  It is nearly impossible to decrypt the data via your client and your server (Maybe the NSA or the CIA are able to decrypt this &#8211; who knows?). You should take care to choose the ssh version 2 protocol. This is safer, as recently some weaknesses were discovered in protocoll version 1. A common SSH-client for Windows is <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html">&#8220;Putty&#8221;</a>.</p>
<p>It is possible to permit or forbid login via SSH for specific users or user groups. Maybe it is not wise to allow direct root login via SSH. It is also possible to login via a certificate. You create an public and private key. Upload the public part to your server (usually: /homedir/.ssh/authorized) and log in without password. Of course it is wiser to secure your private key with a passphrase. In this case you need to type the phassphrase to decrypt the private key to log in.</p>
<p>Next part will be about firewalls, virusscanners and how to avoid spam problems.</p>
<img src="http://blog.rough-sea.com/?ak_action=api_record_view&id=512&type=feed" alt="" /><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fblog.rough-sea.com%2F2009%2F07%2Fsecure-your-webserver-part-2-a%2F&amp;title=Secure%20your%20Webserver%20%28part%202-%20A%29" id="wpa2a_2">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.rough-sea.com/2009/07/secure-your-webserver-part-2-a/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Secure your Webserver (part 1)</title>
		<link>http://blog.rough-sea.com/2009/01/secure-your-webserver-part-1/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=secure-your-webserver-part-1</link>
		<comments>http://blog.rough-sea.com/2009/01/secure-your-webserver-part-1/#comments</comments>
		<pubDate>Mon, 05 Jan 2009 10:44:37 +0000</pubDate>
		<dc:creator>Ole</dc:creator>
				<category><![CDATA[Server Administration]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Web security]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[server management]]></category>
		<category><![CDATA[server security]]></category>

		<guid isPermaLink="false">http://blog.rough-sea.com/?p=358</guid>
		<description><![CDATA[<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.rough-sea.com%2F2009%2F01%2Fsecure-your-webserver-part-1%2F"> <img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.rough-sea.com%2F2009%2F01%2Fsecure-your-webserver-part-1%2F&#38;style=compact&#38;b=2" height="61" width="50" /> </a> <p>Hello ,</p> <p>today I am going to write about server security. I decided to split the post into 3 parts. The future parts will be published during the next weeks.</p> <p>Part 1 deals with server security in general and the conception of your personal strategy to avoid &#8230; </p><p><a class="more-link block-button" href="http://blog.rough-sea.com/2009/01/secure-your-webserver-part-1/">Continue reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.rough-sea.com%2F2009%2F01%2Fsecure-your-webserver-part-1%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.rough-sea.com%2F2009%2F01%2Fsecure-your-webserver-part-1%2F&amp;style=compact&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Hello ,</p>
<p>today I am going to write about server security. I decided to split the post into 3 parts. The future parts will be published during the next weeks.</p>
<p>Part 1 deals with server security in general and the conception of your personal strategy to avoid security problems.</p>
<p>Security has become more and more important in the last 10 years , as the numbers of internet users and server services are growing year by year. Especially the web 2.0 revolution brings new security problems. Nowadays users with a bad understanding of the technical background are setting up blogs, forums, websites and other services.</p>
<p>Therefore I wrote a small introduction for those newcomers!</p>
<p>In general there are 3 main areas you have to keep an eye on.</p>
<p><strong>1. Network infrastructure:</strong></p>
<p>I will not deal with this, because usually only professionals can influence the network infrastructure or your provider does this for you with routing , firewalls and filters.</p>
<p><strong>2. Operating System:</strong></p>
<p>A big part of security solutions and problems rely on the chosen operating system. All common operating systems (e.g. Linux, Windows, Unix) have advantages and disadvantages. If you expect me to write down which is the best one, I WILL NOT ! Nobody can tell you. It depends on so many factors like the services you want to run, your personal knownledge about the operating system, etc&#8230; . Maybe you do not even have the chance to choose your OS as your provider pre installed already one for you.</p>
<p>Unfortunately, I will have to focus on one operating system in the second part of my post. In my point of view the most common one is Linux. Although I am aware of the fact that other operating systems are great. So do not bug me with comments like: &#8220;You hate Windows ! Why not using FreeBSD ?  Solaris is the best one !&#8221; <img src='http://blog.rough-sea.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p><strong>3. Applications &amp; Daemons</strong></p>
<p>Daemons or services are the core of your security solutions and also the source of most security issues. Before offering several services, e.g. a Web-Server , Ftp-Server or an Email-Server, think about which services you really need and if it is really smart to offer all services on a single machine. Every application can be corrupted or compromised. Avoiding services and daemons is always a clever strategy to minimize the risks. Moreover security tools hinder security issues as well, for example virus scanner, firewall, spam filter, a handy user rights management, etc&#8230; .</p>
<p>Please think about all these facts <strong>before</strong> you run a public server.</p>
<p>The second part will be about the practical parts of server management to build a secure server. We are going to leave the boring theory, promised!</p>
<img src="http://blog.rough-sea.com/?ak_action=api_record_view&id=358&type=feed" alt="" /><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fblog.rough-sea.com%2F2009%2F01%2Fsecure-your-webserver-part-1%2F&amp;title=Secure%20your%20Webserver%20%28part%201%29" id="wpa2a_4">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.rough-sea.com/2009/01/secure-your-webserver-part-1/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Web Security &#8211; How to keep HTTP Variables secure</title>
		<link>http://blog.rough-sea.com/2008/09/web-security-how-to-keep-http-variables-secure/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=web-security-how-to-keep-http-variables-secure</link>
		<comments>http://blog.rough-sea.com/2008/09/web-security-how-to-keep-http-variables-secure/#comments</comments>
		<pubDate>Mon, 08 Sep 2008 20:25:12 +0000</pubDate>
		<dc:creator>Dirk</dc:creator>
				<category><![CDATA[Friends]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Web security]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://www.rough-sea.com/wordpress/?p=45</guid>
		<description><![CDATA[<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.rough-sea.com%2F2008%2F09%2Fweb-security-how-to-keep-http-variables-secure%2F"> <img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.rough-sea.com%2F2008%2F09%2Fweb-security-how-to-keep-http-variables-secure%2F&#38;style=compact&#38;b=2" height="61" width="50" /> </a> <p>When I am surfing, I often see websites that have big security leaks in the communication between Server and Client. I know to avoid this, and will describe it here.</p> <p>The most common way for a web server and client to communication is through HTTP Variables. This &#8230; </p><p><a class="more-link block-button" href="http://blog.rough-sea.com/2008/09/web-security-how-to-keep-http-variables-secure/">Continue reading &#187;</a>]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.rough-sea.com%2F2008%2F09%2Fweb-security-how-to-keep-http-variables-secure%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.rough-sea.com%2F2008%2F09%2Fweb-security-how-to-keep-http-variables-secure%2F&amp;style=compact&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>When I am surfing, I often see websites that have big security leaks in the communication between Server and Client. I know to avoid this, and will describe it here.</p>
<p>The most common way for a web server and client to communication is through HTTP Variables. This means that values are stored in the URL (GET) or in the header of the request (POST).<br />
I will give an example for a GET parameter: news.php?id=4. The GET variable &#8220;id&#8221; has the value 4. This is not a random example; I deliberately used one with the keyword ID.<br />
Databases usually identify records through a number. If a new data record is added, the number is incremented.<br />
If you change the value of the variable &#8220;id&#8221; to 3 or 2, the website will display the contents of the article with the id 3 or 2. Many websites are built in this way. This is a small security leak and not really dangerous. But think about a message system or a community where somebody can read the messages of another. This would be a really delicate issue. Luckily, it can be avoided in several ways.</p>
<p>Modifying the GET or POST data of an http request can also cause a issue called SQL injection. Hackers can concatenate your variable with an SQL query, executing the query when the request is sent. For example, they could change the GET parameter to &#8220;site.php?id=3; DROP DATABASE mydatabase&#8221;. Boing! Data is gone.</p>
<p>Here are some tips to avoid this problems:</p>
<ol>
<li>Newer database systems support GUIDs (global unique identifiers). These are 128 bit keys, and hence &#8220;more unique&#8221; as an id. They can be generated simply by counting, beginning with 000000-000000-00000&#8230; . But the big size of the data type will increase the size of your database.</li>
<li>Create a user which only has read privileges. Web pages often only need to output data, not to modify it.</li>
<li>Have your code validate http vars before using them. Checking string or enum values will increase the source code size, so use a checksum for this. A lot of server side application languages support some kind of checksum function, like a MD5 hash.  This works as follows: create a keyword, like &#8220;MM3banana13&#8243;.  Now take your variables id, id2 and id3 and concatenate them with the keyword as prefix or suffix (note that the order is important). Use this string to generate the md5. The destination site receives the GET variables &#8220;id&#8221;,&#8221;id2&#8243;,&#8221;id3&#8243; and &#8220;check&#8221; which includes the generated hash. The destination site now also concatenates the id&#8217; s and the keyword in the same way. After that the destination site compares the generated and the received hash. If the data was modified the generated hash will differ. You can improve security by changing the keyword every day. This is a established method for communication with an e-payment service.</li>
<li>Use SSL connections for sensitive data. This will keep your data private and inaccessible to third parties.</li>
</ol>
<p>I think these four things will help to keep a website secure (on the software side).</p>
<p style="text-align: center;"><strong>The basic idea is to expect data that you don&#8217;t expect.</strong></p>
<p style="text-align: center;">
<img src="http://blog.rough-sea.com/?ak_action=api_record_view&id=45&type=feed" alt="" /><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fblog.rough-sea.com%2F2008%2F09%2Fweb-security-how-to-keep-http-variables-secure%2F&amp;title=Web%20Security%20%26%238211%3B%20How%20to%20keep%20HTTP%20Variables%20secure" id="wpa2a_6">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.rough-sea.com/2008/09/web-security-how-to-keep-http-variables-secure/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

