kasthack-labs / kasthack.GAS

[Deprecated] Stress-testing tool based on IRC-LOIC
12 stars 3 forks source link

Load testing campaign serialization #4

Open KOLANICH opened 11 years ago

KOLANICH commented 11 years ago

Here is old concept written by me

// JSON (comments are not JSON compatible)
{
    "version" : "0.9.0alpha",
    "description" : {
        "message" : "We are testing somebody's site to help him",
        "picture" : "http://myimagehosting.hosting/logo.gif", // logo of load testing campaign
        /*
        uri of the picture, https,http or data
        or about:builtin-pic:<built-in pic id>
         */

        "initator" : "Anonymous",
        "message" : "I wanna test my site very much. Anons, help me please. :>",
        "chat" : [//list of chats
            "irc:\\freenode.net\#loic",
            "ws:\\url.of.the\chat",

            /* type of a chat is determined by scheme
            irc:\\ - for irc
            ws:\\ - for websocket
             */

            /*
            websocket messages can be of 3 types
            the first is for posting
            it must receive :
            msg - message
            id - id of user
            returns either 0 or 1

            the second one is for receiving chat messages through websocket
            returns information serialized into json
            [{ts:epoch-time,t:'message text',a:{n:'nickname',c:'color'}},........]

            nick , color and user info fields are not required if the user is anonymous
            and the soft must write about it
            if the message is posted it returns 1
            if it is not it returns error code
            error codes are negative numbers
            -1 authorization required
            -2 YOU WERE BANNED
            -3 too fast
            -4 too large message
            -100500 internal error

            the third is for chat initiating , closing and modifying userinfo
            it must receive
            login
            password
            modify - json string of modifing parameters
            userid - id, received when logged in
            logout - 1 if logging out
            if logging in is completed it must return userid
            if it is'nt it must return error code

            -1 - login/pass incorrect / authorization required
            -2 - YOU WERE BANNED
            -3 - unable to change the prefs
            -100500 - internal error
            if you are logged in , you dont need to send login/pass, only your id
            (may be sent in cookie)
             */
        ]
    },
    "sync" : {
        "time" : {
            "since" : 123456789,
            "until" : 12345678910
        },
        //epoch-time of campaign starting and ending (optional)
        "commandcentre" : {
            "type" : "irc",
            "addr" : "loic.anonops.net/loic"
        },
        /* command centre address
        if it is set, time block must exist and have correct values
        the client programm will check command centres in specified interval of time
        the type can be:
        irc - standart hivemind or its extended version (will be developed further)
        web - script, which generates document like this or the document
        if the type is web, the vectors block is optional
        it will be used if the command centre is unawailable or returns document without vectors block
         */
    },
    "vectors" : {
        "vector" : {
            "type" : "email",
            /* type can be
            e-mail - field "target" must contain e-mail address, flood and wipe the mailbox
            fields "login", "password" and "message" must contain data needed for sending e-mails via smtp server
            http-flood - target scripts URLs

            http-slow-stream - DNS or URL
            pingflood - DNS

             */
            "target" : {
                "to" : {
                    // address of the target
                    "generator" : {
                        "type" : "pcre",
                        "count" : 10
                        /*Type can be:
                        pcre - see further
                        js - javascript code
                        it must contain Array function generate(Number count) which is used to generate info
                        generates "count": of strings and returns them in an array
                         */

                        /*PCRE template what is matched for address for campaign
                        for example, if pattern is /http\:\/\/badsite\.com\/search\.php?md5=[\dA-F]{32}\&s=\w{5,16}/
                        it means
                        http://badsite.com/search.php?md5=62CB4FA6F9C46C56DAAE0D4EAEAB6667&s=yfda_fs
                        or similar
                         */
                    }
                }
            },
            "settings" : {
                "login" : "", //login for mail server, optional
                "password" : "", //optional
                "smtp" : "", //optional
                "message" : {
                    "morph" : true, // enable morphing to avoid filters
                    "text" : "Dear Mr. Smith.\nWe are very glad to help you by sending the pictures you had requested to help you to test your mail server.<img src=\"http://myimagehosting.hosting/shit1.jpg\"/><img src=\"http://myimagehosting.hosting/blackOverlord2.jpg\"/><img src=\"http://myimagehosting.hosting/dissection3.jpg\"/>Anonymous.",
                    "from" : "anon@anon.anon",
                    //etc
                },
                "postparams" : {
                    //parameters for HTTP POST requests
                    "search" : "qwerty",
                    "sort" : {
                        "generator" : "/(relevant|date|votes|ratio|HATELVL)/"
                    },
                }
            }
        }
    }
}
kasthack commented 11 years ago

Лень же. К тому же, пока не прикручен хайв, в этом не будет особо смысла.

KOLANICH commented 11 years ago

Зато когда будет прикручен... Вообще hivemind должен быть hivemindом - всё должно хранится в децентрализованной БД. Общение - можно пока централизованно (не уверен, что возможно сделать достаточно отзывчивый децентрализованный чат).

kasthack commented 11 years ago

Зато когда будет прикручен...

Не уверен, что это будет совсем скоро - на первом месте сейчас оптимизация атак, а времени от работы и так почти нет - последний коммит сюда был ещё 2 месяца назад. Кроме того, код хайва нельзя просто вытащить из поделия NewEraCracker'а - там безумное спагетти, придётся переписать с нуля.

всё должно хранится в децентрализованной БД

С ужасом представляет объём кода, необходимый для подобного По идее можно сделать на DHT с RSA-подписями, но не уверен в необходимости этого - для реальных задач, имхо, хватит поддержки I2P/Tor(код уже был где-то).