Giter VIP home page Giter VIP logo

Comments (6)

cernekee avatar cernekee commented on August 30, 2024

According to SecurIDBlackBerry10_v100_quickstart.pdf, BB10's device IDs are 8 digit hex numbers. This is similar to the Android device ID, but much shorter. Maybe we will luck out and find that they are handled in a similar manner.

The first thing I would try is to prepend the Android header to your 81-digit numeric string:

stoken import --token=http://127.0.0.1/securid/ctf?ctfData=<81-digit numeric string>

This tells the library to use a slightly different method of interpreting the device ID. Without the URI header, it uses the original "feature phone" logic.

If that doesn't work, try tweaking the logic in generate_key_hash() so that it accepts hex digits but uses the non-smartphone string length:

diff --git a/src/securid.c b/src/securid.c
index 5263e31..dab1e8b 100644
--- a/src/securid.c
+++ b/src/securid.c
@@ -266,6 +266,7 @@ static int generate_key_hash(uint8_t *key_hash, const char *pass,
         * 40 (or 32) zero bytes, below.
         */
        for (; *devid; devid++) {
+           is_smartphone = 1;
            if ((is_smartphone && !isxdigit(*devid)) ||
                (!is_smartphone && !isdigit(*devid)))
                continue;

Some additional questions, if none of that works:

  • Was your token originally delivered as an 81-digit string, or did you convert a sdtid/xml file using TokenConverter?
  • Is there a chance it is bound to your BB 10 GUID? According to SecurIDBlackBerry10_v100_admin.pdf this would look like "b77a1d06-d505-4200-90d3-1bb397748704". Try it with and without the dashes.

from stoken.

raghavkrishnapriyan avatar raghavkrishnapriyan commented on August 30, 2024

Thanks for the response. I'm afraid neither appending the Android header nor editing generate_key_hash() worked.

Some additional questions, if none of that works:

  • Was your token originally delivered as an 81-digit string, or did you convert a sdtid/xml file using TokenConverter?

The latter -- I converted an sdtid file.

  • Is there a chance it is bound to your BB 10 GUID? According to SecurIDBlackBerry10_v100_admin.pdf this would look like "b77a1d06-d505-4200-90d3-1bb397748704". Try it with and without the dashes.

I tried both, but that didn't seem to work.

from stoken.

cernekee avatar cernekee commented on August 30, 2024

What options did you use when running TokenConverter?

Does the sdtid file have a <DeviceSerialNumber> field? If so, what does it look like (base64, hex, GUID, etc.)? Does the number look familiar?

If you happen to have an old/expired/deactivated sdtid file for BB10, that would also be helpful. You can send it to [email protected]

from stoken.

raghavkrishnapriyan avatar raghavkrishnapriyan commented on August 30, 2024

I tried TokenConverter without any options and with the -f flag.

Yep, the sdtid has a field with the Blackberry 10 GUID. Here's the field:

<TokenAttributes>
    <DeviceSerialNumber>b77a1d06-d505-4200-90d3-1bb397748704</DeviceSerialNumber>
    <DeviceTypeVersion>1.x</DeviceTypeVersion>
    <DeviceTypeFamily>BlackBerry 10</DeviceTypeFamily>
    <DeviceType>PC Software Token V3.0 or later</DeviceType>
    <Nickname> </Nickname>
</TokenAttributes>

I haven't got an expired one right now, but I'll see if I can get hold of one.

from stoken.

cernekee avatar cernekee commented on August 30, 2024

Here is what worked for me:

  • Use the iPhone encoding (-iphone) when running TokenConverter to enable "smartphone mode."
  • Change the device ID to uppercase when importing: stoken import --devid B77A1D06-D505-4200-90D3-1BB397748704 com.rsa.securid.iphone://ctf?ctfData=20031...

I will run some more tests to see if it makes sense to automatically convert the device ID to uppercase in generate_key_hash().

from stoken.

raghavkrishnapriyan avatar raghavkrishnapriyan commented on August 30, 2024

Works perfectly for me too. Thanks so much!

from stoken.

Related Issues (20)

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.