<?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>Holy Shmoly! &#187; hacking</title>
	<atom:link href="http://ocaoimh.ie/tag/hacking/feed/" rel="self" type="application/rss+xml" />
	<link>http://ocaoimh.ie</link>
	<description>Look what I found today!</description>
	<lastBuildDate>Fri, 25 May 2012 17:12:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Catch website file changes with AIDE</title>
		<link>http://ocaoimh.ie/2008/06/16/catch-website-file-changes-with-aide/</link>
		<comments>http://ocaoimh.ie/2008/06/16/catch-website-file-changes-with-aide/#comments</comments>
		<pubDate>Mon, 16 Jun 2008 10:48:31 +0000</pubDate>
		<dc:creator>Donncha O Caoimh</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[AIDE]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[irishblogs]]></category>

		<guid isPermaLink="false">http://ocaoimh.ie/?p=89493743</guid>
		<description><![CDATA[A week ago I suggested installing AIDE to track changes on your server in case it had been hacked. I think AIDE Is so useful that it deserves a post of it&#8217;s own. Here&#8217;s a short guide to get it working properly. The AIDE .deb package includes configuration files for over 80 different software packages [...]]]></description>
			<content:encoded><![CDATA[<p>A week ago <a href="http://ocaoimh.ie/2008/06/08/did-your-wordpress-site-get-hacked/">I suggested</a> installing <a href="http://www.cs.tut.fi/~rammer/aide.html">AIDE</a> to track changes on your server in case it had been hacked. I think AIDE Is so useful that it deserves a post of it&#8217;s own. Here&#8217;s a short guide to get it working properly.</p>
<p>The AIDE .deb package includes configuration files for over 80 different software packages or log files. That&#8217;s great if you have all that software installed or want to keep a paranoid eye on /var but what if you only care about the directory where your website lives?</p>
<p>When I first installed AIDE (using <code>apt-get install aide</code>), it said I needed to run /usr/sbin/aideinit after installation. Every morning I&#8217;d get an email from AIDE with a list of changed files from all over my server, including mail logs, Apache logs, and more. I didn&#8217;t need all that so I removed the files from /etc/aide.conf.d/ except my WordPress config file:<br />
<blockquote>/home/web/ Checksums<br />
!/home/web/logs/.*<br />
!/home/web/public_html/wp-content/cache/.*<br />
!/home/web/.*/htdocs/wp-content/cache/.*</p></blockquote>
<p>Unfortunately after I removed the configuration files the daily AIDE email was flooded with open_dir() errors:<br />
<blockquote>Output is 40577 lines, truncated to 1000.<br />
open_dir():Not a directory: /home/donncha/.bashrc<br />
open_dir():Not a directory: /home/donncha/.bash_profile<br />
open_dir():Not a directory: /home/donncha/.viminfo<br />
open_dir():Not a directory: /home/donncha/.bash_history</p></blockquote>
<p>AIDE was rendered useless by all the errors. Thankfully it was easy to fix. Run aideinit again and it regenerates the AIDE database.<br />
<blockquote># /usr/sbin/aideinit<br />
Overwrite existing /var/lib/aide/aide.db.new [Yn]? y<br />
Running aide &#8211;init&#8230;</p>
<p>AIDE, version 0.13.1</p>
<p>### AIDE database at /var/lib/aide/aide.db.new initialized.</p>
<p>Overwrite /var/lib/aide/aide.db [yN]? y</p></blockquote>
<p>For good measure, I ran <code>/etc/cron.daily/aide</code> again which sent me the &#8220;Daily AIDE report&#8221;, and yes, it reported that my .htaccess file had been changed. Nice.</p>
<p>If your site is on a shared hosting account then you&#8217;re out of luck, but if you have a dedicated host, or virtual private server (VPS) then please consider using AIDE to keep track of changed files. It will send you a short email every day listing changed, added or deleted files. It may save you a lot of hassle and embarrassment if your site is hacked.</p>
<p>Edit: By default, the nightly cron script doesn&#8217;t update the AIDE database leading to the same files changes reported every day. Edit /etc/default/aide and make sure COPYNEWDB is set to &#8220;yes&#8221;. That will update the database.</p>
 <img src="http://ocaoimh.ie/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=89493743" width="1" height="1" style="display: none;" />
<p><strong>Related Posts</strong><ul><li> <a href="http://ocaoimh.ie/2008/06/26/wordpress-exploit-scanner-01/" rel="bookmark" title="Permanent Link: WordPress Exploit Scanner 0.1">WordPress Exploit Scanner 0.1</a></li><li> <a href="http://ocaoimh.ie/2003/05/02/b2-snapshot-release/" rel="bookmark" title="Permanent Link: b2++ &#8211; snapshot release">b2++ &#8211; snapshot release</a></li><li> <a href="http://ocaoimh.ie/2004/03/30/ghost-town/" rel="bookmark" title="Permanent Link: GHOST TOWN">GHOST TOWN</a></li></ul></p>]]></content:encoded>
			<wfw:commentRss>http://ocaoimh.ie/2008/06/16/catch-website-file-changes-with-aide/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
	</channel>
</rss>

