Operating System - HP-UX
1819801 Members
2952 Online
109607 Solutions
New Discussion юеВ

Syslogd daemon & Security

 
SOLVED
Go to solution
Rita C Workman
Honored Contributor

Syslogd daemon & Security

OK..I'm open for any suggestions or thoughts how this may happen. Here goes:
First I have inetd logging all connections to syslog. We've been 'touched' a couple times by some curious college students before so I turned it on....seems that Firewall isn't so burn proof. I keep telnet and ftp limited to specific IP ranges. But I had not closed 'every' port.

Noticed the other day that there were duplicate syslogd daemons running. I stopped them and restarted syslogd. Checked before I left and it was fine. Got in this morning and voila...syslogd daemon is now stopped.
Noticed that the default rights to starting this are rx for owner/group/others...I changed it now to rx for owner/group only.
...This is a definite problem to me....it would appear that someone does not want me to know they are there.

Any ideas how this could be happening....??
Or am I just being paranoid...??
Any suggestions would be greatly appreaciated [ Think I may take a look at going to those HP Security Classes I hadn't gotten around to yet...]

Thanks,
9 REPLIES 9
Cheryl Griffin
Honored Contributor
Solution

Re: Syslogd daemon & Security

Rita,
Certainly, syslogd dying sounds suspicious.

This may not help troubleshoot hacking, but may help expedite your awareness of being hacked. You could run a script that continually looks for syslogd, if it dies or is killed, a page could be sent or have it call your cell phone, etc.

The syslogd process is recorded in /var/run/syslog.pid or obtained from ps.
Certainly someone here may already have a script you could adapt.

There's 3rd programs that can do this also. swatch http://www.engr.ucsb.edu/~eta/swatch or http://www.stanford.edu/~atkins/swatch
Logsurfer ftp://ftp.cert.dfn.de/pub/tools/audit/logsurfer/
Big Brother System and Network Monitor http://www.bb4.com/

Best of Luck. I hope you shut the hackers down.
Cheryl
"Downtime is a Crime."
Cheryl Griffin
Honored Contributor

Re: Syslogd daemon & Security

Rita,
In addition to my last post...
Those packages I mentioned actually monitor syslog for certain messages. I would think they also can monitor if syslog is dead.
"Downtime is a Crime."
Darrel Louis
Honored Contributor

Re: Syslogd daemon & Security

Rita,

You're correct, taht everybody can start the syslog syslogd.

Some commands to use:
- pwck (Check password file)
- grpck (Group Check)
- crontab entry's (to see if somebody has scheduled anythig strange)
- /etc/lastb -R
- /etc/last -R

add a simple line in /etc/profile, which get login information during login and add it to a file.

etc.

Rita fill them alive.

Good Luck
CHRIS_ANORUO
Honored Contributor

Re: Syslogd daemon & Security

Yeah Rita, you definitely can't do without the security courses.

Best regards and happy Xmas!
When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
Bill Hassell
Honored Contributor

Re: Syslogd daemon & Security

From your descriptions, I would assume you have been hacked already. You should take immediate steps to close down the system and look for evidence of security breaches. Start with a new root password, then run pwck and grpck and look for duplicate UID numbers or other warnings.

Normally, a sophisticated hacker will install a 'root kit' once they have broken in. This kit replaces key programs such as login, syslogd, passwd, and so on. syslog.log is one of the first files to be compromised as it tracks (or can track) a lot of system activity.

Shutdown /etc/inetd.conf by removing/commenting-out all unnecessary services. A starting point is to leave only:

ftp telnet auth echo

then make sure /var/adm/inetd.sec has restricted ftp, echo and telnet to specific ranges of IP addresses. You can leave auth open to all. Run inetd -c to re-read the above changes.

Check /etc/syslog.conf date: is it recent? If so, it may have been hacked to eliminate logging of certain events. If you aren't logging ftpd, consider turning that on in inetd.conf (and check all other daemons for logging options). Save a copy of syslog, btmp, wtmp, sulog and shutdownlog on a secure system. Use last and lastb to decode logins and attempted logins. Look in shutdownlog for unauthorized reboots (most machines are hacked from the inside simply by forcing a reboot into single user mode--only physical access is needed to the console)

Consider echoing all syslog events to a separate, more secure server. This is done in syslog.conf by replacing a specific filename with (or appending to) @ remote.system.com or whatever. This gets the info off the affected server.

Consider running swverify against the HP-UX packages to see if altered binaries have been installed.

Take a look at RFC 1244 which is a detailed (but somewhat dated). For all RFC's go to: http://www.faqs.org/rfcs/, or specfically: http://www.faqs.org/rfcs/rfc1244.html for the security document.

You mentioned your firewall..contact the vendor to see if vulnerabilities have been reported and if there is an update. Replace any machine used as a firewall if it does not have a subscription service to update to the latest level of protection.

HP offers a new security product called the Praesidium Intrusion Detection System or IDS/9000. It runs on HP-UX version 11 and higher.

This short answer is in no way a complete guide to handling security issues. Definitely get as much information as you can and consider company-wide policies and procedures immediately (those hot projects can wait).


Bill Hassell, sysadmin
Rita C Workman
Honored Contributor

Re: Syslogd daemon & Security

Thanks for the suggestions...I will be looking into taking the classes.
I am already writing up something to monitor to ensure that syslogd is kept running....
and I'll start trying everything else you mentioned.
Unfortunately, shutting down is not an option....they tend to frown on it when I stop access on the one of the main production system to the entire state !!

This is not going to be fun....

Thanks again !
Rita
CHRIS_ANORUO
Honored Contributor

Re: Syslogd daemon & Security

Check this link for additional information http://forums.itrc.hp.com/cm/QuestionAnswer/1,1150,0xa9c3d06ed8c8d4118fef0090279cd0f9,00.html
When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
CHRIS_ANORUO
Honored Contributor

Re: Syslogd daemon & Security

Visit the excellent security related site: http://www.securityfocus.com and http://www.sans.org
for more information on exploits.

When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
Rita C Workman
Honored Contributor

Re: Syslogd daemon & Security

I just thought I'd let you know...I pretty much think I have nailed down who my little 'curious George' is. And it's someone in-house......


Ahhhhh, at least I know is isn't from outside. And this inside thing - will get resolved.

Thanks again for everything.....enjoy the points !!