Author Topic: NOTICE: NWN Authentication Server Down  (Read 9161 times)

Legacy_MasksandLanterns

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
NOTICE: NWN Authentication Server Down
« Reply #60 on: July 07, 2011, 02:51:27 pm »


               Come on Bioware, don't keep your loyal players and communties in the dark, give us an update on what is going on please? My community is having to keep its server offline as we've had people swiping other's characters. We'd really appreciate an update on this.
               
               

               
            

Legacy_FunkySwerve

  • Hero Member
  • *****
  • Posts: 2325
  • Karma: +0/-0
NOTICE: NWN Authentication Server Down
« Reply #61 on: July 07, 2011, 06:37:02 pm »


               

SuperFly_2000 wrote...

FunkySwerve wrote...
Why has it been down? Seriously, slap some cd key authentication of your own down and fire it up.  I'm happy to provide the scripts - they're very straightfoward, and provide at least MS-quality protection.


Why do you need to use a custom auth thingie?

I mean why not do like every other servers and just ignore this?

You mean just because auth fails anyone can log in to your account. Isn't it just when auth is totally OFF on the server (server ini-file) that thoose kinds of problems arise? ...or is there something I am not getting..?


Sure, you can just use the ini as well, though it causes massive ini bloat. I think there might also be a problem with only turning it on now, only after the MS is donw, but I'm not sure, as I've never used it. Custom-scripted solutions are quite straightfoward, and HG is far from the only one using them. They also allow more flexibility, I believe - ours lets you store up to 7 different keys for an account. But hey, if they want to shut down their servers until the MS is back up, more players for us. '<img'>

Funky
               
               

               
            

Legacy_FunkySwerve

  • Hero Member
  • *****
  • Posts: 2325
  • Karma: +0/-0
NOTICE: NWN Authentication Server Down
« Reply #62 on: July 07, 2011, 06:40:15 pm »


               

PlasmaJohn wrote...

2011-07-07 1210gmt

FunkySwerve wrote...

... Bioware had in fact responded and stated that they would bring the server back as soon as possible....

There's been an official statement released on or after June 29th?  Link?  I've poked around the various forums here but I can't claim it to be a rigorous search.

Not so far as I know - it seemed from your posts you hadn't see the one I quoted.

Funky
               
               

               
            

Legacy_IronRook

  • Newbie
  • *
  • Posts: 36
  • Karma: +0/-0
NOTICE: NWN Authentication Server Down
« Reply #63 on: July 07, 2011, 06:57:05 pm »


               Yes if the server doesnt come back online within another week ..please share your scripts ...because setting MS=0 and the Athentication =1 wont let players login,So I have password my server for now.
               
               

               
            

Legacy_Khuzadrepa

  • Sr. Member
  • ****
  • Posts: 347
  • Karma: +0/-0
NOTICE: NWN Authentication Server Down
« Reply #64 on: July 07, 2011, 07:15:11 pm »


               The official statement said that they are retooling the authentication. This does not happen overnight. They are developing something, and that takes time.
Patience is a virtue. Good things come to those who wait.
If you can't wait, in the meantime, FunkySwerve's suggestion of local authentication seems to be a very sound suggestion.
               
               

               
            

Legacy_Keviant

  • Newbie
  • *
  • Posts: 7
  • Karma: +0/-0
NOTICE: NWN Authentication Server Down
« Reply #65 on: July 07, 2011, 07:52:40 pm »


               True but with how Bioware are these days, one cannot be too careful or worried. If they forsake this, they'll probably lose almost their entire old school community but will not suffer much of a loss. Honestly; Mass Effect, Dragon Age and Jade Empire been a really big bore to me and my last string that brings me back to Bioware is Neverwinter Nights. We've all been patient for a very long time, constantly being as best as a community to a game can be. It's the reason why majority of the community is freaking out. Bioware isn't in this specific line of work anymore and if they wanted to drop all of us, they could.

I know they've been having a big slapfest with Atari but if they wanted to fix several things in Neverwinter Nights, they could if they wanted to. Along with this, I hope that Neverwinter(2011) isn't as bad as Neverwinter Nights 2 and lives up to a great expectation of a fine game and maybe even better than Neverwinter Nights 1. However, Neverwinter Nights 1 will always be where my heart lies and it's legacy hopefully never forgotten.
               
               

               


                     Modifié par Keviant, 07 juillet 2011 - 06:59 .
                     
                  


            

Legacy_Lomondra

  • Newbie
  • *
  • Posts: 34
  • Karma: +0/-0
NOTICE: NWN Authentication Server Down
« Reply #66 on: July 07, 2011, 08:31:02 pm »


               Can someone post instructions on how the simple user performs this "Local Authentication" then?

It would make me very happy to be able to play the multiplayer games using my own password and being assured that no one else can see my characters.  As it is now, anyone can use any password on any known GSID in NWN Multiplayer and see all the characters made.  Beyond that I don't know if they can wipe them, hack them or destroy them, but I imagine the blackhearted types will look into doing just this. At any rate, the method now for going in Multiplayer is not secure

So if this work around of "Local Authorization" fixes this, then can someone please post instructions please and thank you.
               
               

               
            

Legacy_zunath

  • Full Member
  • ***
  • Posts: 152
  • Karma: +0/-0
NOTICE: NWN Authentication Server Down
« Reply #67 on: July 07, 2011, 08:46:46 pm »


               

FunkySwerve wrote...

Alec Usticke wrote...

My server has been down for a week. I hope the Master Server returns soon.

www.bastionsofwar.com

Why has it been down? Seriously, slap some cd key authentication of your own down and fire it up.  I'm happy to provide the scripts - they're very straightfoward, and provide at least MS-quality protection.

Funky


Mind sharing the scripts then? Would be helpful for a lot of us. Thanks.
               
               

               


                     Modifié par zunath, 07 juillet 2011 - 07:47 .
                     
                  


            

Legacy_FunkySwerve

  • Hero Member
  • *****
  • Posts: 2325
  • Karma: +0/-0
NOTICE: NWN Authentication Server Down
« Reply #68 on: July 07, 2011, 09:47:12 pm »


               This is a modified repost from the Tales of the Silver Marchers Server Admin forum, where TSMDude has set up a forum for about 20 server admins to talk security, once it's been verified that they are in fact admins - posting some code can reveal vulnerabilities. In this case, however, there's little a determined troublemaker can glean from this code.
========Begin Repost=========
Here's a system to link cd keys to playernames. This system assumes you are using NWNX with MySQL or SQLite and the default pwdata database. It should be easy enough to tweak to another setup, including the default Bioware database - I can help if you like.

When a character logs in, it will automatically check their cd key from oncliententer, and compare it to a persistent variable  named PlayernameKey_<playername>, stored in the database. If that variable is not set, this is the first time that playername has logged in (at least since this system was installed). The key will be linked to their account by setting that variable, and they can proceed with play as normal, unaware that anything has happened. If the variable is already set, however, and it does not match they key they are using, they are booted. This setup allows you to accumulate CD Key info as you go, and assumes that the first login of an account is ligit - an assumption that held true on our server. It's technically possible someone else could get to it first, but the chances are small, since most need to see the account name in use first in order to steal it (unless it's known already). Generally, I think this is far preferable to server passwording, as it's less of an impediment to players, an the chances of a  non-legitimate first logger are quite small, and can be addressed as soon as the legitimate logger posts on the forums of your server reporting the account lockout.

This system is a little more complex than that, though. It also allows addition of multiple keys, up to 7, for a playername - you'd be amazed at how many players use more than one. On our server, it's done via a conversation fired from a item they get when they enter the docks. The conditional checks to make sure they don't already have 7 keys added (this one returns FALSE if they do).

#include "aps_include"
int StartingConditional()
{
    object oPC = GetPCSpeaker();
    string sPlayer = SQLEncodeSpecialChars(GetPCPlayerName(oPC));
    string sSQL = "SELECT val FROM pwdata WHERE name='PlayernameKey_" + sPlayer + "'";
    SQLExecDirect(sSQL);
    if (SQLFetch() == SQL_SUCCESS) /* there's at least one key stored already */
    {
        string sStoredKey = SQLGetData(1);
        int nLength =  GetStringLength(sStoredKey);
        if (nLength > 61) /* allow 7 keys max key-key-key-key-key-key-key    6 spacers + 7x8 keys = 62 */
        {
            return FALSE;
        }
        else return TRUE;
    }

    return TRUE; /* this should never be reached if your database is running, since the first key add is automatic oncliententer */
}

If they do not have the maximum allowed already, their account is marked as ready to accept a new key, and they are asked to logout, swap to the new key, and log in again. This is the action taken script for that line:


#include "aps_include"
void main()
{
    object oPC = GetPCSpeaker();
    string sPlayer = SQLEncodeSpecialChars(GetPCPlayerName(oPC));
    string sSQL = "UPDATE pwdata SET tag='Adding' WHERE name='PlayernameKey_"+ sPlayer + "'"; //must mark as adding
    SQLExecDirect(sSQL);
}

Here is the oncliententer code I mentioned at the outset, which should make more sense now that you know the procedure for adding keys:


#include "aps_include"

int VerifyPlayernameAgainstCDKey(object oPlayer) {
    int nBoot = FALSE;
    string sUnencoded = GetPCPlayerName(oPlayer);
    string sPlayer = SQLEncodeSpecialChars(sUnencoded);
    string sKey = GetPCPublicCDKey(oPlayer);
    string sStoredKey, sAddingKey;
    string sSQL = "SELECT val, tag FROM pwdata WHERE name='PlayernameKey " + sPlayer + "'";

    SQLExecDirect(sSQL);

    /* there's at least one key stored already */

    if (SQLFetch() == SQL_SUCCESS) {
        sStoredKey = SQLGetData(1);
        sAddingKey = SQLGetData(2);

        /* they indicated that they wanted to add a key this login */

        if (sAddingKey == "Adding") {

            /* their current key is not in the key string, add it unless at 7 keys already */
            if (FindSubString(sStoredKey, sKey) == -1) {
                int nKeyLength = GetStringLength(sStoredKey);

                /* allow 7 keys max key-key-key-key-key-key-key    6 spacers + 7x8 keys = 62 */
                if (nKeyLength > 61) {
                    nBoot = TRUE;

                    /* must mark as no longer adding */
                    sSQL = "UPDATE pwdata SET tag='Set' WHERE name='PlayernameKey_" + sPlayer + "'";
                    SQLExecDirect(sSQL);

                    /* add the key to the string */
                } else {
                    sSQL =
                        "UPDATE pwdata SET tag='Set',val='" + sStoredKey + "-" + sKey + "' WHERE name='PlayernameKey_" + sPlayer +
                        "'";
                    SQLExecDirect(sSQL);
                    DelayCommand(25.0, FloatingTextStringOnCreature("New CD Key Successfully Added!", oPlayer, FALSE));
                }


                /* let them know they already had this key in their string */
            } else {
                DelayCommand(25.0,
                    FloatingTextStringOnCreature("CD Key Addition Failed! This key already listed for this account!", oPlayer,
                        FALSE));

                /* must mark as no longer adding */
                sSQL = "UPDATE pwdata SET tag='Set' WHERE name='PlayernameKey_" + sPlayer + "'";
                SQLExecDirect(sSQL);
            }


            /* they are not adding, and the cd key doesnt match those listed - boot and log */
        } else if (FindSubString(sStoredKey, sKey) == -1) {
            string sReport = "INCORRECT CD KEY DETECTED! ID: " + sUnencoded + "; Name: " +
                GetName(oPlayer) + "; CD Key: " + sKey + "; IP: " + GetPCIPAddress(oPlayer) ;

            WriteTimestampedLogEntry(sReport);
            SendMessageToAllDMs(sReport);

            nBoot = TRUE;
        }


        /* new account, add the key */
    } else {
        sSQL = "INSERT INTO pwdata (val,name) VALUES" + "('" + sKey + "','PlayernameKey_" + sPlayer + "')";
        SQLExecDirect(sSQL);
    }

    return nBoot;
}
void main() {

    object oPC = GetEnteringObject();

    /* verify CD keys and double logins to stop hackers */
    if (VerifyPlayernameAgainstCDKey(oPC)) {
        if (GetIsObjectValid(oPC))
            BootPC(oPC);
        return;
    }
}

Here is a sample of 25 playername keys in pwdata. I find looking at database entries helps me to understand what is going on. I have heavily edited the playernames and cd keys to protect their owners (the keys bear almost no relation to their original characters, and might as well be invented from whole cloth). I selected from the very beginning of our table, because it has a few longstanding 'Adding' vars that never got added (only a dozen or so in 5-6 years of this system's operation, though, not bad, including two recent pending ones). That should help you to understand all the steps of the system's code.


+--------+--------+-------------------------------------+---------------------------------------+--------+---------------------+
| player | tag    | name                                | val                                   | expire | last                |
+--------+--------+-------------------------------------+---------------------------------------+--------+---------------------+
| ~      | Adding | PlayernameKey_.toov48fe.S8olen      | A7U1XGY3                              |      0 | 2009-03-08 23:47:35 |
| ~      | Adding | PlayernameKey_234fg3c7b             | BTM2NLH6                              |      0 | 2007-09-06 04:54:53 |
| ~      | Adding | PlayernameKey_Hae3v0                | CPQ3KDRH                              |      0 | 2010-05-09 17:44:13 |
| ~      | Adding | PlayernameKey_Monoridalblad3sz      | DEV64QN7-DTGM5U3G-DGME6VGQ-DLP37JT3   |      0 | 2011-06-26 19:21:37 |
| ~      | Adding | PlayernameKey_isnku6                | EVRM5DDR                              |      0 | 2009-09-10 00:53:52 |
| ~      | Adding | PlayernameKey_Lafigan4              | FNWX6MMG                              |      0 | 2008-03-03 17:18:59 |
| ~      | Adding | PlayernameKey_Kohhn5er              | GEJQ79DE                              |      0 | 2008-12-09 04:40:57 |
| ~      | Adding | PlayernameKey_Yero8en               | HFU8QFMF                              |      0 | 2007-02-06 01:25:42 |
| ~      | Adding | PlayernameKey_lh8ipd02              | IGM9S9G4                              |      0 | 2010-01-16 06:17:32 |
| ~      | Adding | PlayernameKey_opsadl0               | JVC60X6Y                              |      0 | 2011-06-26 23:28:57 |
| ~      | Adding | PlayernameKey_ter3jik1              | KYU1W9L                               |      0 | 2007-09-07 20:53:52 |
| ~      | Adding | PlayernameKey_Ohewfcpw_o0e          | LT62XQR7-LORM8R3Y                     |      0 | 2008-09-02 19:55:11 |
| ~      | Adding | PlayernameKey_tymorsg3huycna6i3s    | MCR3KK3K                              |      0 | 2009-09-24 16:03:39 |
| ~      | Adding | PlayernameKey_I6lmanh               | NG64R3QY-LPDX3XQ7                     |      0 | 2008-09-02 19:53:27 |
| ~      | Set    | PlayernameKey_---Huir---            | OQ45HVTC-ODX27Q7M-OW4Z5PF             |      0 | 2008-06-03 18:47:52 |
| ~      | Set    | PlayernameKey_--k10m--              | P6JG5EEQ-PQC347MT                     |      0 | 2007-02-21 07:41:40 |
| ~      | Set    | PlayernameKey_-Titafi-              | QV47LKGA-QQC73GP-QTEV35VX             |      0 | 2010-01-19 17:16:59 |
| ~      | Set    | PlayernameKey_-Wh1afn-              | R7H68YEU-R2GVFC4P                     |      0 | 2010-01-13 15:58:43 |
| ~      | Set    | PlayernameKey_-Xa7kjo Furrl9oatoon- | SCU96DY6-S0SDK7RA                     |      0 | 2009-04-21 20:11:41 |
| ~      | Set    | PlayernameKey_-Vef-                 | TZVX0T7L-TJD72MR6-TVDEW4PF            |      0 | 2008-03-27 10:10:15 |
| ~      | Set    | PlayernameKey_-Uohy-                | U7Y19IT7-UQYUOADQ                     |      0 | 2009-06-29 10:40:20 |
| ~      | Set    | PlayernameKey_-NejG-                | V772WQHF-VQYIUXYA                     |      0 | 2009-04-09 01:52:12 |
| ~      | Set    | PlayernameKey_.Ga4o                 | W773B4HJ-WA9X2PRC                     |      0 | 2008-04-23 04:33:52 |
| ~      | Set    | PlayernameKey_00Wau611              | XCQJ4U6D-X7QLFE1F-X75NXDKH            |      0 | 2009-02-19 18:22:39 |
| ~      | Set    | PlayernameKey_1Shagi                | YCR5FVVE-YCG2QRW6                     |      0 | 2008-03-17 16:29:51 |
+--------+--------+-------------------------------------+-------------------------------------+--------+---------------------+

Here's the pwdata table info, should you want it. If you have the skill,
you're probably better off making your own table with columns labeled
to your liking - the player column, for example, is totally unnecessary
if you're using custom database calls instead of aps_include. Really,
all you need is 3 columns: status (adding or set), playername, keys.


mysql> describe pwdata;
+--------+-------------+------+-----+-------------------+-----------------------------+
| Field  | Type        | Null | Key | Default           | Extra                       |
+--------+-------------+------+-----+-------------------+-----------------------------+
| player | varchar(64) | NO   | PRI | ~                 |                             |
| tag    | varchar(64) | NO   | PRI | ~                 |                             |
| name   | varchar(64) | NO   | PRI | ~                 |                             |
| val    | text        | YES  |     | NULL              |                             |
| expire | int(11)     | NO   |     | 0                 |                             |
| last   | timestamp   | NO   |     | CURRENT_TIMESTAMP | on update CURRENT_TIMESTAMP |
+--------+-------------+------+-----+-------------------+-----------------------------+
6 rows in set (0.00 sec)


Questions welcome.

Funky
               
               

               


                     Modifié par FunkySwerve, 09 juillet 2011 - 04:49 .
                     
                  


            

Legacy_Lomondra

  • Newbie
  • *
  • Posts: 34
  • Karma: +0/-0
NOTICE: NWN Authentication Server Down
« Reply #69 on: July 07, 2011, 10:57:05 pm »


               That's an overload, I can't do that, I guess than the aforementioned safeguard to Local Authentication was only meant for DM's and Developers, and not for the User.  I didn't get that, sorry.  I wish someone could do something for us poor schmucks.

Forum thread is titled NWN Authentication Down, but I am not familiar with the acronym GoG?
               
               

               
            

Legacy_IronRook

  • Newbie
  • *
  • Posts: 36
  • Karma: +0/-0
NOTICE: NWN Authentication Server Down
« Reply #70 on: July 07, 2011, 10:58:17 pm »


               I do not know how to script but if I were given the scripts and told where to put them I do pretty good.

I use Ubuntu server ,NWN db  

Is it possible to provide these on this forum since they are only checking CD keys and not checking the character to see if it is leggit?

or

do we have to join the other forums ?

EDIT: basically all us noobs will need a oncliententer CD key checker script as you described.

           version for standard db .
               
               

               


                     Modifié par IronRook, 07 juillet 2011 - 10:00 .
                     
                  


            

Legacy_Brayon

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
NOTICE: NWN Authentication Server Down
« Reply #71 on: July 07, 2011, 11:05:28 pm »


               The man reason why you want a local authentication while the MS is down is fairly simple.  Anyone else can use anyone's GSID, and login as them with out a password.  For PWs that strive for consistency, this is a huge security risk.  So go ahead an disable the Authentication, but buyer beware.  Someone on your server maybe playing a fast one.
               
               

               
            

Legacy_FunkySwerve

  • Hero Member
  • *****
  • Posts: 2325
  • Karma: +0/-0
NOTICE: NWN Authentication Server Down
« Reply #72 on: July 07, 2011, 11:52:00 pm »


               

IronRook wrote...


EDIT: basically all us noobs will need a oncliententer CD key checker script as you described.

           version for standard db .


Ok, I'll post a bioware db one shortly.

Funky
               
               

               
            

Legacy_driller

  • Newbie
  • *
  • Posts: 10
  • Karma: +0/-0
NOTICE: NWN Authentication Server Down
« Reply #73 on: July 08, 2011, 01:42:41 am »


               This is what I did, I already had about 20,000 unique verified players in my nwnplayer.ini file, I just need to get them in the database.
I wrote a quick and dirty vbscript to help me.

Copy the login names/cd keys from your nwnplayer.ini and put in c:\\cd_keys.txt.
Put the contents of c:\\new_keys.txt in a test module's on load script and let it populate your database.

This, along with a script like what Funkyswerve posted, makes things a lot easier.


'Begin VBscript

Const ForReading = 1
Const ForWriting = 2

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile("c:\\cd_keys.txt", ForReading)
Set f = objFSO.OpenTextFile("c:\\new_keys.txt", ForWriting, True)

Dim arrlines()
i = 0
Do Until objFile.AtEndOfStream
Redim Preserve arrlines(i)
arrlines(i) = objFile.ReadLine
i = i + 1
Loop
objFile.Close


dim j

For Each strline in arrlines
j = j + 1
l = Len(strline)
s = InStr(strline,"=")
c = Mid(strline,s+1,8)
p = Mid(strline,1,l-9)

f.WriteLine("DelayCommand(0.0f,SetPersistentString(oMod," & """" & "CD_" & p & """" & ",""" & c & """));")
Next

'End VBScript


Thanks,
-driller
               
               

               
            

Legacy_Khuzadrepa

  • Sr. Member
  • ****
  • Posts: 347
  • Karma: +0/-0
NOTICE: NWN Authentication Server Down
« Reply #74 on: July 08, 2011, 02:48:39 am »


               

Lomondra wrote...
Forum thread is titled NWN Authentication Down, but I am not familiar with the acronym GoG?

That's short for Good Old Games, a website that is currently selling a downloadable version of NWN.