LinuxQuestions.org
Review your favorite Linux distribution.
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 08-05-2010, 06:46 PM   #16
claude56
LQ Newbie
 
Registered: Jun 2004
Distribution: Linux Mandrake 9.2/Mandriva Spring '08
Posts: 15

Original Poster
Rep: Reputation: 0

Quote:
...changes as PAM configuration files do not contain privacy-related information unless non-root specific account names are used in configuration lines which would be rather uncommon
.

I'm not concerned about my privacy as much as showing the world how to do something they may not know how to do. Its not exactly easy to find. Before I found it, I googled and googled 'terminal not requesting password' and the like to no avail.

The offending file was /etc/pam.d/system-auth which contained the line:

auth sufficient pam_permit.so

As follows:

auth required pam_env.so
auth sufficient pam_permit.so
auth sufficient pam_unix.so try_first_pass likeauth nullok
auth required pam_deny.so

account sufficient pam_unix.so
account required pam_deny.so

password required pam_cracklib.so try_first_pass retry=3 minlen=0 dcre
password sufficient pam_unix.so try_first_pass use_authtok nullok md5 sha
password required pam_deny.so

session optional pam_keyinit.so revoke
session required pam_limits.so
session [success=1 default=ignore] pam_succeed_if.so service in crond quiet
session required pam_unix.so


Quote:
Checking the terminal hole....
I wasn't in the office at the time to check but did later and it was okay.

Quote:
And thus the value of regularly running a file integrity checker (Samhain, Aide or even tripwire) on the system. Also RPM-based systems have 'rpm' commands allowing you to 0) verify permissions (-V) and 1) restore default permissions (--setperms).
Never heard of those programs and didn't know rpm could do that. Thanks for the tips. Will do.


Quote:
I just hope that statement was backed up by lack of evidence in logs and the file systems.
Absolutely. I may be an ignorant administrator but I'm not so dumb that I don't realize it! I check my logs daily in case I messed up.

Quote:
Where other root-owned processes need to read /etc/shadow the permissions may be set to octal 0440 but AFAIK by default /etc/shadow should have octal 0400 permissions. This does not impede root in any way modifying it.
Understood, I'm changing to 0400.

Quote:
...this then offers non-root users unlimited access to about any part of the system.
I just can't get my head wrapped arount this. I'm running 3 services which would allow a public user access to my system; webmin, sshd and postfix. So they got in to smtpd and they could do what? Relay mail? What else could they possibly do with smtpd access? All my mail users have smtpd access and I dare say in a large system many of those with smtpd access can't be trusted anymore than a stranger to wander around a server. Sshd is running without password access so without an rsa key, all you get is a failed login. With fail2ban, all you get is 3 tries. The webmin log was intact. If I can believe the log, no one got in except me.

Anyway, I'm replacing server2 as we speak because its old and has some hardware issues developing. The new server, server4, will have Mandriva 2010 installed and I will carefully and selectively migrate configurations over one at a time after checking them. Server3, the one with the smtpd break-in, will be next, and I'll do the same.

Last edited by claude56; 08-05-2010 at 06:55 PM.
 
Old 08-05-2010, 07:14 PM   #17
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599Reputation: 3599
Quote:
Originally Posted by claude56 View Post
auth sufficient pam_permit.so
ROTFL! Nice trick. (BTW, seems pam_succeed_if could be used that way too.) A GNU/Tiger patch for checking this (as these modules shouldn't precede pam_unix or be in the auth section anyway) would be cool.


Quote:
Originally Posted by claude56 View Post
I just can't get my head wrapped arount this. I'm running 3 services which would allow a public user access to my system; webmin, sshd and postfix. So they got in to smtpd (..). Sshd (..). The webmin log was intact. If I can believe the log, no one got in except me.
Over the years I've learned that speculation certainly is an entertaining pastime but most of the time it doesn't lead anywhere practically speaking. I'd rather deal with cold hard evidence and data correlation. Do your any of your MTA users have local accounts? Which users accessed the system itself (checking from the time before the first symptoms appeared)? Have you checked their and root shell history files?


Quote:
Originally Posted by claude56 View Post
Anyway, I'm replacing server2 as we speak because its old and has some hardware issues developing. The new server, server4, will have Mandriva 2010 installed and I will carefully and selectively migrate configurations over one at a time after checking them.
Congrats on your good choice!
* If you would like hardening advice I'd suggest opening a new thread.


Quote:
Originally Posted by claude56 View Post
Server3, the one with the smtpd break-in, will be next, and I'll do the same.
Until you're done, if any accounts are shared between systems you might want to give those a wee bit extra TLC?..
 
Old 10-07-2010, 10:32 AM   #18
doublejoon
Member
 
Registered: Oct 2003
Location: King George, VA
Distribution: RHEL/CentOS/Scientific/Fedora, LinuxMint
Posts: 370

Rep: Reputation: 44
look for "nullok" string in any file /etc/pam.d
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Users without passwords ahmedb72 Solaris / OpenSolaris 1 08-22-2007 05:05 AM
passwords for new users r.stiltskin Linux - Security 2 02-08-2006 05:21 AM
Users ressetting passwords pbickerd Linux - Security 4 01-11-2006 01:05 PM
Help with users and passwords???? graystarr Linux - Software 3 04-21-2003 09:40 AM
logging passwords (using PAM) markus1982 Linux - General 1 03-26-2003 02:30 AM

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

All times are GMT -5. The time now is 08:25 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