Input map server storage

Questions / Announcements area for beta tests of Allegiance's future updates.
CharlieTester
Posts: 12
Joined: Thu Jun 17, 2010 8:53 pm

Post by CharlieTester »

Zruty wrote:QUOTE (Zruty @ Aug 23 2010, 02:40 PM) I AM NOT SURE.
then stfu?



the key for the scramble is some of the version info for the client binary - this limits only developers (or @#$%@#s that can build the code) to be able to, at most, set your cloud input map to something you don't expect. that's the worse that can happen - a custom build is a prerequisite. and u have to match the version info which is unique to a release - still a PITA and the worst that could happen is you have to re-config your controls again (arg!)
TheBored
Posts: 4680
Joined: Thu Jun 24, 2004 7:00 am
Location: At my desk staring at my monitor...

Post by TheBored »

fuzzylunkin1 wrote:QUOTE (fuzzylunkin1 @ Aug 23 2010, 03:47 PM) It will change soon if you ungrateful $#@!s keep complaining about it.
You're only proving his point :unsure:

TB
Image
spideycw wrote:QUOTE (spideycw @ Nov 28 2008, 02:50 PM) All the retards are contained in one squad mostly (System X)
[18:48] <Imago> dont take me seriously
CharlieTester
Posts: 12
Joined: Thu Jun 17, 2010 8:53 pm

Post by CharlieTester »

TheBored wrote:QUOTE (TheBored @ Aug 23 2010, 03:07 PM) You're only proving his point :unsure:

TB


same case here

the worst that could happen is you have to re-config your controls again (arg!)
the.ynik
Posts: 101
Joined: Fri Apr 17, 2009 7:23 pm
Location: Germany

Post by the.ynik »

CharlieTester wrote:QUOTE (CharlieTester @ Aug 23 2010, 09:50 PM) the key for the scramble is some of the version info for the client binary - this limits only developers (or @#$%@#s that can build the code) to be able to, at most, set your cloud input map to something you don't expect. that's the worse that can happen - a custom build is a prerequisite. and u have to match the version info which is unique to a release - still a PITA and the worst that could happen is you have to re-config your controls again (arg!)
Uh, and what prevents me from extracting the version information from the officially released build?
Yeah some coding experience is required to perform this exploit, your average anarchist won't mess up any input maps. I would consider this pretty harmless if it was not for the fact that the input map loading code was:
- written by Microsoft
- written in 199x
- never was intended to accept data downloaded from the net
- never went through any security review

As far as I can currently tell, anyone with some coding skills can extract the version info from the client binary, scramble someone else's callsign, upload some buffer-overload-exploiting binary to the cloud, and wait for the victim to press that load button. Mission achieved: full control over the victim's computer.

Sure, given how small the Alleg community is, it's very unlikely that anyone has both the skills and will to pull this off. But it's an unnecessary risk.

Sorry if this stuff is a bit far-fetched, but I'm paranoid when it comes to network security.
Last edited by the.ynik on Mon Aug 23, 2010 8:34 pm, edited 1 time in total.
Imago
Posts: 1440
Joined: Tue Sep 23, 2003 7:00 am
Location: Minneapolis, MN
Contact:

Post by Imago »

<pkk|GB> anyway, your system isnt perfect, but it can made perfect with some help of TE

i acknowledge this and agree with pkk

what more do you want from me?
Image

These bugs haven't been fixed yet because don't have any developers interested in fixing them up. --Tigereye
Imago's stupid-sensor is supersensitive. --RealPandemonium
The art is managing the flow of the drama to achieve the desired results. --Big_Beta_Tester
joeld wrote:But we’ve been amazed at the level to which some of the Allegiance fans have remained hard-core.
Imago
Posts: 1440
Joined: Tue Sep 23, 2003 7:00 am
Location: Minneapolis, MN
Contact:

Post by Imago »

LoadMap is safe from buffer overflow BTW
Image

These bugs haven't been fixed yet because don't have any developers interested in fixing them up. --Tigereye
Imago's stupid-sensor is supersensitive. --RealPandemonium
The art is managing the flow of the drama to achieve the desired results. --Big_Beta_Tester
joeld wrote:But we’ve been amazed at the level to which some of the Allegiance fans have remained hard-core.
Imago
Posts: 1440
Joined: Tue Sep 23, 2003 7:00 am
Location: Minneapolis, MN
Contact:

Post by Imago »

TheBored wrote:QUOTE (TheBored @ Aug 23 2010, 03:07 PM) You're only proving his point :unsure:

TB
again, here, the worst that can happen is you have to re-configure your keys and controls.
Image

These bugs haven't been fixed yet because don't have any developers interested in fixing them up. --Tigereye
Imago's stupid-sensor is supersensitive. --RealPandemonium
The art is managing the flow of the drama to achieve the desired results. --Big_Beta_Tester
joeld wrote:But we’ve been amazed at the level to which some of the Allegiance fans have remained hard-core.
pkk
Posts: 5419
Joined: Tue Jul 01, 2003 7:00 am
Location: Germany, Munich

Post by pkk »

This is how callsign gets decoded, before input map get's uploaded/downloaded from storage server.

src/Wintrek/trekinput.cpp

Starting the save process:

Code: Select all

MprThread* threadp = new MprThread(doSaveInputMap, MPR_NORMAL_PRIORITY, (void*)pzName, "Allegiance inputmap post thread");
the save function itself (at least the interesting part):

Code: Select all

    //Imago #176 7/10 - Similar to doASGS/doDump
    static void doSaveInputMap(void* data, MprThread *threadp) {
        ZString * szName = (ZString *)data;
        ZString strName = szName->GetToken();

        if ((isalnum(strName[0]) == 0) && (strName.Left(1) != "_"))
            strName = strName.RightOf(1);

        if (int leftParen = strName.ReverseFind('(',0))
            strName = strName.LeftOf(leftParen-1);

        debugf("****** posting input map for:\n\tBefore: %s\n",(PCC)strName);
        ZVersionInfo vi; ZString zInfo = (LPCSTR)vi.GetCompanyName(); zInfo += (LPCSTR)vi.GetLegalCopyright();

// scrambles callsign with company name/legal copyright (see above)
        strName = strName.Scramble(zInfo);

        char* p = new char[strName.GetLength()];
        Strcpy(p,(PCC)strName);

// generates number from scrambled callsign
        strName = UTL::char2hex((const unsigned char*)p, strName.GetLength());

        debugf("\tAfter: %s\n",(PCC)strName);

        //sanity check....
        MprSocket* socket = new MprSocket();
        socket->openClient("build.alleg.net",80,0);
        int iwrite = socket->_write("GET /\r\n");
        delete socket;
        if (iwrite != 7) return; 

        MaClient* client = new MaClient();
        client->setTimeout(10000);
        client->setRetries(1);
        client->setKeepAlive(0);
        int contentLen = 0; char *content;

// Put inputmap into a archive
        int iSize = Create7z(GetModeler()->GetArtPath() + "/" + INPUTMAP_FILE + ".mdl", GetModeler()->GetArtPath() + "/" +INPUTMAP_FILE + ".7z");

// uploading starts below (cut, see original code)
pzName is your nickname, shown on lobby. That variable is already used by tons of other functions within Allegiance. And yes, ASGS sets that var. ;)

That's the only information of ASGS used on ticket #176.

Suggested improvement:
That "decryption" is pretty useless. It would be more secure, if you use a ASGS generated account assigned hash/ID (client can authenticate the same way like lobby verifies clients "authtoken" to get it). So you could use the same inputmap on all your "hiders".
Last edited by pkk on Mon Aug 23, 2010 9:30 pm, edited 1 time in total.
The Escapist (Justin Emerson) @ Dec 21 2010, 02:33 PM:
The history of open-source Allegiance is paved with the bodies of dead code branches, forum flame wars, and personal vendettas. But a community remains because people still love the game.
notjarvis
Posts: 4629
Joined: Tue Jun 03, 2008 11:08 am
Location: Birmingham, UK

Post by notjarvis »

Frankly. I would like the option to turn this functionality off.

No drama filled reason about personal data or anything,

I have to play from laptop rather than my normal desktop from time to time, and the keymap is pretty different on there.

I hate the idea of having to mess around every time I switch PCs, and never had a real problem with redoing/saving my keymaps manually to be honest, so i would like this functionality off for my own setup.

Edit:
To clarify I'm using a different joystick too, so the button mappings are different on that, and I map other keys different.
Last edited by notjarvis on Mon Aug 23, 2010 9:59 pm, edited 1 time in total.
peet
Posts: 4972
Joined: Sun Jul 16, 2006 6:57 pm
Location: Holland

Post by peet »

Is the "problem" not a clash of ego's in stead of a "technical" problem?

If it is pure technical, why not post it in a forum were technical people participate (and understand)?

If you post it to get players input, I suspect you might get 1000 different opinions, hence getting nowhere.
Image
Post Reply