Ethical Hacking

Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package.
Computer Forensics Training at InfoSec Institute

Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors.




Network Security Incidents
[Top] [All Lists]

Re: [incidents] SSH scans...

Subject: Re: [incidents] SSH scans...
Date: Mon, 20 Dec 2004 20:01:05 +0000

Dejan & Incidents users,

If you're running Linux, there is one easy limit within PAM that you can
make, to prevent the unauthorized compromise of unused accounts.

Most linux distro's ship with a PAM module called pam_succeed_if.so, in 
/usr/lib/security.

You can use this to limit logins, by any number of characteristics, but
login name is the one I use.

so, in /etc/pam.d/sshd, in place of:
account         required        pam.stack.so service=system-auth

I add a line like:
account         sufficient      pam_succeed_if.so login = username


and comment out the system-auth line:
account         sufficient      pam_succeed_if.so login = gbush
account         sufficient      pam_succeed_if.so login = tblair
account         sufficient      pam_succeed_if.so login = jhoward
#account        required        pam.stack.so service=system-auth

This limits logins to only the small number of users allowed to SSH in, 
and restricts other users, even if they have valid accounts.  For
instance, perhaps a mail-only users, or something. 

-Tim

-- 
Tim Kennedy                     ||      There are 10 types of people on Earth.
http://public.xdi.org/=tck      ||      Those who understand binary,
tim@timkennedy.net              ||      and those who don't.

<Prev in Thread] Current Thread [Next in Thread>