On Mon, Aug 9, 2010 at 11:48 AM, Alan McKinnon <alan.mckin...@gmail.com> wrote:
> On Monday 09 August 2010 18:25:56 Paul Hartman wrote:
>> Hi, today when working remotely I ran nethogs and noticed suspicious
>> network traffic coming from my home gentoo box. It was very low
>> traffic (less than 1KB/sec bandwidth usage) but according to nethogs
>> it was between a root user process and various suspicious-looking
>> ports on outside hosts in other countries that I have no business
>> with. netstat didn't show anything, however, but when I ran chkrootkit
>> told me that netstat was INFECTED. I immediately issued "shutdown -h
>> now" and now I won't be able to take a further look at it until I get
>> home and have physical access to the box. System uptime was a few
>> months. It was last updated for installation of a 2.6.33 kernel
>> (2.6.35 is out now).
>>
>> I have 3 goals now:
>>
>> 1) Figure out what is running on my box and how long it has been there.
>> 2) Find out how it got there.
>> 3) Sanitizing, or most likely rebuilding the system from scratch.
>
> Here's the bad news:
>
> An intruder probably gained access through a script kiddie script, which has
> likely already removed all the logs. Or they have possibly been rotated away
> by now.
>
> I would proceed as follows:
>
> 1. Keep that machine off the internet till it is reinstalled
> 2. Fresh reinstall using boot media that you have downloaded and written
> elsewhere, plus a portage tree. Don't worry about distfiles - a fresh portage
> tree won't use existing copies on that machine if the hashes don't match. So
> you can re-use them. If you boot off new install media it is safe to download
> new distfiles using it.
> 3. Keep your old partitions around if you want to do forensics, you can mount
> them somewhere when a reinstall is done and peruse them at your leisure.
> However, doing that is often a waste of time unless you still have logs. You
> can use a scanner like nessus to look things over.
> 4. And it goes without saying that you should change all passwords and keys
> used on that trojaned machine.

Hi Alan, thanks for the advice.

I just remembered that my DD-WRT router stats page had an anomaly, on
31st of July it showed I had over 700 terabytes of traffic, which is
impossible. Coincidentally, my cable modem stopped working on the same
day, so I wrote it off as a bug or a result of the broken modem. I
replaced the modem and everything seemed to work normally after that.

At this point my mind is running wild thinking of all of the
possibilities. Could the router have been infected? The modem? It'll
still be another 5 or 6 hours before I'm able to lay my hands on the
machine. I'm imagining every doomsday scenario. :)

My hope is that it was "only" a botnet or ssh-scanner or something,
and not sniffer or keylogger or anything nefarious. I fear I may never
truly be able to know, though.

Reply via email to