If this isn't exactly what you wanted, please try our Search (there's a LOT of techy and non-techy stuff here about Linux, Unix, Mac OS X and just computers in general!):
From: Jeff Breitner <nospam.zentec@hotmail.com>
Subject: Re: hack attempt?
Date: Sun, 02 Mar 2003 23:30:03 -0500
References: <eQy8a.327844$vm2.254627@rwcrnsc54>
LRW wrote:
> I've got a small PC with RH 6.2
There are many established problems with 6.2, including my favorite which is
the remote root compromise through the portmapping services.
>that I'm using to play around with, and
> left it up and open to telnet/ftp/ssh over the weekend.
> I came back today to find some odd messages. I'd left a login up with:
> #tail -f /var/log/messages
> so I have a screen of interesting messages (see below), but when I go in
> from another console session and view messages (or messages.1, etc) that
> day's messages are gone. As with that day from /var/log/secure.
Generally, when the log files are gone, that's a bad sign.

Sometimes if you cat /root/.bash_history, you can see what they did. But
only if they were sloppy and forgot to clean that file too.
> Also, I tried to run PINE, (as root) and when I did, it created the files
> as if I'd not used it before. I'm not positive I HAD used PINE or not as
> root before, but even so, if this was the 1st time, shouldn't I have
> received the daily cron files waiting for me from past days?
Looks like they *did* remember to clean out .bash_history for root. Ok,
ignore that last one...
>If not, then
> I'm being paranoid, but if so, then is that possibly an indication of more
> infiltration?
You are correct, this machine has been compromised.
> So, I take it, the PC was hacked and then the log deleted? The owner of
> the log is "root", so, does this person know how to access the PC as root
> now? Here's the messages, and I'd really appreciate any assistance in
> explaining what some of this is.
> Obviously I pulled it off the network now.
> Thanks!
> Liam
Yes, they know how to access the PC as root. What happens is that either
there is a way for them to get into your unpatched machine remotely through
a compromise that gives them root, or through a local compromise that they
exploit to elevate their privilege.
You did the right thing in tearing it off the network. Not only the right
thing, but the responsible thing. Plus it's a good learning experience for
you to go through it and figure out how they managed to get into it in the
first place.
> Mar 1 04:02:00 pcname anacron[3125]: Updated timestamp for job
> 'cron.daily' to 2003-03-01
> Mar 1 04:02:21 pcname PAM_pwdb[3228]: (su) session opened for user news by
> (uid=0)
This is a bad sign right off the bat. User "news" su'ing to root (assuming
it wasn't you).
> Mar 1 04:02:21 pcname PAM_pwdb[3228]: (su) session closed for user news
> Mar 1 04:42:00 pcname anacron[3297]: Updated timestamp for job
> 'cron.monthly' to 2003-03-01
> Mar 1 16:25:25 pcname ftpd[3386]: ANONYMOUS FTP LOGIN FROM
> 213-96-129-151.uc.nombres.ttd.es [213.96.129.151], guest@here.com
Never a good idea to have an anonymous FTP site unless that's what you need
to do. Someone from Spain is knocking on your door.
> Mar 1 16:25:30 pcname ftpd[3386]: FTP session closed
> Mar 1 10:56:53 pcname pumpd[1022]: renewed lease for interface eth0
Houston, why did the clock roll-back? It went from 16:25:30 to 10:56:53.
Plus, if memory serves me correctly, dhcpd has an exploit and "renewing
lease" should be the dhcpd client.
> Mar 1 18:49:10 pcname ftpd[3513]: FTP session closed
> Mar 1 18:52:56 pcname ftpd[3516]: FTP session closed
> Mar 2 00:53:22 pcname ftpd[3517]: ANONYMOUS FTP LOGIN FROM
> 61-21-160-185.home.ne.jp [61.21.160.185], mozilla@
> Mar 1 18:54:50 pcname kernel: kiod uses obsolete (PF_INET,SOCK_PACKET)
> Mar 1 18:54:50 pcname kernel: device eth0 entered promiscuous mode
Your ethernet card has been turned into a packet sniffer.
> Mar 2 04:02:00 pcname anacron[3876]: Updated timestamp for job
> 'cron.daily' to 2003-03-02
> Killed
> [root@pcname log]# lockd: connect from unprivileged port:
Looks like they might have installed something here...
> Thanks for any help translating! I get the ouple of anonymous ftp logins,
> but I don't really understand the rest.
> If I change subnet and ip and close all ports except ssh, will this likely
> happen again?
> Thanks!
Yes, it's likely to happen again. They now pretty much control your machine
and may have installed their own software, libraries or who knows what
else. Simply changing the networking components may or may not work since
it's conceivable that the machine could call "home" to tell them where it
can be found.
Best bet is to burn your 6.2 CD's and download something more current.
Nothing wrong with giving Linux a try, but a 6.2 stock system has quite a
few very well-known security flaws. Plus it lacks the essential tools like
iptables.
When you do get that new system installed, spend a few hours researching the
various opinions on the Internet on how to secure a Linux box. With Red
Hat (SuSE too), I do a "/sbin/chkconfig --list | grep on" to see what
services are going to start at boot. Things like nfs and portmap, I really
don't need them so I issue the /sbin/chkconfig --del portmap command and
get them outta there.
Good luck...
Enter your email address for automatic notification of new posts here
(be sure to whitelist 'feedburner.com' if you use spam filtering)
| Views for this page | ||||
|---|---|---|---|---|
| Today | This Week | This Month | This Year | Overall |
| 2 | 5 | 28 | 724 | 3,054 |
/Bofcusm/2060.html copyright 1997-2004 (various authors) All Rights Reserved
Have you tried Searching this site?
Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates
This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.

Add your comments