<?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>errr-online.com &#187; sysadmin</title>
	<atom:link href="http://www.errr-online.com/index.php/tag/sysadmin/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.errr-online.com</link>
	<description>Be on the lookout for useless Information</description>
	<lastBuildDate>Sun, 30 May 2010 04:48:42 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Hide your Lighttpd Version and Supress the X-Powered-By info given by PHP</title>
		<link>http://www.errr-online.com/index.php/2010/02/27/hide-your-lighttpd-version-and-supress-the-x-powered-by-info-given-by-php/</link>
		<comments>http://www.errr-online.com/index.php/2010/02/27/hide-your-lighttpd-version-and-supress-the-x-powered-by-info-given-by-php/#comments</comments>
		<pubDate>Sat, 27 Feb 2010 16:44:37 +0000</pubDate>
		<dc:creator>errr</dc:creator>
				<category><![CDATA[BSD]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Lighttpd]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[WebServer]]></category>

		<guid isPermaLink="false">http://www.errr-online.com/?p=35</guid>
		<description><![CDATA[A simple first step to some basic security on your web server is to make the response headers say as little as possible. This is not going to be the end all only thing you need to do to secure your web server, but hey like I said its a basic first step. When you [...]]]></description>
			<content:encoded><![CDATA[<p>A simple first step to some basic security on your web server is to make the response headers say as little as possible. This is not going to be the end all only thing you need to do to secure your web server, but hey like I said its a basic first step. When you hit a website and are looking at the content you might find your self wondering &#8220;What OS, and what web server is this person using.. And hey I see the pages end with .php I wonder what version of that they are using too..&#8221; Well this is all (by default on most systems) just pushed out to everyone who visits the site. You can find this with out even having to have any command line skills or know how to use wget or curl. A simple <a href="https://addons.mozilla.org/en-US/firefox/addon/60">Firefox Plugin</a> can tell anyone this. The typical output will look something like this:<br />
<blockquote>X-Powered-By: PHP/5.2.6-1+lenny4<br />
Content-Type: text/html; charset=utf-8<br />
Cache-Control: no-cache, must-revalidate<br />
Pragma: no-cache<br />
Transfer-Encoding: chunked<br />
Date: Sat, 27 Feb 2010 16:18:09 GMT<br />
Server: lighttpd/1.4.25<br />
200 OK</p></blockquote>
<p>Wow thats a lot of info about this persons server&#8230; We can see here that they are running Debian Lenny, and they have php 5.2.6 with a patch set or 2 on it, and they have Lighttpd version 1.4.25.  That now lets a possible attacker know which security lists to go hit up looking for possible exploits in any of the above mentioned software.. And a simple nmap command can automate this whole process of looking for a &#8220;mark&#8221; through entire net blocks in a matter of seconds.</p>
<p>Lets start by telling less info about our web server. The default response from Lighttpd is <b>lighttpd #current-version#</b> To change this all we need to do is edit our lighttpd.conf file. Using your favorite text editor lets open up lighttpd.conf and look though it for <b>server.tag</b> Odds are its not in there but thats OK we will add it and define the value.<br />
<blockquote>server.tag = &#8220;WebServer&#8221;</p></blockquote>
<p>Now that we have done that we will need to restart the web server. Next time we check our site it will look more like this:<br />
<blockquote>X-Powered-By: PHP/5.2.6-1+lenny4<br />
Content-Type: text/html<br />
Transfer-Encoding: chunked<br />
Date: Sat, 27 Feb 2010 15:56:46 GMT<br />
Server: WebServer</p></blockquote>
<p>Ah now that is much better but that pesky PHP is still telling everyone what OS and version of PHP we have.</p>
<p>Now lets shut PHP up. Using your favorite text editor open your php.ini file and lets look through it for <b>expose_php</b> By default the value will be set to On. We need to set it to Off. Now we need to restart Lighttpd again. Now our response headers will look like:<br />
<blockquote>Content-Type: text/html<br />
Transfer-Encoding: chunked<br />
Date: Sat, 27 Feb 2010 16:02:47 GMT<br />
Server: WebServer</p></blockquote>
<p>Now again.. This is not the end all.. you still need to sercure the box with iptables or some other type of firewall because this did not make your server any more secure than it was before. All we did was HIDE the info making it harder to find out what you have. There are many other things you can do like running these services in a chroot jail, but this is not going to hurt to do.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.errr-online.com/index.php/2010/02/27/hide-your-lighttpd-version-and-supress-the-x-powered-by-info-given-by-php/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Rename Files Fast from the Linux CLI</title>
		<link>http://www.errr-online.com/index.php/2010/01/14/rename-files-fast-from-the-linux-cli/</link>
		<comments>http://www.errr-online.com/index.php/2010/01/14/rename-files-fast-from-the-linux-cli/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 18:16:26 +0000</pubDate>
		<dc:creator>errr</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://www.errr-online.com/?p=17</guid>
		<description><![CDATA[So today I moved our web root from this OLD system to our new server. First things first I tried to hit some of the links and I was served given the option to d/l the file&#8230; Well I could go to the Web server config file and tell it to parse these files as [...]]]></description>
			<content:encoded><![CDATA[<p>So today I moved our web root from this OLD system to our new server. First things first I tried to hit some of the links and I was served given the option to d/l the file&#8230; Well I could go to the Web server config file and tell it to parse these files as php, or how about we ditch the .php3 for something this decade&#8230; like .php So I go to our web root and look for all the files that end in .php3</p>
<blockquote><p>find . -iname &#8220;*.php3&#8243; -print</p></blockquote>
<p>Nice. Now I have a huge list of files here.. How on earth can I rename them with out this taking all day&#8230; I used <i>rename</i> like so:</p>
<blockquote><p>find . -iname &#8220;*.php3&#8243; -print |xargs rename -n &#8217;s/\.php3/\.php/&#8217;</p></blockquote>
<p>This command will NOT actually change ANYTHING on your system. The -n flag says to run through as a test and tell me what you would be doing if I wanted it done&#8230; I can see from this output that I do indeed want to run this command.</p>
<blockquote><p>find . -iname &#8220;*.php3&#8243; -print |xargs rename -v &#8217;s/\.php3/\.php/&#8217;</p></blockquote>
<p>Now this time it did go though and rename and it printed to the screen what it did (thats what the -v flag does verbose). Now I can go though and edit the index file that pointed to these php3 files and remove that 3. Simple and now I dont have that silly 3 on the file names any more.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.errr-online.com/index.php/2010/01/14/rename-files-fast-from-the-linux-cli/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DRAC Attack!! Default username and password for DRAC</title>
		<link>http://www.errr-online.com/index.php/2010/01/06/drac-attack-default-username-and-password-for-drac/</link>
		<comments>http://www.errr-online.com/index.php/2010/01/06/drac-attack-default-username-and-password-for-drac/#comments</comments>
		<pubDate>Wed, 06 Jan 2010 19:07:57 +0000</pubDate>
		<dc:creator>errr</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Dell]]></category>
		<category><![CDATA[DRAC]]></category>
		<category><![CDATA[Remote Access Controller]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://www.errr-online.com/?p=10</guid>
		<description><![CDATA[Simple and quick post&#8230; The default user for DRAC is root with a password of calvinenjoy!!
]]></description>
			<content:encoded><![CDATA[<p>Simple and quick post&#8230; The default user for <a href="http://en.wikipedia.org/wiki/Dell_DRAC">DRAC</a> is <b>root</b> with a password of <b>calvin</b><br />enjoy!!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.errr-online.com/index.php/2010/01/06/drac-attack-default-username-and-password-for-drac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Export xBase/dBase files into MySQL</title>
		<link>http://www.errr-online.com/index.php/2010/01/04/export-xbasedbase-files-into-mysql/</link>
		<comments>http://www.errr-online.com/index.php/2010/01/04/export-xbasedbase-files-into-mysql/#comments</comments>
		<pubDate>Mon, 04 Jan 2010 18:18:36 +0000</pubDate>
		<dc:creator>errr</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Conversion]]></category>
		<category><![CDATA[dBase]]></category>
		<category><![CDATA[Export]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[xBase]]></category>

		<guid isPermaLink="false">http://www.errr-online.com/?p=6</guid>
		<description><![CDATA[If you have an application that uses xBase/dBase files to store data you may at some point need to export that data into a real database, like MySQL. This is a really simple task thanks to a nifty app called dbf2mysql. For my example I was using some CRM software called ACT. They used dBase [...]]]></description>
			<content:encoded><![CDATA[<p>If you have an application that uses <a href="http://en.wikipedia.org/wiki/DBase">xBase/dBase</a> files to store data you may at some point need to export that data into a real database, like <a href="http://www.mysql.com/">MySQL</a>. This is a really simple task thanks to a nifty app called <a href="http://sourceforge.net/projects/dbf2mysql/">dbf2mysql</a>. For my example I was using some CRM software called ACT. They used dBase III files to store their data. So I just went to the windows box that was holding my dBase file. I used winscp to move it to my Linux box. Next I used:<br />
<blockquote>dbf2mysql -vvv -c -f -d dbname -r -U dbuser -P dbuserpass CustomerInfo.dbf</p></blockquote>
<p>What this does is turns up the verbose logging to my screen, next the -c will create a table in my database named &#8220;test&#8221; (this is default and can be changed with the -t flag) -f makes all the field named from the dbf file be changed to lower case, next the -d, -U, and -P seem pretty obvious, and that leaves us with the -r which will Trim trailing and leading white space from CHAR type fields. All this info and more can be found in the man page. Here is the trail end of what I got from the output of my command:<br />
<blockquote>fields in dbh 71, allocated mem for query 4293, query size 2156<br />
Inserting records<br />
Inserting record 0<br />
Inserting record 100<br />
Inserting record 200<br />
Inserting record 300<br />
Inserting record 400<br />
Inserting record 500<br />
Inserting record 600<br />
Inserting record 700<br />
Inserting record 800<br />
Closing up&#8230;.
</p></blockquote>
<p>Now I can log into phpmyadmin and verify that all my data has been moved successfully.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.errr-online.com/index.php/2010/01/04/export-xbasedbase-files-into-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
