Results 1 to 4 of 4

Thread: hardlock emulation

  1. #1

    hardlock emulation

    Hi.
    Does anybody can help to emulate such functions:
    HLM_CHECKEXPDATE
    HLM_CHECKALLSLOTS

    i'm talking about kernel-mode (driver level) emulation.
    thanks for you answers.
    --
    bye!

  2. #2
    Hi,

    do you really need to go kernel mode?
    Some years ago (almost forgot) i emulated the HL API at user mode level by implementing HL API providing my own hlvdd.dll.

    About kernel mode ... a good disassembly/analysis/deadlist of the kernel mode driver and its user mode equivalent (hlvdd.dll) + the HL API SDK should give some hints...

    Regards

  3. #3
    Quote Originally Posted by SysCall
    Hi,

    do you really need to go kernel mode?
    Some years ago (almost forgot) i emulated the HL API at user mode level by implementing HL API providing my own hlvdd.dll.
    I also tried to make HLM emulation in such way...
    But I have no possibility to discover emulation for HLM_CHECKALLSLOTS, coz I have no information about... and also have no dongle to log it's requests\responses...
    Have you emulated HLM_CHECKALLSLOTS in your's hlvdd.dll?
    Maybe you could help me about this (we can talk in private)

    Quote Originally Posted by SysCall
    About kernel mode ... a good disassembly/analysis/deadlist of the kernel mode driver and its user mode equivalent (hlvdd.dll) + the HL API SDK should give some hints...
    I'm fully agree with you, but as you know that it's a large amount of obfuscated code there... Now I'm trying to discover HLM_CHECKALLSLOTS in hlvdd. It needs a lot of time and patience...
    but there is so few information about HLM (RUS) functions in SDK...

    thanks.
    --
    bye!

  4. #4
    Hi,

    Have you emulated HLM_CHECKALLSLOTS in your's hlvdd.dll?
    that was not necessary at the time i used to emulate the user mode driver.
    (the app used a subset of HL API so i implemented only necessary stuff )

    Look into the HL API SDK, the C data structures (HL_LIS) of the functions are described there (.pfd, the header files ...).

    I quote the relevant info (which is freely available, i downloaded the SDK some years ago from their public ftp)...

    There might have been some bits changed but should give you some hints/ direction ....

    HLM_CHECKALLSLOTS(BUFLEN,BUFFER)
    Checks all slots (LiMaS only).
    Arguments
    BUFLEN After the function is performed, this variable returns the
    actual buffer length occupied. The function only returns the
    required buffer length if the value of the BUFLEN and
    BUFFER variables is 0. (32-bit)
    BUFFER Pointer to the HL_LIS data structure which contains the slot
    and license information. Refer to "The HL-LIS Data
    Structure" section for more information.
    Return
    The return value contains the API status.
    Use
    If you are using licensing, this function queries the current status of all slots.
    Example
    result =
    HLM_LOGIN(29809,DONT_CARE,"HARDLOCK","@0=/&#s3",
    RUS_VK, 0,"378p,IPX");
    IF (result == STATUS_OK)
    result = HLM_CHECKALLSLOTS(BUFLEN,BUFFER);
    .
    .
    result = HL_LOGOUT();
    ENDIF;
    HLM_CHECKEXPDATE(SLOT,YEAR,MONTH,DAY)

    Returns the expiration date (HL-RUS/LiMaS).
    Arguments
    SLOT Defines the slot number. Slot number 0 indicates the global
    expiration date for local modules and Hardlock Server modules. For
    Hardlock Server the expiration dates for the single slots (1- 32767)
    can also be checked. (32-bit)
    YEAR Pointer for the variable in which the expiration year is returned.
    (16-bit)
    MONTH Pointer for the variable in which the expiration month is returned.
    (16-bit)
    DAY Pointer for the variable in which the expiration day is returned
    (16-bit).
    Return
    The system returns the API status (see chapter 4.1).
    Use
    If you use the expiration date option, this function checks when the license
    expires. This can be done separately for each slot if you are using Hardlock
    Server. The global expiration date (local and server) is returned using slot 0.
    Example
    result = HLM_LOGIN(29809,DONT_CARE,"HARDLOCK","@0=/&#s3", RUS_VK, 0,"378p,IPX");
    IF (result == STATUS_OK)
    result = HLM_CHECKEXPDATE(0, &year, &month, &day);
    IF (result == RUS_DATE_EXPIRED)
    PRINT("Global expiration date exceeded");
    .
    .
    result = HL_LOGOUT();
    ENDIF;
    The HL-LIS Data Structure
    The HL_LIS data structure contains the global license information.
    current_date 16-bit Current date (days since 01.01.1999).
    res 16-bit Reserved.
    num_slots 32-bit Number of slots.
    glob_exp_date 16-bit Global expiration date (days since
    01.01.1999).
    res2 16-bit Reserved.
    slots[ ] Depending on
    number of slots
    Pointer to the first HL_SIS structure, see
    below.
    The HL_SIS data structure
    The HL_SIS contains license information for the individual slots.
    max_user 32-bit Maximum available licenses.
    cur_user 32-bit Number of licenses currently being used.
    exp_date 16-bit Expiration date for this slot.
    flag 8-bit 0 No singularity: Multiple calls of the
    slot on one computer take up the
    equivalent number of licenses.
    1 Singularity: Multiple calls of the slot
    on one computer only take up one
    license.
    reserved 8-bit Reserved.
    typedef _PACKED struct ALIGN_ { /* HL_LIS slot information */
    Long max_user;
    Long cur_user;
    Word exp_date;
    Byte flag; /* singularity flag */
    Byte res; /* filler to make structure size multiple of 4 bytes */
    } ALIGN_GCC HL_SIS;

    /* License Information Structure (HL_LIS) */
    typedef _PACKED struct ALIGN_ {
    Word current_date;
    Word res;
    Long num_slots;
    Word glob_exp_date;
    Word res2; /* filler to make size multiple of 4 bytes */
    HL_SIS slots[1];
    } ALIGN_GCC HL_LIS;
    Regards

Similar Threads

  1. I need help for a hardlock dongle, I cant fix date
    By NONFUN in forum The Newbie Forum
    Replies: 7
    Last Post: June 13th, 2012, 08:51
  2. Information needed about reading out an old hardlock
    By greenpeter in forum The Newbie Forum
    Replies: 1
    Last Post: November 7th, 2008, 14:42
  3. hardlock emulation showed hiden protect option
    By foffa in forum The Newbie Forum
    Replies: 4
    Last Post: June 1st, 2007, 19:36
  4. hardlock maybe?
    By bytexus in forum Advanced Reversing and Programming
    Replies: 5
    Last Post: August 24th, 2002, 13:43
  5. how to crack a hardlock Envelope
    By ohMyGod in forum Malware Analysis and Unpacking Forum
    Replies: 3
    Last Post: January 27th, 2002, 00:40

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •