Pages

Friday, February 12, 2010

Emulating HASP HL Basic

About a month ago, I was asked to remove the protection of a software (it looks like the software is specially developed --not for public sale) which is using usb key to protect the unauthorized execution.

First of all, I would like to give credit to the reverse engineering team board, even though I never post any message there, but their board contains invaluable information to help me complete this task. Please notice that I share this information only for educational purpose and only as a note for myself. If you have trouble, please don't ask me. Go to the board instead. :)

Gladly, the usb key type is HASP HL Basic, which is simpler to emulate. Here is the step I've done to successfully emulate the usb key:
  1. Get the password-1 and password-2 of the usb key
    Tool required: hasploger
    Plug the usb key and run hasploger. Then, execute the protected software. Hasploger will be able to get the password-1 and password-2 of the usb key.
  2. Dump the usb key (password-1 and password-2 from step (1) are required)
    Tool required: h5dmp
    The size of the dump file is 719 bytes (hasp.dmp)
  3. Create dummy memory file
    Tool required: any, notepad text editor is also possible
    Since hasp HL Basic does not contain memory, create file with any content with size 112 bytes (hhl_mem.dmp)
  4. Convert the dump file from step (2) and (3) to registry file to be used by emulator
    Tool required: UniDumpToReg
  5. Install emulation
    Tool required: I am using multikey_19.0.2-x86 to emulate the key in vista (32bit). While in XP I am using vbus_0.15.4.
    By using the example of registry file from multikey/vbus, modify the registry file from step (4). Then, install the registry and the emulation tool.
  6. Done.

All of the tools are available freely in the internet, however, it takes time to find.

That's all :)

Update #1 (2010/11/03)
I've just realized that I miss-typed when I checked my files,the correct multikey file that I was using is multikey_18.0.2-x86. Probably there's a new update now since it had been months.

That's all :)

13 comments:

  1. I swear, I cannot find multikey or vbus. Are the filenames correct?

    ReplyDelete
  2. @Stephon: try to search the reverse engineering board: http://www.reteam.org/board/

    ReplyDelete
  3. Really useful blog.Good work keeping this updated! USB Protection Thanks a lot!

    ReplyDelete
  4. where did you find multikey_19.0.2-x86? i can only find 18.2.x...thanks

    ReplyDelete
  5. @Stephon, @baluba:
    Sorry, I've just realized that it is miss-typed, I've just updated the file name. The correct file I was using is multikey_18.0.2-x86

    ReplyDelete
  6. there is a problem, the hasp key seems to have some kind of protection. the program will not start in step 1 if the hasploger is started(it shows some protection error). and i cannot continue , any idea?

    ReplyDelete
  7. @Ramona: Did you run it as administrator?

    ReplyDelete
  8. then how to change the reg file before install the registry?

    ReplyDelete
  9. This is what I get in my dump before converting 0788365? ÿ
    ÿÿÿÿÿÿÿÿ¦ ¨OÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿWBPT (±

    This is what I get after converting to a registry
    REGEDIT4
    [HKEY_LOCAL_MACHINE\SOFTWARE\TORO\HASP\Dumps\37303838]
    "Name"=""
    "Copyright"="Copyright (C) 2012 Shelly"
    "Created"="08/05/2012 13:44:57"
    "PW"=dword:37303838
    "SN"=dword:A6FFFFFF
    "HaspGeneration"=dword:0000001F
    "Type"=dword:3F353633
    "MemorySize"=dword:FF010120
    "SecTable"=hex:C9,E6,63,BD,F2,F6,7E,F3
    "Seed"=dword:00000000
    "IsUSB"=dword:00000001
    "Memory"=hex:\

    Can someone help me figure out what is wrong?

    ReplyDelete
  10. Hello @Unknown, I am sorry I couldn't help. I would suggest you to search or ask this forum: http://www.reteam.org/board/forumdisplay.php?f=23

    ReplyDelete
  11. Hello,

    Please, i need help of experienced, i've tried all the types pf emulators and i couldn't get it to work !

    Any one could help me

    ReplyDelete
  12. Hasploger not working. Am used 32 bit os version. How to find password hasp key . what to do hhl_memory.Dmp file.

    ReplyDelete
  13. This tools are not working aladdin hasp srm dongle. How to Emulate Srm key.what to do usb trace

    ReplyDelete