seriousman
May 14th, 2010, 12:15
Hi,
So, I've been trying to crack a program under Linux using IDA.
Interestingly, the program seems to be written in TCL/TK, which switched my interests from cracking the program to understanding how it works. I tried searching in the Internet information about reversing/cracking Tcl executable but found none.
So here is the result of what I found, that can be helpful for interested in the future (You'll find my question in the end):
After being called, the program calls _Tcl_findexecutable to find the tcl interpreter then start a new interpreter using _Tcl_CreateInterp.
Now using the call _Tcl_SetVar it passes the arguments (argv0..) to the TCL interpreter, calls the Tk interepreter through the call _Tk_MainLoop.
Now through the two commands _Tcl_CreateCommand and _Tcl_CreateObjCommand the program creates the tcl functions using their "real" name and links to their address in the program, a little example:
and
I would say that _Tcl_CreateObjCommand creates classes where _Tcl_CreateCommand create simple command, but I'm not sure. Remark, that the commentaries are added by IDA and are the values of the used offsets.
So you probably maybe think, cracking a executable Tcl program is simple, as you have the original name of all procedures.
Unfortunately it is not.
For example in my case, I was trying to crack a software protection that required a serial that will be checked, the serial then is stored in a file and a connection to the internet is made to activate it. Now I cracked the part were the program checks if the serial is valid and write to a file, but I can't find how and were the program connects to the internet, there is no calls, no function nothing.
So, if you have cracked before a compiled Tcl/Tk program and have some ideas, tell me. I will keep you updated.
p.s. This is my first post, so I'm not sure if it is ok to say the name of the software I'm cracking. Please tell me if it is. Anyone interested in the software please msg me and I will give you the link for the demo and the name.
So, I've been trying to crack a program under Linux using IDA.
Interestingly, the program seems to be written in TCL/TK, which switched my interests from cracking the program to understanding how it works. I tried searching in the Internet information about reversing/cracking Tcl executable but found none.
So here is the result of what I found, that can be helpful for interested in the future (You'll find my question in the end):
After being called, the program calls _Tcl_findexecutable to find the tcl interpreter then start a new interpreter using _Tcl_CreateInterp.
Now using the call _Tcl_SetVar it passes the arguments (argv0..) to the TCL interpreter, calls the Tk interepreter through the call _Tk_MainLoop.
Now through the two commands _Tcl_CreateCommand and _Tcl_CreateObjCommand the program creates the tcl functions using their "real" name and links to their address in the program, a little example:
Code:
.text:08054EE6 mov [esp+638h+var_628], 0
.text:08054EEE mov [esp+638h+var_62C], 0Fh
.text:08054EF6 mov [esp+638h+var_630], offset sub_805FB00
.text:08054EFE mov [esp+638h+var_634], offset aStoreactivatio ; "storeActivationKey"
.text:08054F06 mov [esp+638h+var_638], edi
.text:08054F09 call _Tcl_CreateCommand
and
Code:
.text:08055026 mov [esp+638h+var_628], 0
.text:0805502E mov [esp+638h+var_62C], 16h
.text:08055036 mov [esp+638h+var_630], offset sub_804E020
.text:0805503E mov [esp+638h+var_634], offset aShowhelp ; "showHelp"
.text:08055046 mov [esp+638h+var_638], edi
.text:08055049 call _Tcl_CreateObjCommand
I would say that _Tcl_CreateObjCommand creates classes where _Tcl_CreateCommand create simple command, but I'm not sure. Remark, that the commentaries are added by IDA and are the values of the used offsets.
So you probably maybe think, cracking a executable Tcl program is simple, as you have the original name of all procedures.
Unfortunately it is not.
For example in my case, I was trying to crack a software protection that required a serial that will be checked, the serial then is stored in a file and a connection to the internet is made to activate it. Now I cracked the part were the program checks if the serial is valid and write to a file, but I can't find how and were the program connects to the internet, there is no calls, no function nothing.
So, if you have cracked before a compiled Tcl/Tk program and have some ideas, tell me. I will keep you updated.
p.s. This is my first post, so I'm not sure if it is ok to say the name of the software I'm cracking. Please tell me if it is. Anyone interested in the software please msg me and I will give you the link for the demo and the name.