Hi,
I'm trying to investigate my system that was cracked (or hacked ?) - see
SuckIt disaster thread - and I started to search for all the passwd files.
I found severals of them, and I'm trying to open them once at the time
to look for footprints.
I'm not really familiar with security so I would appreciate if someone can help me investigating these files
I was looking these file:
1) naspasswd
-----------------------------------------------------------------------------------------
#
# naspasswd This is the file that primarily stores the passwords
# for the NASes. This will be read by checkrad.pl to
# supply the password for a certain NAS if needed, in the
# event that FreeRADIUS server suspects a multiple login.
#
# Note that at this time you ONLY need to enter passwords
# here if you use a non-SNMP method to poll the terminal
# servers, eg ONLY with USR/3Com Total Control, NetServer
# and Cyclades PathRAS servers!
#
# This is in the format:
#
# ip_address<SPACE>login_name<SPACE>password
#
# Blank lines and lines with '#' as the first
# character are ignored.
#
# WARNING: Always make sure that this file has the "-r------" permission.
# And, don't set the passwords on your other systems to the same
# passwords that can be found below.
#
#
#203.172.90.118 !root xxxxxxxxxxxxxx
#203.172.42.152 !root yyyyyyyyyy
-----------------------------------------------------------------------------------------
Questions:
1a) What is it NASes?
1b) Is this a file created by the cracker?
1c) Is the IP the one the cracker came from?
1d) Did the cracker guess the root password?
1e) Other hints?
2) passwd
-----------------------------------------------------------------------------------------
#
# The PAM configuration file for the Shadow `passwd' service
#
# The standard Unix authentication modules, used with NIS (man nsswitch) as
# well as normal /etc/passwd and /etc/shadow entries. For the login service,
# this is only used when the password expires and must be changed, so make
# sure this one and the one in /etc/pam.d/login are the same. The "nullok"
# option allows users to change an empty password, else empty passwords are
# treated as locked accounts.
#
# (Add `md5' after the module name to enable MD5 passwords the same way that
# `MD5_CRYPT_ENAB' would do under login.defs).
#
# The "obscure" option replaces the old `OBSCURE_CHECKS_ENAB' option in
# login.defs. Also the "min" and "max" options enforce the length of the
# new password.
password required pam_unix.so nullok obscure min=4
# Alternate strength checking for password. Note that this
# requires the libpam-cracklib package to be installed.
# You will need to comment out the password line above and
# uncomment the next two in order to use this.
# (Replaces the `OBSCURE_CHECKS_ENAB', `CRACKLIB_DICTPATH')
#
# password required pam_cracklib.so retry=3 minlen=6 difok=3
# password required pam_unix.so use_authtok nullok md5
-----------------------------------------------------------------------------------------
Questions:
2a) What is this fiel all about?
3) passwd (under /etc)
-----------------------------------------------------------------------------------------
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/bin/sh
bin:x:2:2:bin:/bin:/bin/sh
sys:x:3:3:sys:/dev:/bin/sh
sync:x:4:65534:sync:/bin:/bin/sync
games:x:5:60:games:/usr/games:/bin/sh
man:x:6:12:man:/var/cache/man:/bin/sh
lp:x:7:7:lp:/var/spool/lpd:/bin/sh
mail:x:8:8:mail:/var/mail:/bin/sh
news:x:9:9:news:/var/spool/news:/bin/sh
uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
proxy:x:13:13

roxy:/bin:/bin/sh
majordom:x:30:31:Majordomo:/usr/lib/majordomo:/bin/sh
postgres:x:31:32

ostgres:/var/lib/postgres:/bin/sh
www-data:x:33:33:www-data:/var/www:/bin/sh
backup:x:34:34:backup:/var/backups:/bin/sh
msql:x:36:36:Mini SQL Database Manager:/var/lib/msql:/bin/sh
operator:x:37:37:Operator:/var:/bin/sh
list:x:38:38:Mailing List Manager:/var/list:/bin/sh
irc:x:39:39:ircd:/var/run/ircd:/bin/sh
gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats/gnats-db:/bin/sh
mysql:x:100:103:MySQL Server:/var/lib/mysql:/bin/false
postfix:x:102:65534:Postfix Mailsystem:/var/spool/postfix:/bin/false
knoppix:x:1000:1000:Knoppix User:/home/knoppix:/bin/bash
nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
sshd:x:103:65534:SSH Server:/var/run/sshd:/bin/false
partimag:x:104:65534::/home/partimag:/bin/false
bind:x:106:108::/var/cache/bind:/bin/false
sslwrap:x:107:1001::/etc/sslwrap:/bin/false
clamav:x:101:101::/var:/bin/false
ntop:x:110:110::/var/lib/ntop:/bin/false
uml-net:x:111:111::/home/uml-net:/bin/false
captive:x:105:65534::/var/lib/captive:/bin/false
-----------------------------------------------------------------------------------------
Questions:
3a) How do I read each row of this file?
3b) Do you see any sospicious thing on this file ... for instance: majordom is a sospiscious user, so I'm expecting to find a user under: /usr/lib/majordomo ... but I didn't..
4) maillog.1
-----------------------------------------------------------------------------------------
Dec 27 07:46:43 Storione sendmail[31370]: hBRFkgD31370: from=<hash_03953260@localhost.localdomain>, size=335, class=0, nrcpts=1, msgid=<Pine.LNX.4.21.0312270746420.31368@localhost.localdomain>, proto=ESMTP, relay=root@localhost
Dec 27 07:46:45 Storione sendmail[31372]: hBRFkgD31370: to=<pine-count@docserver.cac.washington.edu>, delay=00:00:02, xdelay=00:00:02, mailer=esmtp, pri=30335, relay=docserver.cac.washington.edu. [140.142.32.171], dsn=2.0.0, stat=Sent (hBQEsv6t019223 Message accepted for delivery)
Dec 27 07:49:47 Storione sendmail[31374]: hBRFnl731374: from=<root@localhost.localdomain>, size=54456, class=0, nrcpts=1, msgid=<Pine.LNX.4.21.0312270746570.31368-100000@localhost.localdomain>, proto=ESMTP, relay=root@localhost
Dec 27 07:49:54 Storione sendmail[31376]: hBRFnl731374: to=<dragos_ro_bn@yahoo.com>, ctladdr=<root@localhost.localdomain> (0/0), delay=00:00:07, xdelay=00:00:07, mailer=esmtp, pri=84456, relay=mx1.mail.yahoo.com. [64.156.215.7], dsn=2.0.0, stat=Sent (ok dirdel)
-----------------------------------------------------------------------------------------
Questions:
4a) Looking at this file ... is it correct to say that someone is trying to use the mail server to retrieve information? What type of information?
4b) What kind of helpful information can I really get fromthis file?
4c) Could the emails to be the one the cracker uses?
There are so many other files with footprints like these (IP adresses, etc..)
however I have hard time to figure out how to trace back the cracker.
How do you really order all the ip adresses in order to find the one of the cracker. It seems kind of hard, and especially easy to arrive to wrong conclusions....
Any help is really appreciated.