<?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>Binbert &#187; Security</title>
	<atom:link href="http://www.binbert.com/blog/category/security/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.binbert.com/blog</link>
	<description>Technology &#124; Computer &#124; Security &#124; Networking &#124; Mobile</description>
	<lastBuildDate>Mon, 23 Jan 2012 06:11:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Update timthumb.php to prevent Zero Day vulnerability</title>
		<link>http://www.binbert.com/blog/2011/08/update-timthumb-php-to-prevent-zero-day-vulnerability/</link>
		<comments>http://www.binbert.com/blog/2011/08/update-timthumb-php-to-prevent-zero-day-vulnerability/#comments</comments>
		<pubDate>Thu, 25 Aug 2011 16:35:11 +0000</pubDate>
		<dc:creator>Albin Sebastian</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[patch]]></category>
		<category><![CDATA[timthumb.php]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.binbert.com/blog/?p=1663</guid>
		<description><![CDATA[Recently many sites are infected with timthumb script vulnerability.  Its a Zero Day vulnerability inside image resizing function. Most of the free as well as  paid themes are the victim of this vulnerability. It can be affected in timthumb.php or thumb.php. Update your wordpress theme to prevent the attack. Read more about this vulnerability at VaultPress [...]]]></description>
			<content:encoded><![CDATA[<p>Recently many sites are infected with timthumb script vulnerability.  Its a Zero Day vulnerability inside image resizing function. Most of the free as well as  paid themes are the victim of this vulnerability. It can be affected in timthumb.php or thumb.php. Update your wordpress theme to prevent the attack. Read more about this vulnerability at <a href="http://blog.vaultpress.com/2011/08/02/vulnerability-found-in-timthumb/">VaultPress </a></p>
<h3>How to fix timthumb.php</h3>
<p>You will get the update from the vendor If it is a paid theme, or you can do it manually<br />
Go to your theme directory and find thumb.php / timethumb.php<br />
Download following file and replace the code</p>
<p><a href="http://timthumb.googlecode.com/svn/trunk/timthumb.php">http://timthumb.googlecode.com/svn/trunk/timthumb.php</a><br />
Patch from woothemes : <a href="http://www.woothemes.com/2011/08/timthumb-security-flaw-patch/">Download </a></p>
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.binbert.com%2Fblog%2F2011%2F08%2Fupdate-timthumb-php-to-prevent-zero-day-vulnerability%2F&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true"></iframe>]]></content:encoded>
			<wfw:commentRss>http://www.binbert.com/blog/2011/08/update-timthumb-php-to-prevent-zero-day-vulnerability/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Running console applications using Tor</title>
		<link>http://www.binbert.com/blog/2011/06/running-console-applications-using-tor/</link>
		<comments>http://www.binbert.com/blog/2011/06/running-console-applications-using-tor/#comments</comments>
		<pubDate>Sat, 11 Jun 2011 06:52:03 +0000</pubDate>
		<dc:creator>Albin Sebastian</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Backtrack]]></category>
		<category><![CDATA[Proxy]]></category>
		<category><![CDATA[Tor]]></category>

		<guid isPermaLink="false">http://www.binbert.com/blog/?p=1540</guid>
		<description><![CDATA[Last time we explained how to install Tor on backtrack. That was for browsers and for some IM clients.Here I will be explaining how to use TOR for console-based applications. These are for applications which doesn&#8217;t have any settings for adding proxy address. How to do an anonymous scan using applications like Nmap ? or download a file [...]]]></description>
			<content:encoded><![CDATA[<p>Last time we explained <a href="http://www.binbert.com/blog/2011/06/how-to-install-tor-on-backtrack-5/">how to install Tor on backtrack</a>. That was for browsers and for some IM clients.Here I will be explaining how to use TOR for console-based applications. These are for applications which doesn&#8217;t have any settings for<br />
adding proxy address.<br />
How to do an anonymous scan using applications like Nmap ? or download a file using wget. Here we are using one application called proxychains. The usage is relatively simple. Add the command &#8220;proxychains&#8221; in front of your commands. For example you can nmap example.com using following command</p>
<pre>#proxychains nmap google.com</pre>
<h3>How to install proxychains ?</h3>
<pre>#apt-get install proxychains</pre>
<h3>Proxychaiins configurations</h3>
<p>Add Following line to /etc/proxychains.conf</p>
<pre>socks4  127.0.0.1 9050</pre>
<p>Now restart the proxy chains and use</p>
<h3>how to test your current IP address ?</h3>
<p>Open cmyip.com using elinks and proxy chain.</p>
<pre>#proxychains elinks cmyip.com </pre>
<p>To know yor real IP address do the same command without proxy chains</p>
<pre>#elinks cmyip.com </pre>
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.binbert.com%2Fblog%2F2011%2F06%2Frunning-console-applications-using-tor%2F&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true"></iframe>]]></content:encoded>
			<wfw:commentRss>http://www.binbert.com/blog/2011/06/running-console-applications-using-tor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to install Tor on Backtrack 5</title>
		<link>http://www.binbert.com/blog/2011/06/how-to-install-tor-on-backtrack-5/</link>
		<comments>http://www.binbert.com/blog/2011/06/how-to-install-tor-on-backtrack-5/#comments</comments>
		<pubDate>Thu, 02 Jun 2011 09:22:49 +0000</pubDate>
		<dc:creator>Manjunath Aka Punter</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Backtrack]]></category>
		<category><![CDATA[Proxy]]></category>
		<category><![CDATA[Tor]]></category>

		<guid isPermaLink="false">http://www.binbert.com/blog/?p=1528</guid>
		<description><![CDATA[Tor is an open source Anonymous Internet tool. It protects your personal identification from tracking systems by changing the source IP address frequently. Application will create many virtual tunnels through the tor network. By default Tor is not integrated in BackTrack 5. Why use Tor on Backtrack ? Normally Tor is used to protect the [...]]]></description>
			<content:encoded><![CDATA[<p>Tor is an open source Anonymous Internet tool. It protects your personal identification from tracking systems by changing the source IP address frequently. Application will create many virtual tunnels through the tor network.</p>
<p>By default Tor is not integrated in BackTrack 5. Why use Tor on Backtrack ? Normally Tor is used to protect the browsing security but Tor can be used for network scanning tools and other information gathering tools, in my next article i will explain <a href="http://www.binbert.com/blog/2011/06/running-console-applications-using-tor/">how to configure Tor for console applications</a>.</p>
<h3>Follow the installation steps</h3>
<p>Open /etc/apt/sources.list file and add following line</p>
<pre>deb <a href="http://deb.torproject.org/torproject.org">http://deb.torproject.org/torproject.org</a> lucid main</pre>
<p>Open command prompt and run follwing commands</p>
<pre>gpg --keyserver keys.gnupg.net --recv 886DDD89
gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | sudo apt-key add -
apt-get update
apt-get install tor tor-geoipdb
apt-get install privoxy</pre>
<p>After installing Privoxy, Open /etc/privoxy/config and append follwing line</p>
<pre>forward-socks4a / 127.0.0.1:9050 .</pre>
<p>/etc/init.d/privoxy start</p>
<p>Configure your clients with Ip address 127.0.0.1 and port 8118</p>
<h3>How to check</h3>
<p>go to <a href="http://cmyip.com">http://cmyip.com</a> or  <a href="http://www.whatismyip.com">http://www.whatismyip.com</a> to know your current Ip address</p>
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.binbert.com%2Fblog%2F2011%2F06%2Fhow-to-install-tor-on-backtrack-5%2F&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true"></iframe>]]></content:encoded>
			<wfw:commentRss>http://www.binbert.com/blog/2011/06/how-to-install-tor-on-backtrack-5/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Secure file transfer from Windows to Linux using RSA key</title>
		<link>http://www.binbert.com/blog/2011/04/secure-file-transfer-from-windows-to-linux-using-rsa-key/</link>
		<comments>http://www.binbert.com/blog/2011/04/secure-file-transfer-from-windows-to-linux-using-rsa-key/#comments</comments>
		<pubDate>Fri, 01 Apr 2011 09:41:16 +0000</pubDate>
		<dc:creator>Sandeep kalathil</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Putty]]></category>
		<category><![CDATA[rsa]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.binbert.com/blog/?p=1367</guid>
		<description><![CDATA[PSCP is a command line application which is a free implementation  of scp for win 32 platform  . This tool is used for securely copying between computer systems. It uses the SSH (secure shell) protocol, which makes it impossible for other people on the network to snoop on your password or on the data you [...]]]></description>
			<content:encoded><![CDATA[<p><span style="color: #000000;"><strong>PSCP</strong></span> is a command line application which is a free implementation  of scp for win 32 platform  . This tool is used for securely copying between computer systems. It uses the SSH (secure shell) protocol, which makes it impossible for other people on the network to snoop on your password or on the data you are transferring.</p>
<p><span style="color: #000000;">PSCP</span> can run from the command line and has many options, which you can see via the –h option:</p>
<pre>C:\&gt;pscp -h
PuTTY Secure Copy client
Release 0.53b
Usage: pscp [options] [user@]host:source target
pscp [options] source [source...] [user@]host:target
pscp [options] -ls user@host:filespec
Options:
-p preserve file attributes
-q quiet, don’t show statistics
-r copy directories recursively
-v show verbose messages
-load sessname Load settings from saved session
-P port connect to specified port
-l user connect with specified username
-pw passw login with specified password
-1 -2 force use of particular SSH protocol version
-C enable compression
-i key private key file for authentication
-batch disable all interactive prompts
-unsafe allow server-side wildcards (DANGEROUS)</pre>
<p>Here is a basic example of an user using PSCP to connect from Windows client to Linux server for transferring data to a specified path.</p>
<pre>C:\&gt;pscp -pw &lt;password&gt; -r -p &lt;path of the file&gt;  user@192.168.1.1:&lt;path file to stored&gt;</pre>
<pre>C:\&gt;pscp -pw test -r -p "c:\New Folder\test.txt" sandeep@192.168.1.1:/home/sandeep/</pre>
<p>In the above mentioned as we are providing the password its not a secure way of transferring file.  Here comes the use of authenticating with RSA keys.</p>
<p>Download PuTTygen and PSCP from <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html">here</a></p>
<h2>Public Key Authentication With PSCP</h2>
<h3>Preliminary Setup</h3>
<p>Setting up public key authentication to access a particular remote host is a one-time procedure. We will require PuTTYgen for this process.</p>
<h3>Steps for Authentication using RSA</h3>
<p>Download PuTTYgen on your Windows client machine and Generate a public/private key pair on the same.</p>
<p>Click the Generate button. You will be prompted to move the mouse over the blank area to generate some randomness. Do so. Shortly thereafter, the program will generate the key and display the result</p>
<p><a href="http://www.binbert.com/blog/wp-content/uploads/2011/04/puttykeygen-screen.jpg"><img class="aligncenter size-full wp-image-1477" title="puttykeygen screen" src="http://www.binbert.com/blog/wp-content/uploads/2011/04/puttykeygen-screen.jpg" alt="puttykeygen screen" width="488" height="468" /></a></p>
<p>Select all  of the text in the box labeled &#8220;Public key for pasting into OpenSSH authorized_keys file&#8221; (near the top of the window) by dragging the cursor. Right-click over the selection and choose Copy. Finally, click the &#8220;Save private key&#8221; button to save the private key to a file , lets save it as key.ppk</p>
<p>Install the public key on the remote host (here Linux Server) to which you want to connect. Paste the public key from the Clipboard into the the authorized_keys file of   the , which is located in the .ssh directory in your home directory on the remote host( If no such file is there we will have to manually create it). Figure 3 shows the vi editor being used for this purpose.</p>
<p>Repeat this procedure to install the same public key on as many additional remote hosts as you like.</p>
<p>Now to transfer files with basic public key authentication for file transfers with pscp.exe, use the -i flag on the command line and specify key.ppk as the flag&#8217;s argument</p>
<pre>C:\&gt;pscp -i &lt;private key&gt; &lt;path of the file&gt;  user@192.168.1.1:&lt;path file to stored&gt;</pre>
<pre>C:\&gt;pscp -i "c:\New Folder\key.ppk" "c:\sandeep\test.txt"  sandeep@192.168.1.1:/home/sandeep/</pre>
<p>&nbsp;</p>
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.binbert.com%2Fblog%2F2011%2F04%2Fsecure-file-transfer-from-windows-to-linux-using-rsa-key%2F&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true"></iframe>]]></content:encoded>
			<wfw:commentRss>http://www.binbert.com/blog/2011/04/secure-file-transfer-from-windows-to-linux-using-rsa-key/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to get ride from facebook chat virus?</title>
		<link>http://www.binbert.com/blog/2011/03/how-to-get-ride-from-facebook-chat-virus/</link>
		<comments>http://www.binbert.com/blog/2011/03/how-to-get-ride-from-facebook-chat-virus/#comments</comments>
		<pubDate>Sun, 27 Mar 2011 16:04:28 +0000</pubDate>
		<dc:creator>Albin Sebastian</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[chat]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Virus]]></category>

		<guid isPermaLink="false">http://www.binbert.com/blog/?p=1448</guid>
		<description><![CDATA[Hope you noticed that a facebook chat virus is spreading links with some attractive messages. See some sample messages here. “Did you see how will u look like in 20 years from now? lol &#8212;-&#62; {bitly link }” “ Hey!! is this photo urs? … OMG!!! &#8212;-&#62; {bitly link }” “ omg hahah have u [...]]]></description>
			<content:encoded><![CDATA[<p>Hope you noticed that a facebook chat virus is spreading links with some attractive messages. See some sample messages here.</p>
<p><img style="display: block; float: none; margin-left: auto; margin-right: auto; border: 0px;" title="facebook chat malware" src="http://www.binbert.com/blog/wp-content/uploads/2011/03/facebookchatmalware_thumb.jpg" border="0" alt="facebook chat malware" width="264" height="313" /></p>
<p><span style="color: #ff0000;">“Did you see how will u look like in 20 years from now? lol &#8212;-&gt; {bitly link }”</span></p>
<p><span style="color: #ff0000;">“ Hey!! is this photo urs? … OMG!!! &#8212;-&gt; {bitly link }”</span></p>
<p><span style="color: #ff0000;">“ omg hahah have u seen this photo u got tagged in LOL &#8212;-&gt; {bitly link }”</span></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><a href="http://www.binbert.com/blog/wp-content/uploads/2011/03/facebookvirusdeny.png"><img style="display: block; float: none; margin-left: auto; margin-right: auto; border: 0px;" title="facebook virus deny" src="http://www.binbert.com/blog/wp-content/uploads/2011/03/facebookvirusdeny_thumb.png" border="0" alt="facebook virus deny" width="500" height="277" /></a></p>
<p>This messages are pop up with a bit.ly shortened url of  “http:// yaira .info” If you clicked any of the link it will ask for a facebook application access request. this is the last option to stay away from this kind of fake applications. If you click on “Don’t Allow” button, nothing will happen. Instead of that if you are clicking on “Allow” button it will grand the access to facebook chat.You can see the access type in the popup message. Here it is “Access Facebook Chat” Normally genuine applications will show the Icon and application name. Here the application name is “Check it”.</p>
<p>&nbsp;</p>
<p>If you are permitted this Facebook application to access your Facebook chat, It will start spreading messages with infected links to your online friends.</p>
<p>There is an option to remove this Rogue application. By checking infected facebook accounts we come in a conclusion that this application is not retaining access. you can check it on your Privacy settings.</p>
<p>Go to “Accounts” &gt; “<strong>Privacy Settings</strong>”</p>
<p>Find “Apps and Websites” in bottom and click on “<strong>Edit Your Settings</strong>”</p>
<p>Click on “<strong>Edit settings</strong>” Under “Apps you use”</p>
<p>Here you can see the applications retain access to your account</p>
<p>&nbsp;</p>
<p>If you see an application named “<strong>Check it</strong>” Select “<strong>Remove app</strong>”</p>
<p>Also find and clean all applications which is not familiar.</p>
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.binbert.com%2Fblog%2F2011%2F03%2Fhow-to-get-ride-from-facebook-chat-virus%2F&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true"></iframe>]]></content:encoded>
			<wfw:commentRss>http://www.binbert.com/blog/2011/03/how-to-get-ride-from-facebook-chat-virus/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Root password recovery of Debian</title>
		<link>http://www.binbert.com/blog/2011/02/root-password-recovery-of-debian/</link>
		<comments>http://www.binbert.com/blog/2011/02/root-password-recovery-of-debian/#comments</comments>
		<pubDate>Thu, 17 Feb 2011 05:02:01 +0000</pubDate>
		<dc:creator>Jinju George</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Password]]></category>
		<category><![CDATA[Recover]]></category>

		<guid isPermaLink="false">http://www.binbert.com/blog/?p=1317</guid>
		<description><![CDATA[If you don’t know the root password of Debian, how are you going to change it? You need to know a method of password recovery for the Debian Linux operating system. What this method does is reboot your machine into what is called “single user mode”. Single user mode is also referred to as maintenance [...]]]></description>
			<content:encoded><![CDATA[<p>If you don’t know the root password of Debian, how are you going to change it? You need to know a method of password recovery for the Debian Linux operating system.<br />
What this method does is reboot your machine into what is called “single user mode”. Single user mode is also referred to as maintenance mode and is runlevel 1.</p>
<p style="text-align: center;">
<a href="http://www.binbert.com/blog/2011/02/root-password-recovery-of-debian"><img class="size-full wp-image-1319  aligncenter" title="debian-logo-150x150" src="http://www.binbert.com/blog/wp-content/uploads/2011/02/debian-logo-150x150.png" alt="" width="150" height="150" /></a></p>
<p>First reboot the Machine</p>
<p>What you need to do is to get to the screen that allows you to select which kernel to boot.</p>
<p>set the arrows to select the kernel entry you want to modify.<br />
press &#8220;e&#8221; to edit the entry<br />
use the arrows to go to &#8220;kernel line&#8221;<br />
press &#8220;e&#8221; to edit this entry</p>
<p>at the end of the line add the word</p>
<pre>init=/bin/bash</pre>
<p>press &#8220;ESC&#8221; to go back to the parent menu press &#8220;b&#8221; to boot this kernel</p>
<p>Your machine will now start the single user boot process.At this point all you need to do the following commands.</p>
<p>#mount -o remount,rw /<br />
#passwd</p>
<p>If password command is not found.Type below details:</p>
<pre>#mount -t &lt;file system type:eg:-ext3&gt; &lt;device,:eg:-/dev/sda1&gt; &lt;/usr&gt;</pre>
<p>Then type password command.</p>
<pre>#passwd</pre>
<p>You are successfully changed the password.</p>
<p>Now reboot</p>
<p>Now i am thinking why all this passwords!!!?</p>
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.binbert.com%2Fblog%2F2011%2F02%2Froot-password-recovery-of-debian%2F&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true"></iframe>]]></content:encoded>
			<wfw:commentRss>http://www.binbert.com/blog/2011/02/root-password-recovery-of-debian/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Redhat linux hardening tips &amp; bash script</title>
		<link>http://www.binbert.com/blog/2011/01/redhat-linux-hardening/</link>
		<comments>http://www.binbert.com/blog/2011/01/redhat-linux-hardening/#comments</comments>
		<pubDate>Tue, 18 Jan 2011 05:23:34 +0000</pubDate>
		<dc:creator>Sandeep kalathil</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[Bash]]></category>
		<category><![CDATA[Hardening]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Redhat]]></category>
		<category><![CDATA[scripting]]></category>

		<guid isPermaLink="false">http://www.binbert.com/blog/?p=1219</guid>
		<description><![CDATA[From the time a servers goes to live environment its prone to too many attacks from the hands of crackers (hackers) also as a system administrator you need to secure your Linux server to protect and save your data, intellectual property, and time here server hardening comes into effect. Securing a server is much different [...]]]></description>
			<content:encoded><![CDATA[<p><!-- pre.cjk { font-family: "DejaVu Sans",monospace; }p { margin-bottom: 0.21cm; }tt.cjk { font-family: "DejaVu Sans",monospace; } --><a href="http://www.binbert.com/blog/wp-content/uploads/2011/01/Redhat-linux.png"><img class="alignleft size-full wp-image-1253" title="Redhat linux" src="http://www.binbert.com/blog/wp-content/uploads/2011/01/Redhat-linux.png" alt="" width="155" height="267" /></a>From the time a servers goes to live environment its prone to too many attacks from the hands of crackers (hackers) also as a system administrator you need to secure your Linux server to protect and save your data, intellectual property, and time here server hardening comes into effect.   Securing a server is much different than securing a desktop computer for a variety of reasons. By default, a desktop operating system is installed to provide the user with an environment that can be run out of the box. Desktop operating systems are sold on the premise that they require minimal configuration and come loaded with as many applications as possible to get the user up and running. Conversely, a server&#8217;s operating system should abide by the Principle of Least Privilege, which states that it should have only the services, software, and permissions necessary to perform the tasks it&#8217;s responsible for.</p>
<p>We already covered some topics in earlier articles some of them are linked here.</p>
<p>Here are some tips for servers hardening ( Some already mentioned in my previous posts)</p>
<h2><strong>1) Removing Unnecessary Software Packages (RPMs)</strong></h2>
<p>An administrator should be crystal clear about the primary function or role of the Linux server also should know what is on the server.Therefore, it is very critical to look at the default list of software packages and remove unneeded packages.</p>
<p>To get a list of all installed RPMs you can use the following command:</p>
<pre><span style="color: #000000;">rpm -qa</span></pre>
<p>Remove the  unneeded packages from the list.</p>
<h2>2)<strong> <a title="Disabling runlevel system services on Linux Servers" href="http://www.binbert.com/blog/2010/12/disabling-runlevel-system-services-on-linux-servers/" target="_blank">Disabling Run level System Services</a></strong></h2>
<p>In  Linux servers, some services are enabled to start at boot up by default.<br />
it is safe to disable all services that are not needed as they are risks security and waste of hardware  resources. Read <a href="http://www.binbert.com/blog/2010/12/disabling-runlevel-system-services-on-linux-servers/">more</a>.</p>
<h2><strong>3) Reviewing Inittab and Boot Scripts</strong></h2>
<p>The inittab file <tt><span style="color: #0000ff;">/etc/inittab</span></tt> also describes which processes are started at bootup and during normal operation. For example, Oracle uses it to start cluster services at bootup. Therefore, it is recommended to ensure that all entries in <tt>/etc/inittab</tt> are legitimate in your environment.</p>
<p>I would at least remove the<a title="Prevent accidental reboots in Linux Servers" href="http://www.binbert.com/blog/2010/12/prevent-accidental-reboots-in-linux-servers/" target="_blank"> CTRL-ALT-DELETE</a> trap entry to prevent accidental reboots:</p>
<p>The default runlevel should be set to 3 since in my opinion X11 (X Windows System) should not be running on a production server. In fact, it shouldn&#8217;t even be installed.</p>
<pre># <span style="color: #0000ff;">grep ':initdefault' /etc/inittab</span>
id:3:initdefault:</pre>
<p>To have changes in <tt>/etc/inittab</tt> become effective immediately, you can run:</p>
<pre># <span style="color: #0000ff;">init q</span>
</pre>
<h2><strong>4) <a title="Securing SSH in Linux Servers" href="http://www.binbert.com/blog/2010/11/securing-ssh-in-linux-servers/" target="_blank">Securing SSH</a></strong></h2>
<p>Ssh is a great protocol and as it name  stands for Secure SHell its secure but its prone to attacks with basic configuration. There are ways to make ssh even more  secure than it is now.Read <a href="../2010/11/securing-ssh-in-linux-servers/">more</a></p>
<h2><strong>5) <a title="SSH login without password using RSA key authentication" href="http://www.binbert.com/blog/2010/08/ssh-login-without-password-using-rsa-key-authentication/" target="_blank">SSH login without passwords</a></strong></h2>
<p>Automated authentication onto server using RAS key authenticating mechanism . Read <a href="http://www.binbert.com/blog/2010/08/ssh-login-without-password-using-rsa-key-authentication/">more</a></p>
<h2><strong>6) Kernel Tuning<br />
</strong></h2>
<p>Following are some tunable kernel parameters you can use to secure your Linux server against attacks .We need to add these entries inside /etc/sysctl.conf configuration file to make the change permanent after reboots.To activate the configured kernel parameters immediately at runtime, use:</p>
<pre><span style="color: #0000ff;">#sysctl -p</span></pre>
<h3>Disable IP Source Routing</h3>
<pre>net.ipv4.conf.all.accept_source_route = 0</pre>
<h3>Disable ICMP Redirect Acceptance</h3>
<pre>net.ipv4.conf.all.accept_redirects = 0</pre>
<h3>Enable Ignoring Broadcasts Request</h3>
<pre>net.ipv4.icmp_echo_ignore_broadcasts = 1</pre>
<h3>Enable Bad Error Message Protection</h3>
<pre>net.ipv4.icmp_ignore_bogus_error_responses = 1</pre>
<h3>Enable Logging of Spoofed Packets, Source Routed Packets, Redirect Packets</h3>
<pre>net.ipv4.conf.all.log_martians = 1</pre>
<p>The above mentioned are only few steps for harding . There are many more steps like providing strong password , locking user accounts after too many login failures , restricting use of previous used passwords , setting banners etc.</p>
<p>Hardening  five or six servers can be done quite easily at a stretch but when the number of servers increases it just becomes tiresome and time consuming . So why don&#8217;t we think about a running a script that does all the hardening jobs and there wont be any waste of time. The script presented can be customized according to the requirement.</p>
<pre>#!/bin/bash
chkconfig autofs off
chkconfig avahi-daemon off
chkconfig avahi-dnsconfd off
chkconfig bluetooth off
chkconfig conman off
chkconfig cups off
chkconfig dhcdbd off
chkconfig firstboot off
chkconfig gpm off
chkconfig haldaemon off
chkconfig isdn off
chkconfig iptables off
chkconfig ip6tables off
chkconfig irda off
chkconfig irqbalance off
chkconfig kdump off
chkconfig kudzu off
chkconfig mcstrans off
chkconfig microcode_ctl off
chkconfig multipathd off
chkconfig netconsole off
chkconfig netfs off
chkconfig netplugd off
chkconfig nfs off
chkconfig nfslock off
chkconfig nscd off
chkconfig pcscd off
chkconfig portmap off
chkconfig rdisc off
chkconfig rhnsd off
chkconfig restorecond off
chkconfig rpcgssd off
chkconfig rpcidmapd off
chkconfig rpcsvcgssd off
chkconfig sendmail off
chkconfig smartd off
chkconfig winbind off
chkconfig wpa_supplicant off
chkconfig xfs off
chkconfig ypbind off
chkconfig yum-updatesd off
chkconfig acpid on
chkconfig anacron on
chkconfig atd on
chkconfig cpuspeed on
chkconfig lvm2-monitor on
chkconfig messagebus on
chkconfig ntpd on
chkconfig network on
chkconfig oracle on
chkconfig oracleasm on
chkconfig readahead_early on
chkconfig readahead_later on
chkconfig syslog on
chkconfig sshd on
cat &gt; /root/banner &lt;&lt; EOF
|-----------------------------------------------------------------|
| This system is for the use of authorized users only. |
| Individuals using this computer system without authority, or in |
| excess of their authority, are subject to having all of their |
| activities on this system monitored and recorded by system |
| personnel. |
| |
| In the course of monitoring individuals improperly using this |
| system, or in the course of system maintenance, the activities |
| of authorized users may also be monitored. |
| |
| Anyone using this system expressly consents to such monitoring |
| and is advised that if such monitoring reveals possible |
| evidence of criminal activity, system personnel may provide the |
| evidence of such monitoring to law enforcement officials. |
|-----------------------------------------------------------------|
EOF
cat /root/banner
sed -i 's/id:5:initdefault:/id:3:initdefault:/g' /etc/inittab
sed -i 's/ca::ctrlaltdel:/#ca::ctrlaltdel:/g' /etc/inittab
echo PermitRootLogin no &gt;&gt; /etc/ssh/sshd_config
echo Banner /root/banner &gt;&gt; /etc/ssh/sshd_config
sed -i 's/#AllowTcpForwarding yes/AllowTcpForwarding no/g' /etc/ssh/sshd_config
sed -i 's/#X11Forwarding no/X11Forwarding no/g' /etc/ssh/sshd_config
sed -i 's/X11Forwarding yes/#X11Forwarding yes/g' /etc/ssh/sshd_config
sed -i 's/#StrictModes yes/StrictModes yes/g' /etc/ssh/sshd_config
sed -i 's/#IgnoreRhosts yes/IgnoreRhosts yes/g' /etc/ssh/sshd_config
sed -i 's/#HostbasedAuthentication no/HostbasedAuthentication no/g' /etc/ssh/sshd_config
sed -i 's/#RhostsRSAAuthentication no/RhostsRSAAuthentication no/g' /etc/ssh/sshd_config
service sshd restart
echo net.ipv4.conf.all.accept_source_route = 0 &gt;&gt; /etc/sysctl.conf
echo net.ipv4.conf.all.accept_redirects = 0 &gt;&gt; /etc/sysctl.conf
echo net.ipv4.icmp_echo_ignore_broadcasts = 1 &gt;&gt; /etc/sysctl.conf
echo net.ipv4.icmp_ignore_bogus_error_responses = 1 &gt;&gt; /etc/sysctl.conf
echo net.ipv4.conf.all.log_martians = 1 &gt;&gt; /etc/sysctl.conf
sysctl -p
if [ $(id -u) -eq 0 ]; then
read -p "Enter username : " username
read -s -p "Enter password : " password
egrep "^$username" /etc/passwd &gt;/dev/null
if [ $? -eq 0 ]; then
echo "$username exists!"
exit 1
else
pass=$(perl -e 'print crypt($ARGV[0], "password")' $password)
useradd -m -p $pass $username
[ $? -eq 0 ] &amp;&amp; echo "User has been added to system!" || echo "Failed to add a user!"
fi
else
echo "Only root may add a user to the system"
exit 2
fi</pre>
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.binbert.com%2Fblog%2F2011%2F01%2Fredhat-linux-hardening%2F&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true"></iframe>]]></content:encoded>
			<wfw:commentRss>http://www.binbert.com/blog/2011/01/redhat-linux-hardening/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Wikileaks Datacenter</title>
		<link>http://www.binbert.com/blog/2010/12/wikileaks-datacenter/</link>
		<comments>http://www.binbert.com/blog/2010/12/wikileaks-datacenter/#comments</comments>
		<pubDate>Mon, 13 Dec 2010 10:43:44 +0000</pubDate>
		<dc:creator>Albin Sebastian</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[Datacenter]]></category>
		<category><![CDATA[Photos]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[wikileaks]]></category>

		<guid isPermaLink="false">http://www.binbert.com/blog/?p=1211</guid>
		<description><![CDATA[Wikileaks is hosted at White Mountain Datacenter in Stockholm (Sweden), Pionen also houses dozens of servers belonging to other companies. These pictures show the Pionen data centre, 100 ft below ground in a former Cold War nuclear bunker.The datacenter is bomb proof . This is one of the most secure Datacenters in the world as [...]]]></description>
			<content:encoded><![CDATA[<p>Wikileaks is hosted at White Mountain Datacenter in Stockholm (Sweden), Pionen also houses dozens of servers belonging to other companies. These pictures show the Pionen data centre, 100 ft below ground in a former Cold War nuclear bunker.The datacenter is bomb proof . This is one of the most secure Datacenters in the world as it is housed in a bunker 30 meters underground in solid bedrock.   Wikileaks is physically protected. Is it protected by low and network attackers ?</p>
<p style="text-align: center;">
<p style="text-align: center;"><a href="http://www.binbert.com/blog/wp-content/uploads/2010/12/1_White-Mountain-datacenter_wikileaks.jpg"><img class="aligncenter" style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="1_White Mountain datacenter_wikileaks" src="http://www.binbert.com/blog/wp-content/uploads/2010/12/1_White-Mountain-datacenter_wikileaks_thumb.jpg" border="0" alt="1_White Mountain datacenter_wikileaks" width="535" height="293" /></a></p>
<p style="text-align: center;"><a href="http://www.binbert.com/blog/wp-content/uploads/2010/12/2_White-Mountain-datacenter_wikileaks.jpg"><img class="aligncenter" style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="2_White Mountain datacenter_wikileaks" src="http://www.binbert.com/blog/wp-content/uploads/2010/12/2_White-Mountain-datacenter_wikileaks_thumb.jpg" border="0" alt="2_White Mountain datacenter_wikileaks" width="535" height="293" /></a></p>
<p style="text-align: center;"><a href="http://www.binbert.com/blog/wp-content/uploads/2010/12/3_White-Mountain-datacenter_wikileaks.jpg"><img class="aligncenter" style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="3_White Mountain datacenter_wikileaks" src="http://www.binbert.com/blog/wp-content/uploads/2010/12/3_White-Mountain-datacenter_wikileaks_thumb.jpg" border="0" alt="3_White Mountain datacenter_wikileaks" width="535" height="293" /></a></p>
<p style="text-align: center;"><a href="http://www.binbert.com/blog/wp-content/uploads/2010/12/4_White-Mountain-datacenter_wikileaks.jpg"><img class="aligncenter" style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="4_White Mountain datacenter_wikileaks" src="http://www.binbert.com/blog/wp-content/uploads/2010/12/4_White-Mountain-datacenter_wikileaks_thumb.jpg" border="0" alt="4_White Mountain datacenter_wikileaks" width="535" height="293" /></a></p>
<p style="text-align: center;"><a href="http://www.binbert.com/blog/wp-content/uploads/2010/12/5_White-Mountain-datacenter_wikileaks.jpg"><img class="aligncenter" style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="5_White Mountain datacenter_wikileaks" src="http://www.binbert.com/blog/wp-content/uploads/2010/12/5_White-Mountain-datacenter_wikileaks_thumb.jpg" border="0" alt="5_White Mountain datacenter_wikileaks" width="535" height="293" /></a></p>
<p style="text-align: center;">
<p style="text-align: center;"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="640" height="385" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/qwlATf9xse4?fs=1&amp;hl=en_US" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="640" height="385" src="http://www.youtube.com/v/qwlATf9xse4?fs=1&amp;hl=en_US" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.binbert.com%2Fblog%2F2010%2F12%2Fwikileaks-datacenter%2F&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true"></iframe>]]></content:encoded>
			<wfw:commentRss>http://www.binbert.com/blog/2010/12/wikileaks-datacenter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Prevent accidental reboots in Linux Servers</title>
		<link>http://www.binbert.com/blog/2010/12/prevent-accidental-reboots-in-linux-servers/</link>
		<comments>http://www.binbert.com/blog/2010/12/prevent-accidental-reboots-in-linux-servers/#comments</comments>
		<pubDate>Mon, 06 Dec 2010 07:31:31 +0000</pubDate>
		<dc:creator>Sandeep kalathil</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Server]]></category>

		<guid isPermaLink="false">http://www.binbert.com/blog/?p=1094</guid>
		<description><![CDATA[CTRL+ATL+DELETE will be the most commonly used shortcut key when we work on windows . Watch out that you never use this key (CTRL+ATL+DELETE) on linux server. The default Linux installation treats CTRL+ATL+DELETE command to immediately reboot the Linux system without any warning signals. To avoid this to happen we need to edit  the inittab [...]]]></description>
			<content:encoded><![CDATA[<p>CTRL+ATL+DELETE will be the most commonly used shortcut key when we work on windows . Watch out that you never use this key (CTRL+ATL+DELETE) on linux server. The default Linux installation treats CTRL+ATL+DELETE command to immediately reboot the Linux system without any warning signals.</p>
<p>To avoid this to happen we need to edit  the inittab file /etc/inittab</p>
<p>The inittab file /etc/inittab  describes which processes are started   at bootup and during normal operation also it tells  how the INIT  process should set up the system in a certain run-level.</p>
<p>Open the file /etc/inittab in editor mode and search for the string</p>
<pre>ca::ctrlaltdel:/sbin/shutdown -t3 -r now
</pre>
<p>comment this line to prevent accidental reboots.</p>
<pre>#ca::ctrlaltdel:/sbin/shutdown -t3 -r now</pre>
<p>To make the inittab changes effective immediately with out reeboting Linux execute the command</p>
<pre>kill -HUP 1
</pre>
<p>This will restart the Linux master process (init) immediately to re-read modified inittab settings.</p>
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.binbert.com%2Fblog%2F2010%2F12%2Fprevent-accidental-reboots-in-linux-servers%2F&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true"></iframe>]]></content:encoded>
			<wfw:commentRss>http://www.binbert.com/blog/2010/12/prevent-accidental-reboots-in-linux-servers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Disabling runlevel system services on Linux Servers</title>
		<link>http://www.binbert.com/blog/2010/12/disabling-runlevel-system-services-on-linux-servers/</link>
		<comments>http://www.binbert.com/blog/2010/12/disabling-runlevel-system-services-on-linux-servers/#comments</comments>
		<pubDate>Wed, 01 Dec 2010 06:31:51 +0000</pubDate>
		<dc:creator>Sandeep kalathil</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.binbert.com/blog/?p=1068</guid>
		<description><![CDATA[When Linux server boots up a large amount of services keeps running in its background . Some services are essential to the operation of your server, while other services are considered non-essential and will cause no problems to your server by disabling them.  Some services takes a lot of time and may affect the working [...]]]></description>
			<content:encoded><![CDATA[<p>When Linux server boots up a large amount of services keeps running in its background . Some services are essential to the operation of your server, while other services are considered non-essential and will cause no problems to your server by disabling them.  Some services takes a lot of time and may affect the working of some of your applications. We can disable these services during boot up.</p>
<p>To list all the services that are started at boot up type command</p>
<pre>chkconfig --list |grep on
</pre>
<p>We can see a quite a lot of services are enabled and disabled on the server for different run levels.</p>
<p>Some of the services like ( autofs,  avahi-daemon,  avahi-dnsconfd,  bluetooth,  conman,  cups,  dhcdbd,  firstboot,  gpm,   haldaemon,  isdn,  iptables,  ip6tables,  irda,  irqbalance,  kdump,  kudzu,  mcstrans,  microcode_ctl,  multipathd,  netconsole,  netfs,  netplugd,  nfs,   nfslock,  nscd,  pcscd,  rdisc,  rhnsd, restorecond,  rpcgssd,  rpcidmapd, rpcsvcgssd, sendmail,  smartd,  winbind,  wpa_supplicant,  xfs,   ypbind,  yum-updatesd) are not that necessary for the server  working. We can disable these services .</p>
<p>To permanently disable e.g. the runlevel service <tt>bluetooth</tt>, run:</p>
<pre>chkconfig bluetooth off
</pre>
<p>To immediately disable the runlevel service <tt>bluetooth</tt>, run:</p>
<pre>/etc/init.d/<tt>bluetooth</tt> stop</pre>
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.binbert.com%2Fblog%2F2010%2F12%2Fdisabling-runlevel-system-services-on-linux-servers%2F&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true"></iframe>]]></content:encoded>
			<wfw:commentRss>http://www.binbert.com/blog/2010/12/disabling-runlevel-system-services-on-linux-servers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

