Silkut
December 20th, 2010, 06:05
Hi everyone,
I have a software embedded in a BSD distribution for remote IP camera control. It is currently limited to x cams and n streams.
A menu is called from the shell with a command (bash script) that invokes the program causing my troubles.
I don't believe it to be protected with something, I'm just rusty at finding the correct path. Especially with ELF and UNIX
So when everything is installed it relies on a key file containing the licence information:
FORMAT: unknown|unknown|licensee name|postal code|operating system|soft version|number of streams|number of cams|licence
There is few functions of interests:
check_key: parse the keyfile, hardware signature, call keysigcheck
keysigcheck: parsing the key and doing MD5 operations on it (Init, Update, Final) so I guess it's a kind of integrity check, there is a few xrefs to this one but I can easily nop the calls...
check_license: read the key, call keysigcheck and then enters DEMO or LIMITED mode and tells I am limited to x cams and n streams
install_license: opens the keyfile, read the key and process the serialization, write/saves the key (I guess it's to edit the license information)
view_license: prints the licence information and calls keysigcheck several times...
My problem is that I'm not sure it uses all the function above due to the DEMO state, it may look pretty obvious so far but several patching attempts always resulted in a data serialization fail.
I want the software to accept more cams and streams (and therefore bypass the key signature verification and demo limitations). If someone would be kind enough to point me my mistakes or the right path.
I'm using IDA for deadlisting, CFF Explorer for patching.
As the code for each function is vast it'd be vain to paste it (I put the address instead).
ELF file http://www.mediafire.com/?7q3b60t3i8i8n80
MD5: 19a843bab9119e86cb1cfab10456fe49
Thanks.
Regards,
S~
I have a software embedded in a BSD distribution for remote IP camera control. It is currently limited to x cams and n streams.
A menu is called from the shell with a command (bash script) that invokes the program causing my troubles.
I don't believe it to be protected with something, I'm just rusty at finding the correct path. Especially with ELF and UNIX

So when everything is installed it relies on a key file containing the licence information:
Quote:
9999|C|Software DEMO|00000|FreeBSD|5.9.4.5|8|4|GSi8CIHRhX12X2Pj |
FORMAT: unknown|unknown|licensee name|postal code|operating system|soft version|number of streams|number of cams|licence
There is few functions of interests:
check_key: parse the keyfile, hardware signature, call keysigcheck
Code:
.text:08070C50
keysigcheck: parsing the key and doing MD5 operations on it (Init, Update, Final) so I guess it's a kind of integrity check, there is a few xrefs to this one but I can easily nop the calls...
Code:
.text:080705D0
check_license: read the key, call keysigcheck and then enters DEMO or LIMITED mode and tells I am limited to x cams and n streams
Code:
.text:080707F0
install_license: opens the keyfile, read the key and process the serialization, write/saves the key (I guess it's to edit the license information)
Code:
.text:08070CF0
view_license: prints the licence information and calls keysigcheck several times...
Code:
.text:080709A0
My problem is that I'm not sure it uses all the function above due to the DEMO state, it may look pretty obvious so far but several patching attempts always resulted in a data serialization fail.

I want the software to accept more cams and streams (and therefore bypass the key signature verification and demo limitations). If someone would be kind enough to point me my mistakes or the right path.
I'm using IDA for deadlisting, CFF Explorer for patching.
As the code for each function is vast it'd be vain to paste it (I put the address instead).
ELF file http://www.mediafire.com/?7q3b60t3i8i8n80
MD5: 19a843bab9119e86cb1cfab10456fe49
Thanks.
Regards,
S~