I do not think he got root...he just found a testing account that had
a password that was too easy to crack. He didn't (or couldn't) make
much of an attempt to cover his tracks, as the tools I used to find
and disable his stuff were top, ps, ls, crontab, kill and
killall...usually the more dangerous crackers override those, from
what I understand.
My guess on how he got in: I have AT&T U-Verse, including their
residential gateway. I set its firewall up to let port 80 and port 22
point to my linux box, so I could ssh home from work, and so my wife
could do some html/css experiments on it (she hasn't done that yet
though). Sometimes the gateway seems to get a bur under its saddle
and says "there is a router behind this router, do you want me to
resolve the problem?" If you say yes, it puts one machine into
"DMZplus" mode, which as far as I can tell sends ALL ports to that
machine. Nice. My linux machine was DMZplus-ified when I went in to
shut off ports 80 and 22...no telling how long it had been that way.
So that doesn't narrow down what he could have exploited, but maybe
points to how the doors all got unlocked.
As near as I can tell the main activity he was doing was portscanning,
but what he might have done with the results, I don't know. After
killing his account I shut the machine off. We had been having
internet trouble across the board since the thunderstorm this weekend,
and I'm wondering whether maybe this cracker had something to do with
the trouble. It's still not 100% great though and we have a tech
coming to our house this evening.
I'm thinking about burning the test account's home dir to a CD for
inspection. I haven't deleted any of his files, only his crontab
entry that spawned a new job every minute if it got killed. Would
anyone on the list want a look at the files?
Beyond that...to get the machine back to a usable state...does anyone
have any suggestions? It seems like it would be foolish to assume
just killing that account would take care of the problem for good, but
would that be sufficient to hobble along for a week or so until I can
cp my own home dir elsewhere and reinstall? Or would it be safer to
keep the machine off the network until I can get that done?
Kendric Beachey
On Thu, Jun 18, 2009 at 16:05, Billy Crook<billy...@gmail.com> wrote:
> I also use fail2ban for ssh. When someone tries to guess an account's
...
You really won't have a choice about using that Residential Gateway.
To get service, at all, I think you'll have to leave that machine in
place. But don't trust it as your firewall. Put another firewall
between you and it, and just consider everything outside your firewall
own as untrusted.
If you are going to put services out there where they are reachable on
the internet, you need to plan on keeping them patched. You should
either set it up to update automatically (does anyone here have
experience with that) or set up some way to remind you to do it. You
really can't afford to let yourself get significantly behind on
patches for a service that is internet facing.
My two cents worth, in addition to the plethora of good suggestions you have already gotten, I always have my external ssh on a non-standard port. No sense in making it an easier for hackers than you have to. ;)