home *** CD-ROM | disk | FTP | other *** search
/ Reverse Code Engineering RCE CD +sandman 2000 / ReverseCodeEngineeringRceCdsandman2000.iso / RCE / Mendoza / hworks.txt < prev    next >
Text File  |  2000-05-25  |  7KB  |  185 lines

  1.  ---------------------------------
  2. | How to crack Hex Workshop v2.54 |  by da Cracker/CBE
  3.  ---------------------------------
  4.  
  5.  
  6. Introduction:
  7. ────────────
  8. Many peoples want to know how to crack in our days... So I decided to write my
  9. second tutorial, requested by pist0ls. In this tutorial, I'll teach you how to
  10. crack Hex Workshop v2.54... I hope that you'll enjoy it! If you have any
  11. comment, suggestions, .... please e-mail me at dc_cbe@hotmail.com
  12.  
  13.  
  14.  ┌────────────────────Index──────────────────────────┐
  15.  |                                                   |
  16.  |1) Programs that you'll need to crack Hex Workshop |
  17.  |2) Finding the location that needs to be patched   |
  18.  |3) Patching the location                           |
  19.  |4) Writing a patcher in C++                        |
  20.  |5) Final Notes                                     |
  21.  └───────────────────────────────────────────────────┘
  22.  
  23. 1) Programs that you'll need to crack Hex Workshop
  24.    ───────────────────────────────────────────────
  25.  
  26. Here's the list of programs that you'll need to get to crack Hex Workshop:
  27.  
  28. WinDisassembler
  29. Hex Workshop (no, really? ;) )
  30. Hacker's View
  31.  
  32. Don't expect to crack it without these utilities!
  33. Note: You can get them at http://cracking.home.ml.org, or if you're a CBE
  34. member, at CBE's memberz FTP Area
  35. And you can get Hex Workshop at http://www.bpoint.com
  36.  
  37.  
  38. 2) Finding the location that needs to be patched
  39.    ─────────────────────────────────────────────
  40.  
  41. Now we're going to find the location that needs to be patched (where you have
  42. to modify the program so that it's cracked...)
  43.  
  44. Start Hex Workshop
  45. Click on Help --> About Hex Workshop
  46. Umm, you a place where you can enter a serial number... Enter "123".
  47. Click on "Register"
  48. "You have entered an invalid registration number" No, really? ;)
  49. Go to the dir where Hex Workshop is installed
  50. Copy hworks32.exe to hworks32.bak (for backup) and to 1.exe (for disassembling)
  51. Start W32Dasm
  52. Click on Disassembler --> Open File to be disassembled
  53. Open 1.exe from the directory where you installed Hex Workshop.
  54. Click on Search --> Find Text
  55. Search for "You have entered an"
  56. Umm, you should have found
  57. "Name: DialogID_0075" just one line up the error message
  58. Now, you know which Dialog ID it uses when you enter a wrong serial #.
  59. Search for DialogID_0075
  60. Ignore, the first "Reference to Dialog: DialogID_0075"
  61. It's only a thing so that new crackers think that it's the right place, and
  62. boom, invalid serial number, even when you patched it.
  63. So, search for the last reference to dialogID_0075
  64. Now, scroll up until you find:
  65. "* Referenced by a (U)nconditional or (C)onditional Jump at Address:
  66. | :004262B3 (C)"  <-- Interesting
  67.  
  68. Now, go to the location where the jump occured (004262B3)
  69. At this location, you can see "je 00426332"
  70. That's it!!! You found the location to patch!!!
  71. And now you just need to patch it! (described in part 3)
  72.  
  73.  
  74. 3) Patching the location
  75.    ─────────────────────
  76.  
  77. Click on the location where the jump has occured.
  78. In the status bar, you'll see: "Code Data @: 004262B3 @Offset 000256B3h"
  79. So the offset address is 256B3 (you don't need the 0's and the h)
  80. Ok, remember this.
  81. Start Hacker's View to edit the exe file of hex workshop (hiew hworks32.exe)
  82. Press F4, select Decode and press enter
  83. Press F5 (goto offset) and type 256B3 + Enter
  84. Now, you're almost done....
  85. Press F3 (To edit the program)
  86. You can see 0F84 and some other things. 0F84 stands for je (jump if equal)
  87. Why "if equal"? Because there's a flag set to 0 (wrong) and if the flag of the
  88. code that you entered is 0 (wrong), it will be equal to the other flag (quite
  89. complicated ;) )
  90. Ok, so we have to replace je to jne (jump if not equal)
  91. The Hex code for jne if 0F85, so type 0F85.
  92. Now, press F9 to update the file and F10 to exit.
  93. Start Hex Workshop.
  94. Click on Help --> About
  95. Enter any code
  96. Click on Register
  97. It will ask you your name/company
  98. Voila!!! Hex Workshop is now Registered! You've made it!
  99.  
  100.  
  101. 4) Writing a patcher in C++
  102.    ────────────────────────
  103.  
  104. Now, to release the crack, you have to make what we call a patch.
  105. Yeah, you can't distribute the exe for two reasons:
  106. 1) It's illegal (a patch isn't illegal: it's your prog; but when a persons uses
  107. it, it's illegal)
  108. 2) It's quite big for a crack
  109.  
  110. Here's the C++ source code of the patcher:
  111.  
  112. -------------------------------cut here---------------------------------------
  113. #include <stdio.h>
  114.  
  115. long filesize(FILE *stream)
  116. {
  117.    long curpos, length;
  118.    curpos = ftell(stream);
  119.    fseek(stream, 0L, SEEK_END);
  120.    length = ftell(stream);
  121.    fseek(stream, curpos, SEEK_SET);
  122.    return length;
  123. }
  124.  
  125. main() {
  126.  
  127. int   counter;
  128. FILE *filename;
  129. unsigned char readbyte;
  130.  
  131. long int offset[1] = {
  132.         153268 }; // Offset address
  133.  
  134. unsigned char data[2] = {
  135.         132, 133 }; // Data to be written
  136.  
  137.  
  138. printf(" ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄\n"); // Displays the logo
  139. printf("█▀                                   ▀█\n");
  140. printf("█          Hex Workshop v2.54         █\n");
  141. printf("█          ENTER ANY SERIAL #         █\n");
  142. printf("█              BY dC/CBE              █\n");
  143. printf("█      E-mail: dc_cbe@hotmail.com     █\n");
  144. printf("█      Website: http://cbe.ml.org     █\n");
  145. printf("█         IRC: #cbe98 on Efnet        █\n");
  146. printf("█▄                                   ▄█\n");
  147. printf(" ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀\n");
  148. printf("\n■ OPENING FILE: ");
  149. if ((filename = fopen("HWORKS32.EXE", "r+")) == NULL) {
  150.       printf("OK!\n■ CHECKING SIZE : ");
  151.  if (filesize(filename) == 678912) {
  152.       printf("OK!\n■ PATCHING FILE : ");
  153.        for (counter=1;counter<2;counter++) {
  154.           fseek(filename,offset[counter-1],SEEK_SET);
  155.           fscanf(filename,"%c",&readbyte);
  156.       if (readbyte == data[(counter*2)-2]) {
  157.       fseek(filename,offset[counter-1],SEEK_SET);
  158.       fprintf(filename,"%c",data[(counter*2)-1]);
  159.       } else
  160.           {printf("ERROR!\n■ FILE ALREADY PATCHED OR DIFFERENT!\n"); fclose(filename); return 1; }
  161.       }
  162.        printf("OK!\n■ PATCH SUCCESSFULL! Enjoy it!\n");
  163.    } else printf("ERROR!\n■ FILESIZE MISMATCH!!\n");
  164.        fclose(filename);
  165. } else printf("ERROR!\n■ CAN'T OPEN FILE!!\n");
  166. return 0;
  167. }
  168. ----------------------------------cut here------------------------------------
  169.  
  170. Now, compile this patcher (with a C++ compiler) and you can distribute your
  171. crack!
  172.  
  173.  
  174. 5) Final Notes
  175.    ───────────
  176.  
  177. I hope that you enjoyed reading this tutorial as much as I did writing it!
  178. I wrote it for pist0ls who is a newbie and who wants to learn how to crack...
  179. Good luck, pist0ls!
  180.  
  181. -da Cracker/CBE
  182. dc_cbe@hotmail.com
  183. http://cbe.ml.org
  184. #cbe98 on Efnet
  185.