Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[gentoo-user] Enter ROOT pasword THREE TIMES ONLY

2 views
Skip to first unread message

Joseph

unread,
Dec 23, 2004, 12:50:07 AM12/23/04
to
Is it possible to configure Linux to accept root password limited number
of time (let say three times ONLY); and if the password is not correct
the user would need to shut down the system and restart it manually for
security reason.

There is an interesting article on CNet "Linux lasting longer against
Net attacks"
http://news.com.com/Linux+lasting+longer+against+Net
+attacks/2100-7349_3-5501278.html?tag=nefd.top

and based on the article most of the successful comprise were based on
dictionary based attack on poor quality root password.

So, I was thinking that if would be possible to limit the number of
times the root password can be entered in single session (it would
eliminate dictionary style attack) if the user was forced to shut down
the system manually and restart it to retry it. Of course it could be
optional and configurable what action should be taken if the password is
incorrect.

--
#Joseph

--
gento...@gentoo.org mailing list

Francesco Talamona

unread,
Dec 23, 2004, 2:10:07 AM12/23/04
to
On Thursday 23 December 2004 06:45, Joseph wrote:
> Is it possible to configure Linux to accept root password limited
> number of time (let say three times ONLY); and if the password is not
> correct the user would need to shut down the system and restart it
> manually for security reason.

Are you sure it is what you want? Do you want your machine being forced
to shutdown for every failed login? IMHO you are issuing a DoS against
yourself...

Ciao
Francesco
--
Linux Version 2.6.10-rc3, Compiled #2 Sat Dec 18 18:16:29 CET 2004
One 1.53GHz AMD Athlon XP Processor, 1.5GB RAM, 3022.84 Bogomips Total
macula

--
gento...@gentoo.org mailing list

vg`Braindead_One

unread,
Dec 23, 2004, 2:10:09 AM12/23/04
to
Joseph wrote:

This will open a very nice dos-opportunity. If you got a static ip an
attacker would be able to enter 3 wrong passwords vis ssh before you
even get a login-prompt ;)

--
gento...@gentoo.org mailing list

Matthew Cline

unread,
Dec 23, 2004, 9:20:09 AM12/23/04
to
> >So, I was thinking that if would be possible to limit the number of
> >times the root password can be entered in single session (it would
> >eliminate dictionary style attack) if the user was forced to shut down
> >the system manually and restart it to retry it. Of course it could be
> >optional and configurable what action should be taken if the password is
> >incorrect.

Wouldn't it just be better to not allow remote root logins via ssh?


Matt

--
gento...@gentoo.org mailing list

David Rea

unread,
Dec 23, 2004, 9:30:12 AM12/23/04
to
Quoting Joseph <sys...@interbaun.com>:

> Is it possible to configure Linux to accept root password limited
> number
> of time (let say three times ONLY); and if the password is not
> correct
> the user would need to shut down the system and restart it manually
> for
> security reason.

I believe there is a way in the sshd configuration to restrict root
logins to console only. This way in order to work as root from an
untrusted network, you would have to first log in as a non-priveliged
user, then use the `su` command to gain root privs.

This wouldn't completely eliminate the possibility of an attacker on an
untrusted network gaining root access, but it would slow them down
significantly since they'd have two different passwords to break. This
would a) buy you time and b) give a tool like tripwire more
opportunities to discover the attack.

Dave


--
gento...@gentoo.org mailing list

David Morgan

unread,
Dec 23, 2004, 10:10:12 AM12/23/04
to
On Thu, 23 Dec 2004 09:23:04 -0500, David Rea <da...@daverea.com> wrote:
>
> I believe there is a way in the sshd configuration to restrict root
> logins to console only. This way in order to work as root from an
> untrusted network, you would have to first log in as a non-priveliged
> user, then use the `su` command to gain root privs.
>
> This wouldn't completely eliminate the possibility of an attacker on an
> untrusted network gaining root access, but it would slow them down
> significantly since they'd have two different passwords to break. This
> would a) buy you time and b) give a tool like tripwire more
> opportunities to discover the attack.
>
> Dave
>

You should be able to get su to mail you when someone enters the wrong
password (I've done this with either su or sudo, so you can definitely
do it with one of them, but I'd imagine you can do it with both). This
doesn't help you from stopping the attack if you aren't at your
computer, but it's still useful to know.

I don't know if this is possible, but depending on whether or not you
need root privs remotely you could set up a user account that's not in
the wheel group and have that be the only account that's allowed to
login via shh. Of course, nothing is more secure than just not having
sshd running when you don't need it (fex, if you only ever use it
between certain times you could set up cron jobs to start and stop it
at appropriate times). ssh should be fairly secure anyway though, it
just depends on how paranoid you are.

--
gento...@gentoo.org mailing list

Michael Sullivan

unread,
Dec 23, 2004, 12:20:11 PM12/23/04
to
I think the person meant that someone local to the computer being attacked would have to reboot the computer before being able to log in as root (if this option were activated.) Rebooting a computer under ordinary circumstances would take less than two minutes. I don't think it would pose that much of a problem, and besides, it's the administrator's choice whether that option would be activated or not...

--
gento...@gentoo.org mailing list

Matthew Cline

unread,
Dec 23, 2004, 12:30:14 PM12/23/04
to
> I think the person meant that someone local to the computer being attacked would have to reboot the computer before being able to log in as root (if this option were activated.) Rebooting a computer under ordinary circumstances would take less than two minutes. I don't think it would pose that much of a problem, and besides, it's the administrator's choice whether that option would be activated or not...
>

I thought the concern was remote access, seeing as how the article he
linked to dealt with remote attacks against Linux machines.

If you have someone with local access to your computer trying to brute
force attack the root password, then that brings up issues of physical
security.

Ionut Nicu

unread,
Dec 23, 2004, 1:50:08 PM12/23/04
to
sshd can be configured not to accept root logins.
There's the "PermitRootLogin" option in /etc/ssh/ssh_config that can
be set to "no".
The default value is "yes".

IMHO having PermitRootLogin set to no and a fairly good password
policy for the users of your server is a pretty good protection
against those sshd brute-force
attacks.

I think the idea of having to reboot your machine after 3 repeated
unsuccesful logins is just unacceptable.

--
gento...@gentoo.org mailing list

Brant Katkansky

unread,
Dec 23, 2004, 3:50:08 PM12/23/04
to
On Wed, 22 Dec 2004 22:45:55 -0700, Joseph <sys...@interbaun.com> wrote:
> [snip] based on the article most of the successful comprise were based on

> dictionary based attack on poor quality root password.

I've always beleived that simple problems frequently demand simple answers.

If the problem (successful compromise of system via brute force
dictionary attack) is a result of a poor quality root password, it
would seem that the solution is simple: choose a quality root
password. Limit root logins to the console while you're at it too.

--
gento...@gentoo.org mailing list

0 new messages