Exetools

Exetools (https://forum.exetools.com/index.php)
-   General Discussion (https://forum.exetools.com/forumdisplay.php?f=2)
-   -   FlexLM Help (https://forum.exetools.com/showthread.php?t=4509)

Peter[Pan] 06-28-2004 14:33

FlexLM Help
 
Ive read a lot of tutorials on it, but iam stuck in one part maybe somebody can read here and help:

Fixed using _l_sg() method, with calcseed.

-Peter

Peter[Pan] 06-29-2004 21:55

Still Wrong :(, anybody can help me with this ?

*edit 2*

now i have it working, i changed on a hunch license behavoir to 7.0, now should i assume all license in that format are 7.0 ? or is there a way i can tell how its being handled, thanks.

Numega Softice 07-01-2004 10:49

Quote:

Originally Posted by Peter[Pan]
Still Wrong :(, anybody can help me with this ?

*edit 2*

now i have it working, i changed on a hunch license behavoir to 7.0, now should i assume all license in that format are 7.0 ? or is there a way i can tell how its being handled, thanks.

Well atleast with Fluent that is the case, even i have observed.

jmqlucky 09-03-2004 23:38

up 7.0 ,the license mybe ok !!

appleleafs 09-04-2004 04:28

I think there is a way to find the version of the license, by checking the disassembly, or real time trace for the lc_set_attr call.
The function is defined as:
lm_extern int API_ENTRY lc_set_attr lm_args((LM_HANDLE_PTR job, int key,
LM_A_VAL_TYPE value));
The second arg will indicate the license version, for example, in the tracing of the code:


00478026 |. 8B4424 34 MOV EAX,DWORD PTR SS:[ESP+34]
0047802A |. 6A 00 PUSH 0
0047802C |. 6A 4C PUSH 4C
0047802E |. 50 PUSH EAX
0047802F |. E8 BCBFFBFF CALL <_lc_set_attr>

You will find the second arg is 0x4c, and look back to the lm_attr.h, there is the following def, 76 is the 0x4c in Dec. :

#define LM_A_CKOUT_INSTALL_LIC 76 /* (int) true if BEH_V7+, else false */

So you must use behavior V7.

good luck.

toro 09-04-2004 21:51

typedef struct vendorcode7 {
short type; /* Type of structure */
unsigned long data[2]; /* 64-bit code */
unsigned long keys[4];
short flexlm_version;
short flexlm_revision;
char flexlm_patch[2];
char behavior_ver[LM_MAX_BEH_VER + 1];
unsigned long crokeys[2];
int signs; /* number of entries in pubkeyinfo */
int strength;
int sign_level;
LM_VENDORCODE_PUBKEYINFO pubkeyinfo[LM_MAXSIGNS];
} VENDORCODE7, *VENDORCODE_PTR;

#define LM_BEHAVIOR_V2 "02.0"
#define LM_BEHAVIOR_V3 "03.0"
#define LM_BEHAVIOR_V4 "04.0"
#define LM_BEHAVIOR_V5 "05.0"
#define LM_BEHAVIOR_V5_1 "05.1"
#define LM_BEHAVIOR_V6 "06.0"
#define LM_BEHAVIOR_V7 "07.0"
#define LM_BEHAVIOR_V7_1 "07.1"
#define LM_BEHAVIOR_V8 "08.0"
#define LM_BEHAVIOR_V8_1 "08.1"
#define LM_BEHAVIOR_V8_2 "08.2"
#define LM_BEHAVIOR_V8_3 "08.3"
#define LM_BEHAVIOR_V9 "09.0"

the vendorcode struct is used by lc_init

outputs of 2 call to signed32 in l_string_key are seed1 and seed2.
after finding the flexversion and seeds you can use lmcryptgui to generate lmcrypt.


toro

jacky1108 09-07-2004 20:56

peter, did you solve your problem.
if not, please describe more detail!

toro 09-08-2004 15:54

hi szy111

for creation of lmcrypt with lmcryptgui you must supply vendorname, behaviour and 2 enc seed.
the l_string_key is a function that generate licensekey for every feature. you can trace it to see the proc of licensekey generation or the result of it and create license.
another way is grabing 2 seed from output of 2 signed32 call in l_string_key and create lmcrypt with lmcryptgui.


toro.

szy111 09-08-2004 23:12

hi toro:
thanks for your replay. my question is :i can not set breakpoint at l_string_key in my target . why? what's signed32 ?

toro 09-09-2004 03:28

hi szy111

depend on flexlm version and its behaviour there are more than one l_string_key. if your question is that you set breakpoint but programs not break, the answer is you must set breakpoint in every of them.

find your target flexlm version with lmtools then open target in olly and scan object file with lmgr.lib or lmgrd.lib and then set breakpoint on every l_string_key. in middle of everyl_string_key you will see 2 call to signed32.

toro.

szy111 09-10-2004 17:19

sorry, my mean is that i can not find l_string_key breakpoint in my target, it report symbol not found !!!

my target is unix program , not win'program , so can not use olly .

toro 09-10-2004 20:53

hi szy111

in windows if have not proper .lib, i serach this sequence of commands for l_string_key.

MOV DWORD PTR SS:[EBP-0B0],8
MOV DWORD PTR SS:[EBP-114],5
MOV DWORD PTR SS:[EBP-20],0A

toro

szy111 09-10-2004 21:35

toro:
thank you very much . i am sorry i can not find l_string_key , i attach it , can you find where it is ?

toro 09-11-2004 02:13

hi szy111

41a1f5
41ea7d
441478
451e08
4870c9
48024c

this is not test.exe. the vendor is "Hamp-Russ" !!!!!! please don't ask me to generate license for you!!!!.

toro

szy111 09-11-2004 22:33

hi toro:
thank you again. i know the vendor name , but it is my first target for crack on win. so i rename it to test . i will set breakpoint at l_string_key , then trace in and watch the value at the adress where call 424410 , it maybe seeds. right? i got the value 00a1b3e8 and 00a19ee8 , it's wrong !!!

toro 09-12-2004 03:27

hi szy111

the function at address 424410 is l_getattr, the address of signed32 is 4422cf. it must be call from l_string_key.

toro

szy111 09-12-2004 16:09

hi toro:
thank you again . but in middle of every l_string_key , i can not find 4422cf , why ? only 2 call 424410 !!!

szy111 09-14-2004 17:47

hi toro:
please hlep me !!
i do not know why the address of signed32 is 4422cf ? can you give me detailed information ? thank you .

nikkov 09-14-2004 18:38

Anybody used lmcryptgui from Crackz tutorial page?
I create generator, but it dont't work and terminate with exception :(

toro 09-14-2004 21:47

hi szy111

at least can you see the correct sign that created in end of l_string key for every feature?

toro.

szy111 09-15-2004 13:51

hi toro:
i set breakpoint at 41a1f5 in olly (F2). then F7 ,but it stop at next point !!! how to trace ? please tell me step by step . i begin to use olly .

szy111 09-15-2004 21:43

Quote:

Originally Posted by nikkov
Anybody used lmcryptgui from Crackz tutorial page?
I create generator, but it dont't work and terminate with exception :(

give me the seed and license.dat , l make it for you !!!!

toro 09-15-2004 21:51

Quote:

i set breakpoint at 41a1f5 in olly (F2). then F7 ,but it stop at next point !!! how to trace ? please tell me step by step . i begin to use olly .

there are many tut on internet

toro

nikkov 09-16-2004 11:00

Quote:

Originally Posted by szy111
give me the seed and license.dat , l make it for you !!!!

I haven't seed while, but I search it for autodesk inventor 8
(FlexLm 8.3a).
I haven't SDK for this version, so I want use lmcryptgui, if is it possible.
And another question: can I use SDK not 8.3a version and what changes need made for it.
---------------------------------------------------
AAAAA!!! I am stupid man :(.
I run lmcryptgui without parameter!!!
Now it work, but lmcryptgui can generate license for FlexLm 8.3a ?

Thanks.

szy111 09-16-2004 15:06

run lmcryptgui with seeds and vendor ,then create a exe file ,run exe with license.dat , you will be well .but you must need seeds !!

nikkov 09-16-2004 16:59

Quote:

Originally Posted by szy111
run lmcryptgui with seeds and vendor ,then create a exe file ,run exe with license.dat , you will be well .but you must need seeds !!

O.K. I found seed, vendor and successfully made working license
for autodesk inventor 8. It's easier that crack C-Dilla :)

Thank you for advise.

appleleafs 10-15-2004 05:30

Acutually, the call to signed32 will depend on the behavior of the Flexlm. For example, if the crypt filter is used, the code will skip the call to signed32. They have improved the security in a way, and does not provide compatibility in this special case.
On the other hand, it is a better idea to recover the seed from the job structure, which envolves identify the call to l_sg and record the memory contents. There has been essay's and calc tools to make this very easy. Most important is all the behavior can be defeated in this way. Of course, we are not talking about the ECC.
If you have identified the l_string_key code, you will be able to found the license key information by just looking at the return point of this function. There will be a call to atox, which convert and format the license key in ASCII format, just check the return value in EAX, do a reference to the memory, and dump the key. It is automatically generated for you. There is a easy signature of the atox function, there is a long string 0123456789ABCDEF defined there. Do a search on the code, you will find it easily. Then you can trace back to the point for the key generation. There is no need to recovery seeds, no need to run license generation.

Peter[Pan] 11-01-2004 03:39

Guys thanks for the info, iam back to viewing flexlm apps, i did manage to solve my license problem and thanks :) iam now using the method for l_sg, at all my targets, however i found one target it doenst work for! maybe i maked a mistake, maybe not, anybody can view and see ?

i view the app:
*removed by request*

I got the following information:
Seed1: 38aa43fa
Seed2: 95845bd5
Vendor: Pxxxx

however, putting these into lmcryptgui, and resigning the license file, still results in -8 (Bad Auth)

Any ideas ?

Thanks.

dirkmill 11-01-2004 04:53

@Peter[Pan]:
I just had a quick look at your target and it seems that your seeds are wrong!

I found this:
encseed[0]=6bxxxx58
encseed[1]=9cxxxx2e

You might want to recheck the byte-order of your calcseed-inputs ;)

Dirk

Peter[Pan] 11-01-2004 05:46

gona view straight away! thnx :)

*edit*, yea it guess i was using Jobx04 ++, isnted of Jobx08++

anways i recorded the job, data and vendor name before, and after the call to n36buff

Code:

[BEFORE]
VENDOR: ASCII "Pxxxx"
Name: DATA                              JOB
0x00: 66 00 00 00                      04 00 00 00
0x04: 00 00 00 00                      15 BB F2 4E
0x08: 00 00 00 00                      63 4C 08 B9
0x0C: 00 00 00 00                      C0 D9 02 38
0x10: 00 00 00 00                      E5 B6 0F 2F
0x14: 00 00 00 00                      EA 9B 6F 06
0x18: 00 00 00 00                      B0 7E 2A 4C
0x1C: 00 00 00 00                      09 00 02 00

[AFTER]
VENDOR: ASCII "Pxxxx"
Name: DATA                              JOB
0x00: 66 00 00 00                      04 00 00 00
0x04: 91 00 29 00                      74 35 99 6B
0x08: 3F 99 86 2C                      02 C2 63 9C
0x0C: 5E 3D 1C 00                      C0 D9 02 38
0x10: 00 00 73 00                      E5 B6 0F 2F
0x14: 00 00 00 00                      EA 9B 6F 06
0x18: 00 00 00 00                      B0 7E 2A 4C
0x1C: 00 00 00 00                      09 00 02 00

gives me:
data[0]: 00290091
data[1]: 2C86993F
Vendor: Pxxxx
job+0x08: 0x9C63C202
job+0x0c: 0x3802D9C0
job+0x10: 0x2F0FB6E5
XOR VAL: 0x2fc0d99c
Enc1: 0x2fe9d90d
Enc2: 0x034640a3

still doesnt match yours, maybe iam going wrong somewhere... :/

p.s thanks for the help its really appreciated :)

dirkmill 11-01-2004 06:43

Ah, I see your mistake.
You're confusing job- and vendorcode-structure!
The vendor-struct is the block you marked JOB and vice-versa.

Your data is consistent with my encseeds :D

Dirk

Peter[Pan] 11-01-2004 06:48

omg *me dies* thanks man!, worked like a charm, what a silly mistake, my 1000 sorrys :)

JMI, if any of the previous posts need editing for something removing plz do! or just tell me and i will, sorry to waste peoples time :)

Peter[Pan] 11-01-2004 11:26

hehe another day, another problem :)

today i try to build lmcrypt for my own amusement, so i edit lm_code.h with:

(i got it from lmv8gen)
Code:

#define VENDOR_KEY1 0x6cfe8c94
#define VENDOR_KEY2 0x2d430502
#define VENDOR_KEY3 0xe64b1485
#define VENDOR_KEY4 0x04858ac0
#define VENDOR_KEY5 0x7a7420d1
#define CRO_KEY1 0x367306ef
#define CRO_KEY2 0x54c60c79
#define VENDOR_NAME "testabc"

now i go to C:\Program Files\FLEXlm\v9.2\i86_n3 in a dos promt and run:
"Build", i get the following:

Code:

Microsoft (R) Program Maintenance Utility  Version 6.00.9782.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.
        lmrand1 -i ..\machind\lsvendor.c
        cl /c /nologo /c  /I..\machind /I. /MT  -I../h lmcode.c
lmcode.c
        LINK /nologo /NODEFAULTLIB /OPT:NOREF  /subsystem:CONSOLE lmnewgen.obj l
mcode.obj  lmgr.lib libcrvs.lib libsb.lib oldnames.lib kernel32.lib user32.lib n
etapi32.lib  advapi32.lib  gdi32.lib comdlg32.lib  comctl32.lib wsock32.lib libc
mt.lib /out:lmnewgen.exe
        if exist lm_new.c del lm_new.c
        lmnewgen.exe testabc -o lm_new.c
v8.1+ FLEXlm, non-CRO
lc_init failed: Invalid FLEXlm key data supplied
FLEXlm error:  -44,49
For further information, refer to the FLEXlm End User Manual,
available at "www.macrovision.com".
NMAKE : fatal error U1077: 'lmnewgen.exe' : return code '0x1'
Stop.

no matter how i change lm_code.h, i always get -44, anybody any ideas about this one ?, this is first time i use lmcrypt.c, i always have used lmcryptgui, thanks!

tom324 11-01-2004 14:28

First thing to do is RTFM.

-44
LM_BADKEYDATA

"Invalid key data supplied."
Invalid FLEXnet Licensing key data was supplied to the lc_new_job() call. Some FLEXnet Licensing functions will be disabled.

Seems your VENDOR_KEYx and/or CRO_KEYn are not correct for vendor "testabc"

Tom

Peter[Pan] 11-01-2004 19:04

tom: sorry i shoulda said that i did read thru, it and i knew what -44 was.

how would one generate such vendor keys then ?

Thanks.

dirkmill 11-01-2004 20:02

Hi again!

As you should probably know vendor-keys are changing with each major revision of flexlm. And what does this tell us:
Code:

$ ./lmv8gen
**********************************
*Flexlm v 8.x Vendor key generator

If you want to play with CRO either get a v8.x SDK or investigate v9.x CRO-key generation...

Dirk

Peter[Pan] 11-01-2004 21:18

yea i understand they change, and i have 0 intrest in playing with the cro versions atm, however i did try lmv8gen, found at CrackZ website, on v7, v8, v9.2 of the sdk's with differnt vendor names, all report back -44 during build time, again iam prolly missing something silly.

*edit* got v7.2 SDK working, by using PGC FlexLM Vendor Kegen, must be the lmv8gen, that just didnt worked for me in the 8+ SDK.

Thanks as always.

-Peter


All times are GMT +8. The time now is 00:42.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX