Hi, im brasilian, sorry for bad english ok? Well, im writing one honeypot, look:
#!/bin/bash
echo ""
echo `cat /etc/welcome.pot`
echo ""
echo -n "login: "; read usuario
echo -n "Password: "
#stty -echo
read -s senha
#stty echo
exit
Running it in localhost, thats right:
kurumin@servidor:~$ honey.pot
FreeBSD/i386 (servidor) (ttyp0)
login: root
Password:
dear friend, the pass is root, and user root
Good, then I:
$ sudo cat "telnet stream tcp nowait root /usr/bin/honey.pot" >> /etc/inetd.conf
And:
kurumin@servidor:~$ telnet servidor
Trying 127.0.0.1...
Connected to servidor.
Escape character is '^]'.
FreeBSD/i386 (servidor) (ttyp0)
login: root
Password: root
, and user rootpass is root
Two things: The password is not hide and the message in the end.
OK, trying the command stty -echo:
login: root
Password: stty: standard input: Invalid argument
stty: standard input: Invalid argument
What is the problem?? Some in telnet??? I dont know..
Thanks!!