LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 11-06-2007, 03:08 PM   #1
artur4
LQ Newbie
 
Registered: Nov 2007
Posts: 2

Rep: Reputation: 0
/bin/su security problem (probably crack)


I have very weird problem on one of the RHE4-4 servers: /bin/su accept any password for authentication. I have compared md5 checksum of the binary with working machines, it was all right. Then I upgraded coreutils rpm package to newer one, but that didn't fix the issue. If I ssh to root, it requires real password. I guess the computer got cracked. Reinstallation is not an option now. Please advise.

Thanks.
 
Old 11-06-2007, 03:40 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by artur4 View Post
/bin/su accept any password for authentication.
And it's not say PAM misconfiguration?


Quote:
Originally Posted by artur4 View Post
I have compared md5 checksum of the binary with working machines, it was all right.
You should compare with RPM contents from a trusted remote source, not running machines.


Quote:
Originally Posted by artur4 View Post
Then I upgraded coreutils rpm package to newer one, but that didn't fix the issue.
Great. Overwriting the package removes all traces of tampering, effectively annulling your own investigative efforts.


Quote:
Originally Posted by artur4 View Post
If I ssh to root, it requires real password.
Next mistake (hope you learn from them) SSH as root account user is NOT a SOP!


Quote:
Originally Posted by artur4 View Post
I guess the computer got cracked.
Don't assume, make certain. Use the "Intruder Detection Checklist (CERT)" http://www.cert.org/tech_tips/intrud...checklist.html as starting point.


Quote:
Originally Posted by artur4 View Post
Reinstallation is not an option now.
What does that mean? That you value anything over the security of your customers data and reliability of your servers?


Oh, and welcome to LQ, hope you like it here.
 
Old 11-06-2007, 04:22 PM   #3
artur4
LQ Newbie
 
Registered: Nov 2007
Posts: 2

Original Poster
Rep: Reputation: 0
Smile

Oh, I cracked the box by myself While migration from nis to openldap i changed pam configuration. Thank you for the hint.
That's not production server, but development one and it's connected to internal network only. However there're a lot of people have unix account on this box and they get connections from multiple offices. That's almost impossible to investigate all the connections, because we don't have any intrusion detection for internal boxes.
However my question was not related to investigation process. I was asking about preventing /bin/su to work with no password?
Thank you anyway.
 
Old 11-08-2007, 11:58 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by artur4 View Post
Oh, I cracked the box by myself While migration from nis to openldap i changed pam configuration. Thank you for the hint. (...) However my question was not related to investigation process. I was asking about preventing /bin/su to work with no password?
No, but investigation *should* be a first reflex when encountering this type of anomalies. Since you explained you modded your PAM config the answer to your question is to mod it back ;-p
 
Old 11-14-2007, 06:45 PM   #5
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
Moved: This thread is more suitable in the Linux Security forum and has been moved accordingly to help your thread/question get the exposure it deserves.
 
Old 11-14-2007, 07:06 PM   #6
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Quote:
Originally Posted by artur4
I have compared md5 checksum of the binary with working machines, it was all right.
FYI, you can validate a file against the source rpm on the CD/DVD installation source.

Use the -p option for package.

Example
rpm -qVp opensuse/suse/x86_64/coreutils-6.9-43.x86_64.rpm

I keep the installation dvd iso image in it's own partition so I don't have to grab the DVD. This is a bit of compromise but I don't think that would be as easy to hack given it's size, and because iso6990 is a read only filesystem.

Quote:
Originally Posted by artur4
it's connected to internal network only
If a hacker has compromised another computer on the local network, that could be used to launch an attack against the server. I think that hackers refer to this as cracking a nut. Hard on the outside, soft and meaty on the inside.
 
Old 11-14-2007, 07:12 PM   #7
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939
Just to clarify what's happening here, for the among us...

Like many operating systems, Linux offers you options for choosing how you want to handle authentication tasks ... such as determining whether a particular login should be accepted (and where and how to check it, and whether to require things like a badge, a fingerprint-reader, and so on).

The most common way that this is done, these days, is with a very clever system called Pluggable Authentication Modules, or simply "PAM."

As you can see from, say, man pam, this system allows you considerable control in setting-up authentication requests of all kinds .. not just for login, but for anything.

Even if your system uses ordinary passwords (and I sincerely hope that you're using "shadow" passwords), you'll find that the request-handling process is being routed through and controlled by PAM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cgi-bin security question greyhammer Linux - Security 0 08-03-2005 03:24 PM
Mandrake security freaked out, can't execute /usr/bin rhettg Linux - Security 3 09-08-2004 11:55 PM
Crack install problem help!? crealkillerI75 Linux - Software 0 08-09-2002 01:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 08:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration