Git Product home page Git Product logo

mirai's Issues

Can't compile bot binary

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?

Telnet connection

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.