jgamblin /Mirai-Source-Code

Leaked Mirai Source Code for Research/IoC Development Purposes

★ 9,595⑂ 3,537👁 545⑃ 24● 0▤ 0
CGPL-3.0Created 2016-10-02
+0
日增长
9,595
stars
3,537
forks
545
watchers
24
prs
0
issues
0
releases

README

Mirai Source Code
---

 🔧 Requirements

Before building and running this code, ensure you have the following installed on a Linux host:

- gcc - GNU Compiler Collection
- golang - Go programming language
- electric-fence - Memory debugging library
- mysql-server - MySQL database server
- mysql-client - MySQL database client
- build-essential - Essential build tools
- crossbuild-essential-armel - Cross-compilation tools for ARM

Additional Resources:
- For detailed setup instructions and background information, refer to the original leak post in ForumPost.txt or view the formatted version at ForumPost.md.


⚠️ CRITICAL DISCLAIMER  
This repository contains the leaked source code of the Mirai botnet, originally created to infect IoT devices and launch large-scale DDoS attacks. This code is provided strictly for cybersecurity research, reverse engineering, malware analysis, and detection development purposes only.

⚠️ WARNING: Do not use this code to attack or scan any real devices or networks. Unauthorized use is illegal and violates GitHub policy.

🛡️ SECURITY NOTICE: The zip file for this repo is being identified by some AV programs as malware. Please take caution.

---

 📋 Table of Contents

- About Mirai
- Repository Structure
- Requirements
- How to Use (Lab Research Only)
- Learning Use Cases
- Do NOT Use For
- References
- Credits
- Acknowledgments

---

 📌 About Mirai

Mirai is a malware botnet that infects Internet of Things (IoT) devices using default or weak login credentials. Once infected, these devices are controlled by a command-and-control (CnC) server and can be used to launch DDoS attacks.

This repo is a fork of the original leaked source code and includes components such as:
- The bot (runs on IoT devices)
- The CnC server
- The loader (infects devices)
- Scanning and deployment scripts

---

 📁 Repository Structure

| Folder/File       | Description                                           |
|-------------------|-------------------------------------------------------|
| mirai/          | Core malware source code (bot + CnC server)          |
| loader/         | Infects vulnerable devices using telnet brute-force  |
| dlr/            | Possibly supports payload delivery (optional)        |
| scripts/        | Scripts for building and managing the malware        |
| ForumPost.txt   | Original forum post by author explaining Mirai       |
| LICENSE.md      | License as included in original leak (not official)  |
| README.md       | You’re reading it                                     |

---

 ⚙️ How to Use (FOR LAB RESEARCH ONLY)

 You must use isolated VMs or an offline network. Never run this on a real device or public network.

 🔧 1. Prerequisites

Install on a Linux host:

bash
sudo apt update
sudo apt install gcc make build-essential git crossbuild-essential-armel -y


 🔨 2. Clone the Repository

bash
git clone https://github.com/jgamblin/Mirai-Source-Code.git
cd Mirai-Source-Code


 🔨 3. Build the Bot and CnC

bash
./build

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON