<?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>Tuts4Tech &#187; security</title>
	<atom:link href="http://tuts4tech.net/tag/security/feed/" rel="self" type="application/rss+xml" />
	<link>http://tuts4tech.net</link>
	<description>Tech Tutorials</description>
	<lastBuildDate>Tue, 04 May 2010 20:35:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Understanding and Preventing Fork Bombs</title>
		<link>http://tuts4tech.net/2009/10/07/understanding-and-preventing-fork-bombs/</link>
		<comments>http://tuts4tech.net/2009/10/07/understanding-and-preventing-fork-bombs/#comments</comments>
		<pubDate>Wed, 07 Oct 2009 16:26:57 +0000</pubDate>
		<dc:creator>Duffy</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[Bomb]]></category>
		<category><![CDATA[Fork]]></category>
		<category><![CDATA[Functions]]></category>
		<category><![CDATA[Reboot]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[System admin]]></category>

		<guid isPermaLink="false">http://tuts4tech.net/?p=595</guid>
		<description><![CDATA[A fork bomb is just a bash function that gets called recursively. Once a fork bomb is active on a machine it may not be able to preform normally until a reboot is made, as the only solution to the fork bomb is to kill all its processes. Bash Functions A fork bomb is really [...]]]></description>
			<content:encoded><![CDATA[<p>A fork bomb is just a bash function that gets called recursively. Once a fork bomb is active on a machine it may not be able to preform normally until a reboot is made, as the only solution to the fork bomb is to kill all its processes.</p>
<h3>Bash Functions</h3>
<p>A fork bomb is really just a bash function, below is an example of a bash function</p>
<pre class="brush: plain; title: ; notranslate">helloworld() {
echo hello world
};</pre>
<p>A fork bomb would be</p>
<pre class="brush: plain; title: ; notranslate">:(){
 :|:&amp;
};:</pre>
<p>Now to explain.<br />
:(){ - Creates the function<br />
:|: - Next it call itself using recursion and pipes the output to another call of the function<br />
&#038; - Puts the function call in the background so child cannot die<br />
}; - Terminate the function<br />
: - Call (run) the function</p>
<p>If you would like a more human readable fork bomb it would be as follows</p>
<pre class="brush: plain; title: ; notranslate">forkbomb(){
forkbomb | forkbomb &amp;
}; forkbomb</pre>
<h3>Preventing Fork Bombs</h3>
<p>We can prevent users from running fork bombs by limiting the amount of processes they are allowed to run.<br />
We can achive this using /etc/security/limits.conf</p>
<p>To get started open /etc/security/limits.conf</p>
<pre class="brush: plain; title: ; notranslate">nano /etc/security/limits.conf</pre>
<p>In my example I want to limit the user john to 300 processes and any users in the group of students to 250 processes. For this I would put the following into my config file</p>
<pre class="brush: plain; title: ; notranslate">john hard nproc 300
@students hard nproc 250</pre>
<p>Please keep in mind that KDE and Gnome desktop system can lanuch many processes.</p>
]]></content:encoded>
			<wfw:commentRss>http://tuts4tech.net/2009/10/07/understanding-and-preventing-fork-bombs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Passwordless SSH login using SSH Keys</title>
		<link>http://tuts4tech.net/2009/07/01/passwordless-ssh-login-using-ssh-keys/</link>
		<comments>http://tuts4tech.net/2009/07/01/passwordless-ssh-login-using-ssh-keys/#comments</comments>
		<pubDate>Wed, 01 Jul 2009 01:32:00 +0000</pubDate>
		<dc:creator>Duffy</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[OSX]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[encryption]]></category>
		<category><![CDATA[keys]]></category>
		<category><![CDATA[openssh]]></category>
		<category><![CDATA[passwordless]]></category>
		<category><![CDATA[rsa]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://tuts4tech.net/?p=401</guid>
		<description><![CDATA[SSH keys allow you to login without requiring you to type in your password this tutorial will teach you how to set them up First we need to create the key Then we need to move it over to the machine that we want to be able to login too without the need for a [...]]]></description>
			<content:encoded><![CDATA[<p>SSH keys allow you to login without requiring you to type in your password this tutorial will teach you how to set them up</p>
<ol>
<li>First we need to create the key
<pre class="brush: bash; title: ; notranslate">ssh-keygen -t rsa</pre>
</li>
<li>Then we need to move it over to the machine that we want to be able to login too without the need for a password to do this run the following command
<pre class="brush: bash; title: ; notranslate">scp .ssh/id_rsa.pub OTHER-MACHINES-IP:.ssh/authorized_keys</pre>
</li>
<li>You should now be able to ssh into that machine without needing a password</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://tuts4tech.net/2009/07/01/passwordless-ssh-login-using-ssh-keys/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Chroot Sftp</title>
		<link>http://tuts4tech.net/2009/05/03/chroot-sft/</link>
		<comments>http://tuts4tech.net/2009/05/03/chroot-sft/#comments</comments>
		<pubDate>Sun, 03 May 2009 19:55:46 +0000</pubDate>
		<dc:creator>Duffy</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[chroot]]></category>
		<category><![CDATA[ftp]]></category>
		<category><![CDATA[openssh]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[sshd]]></category>
		<category><![CDATA[vsftpd]]></category>

		<guid isPermaLink="false">http://tuts4tech.co.cc/?p=175</guid>
		<description><![CDATA[Create a Chrooted group Open up /etc/ssh/sshd_config and add the following to the end of it Restart SSHD Then make users chrooted by adding them to the chrooted group Now when the user sftps the server they will only see the contents of there home folder]]></description>
			<content:encoded><![CDATA[<ol>
<li>Create a Chrooted group
<pre class="brush: plain; title: ; notranslate">addgroup chrooted</pre>
</li>
<li>Open up /etc/ssh/sshd_config and add the following to the end of it
<pre class="brush: plain; title: ; notranslate">Subsystem sftp internal-sftp
Match group chrooted
ChrootDirectory /home/%u
X11Forwarding no
ForceCommand internal-sftp
</pre>
</li>
<li>Restart SSHD
<pre class="brush: plain; title: ; notranslate">/etc/init.d/ssh restart</pre>
</li>
<li>Then make users chrooted by adding them to the chrooted group
<pre class="brush: plain; title: ; notranslate">adduser user chrooted</pre>
</li>
<li>Now when the user sftps the server they will only see the contents of there home folder</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://tuts4tech.net/2009/05/03/chroot-sft/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stopping SSH brute force attacks using iptables</title>
		<link>http://tuts4tech.net/2009/04/09/stopping-ssh-brute-force-attacks-using-iptables/</link>
		<comments>http://tuts4tech.net/2009/04/09/stopping-ssh-brute-force-attacks-using-iptables/#comments</comments>
		<pubDate>Thu, 09 Apr 2009 11:08:52 +0000</pubDate>
		<dc:creator>Duffy</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[asia]]></category>
		<category><![CDATA[brute]]></category>
		<category><![CDATA[force]]></category>
		<category><![CDATA[hackers]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[logs]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[wordlist]]></category>

		<guid isPermaLink="false">http://duffys-place.co.cc/?p=130</guid>
		<description><![CDATA[If your running a SSH server on the default port(22) you've probably noticed a lot of failed login attempts cause due to brute force attacks Adding the following to your IP tables will only allow 3 connections at once from any IP if it goes above 3 then that IP is locked out for 3minutes. [...]]]></description>
			<content:encoded><![CDATA[<p>If your running a SSH server on the default port(22) you've probably noticed a lot of failed login attempts cause due to brute force attacks</p>
<p>Adding the following to your IP tables will only allow 3 connections at once from any IP if it goes above 3 then that IP is locked out for 3minutes. At this stage the bot running the attack will either give up as its getting no reply from the SSH server or it will keep trying until it finishes its wordlist</p>
<pre class="brush: plain; title: ; notranslate">iptables -I INPUT -p tcp -m tcp --dport 22 -m state --state NEW -m recent --set --name DEFAULT --rsource

iptables -I INPUT -p tcp -m tcp --dport 22 -m state --state NEW -m recent --update --seconds 180 --hitcount 4 --name DEFAULT --rsource -j DROP</pre>
]]></content:encoded>
			<wfw:commentRss>http://tuts4tech.net/2009/04/09/stopping-ssh-brute-force-attacks-using-iptables/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux File Permissions</title>
		<link>http://tuts4tech.net/2009/04/05/linux-file-permission/</link>
		<comments>http://tuts4tech.net/2009/04/05/linux-file-permission/#comments</comments>
		<pubDate>Sun, 05 Apr 2009 09:46:51 +0000</pubDate>
		<dc:creator>Duffy</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[files]]></category>
		<category><![CDATA[permissions]]></category>
		<category><![CDATA[root]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://duffys-place.co.cc/?p=64</guid>
		<description><![CDATA[What is chmod? Chmod is a command that changes the access permissions of files or directories in order to read, write or execute files How do I view The permissions of files? You can do this by typing Heres is a example of its output What do the letters mean in front of the files/directories [...]]]></description>
			<content:encoded><![CDATA[<p>What is chmod?<br />
Chmod is a command that changes the access permissions of files or directories in order to read, write or execute files</p>
<p>How do I view The permissions of files?<br />
You can do this by typing</p>
<pre class="brush: plain; title: ; notranslate">ls -la</pre>
<p>Heres is a example of its output</p>
<pre class="brush: plain; title: ; notranslate">root@duffys-place:/etc/lighttpd# ls -la
total 20
drwxr-xr-x  4 root root 4096 2009-03-29 00:36 .
drwxr-xr-x 79 root root 4096 2009-04-05 01:14 ..
drwxr-xr-x  2 root root 4096 2009-03-29 00:30 conf-available
drwxr-xr-x  2 root root 4096 2008-09-27 11:24 conf-enabled
-rw-r--r--  1 root root 3248 2009-04-05 01:18 lighttpd.conf
root@duffys-place:/etc/lighttpd#</pre>
<p>What do the letters mean in front of the files/directories mean?<br />
r indicates that it is readable (someone can view the file’s contents)<br />
w indicates that it is writable (someone can edit the file’s contents)<br />
x indicates that it is executable (someone can run the file, if executable)<br />
- indicates that no permission to manipulate has been assigned.</p>
<p>When you are listing files/directories the first character lets you know whether you’re looking at a file or a directory. The next three characters define your permissions.</p>
<p>Using Chmod<br />
7	Full Permissions<br />
5	Read and Execute<br />
4	Read Only<br />
3	Write and Execute<br />
2	Write Only<br />
1	Execute Only<br />
0	No Permissions</p>
<p>Example:</p>
<pre class="brush: plain; title: ; notranslate">chmod 755 filename</pre>
<p>Why is there three numbers?<br />
The First number defines what the owners permissions are.<br />
The second number defines what the group rights are.<br />
And the last number defines what access other users have.</p>
<p>In this case we have 755 so that means the owner has full permissions, group rights to execute and read, and all others access to execute the file.</p>
]]></content:encoded>
			<wfw:commentRss>http://tuts4tech.net/2009/04/05/linux-file-permission/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

