<?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>Debian Tutorials &#187; Security</title>
	<atom:link href="http://www.debiantutorials.com/tag/security/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.debiantutorials.com</link>
	<description>Copy/Paste tutorials for Debian based Linux distros</description>
	<lastBuildDate>Tue, 27 Dec 2011 01:15:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Scan your web server for vulnerabilities with Nikto on squeeze</title>
		<link>http://www.debiantutorials.com/scan-your-web-server-for-vulnerabilities-with-nikto-on-squeeze/</link>
		<comments>http://www.debiantutorials.com/scan-your-web-server-for-vulnerabilities-with-nikto-on-squeeze/#comments</comments>
		<pubDate>Thu, 15 Dec 2011 17:47:11 +0000</pubDate>
		<dc:creator>aip</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Squeeze]]></category>
		<category><![CDATA[nikto]]></category>

		<guid isPermaLink="false">http://www.debiantutorials.com/?p=436</guid>
		<description><![CDATA[Nikto is a web server scanner which performs comprehensive tests against web servers for multiple items, including over 3500 potentially dangerous files/CGIs, versions on over 900 servers, and version specific problems on over 250 servers. 1. Add non-free archive to apt sources (pico /etc/apt/sources.list) deb http://ftp.uk.debian.org/debian/ squeeze main non-free deb-src http://ftp.uk.debian.org/debian/ squeeze main non-free Add [...]]]></description>
			<content:encoded><![CDATA[<p>Nikto is a web server scanner which performs comprehensive tests against web servers for multiple items, including over 3500 potentially dangerous files/CGIs, versions on over 900 servers, and version specific problems on over 250 servers.</p>
<p>1. Add non-free archive to apt sources (pico /etc/apt/sources.list)</p>
<p><code>deb http://ftp.uk.debian.org/debian/ squeeze main non-free<br />
deb-src http://ftp.uk.debian.org/debian/ squeeze main non-free<br />
</code><span id="more-436"></span></p>
<p><em>Add non-free behind main in both lines</em></p>
<p>2. Update the package list</p>
<p><code>apt-get update<br />
</code></p>
<p>3. Install Nikto</p>
<p>apt-get install nikto</p>
<p>4. Test the local web server</p>
<p>nikto -h localhost</p>
<p>Nikto also supports testing on different ports. <a href="http://cirt.net/nikto2-docs/usage.html" target="_blank">Click here for Nikto usage information</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.debiantutorials.com/scan-your-web-server-for-vulnerabilities-with-nikto-on-squeeze/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scan your server for rootkits with rkhunter</title>
		<link>http://www.debiantutorials.com/scan-your-server-for-rootkits-with-rkhunter/</link>
		<comments>http://www.debiantutorials.com/scan-your-server-for-rootkits-with-rkhunter/#comments</comments>
		<pubDate>Thu, 03 Nov 2011 22:33:24 +0000</pubDate>
		<dc:creator>aip</dc:creator>
				<category><![CDATA[Etch]]></category>
		<category><![CDATA[Jaunty Jackalope]]></category>
		<category><![CDATA[Karmic Koala]]></category>
		<category><![CDATA[Lenny]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Squeeze]]></category>
		<category><![CDATA[rootkit]]></category>

		<guid isPermaLink="false">http://www.debiantutorials.com/?p=421</guid>
		<description><![CDATA[rkhunter (Rootkit Hunter) is a tool that scans for rootkits, backdoors and possible local exploits. It does this by comparing SHA-1 hashes of important files with known good ones in online database, searching for default directories (of rootkits), wrong permissions, hidden files, suspicious strings in kernel modules, and special tests for Linux and FreeBSD. 1. [...]]]></description>
			<content:encoded><![CDATA[<p><img src="/wp-content/uploads/2011/11/rkhunter.png" alt="Rootkit hunter (rkhunter)" align="right" style="margin-left:10px" />rkhunter (Rootkit Hunter) is a tool that scans for rootkits, backdoors and possible local exploits. It does this by comparing SHA-1 hashes of important files with known good ones in online database, searching for default directories (of rootkits), wrong permissions, hidden files, suspicious strings in kernel modules, and special tests for Linux and FreeBSD.</p>
<p>1. Install rkhunter</p>
<p><code>apt-get install rkhunter<br />
</code><span id="more-421"></span></p>
<p>2. Run rkhunter to check your server</p>
<p><code>rkhunter --check<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.debiantutorials.com/scan-your-server-for-rootkits-with-rkhunter/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Running Apache2 virtual hosts as different users with mpm-itk</title>
		<link>http://www.debiantutorials.com/running-apache2-virtual-hosts-as-different-users-with-mpm-itk/</link>
		<comments>http://www.debiantutorials.com/running-apache2-virtual-hosts-as-different-users-with-mpm-itk/#comments</comments>
		<pubDate>Tue, 31 May 2011 10:50:46 +0000</pubDate>
		<dc:creator>aip</dc:creator>
				<category><![CDATA[Lenny]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Squeeze]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[itk]]></category>
		<category><![CDATA[mpm]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.debiantutorials.com/?p=369</guid>
		<description><![CDATA[apache2-mpm-itk is an MPM (Multi-Processing Module) for the Apache web server. mpm-itk allows you to run each of your vhost under a separate uid and gid — in short, the scripts and configuration files for one vhost no longer have to be readable for all the other vhosts. 1. Install the apache2-mpm-itk package apt-get install [...]]]></description>
			<content:encoded><![CDATA[<p>apache2-mpm-itk is an MPM (Multi-Processing Module) for the Apache web server. mpm-itk allows you to run each of your vhost under a separate uid and gid — in short, the scripts and configuration files for one vhost no longer have to be readable for all the other vhosts.</p>
<p>1. Install the apache2-mpm-itk package</p>
<p><code>apt-get install apache2-mpm-itk<br />
</code><span id="more-369"></span></p>
<p>2. Configure user and group for each virtual host by adding the following line somewhere between &lt;VirtualHost *:80&gt;...&lt;/VirtualHost&gt;</p>
<p><code>AssignUserId [user] [group]<br />
</code></p>
<p>Replace [user] and [group] with a username and group name that already exists on the system.</p>
<p>3. Change the owner of the web root</p>
<p><code>chown [user].[group] [location]<br />
</code></p>
<p>Replace [user] and [group] with the username and group name configured on the virtual host. Replace [location] with the location specified as DocumentRoot for the virtual host, eg. /var/www</p>
<p>4. Make sure the location isn't accessible by other users (optional)</p>
<p><code>chmod o= [location]<br />
</code></p>
<p>Replace [location] with the location specified as DocumentRoot for the virtual host, eg. /var/www</p>
<p>5. Restart apache</p>
<p><code>/etc/init.d/apache restart<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.debiantutorials.com/running-apache2-virtual-hosts-as-different-users-with-mpm-itk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Prevent brute force attacks using fail2ban</title>
		<link>http://www.debiantutorials.com/prevent-brute-force-attacks-using-fail2ban/</link>
		<comments>http://www.debiantutorials.com/prevent-brute-force-attacks-using-fail2ban/#comments</comments>
		<pubDate>Mon, 21 Jun 2010 22:38:04 +0000</pubDate>
		<dc:creator>aip</dc:creator>
				<category><![CDATA[Lenny]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[fail2ban]]></category>
		<category><![CDATA[iptables]]></category>

		<guid isPermaLink="false">http://www.debiantutorials.net/?p=329</guid>
		<description><![CDATA[fail2ban monitors log files such as /var/log/auth.log and /var/log/apache/access.log and temporarily or persistently bans failure-prone addresses by updating existing firewall rules. Currently, by default, fail2ban supports ssh/apache/vsftpd but configuration can be easily extended for monitoring any other ASCII file. 1. Install fail2ban apt-get install fail2ban 2. Test by connecting via ssh and making three incorrect [...]]]></description>
			<content:encoded><![CDATA[<p>fail2ban monitors log files such as /var/log/auth.log and /var/log/apache/access.log and temporarily or persistently bans failure-prone addresses by updating existing firewall rules. Currently, by default, fail2ban supports ssh/apache/vsftpd but configuration can be easily extended for monitoring any other ASCII file.</p>
<p>1. Install fail2ban</p>
<p><code>apt-get install fail2ban<br />
</code><span id="more-329"></span></p>
<p>2. Test by connecting via ssh and making three incorrect password attempts. By default fail2ban blocks the IP address for 10 minutes.</p>
<p>You can tail the fail2ban log file to monitor actions:</p>
<p><code>tail -f /var/log/fail2ban.log<br />
</code></p>
<p>Sample results</p>
<p><code>2010-06-21 22:27:58,953 fail2ban.jail   : INFO   Jail 'ssh' started<br />
2010-06-21 22:29:36,430 fail2ban.actions: WARNING [ssh] Ban 192.168.1.18<br />
</code></p>
<p>3. (optional) Specify a list of IP addresses ignored by fail2ban. This can be useful to avoid getting locked out (pico /etc/fail2ban/jail.conf)</p>
<p><code>ignoreip = 127.0.0.1 192.168.1.0/24<br />
</code></p>
<p><em>Modify the ignoreip property and type a list of IP addresses or networks seperated by a space.</em></p>
<p>4. Restart fail2ban (only required if you modified the ignoreip property)</p>
<p><code>/etc/init.d/fail2ban restart<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.debiantutorials.com/prevent-brute-force-attacks-using-fail2ban/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Installing suPHP</title>
		<link>http://www.debiantutorials.com/installing-suphp/</link>
		<comments>http://www.debiantutorials.com/installing-suphp/#comments</comments>
		<pubDate>Fri, 01 Jan 2010 22:05:02 +0000</pubDate>
		<dc:creator>aip</dc:creator>
				<category><![CDATA[Lenny]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[php5]]></category>
		<category><![CDATA[suphp]]></category>

		<guid isPermaLink="false">http://www.debiantutorials.net/?p=223</guid>
		<description><![CDATA[suPHP is a tool for executing PHP scripts with the permissions of their owners. It consists of an Apache module (mod_suphp) and a setuid root binary (suphp) that is called by the Apache module to change the uid of the process executing the PHP interpreter. 1. Install suPHP apt-get install libapache2-mod-suphp 2. Disable the php5 [...]]]></description>
			<content:encoded><![CDATA[<p>suPHP is a tool for executing PHP scripts with the permissions of their owners. It consists of an Apache module (mod_suphp) and a setuid root binary (suphp) that is called by the Apache module to change the uid of the process executing the PHP interpreter.</p>
<p>1. Install suPHP</p>
<p><code>apt-get install libapache2-mod-suphp<br />
</code><span id="more-223"></span></p>
<p>2. Disable the php5 apache module</p>
<p><code>a2dismod php5<br />
</code></p>
<p>3. Restart Apache</p>
<p><code>/etc/init.d/apache2 restart<br />
</code></p>
<p>4. You can test if suPHP is working correctly by creating a php file containing the following lines:</p>
<p><code>&lt;?php<br />
system('id');<br />
?&gt;<br />
</code></p>
<p>The script will return user/group id and name. Make sure you set the file owner to a user/group with id greater than 99.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.debiantutorials.com/installing-suphp/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Scan your web server for vulnerabilities with Nikto</title>
		<link>http://www.debiantutorials.com/scan-your-web-server-for-vulnerabilities-with-nikto/</link>
		<comments>http://www.debiantutorials.com/scan-your-web-server-for-vulnerabilities-with-nikto/#comments</comments>
		<pubDate>Mon, 28 Dec 2009 09:49:56 +0000</pubDate>
		<dc:creator>aip</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[nikto]]></category>

		<guid isPermaLink="false">http://www.debiantutorials.net/?p=219</guid>
		<description><![CDATA[Nikto is a web server scanner which performs comprehensive tests against web servers for multiple items, including over 3500 potentially dangerous files/CGIs, versions on over 900 servers, and version specific problems on over 250 servers. 1. Install Nikto apt-get install nikto 2. Test the local web server nikto -h localhost Nikto also supports testing on [...]]]></description>
			<content:encoded><![CDATA[<p>Nikto is a web server scanner which performs comprehensive tests against web servers for multiple items, including over 3500 potentially dangerous files/CGIs, versions on over 900 servers, and version specific problems on over 250 servers.</p>
<p>1. Install Nikto</p>
<p><code>apt-get install nikto<br />
</code><span id="more-219"></span></p>
<p>2. Test the local web server</p>
<p><code>nikto -h localhost<br />
</code></p>
<p>Nikto also supports testing on different ports. <a href="http://cirt.net/nikto2-docs/usage.html" target="_blank">Click here for Nikto usage information</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.debiantutorials.com/scan-your-web-server-for-vulnerabilities-with-nikto/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Disable root login to SSH</title>
		<link>http://www.debiantutorials.com/disable-root-login-to-ssh/</link>
		<comments>http://www.debiantutorials.com/disable-root-login-to-ssh/#comments</comments>
		<pubDate>Mon, 09 Nov 2009 20:44:31 +0000</pubDate>
		<dc:creator>aip</dc:creator>
				<category><![CDATA[Etch]]></category>
		<category><![CDATA[Lenny]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://www.debiantutorials.net/?p=205</guid>
		<description><![CDATA[Allowing root logins to your SSH damon is a big security threat. If the SSH port is open, hackers will probably at some time attempt to brute force your root password. It's a good idea to disable root logins to SSH and instead use a normal user to login and type "su -" to enter [...]]]></description>
			<content:encoded><![CDATA[<p>Allowing root logins to your SSH damon is a big security threat. If the SSH port is open, hackers will probably at some time attempt to brute force your root password. It's a good idea to disable root logins to SSH and instead use a normal user to login and type "su -" to enter the super user shell or sudo to perform tasks that require root privileges.</p>
<p>1. Open the SSH daemon config file and change this line: (pico /etc/ssh/sshd_config)</p>
<p><code>PermitRootLogin no<br />
</code><span id="more-205"></span></p>
<p>2. Restart the SSH daemon</p>
<p><code>/etc/init.d/ssh restart<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.debiantutorials.com/disable-root-login-to-ssh/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Adding a sudoer to use sudo on Debian</title>
		<link>http://www.debiantutorials.com/adding-a-sudoer-to-use-sudo-on-debian/</link>
		<comments>http://www.debiantutorials.com/adding-a-sudoer-to-use-sudo-on-debian/#comments</comments>
		<pubDate>Mon, 09 Nov 2009 20:36:59 +0000</pubDate>
		<dc:creator>aip</dc:creator>
				<category><![CDATA[Etch]]></category>
		<category><![CDATA[Lenny]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[sudo]]></category>

		<guid isPermaLink="false">http://www.debiantutorials.net/?p=203</guid>
		<description><![CDATA[Sudo allows a system administrator to delegate authority to give certain users (or groups of users) the ability to run some (or all) commands as root or another user while providing an audit trail of the commands and their arguments. 1. Create a new user (optional) adduser user1 2. Make sure sudo is install (installed [...]]]></description>
			<content:encoded><![CDATA[<p>Sudo allows a system administrator to delegate authority to give certain users (or groups of users) the ability to run some (or all) commands as root or another user while providing an audit trail of the commands and their arguments.</p>
<p>1. Create a new user (optional)</p>
<p><code>adduser user1<br />
</code><span id="more-203"></span></p>
<p>2. Make sure sudo is install (installed by default on lenny)</p>
<p><code>apt-get install sudo<br />
</code></p>
<p>3. Add the new user to the sudo-ers list (visudo)</p>
<p><code>user1 ALL=(ALL) ALL<br />
</code></p>
<p><em>This will allow user1 to run all commands that require root privileges. You can also limit the access, <a href="http://www.sudo.ws/sudo/man/sudoers.html" target="_blank">Click here to view the syntax</a></em></p>
<p>4. Save the file by pressing Ctrl-X if you are using Nano/pico or :w if using vi</p>
<p>You can now login as the standard user (user1) and execute commands that require root privileges using sudo.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.debiantutorials.com/adding-a-sudoer-to-use-sudo-on-debian/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Loading iptables rules on startup</title>
		<link>http://www.debiantutorials.com/loading-iptables-rules-on-startup/</link>
		<comments>http://www.debiantutorials.com/loading-iptables-rules-on-startup/#comments</comments>
		<pubDate>Mon, 01 Sep 2008 21:48:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Lenny]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[etch]]></category>
		<category><![CDATA[firewall]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[lenny]]></category>

		<guid isPermaLink="false">http://debiantutorials.net/loading-iptables-rules-on-startup/</guid>
		<description><![CDATA[By default iptables is setup on Debian etch but there are no rules configured. In this tutorial we'll configure some rules and load them into iptables on startup. 1. Rules file Create a new file that will contain a shell script to insert rules into iptables (pico /etc/firewall-rules.sh) and add this content as template: #!/bin/sh [...]]]></description>
			<content:encoded><![CDATA[<p>By default iptables is setup on Debian etch but there are no rules configured. In this tutorial we'll configure some rules and load them into iptables on startup.</p>
<p><strong>1. Rules file</strong></p>
<p>Create a new file that will contain a shell script to insert rules into iptables (pico /etc/firewall-rules.sh) and add this content as template:</p>
<p><span id="more-19"></span><code>#!/bin/sh<br />
IPT="/sbin/iptables"</p>
<p>echo -n "Loading iptables rules..."<br />
</code><br />
# Flush old rules<br />
$IPT --flush<br />
$IPT --delete-chain</p>
<p># By default, drop everything except outgoing traffic<br />
$IPT -P INPUT DROP<br />
$IPT -P FORWARD DROP<br />
$IPT -P OUTPUT ACCEPT</p>
<p># Allow incoming and outgoing for loopback interfaces<br />
$IPT -A INPUT -i lo -j ACCEPT<br />
$IPT -A OUTPUT -o lo -j ACCEPT</p>
<p># ICMP rules<br />
$IPT -A INPUT -p icmp --icmp-type echo-reply -m state --state ESTABLISHED,RELATED -j ACCEPT<br />
$IPT -A INPUT -p icmp --icmp-type echo-request -m limit --limit 5/s -m state --state NEW -j ACCEPT<br />
$IPT -A INPUT -p icmp --icmp-type destination-unreachable -m state --state NEW -j ACCEPT<br />
$IPT -A INPUT -p icmp --icmp-type time-exceeded -m state --state NEW -j ACCEPT<br />
$IPT -A INPUT -p icmp --icmp-type timestamp-request -m state --state NEW -j ACCEPT<br />
$IPT -A INPUT -p icmp --icmp-type timestamp-reply -m state --state ESTABLISHED,RELATED -j ACCEPT</p>
<p># Block new connections without SYN<br />
$IPT -A INPUT -p tcp ! --syn -m state --state NEW -j DROP</p>
<p># Allow established connections:<br />
$IPT -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT</p>
<p># SSH<br />
$IPT -A INPUT -p tcp --dport 22 -m state --state NEW -j ACCEPT</p>
<p># HTTP<br />
$IPT -A INPUT -p tcp --dport 80 -m state --state NEW -j ACCEPT<br />
$IPT -A INPUT -p tcp --dport 443 -m state --state NEW -j ACCEPT</p>
<p># Block fragments and Xmas tree as well as SYN,FIN and SYN,RST<br />
$IPT -A INPUT -p ip -f -j DROP<br />
$IPT -A INPUT -p tcp --tcp-flags ALL ACK,RST,SYN,FIN -j DROP<br />
$IPT -A INPUT -p tcp --tcp-flags SYN,FIN SYN,FIN -j DROP<br />
$IPT -A INPUT -p tcp --tcp-flags SYN,RST SYN,RST -j DROP</p>
<p># Anti-spoofing rules<br />
$IPT -A INPUT -s 200.200.200.200 -j DROP<br />
$IPT -A INPUT -s 192.168.0.0/24 -j DROP<br />
$IPT -A INPUT -s 127.0.0.0/8 -j DROP</p>
<p>echo "rules loaded."<br />
You can customize this file as required, check the iptables manual for parameters and options.</p>
<p>Change the permissions to make the file executable by root:</p>
<p><code>chown root /etc/firewall-rules.sh<br />
chmod 700 /etc/firewall-rules.sh<br />
</code></p>
<p><strong>2. Load rules shell script on startup</strong></p>
<p>Add this line above the address line for your default network interface (pico /etc/network/interfaces):</p>
<p><code>pre-up /etc/firewall-rules.sh<br />
</code></p>
<p>Now, every time you start the network interfaces including restarting the system, iptables rules are reloaded.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.debiantutorials.com/loading-iptables-rules-on-startup/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
