<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  
  
  <channel>
    <title>chrisjrob: rootkit</title>
    <link>https://chrisjrob.com</link>
    <atom:link href="https://chrisjrob.com/tag/rootkit/feed/index.xml" rel="self" type="application/rss+xml" />
    <description>GNU Linux, Perl and FLOSS</description>
    <language>en-gb</language>
    <pubDate>Fri, 13 Feb 2026 17:22:31 +0000</pubDate>
    <lastBuildDate>Fri, 13 Feb 2026 17:22:31 +0000</lastBuildDate>
    
    <item>
      <title>Howto | Protect against rootkits</title>
      <link>https://chrisjrob.com/2009/03/21/protect-against-rootkits/</link>
      <pubDate>Sat, 21 Mar 2009 06:20:17 +0000</pubDate>
      <author>chrisjrob@gmail.com (Chris Roberts)</author>
      <guid>https://chrisjrob.com/2009/03/21/protect-against-rootkits</guid>
      <description>
       <![CDATA[
         
         <p>Apparently <strong>Rootkits</strong> are a major problem in the linux world.  Unlike viruses, you are much more likely to be infected without realising that you even have a problem.  The purpose of this document is twofold:</p>

<ol>
  <li>Check for existing infection</li>
  <li>Protect against future infection</li>
</ol>

<p>If you are unsure what a Rootkit is, then please read the <a href="https://en.wikipedia.org/wiki/Rootkit">Rootkit Wikipedia page</a> before continuing.</p>

<!--more-->

<h2 id="warning">Warning</h2>

<p><strong>This is how I checked and protected against rootkits and is not how I would recommend that anyone else should do so.</strong></p>

<h2 id="step-1-rkhunter">Step 1: rkhunter</h2>

<p>I suggest you visit the rkhunter website at: http://rkhunter.sourceforge.net/</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ sudo apt-get install rkhunter
$ sudo rkhunter --upgrade
$ sudo rkhunter --checkall --createlogfile
</code></pre></div></div>

<p>Read the output and take corrective action as required.</p>

<h2 id="step-2-chkrootkit">Step 2: chkrootkit</h2>

<p>I suggest you visit the chkrootkit website at:</p>

<ul>
  <li>http://www.chkrootkit.org</li>
</ul>

<p>In particular, <a href="http://www.chkrootkit.org/faq/#9">the FAQS</a> would suggest that you shouldn’t trust the chkrootkit to use the commands on your system, bearing in mind that you suspect that they might be compromised; I chose not to take this additional precaution - you should make your decision based on the exposure of your server to the Internet and your assessment of the likelihood of your having a rootkit.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ sudo apt-get install chkrootkit
$ sudo chkrootkit
</code></pre></div></div>

<h2 id="step-4-tripwire">Step 4: tripwire</h2>

<ul>
  <li>http://sourceforge.net/projects/tripwire/</li>
</ul>

<p>Tripwire creates a database of your system files and then tracks any changes to them.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ sudo apt-get install tripwire
</code></pre></div></div>

<p>Follow all the prompts, which will require you to create a Site Key Pass-phrase and a Local key Pass-phrase.  Next we need to create the database:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ sudo tripwire --init
Wrote database file: /var/lib/tripwire/hostname.domain.com.twd
The database was successfully generated.
</code></pre></div></div>

<p>Next we run a first check:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ sudo tripwire --check
</code></pre></div></div>

<p>This will doubtless come back with far more information than you really want.  For example I received loads of lines about “/proc/PIDNO/”.</p>

<h2 id="references">References</h2>

<ul>
  <li><a href="http://sourceforge.net/docman/display_doc.php?docid=2078&amp;group_id=3130">Implementing Tripwire</a></li>
  <li><a href="http://www.alwanza.com/howto/linux/tripwire.html">Howto Linux - Tripwire</a></li>
</ul>

<h2 id="a-better-way">A better way</h2>

<ul>
  <li><a href="http://linuxgazette.net/issue98/moen.html">Combining AIDE and Tripwire</a></li>
</ul>


       ]]>
      </description>
    </item>
    
  </channel> 
</rss>
