PDA

View Full Version : Extracting Flexlm seeds


redhatjack
May 25th, 2011, 12:37
Hi,

Can seeds be extracted from shared object file (liblicmgr.so) with out the orginal APP?
Download link for my shared object file: http://www.redhatjack.com/ftp/liblicmgr.so

IE.
Can you use your own C program to make the necessary function calls for the .so to checkout the dummy license file?


This is on a Solaris x86/64 platform. The reason for the question. The App is believed to be Java based and strangly never brakes in the liblicmgr or at main after being attached and restarted. Using DDD.

------------------------------------------------------------------------------------
200+ Views And NO one has a clue....
------------------------------------------------------------------------------------

Are there no leaders only followers of???
flexlm_7.x-11.4_seed_extraction.pdf
http://www.woodmann.com/crackz/Tutorials/Flexpilg.htm
http://www.woodmann.com/crackz/Flexlm.htm
http://www.woodmann.com/crackz/Tutorials/Siulflex.htm
http://www.woodmann.com/fravia/siulflex.htm
http://www.woodmann.com/crackz/Tutorials/Flex2004.htm#flexsign


OK...OK... I'll start......
What I'm looking for is help with something along the lines of
How To Make and use a Shared Object, but what call should be used for Flexlm with my .so instead of the example below.

arithmetic.c
_________________
int add(int, int);
int sub(int, int);
int mul(int, int);
int div(int, int);

int add(int a, int b)
{
return a + b;
}

int sub(int a, int b)
{
return a - b;
}

int mul(int a, int b)
{
return a * b;
}

int div(int a, int b)
{
return a / b;
}



arithmetic.h
_________________
#ifndef _ARITHMETIC_H_
#define _ARITHMETIC_H_

int add(int, int);
int sub(int, int);
int mul(int, int);
int div(int, int);

#endif



main.c
__________________
#include <stdio.h>
#include <dlfcn.h>

typedef int (*func)(int, int);
func add, sub, mul, div;

int main()
{
int a = 5, b = 4;
void *arithHandle = NULL;

arithHandle = dlopen("./libarithmetic.so", RTLD_NOW);
if ( NULL == arithHandle )
{
printf("Arithmetic library cant be opened\n";
}

add = (func) dlsym (arithHandle, "add";
sub = (func) dlsym (arithHandle, "sub";
mul = (func) dlsym (arithHandle, "mul";
div = (func) dlsym (arithHandle, "div";

printf("Add :: %d\n", add(a, b));
printf("Sub :: %d\n", sub(a, b));
printf("Mul :: %d\n", mul(a, b));
printf("Div :: %d\n", div(a, b));

dlclose(arithHandle); //Its important to call dlclose() when you are done
return 0;
}

___________________________________________________________________
Test run....

arithmetic.c
arithmetic.h
main.c

# /export/home/SUNWspro/bin/cc -c arithmetic.c
arithmetic.o

# /export/home/SUNWspro/bin/cc -G -o libarithmetic.so *.o
libarithmetic.so

# /export/home/SUNWspro/bin/cc main.c -ldl
a.out

# ./a.out
Add :: 9
Sub :: 1
Mul :: 20
Div :: 1

------------------------------------------------
------------------------------------------------
I would assume that with the right mods to this I could call in my flexlm Shared Object and check out the a dummy license file to recover the seeds.
At first I was thinking that the shared object worked like a windows DLL which would not be good in my case for seeds recovery. In that the windows lmgr9a.dll is feed the seeds and license from the main app. But I don't think the seeds are feed into the .so shared object and here's why. With IDA I can see that the .so has daemon structure ie. l_sg, 6F7330B8, l_n36_buff the windows .dll does not have these. I can post ldd or nm of the .so if needed for someone to see the function calls. I'm not looking for a crack or for someone to have over the seeds. Just help to make the right function calls or if what im asking can even be done with this .so.

Looking for help from those that can think outside the box.
PM me if you have something to add and just don't want to look DUMB by what you post....

Thanks
Jack