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

  1.                      HOW TO CRACK, by +ORC, A TUTORIAL
  2.  
  3. ---------------------------------------------------------------------------
  4.  
  5.               LESSON C (1) - How to crack, Cracking as an art
  6.  
  7. ---------------------------------------------------------------------------
  8.  
  9.                         [BARCODES] [INSTANT ACCESS]
  10.  
  11.                    --------------------------------------
  12.  
  13. [BARCODES]
  14.      First of all, let me stress the importance of cracking in
  15. our everyday life. Cracking it's not just about software, it's
  16. about information, about all patterns of life. To crack is to
  17. refuse to be controlled and used by others, to crack is to be
  18. free. But you must also be yourself free from petty conventions
  19. in order to crack properly.
  20.      You must learn to discerne cracking possibilities all around
  21. yourself, and believe me, the development of this ghastly society
  22. brings every day new codes, protections and concealing
  23. mechanismes.
  24.      All around us grows a world of codes and secret and not so
  25. secret patterns. Codes that are at times so familiar and common
  26. that we do not even notice them any more... and yet they are
  27. there to fool us, and yet they offer marvellous cracking
  28. possibilities.
  29.      Let's take as an striking example BARCODES... those little
  30. lines that you see on any book you buy, on any bottle you get,
  31. on any item around you... do you know how they work? If you do
  32. not you may be excused, but you cannot be excused if you never
  33. had the impulse to understand them... crackers are curious by
  34. nature... heirs of an almost extinct race of researchers that has
  35. nothing in common with the television slaves and the publicity
  36. and trend zombies around us. Cracker should always be capable of
  37. going beyond the obvious, seek knowledge where others do not see
  38. and do not venture.
  39.  
  40. [BARCODE HISTORY]
  41.      Let's begin with a little history. Universal Product Code
  42. (UPC) was adopted for commercial use by the grocery industry in
  43. the USA. Among the advantages were a rapid, accurate and reliable
  44. way of entering stock information into a computer and the
  45. possibility to sack a lot of workers and to do more profit. The
  46. early success led to the development of the European Article
  47. Numbering System (EAN), a symbology similar to UPC, that is
  48. widely used in Europe and in the rest of the World. I'll teach
  49. you to crack this one, since I do not -fortunately- live in the
  50. States. Keep in mind, anyway, that there are different barcode
  51. symbologies, each with its own particular pattern of bars. The
  52. UPC/EAN code used on retail products is an all-numeric code; so
  53. is the Interleaved 2 of 5 Code. Code 39 includes upper case
  54. letters, digits, and a few symbols. Code 128 includes every
  55. printable and unprintable ASCII character code. The most new one
  56. is a 2-D code. These are special rectangular codes, called
  57. stacked barcodes or matrix codes. They can store considerably
  58. more information than a standard barcode. They require special
  59. readers which cost more than a standard scanner. The practical
  60. limit for a standard barcode depends on a number of factors, but
  61. 20 to 25 characters is an approximate maximum. For applications
  62. that need more data, matrix codes are used. For example, the next
  63. time you receive a package from United Parcel Service look for
  64. a small square label with a pattern of dots and a small bullseye
  65. in the centre. This is a MaxiCode label, and it is used by UPS
  66. for automatic destination sortition.
  67.      The manufacturer's ID number on the barcode uniquely
  68. identifies products. These numbers are managed by the Uniform
  69. Code Council in Dayton, Ohio for the States and Canada and by the
  70. EAN authority (Internationale Article Numbering Association) in
  71. Bruxelles, for Europe and the rest of the World. The
  72. manufacturer's ID number accounts for some digits of the code,
  73. which leaves other digits to be assigned in any way the producer
  74. wants. He provides retail outlets with a list of his products and
  75. their assigned codes so that they can be entered in the cash
  76. register system. Many codes are NOT on the products and are added
  77. by the supermarkets on the fly, using an internal code schema
  78. that may be non standard. Now it's enough... let's crack.
  79.      BARCODES are the only thing an automated casher needs to see
  80. on a product to calculate its price and automatically catalogate
  81. the sold merchandise... imagine (just imagine it :=) coz it would
  82. be extremely illegal to act in this way) somebody would fasten
  83. an adhesive home-made codebar label direct on the top of the
  84. supermarket/mall/retail store label, say on a bottle of Pomerol
  85. (that's a very good but unfortunately very expensive french
  86. wine).
  87.      The new label would mean for the casher something like
  88. "cheap wine from Bordeaux, France, cost so and so, everything
  89. it's OK, do not worry"... do you think that anybody would come
  90. to the idea that there is something wrong with the label, with
  91. the bottle or with you? I have been codebaring for years and had
  92. only once a problem, coz my printer was running out of ink and
  93. the scanner in the supermarket could not read it... so what? Act
  94. uninterested, always wear jackets of the utmost quality, shetland
  95. pullovers and beautiful expensive shoes... (all articles that you
  96. may codebar too, by the way), in this society appearance and look
  97. count much more than substance and knowledge... LET'S USE THIS
  98. TO OUR ADVANTAGE! Nobody will ever come to the idea that you may
  99. actually really know the working of the scheme... coz codebar is
  100. pretty complicated and not exactly exceptionally public. On the
  101. Web there are a lot information about it, but most of them are
  102. useless, unless you know how to search most of the time you'll
  103. find only sentences like this one:
  104.           "The calculated check digit is the twelfth and final
  105.           digit in the U.P.C.code. It is calculated based on a
  106.           specific algorithm, and is necessary to ensure that
  107.           the number is read or key-entered correctly."
  108.  
  109. But good +ORC will now explain you everything you need to crack:
  110.  
  111. [THE 13 BAR "CODES"]
  112. Each barcode label has 13 values, from #0 to #12 (that's the EAN
  113. code, the UPC american one has only 12, from #0 to #11).
  114.      #0 and #1 indicate the origin of the product.
  115.      #2 to #11 give the article code
  116.      #12 (the last and 13th one) is a checksum value, that
  117.      verifies the validity of all the other numbers.
  118. How is it calculated? #12 is calculated in 4 steps
  119.      VALUE A:  You sum odd position numbers (#0+#2+#4+#6+#8+#10)
  120.      VALUE B:  You sum even position numbers and multiply by 3
  121.                ((#1+#3+#5+#7+#9+#11)*3)
  122.      VALUE C:  You sum value A and value B
  123.      VALUE D:  You mod value C (you divide by 10 and only keep
  124.      the remaining units, a very widespread checking scheme as
  125.      you'll see in the software part of this lesson)
  126.      If the result is not zero, you subtract it from 10.
  127. Now look at a barcode label, get some books or other barcoded
  128. items and *watch* it...
  129. Bar codes are supposed to have "quiet zones" on either side of
  130. the symbol. Quiet zones are blank areas, free of any printing or
  131. marks,typically 10 times the width of the narrowest bar or space
  132. in the bar code. Failure to allow adequate space on either side
  133. of the symbol for quiet zones can make it impossible to read the
  134. bar code.
  135. On the barcode there are two "borders", left and right, and a
  136. "middle" longer line. These three lines are longer than the
  137. others and are used to "regulate" the scanner to whatever
  138. dimension has been used for the barcode.
  139. #0 dwells left of the first (left) border and has a special
  140. meaning, the other 12 numbers are written "inside" the code and
  141. are divided in two "groups" by the middle bar.
  142. Each value is coded through SEVEN bars: black=1 and White=0.
  143. These form two couples of "optic" bars of different widths.
  144. We come now to the "magic" part: In order to bluff the
  145. simpletons, barcode uses three different SETS of characters to
  146. represent the values 0-9. This should make it impossible for you
  147. to understand what's going on, as usual, in this society, slaves
  148. should not need to worry with the real functioning of things.
  149.    Here are the graphic codes of the three graphic sets:
  150.  
  151.      CODE A            CODE B (XOR C)    CODE C (NOT A)
  152. 0:  0001101   (13)     0100111   (39)    1110010   (114)
  153. 1:  0011001   (25)     0110011   (51)    1100110   (102)
  154. 2:  0010011   (19)     0011011   (27)    1101100   (108)
  155. 3:  0111101   (61)     0100001   (33)    1000010   (066)
  156. 4:  0100011   (35)     0011101   (29)    1011100   (092)
  157. 5:  0110001   (49)     0111001   (57)    1001110   (078)
  158. 6:  0101111   (47)     0000101   (05)    1010000   (080)
  159. 7:  0111011   (59)     0010001   (17)    1000100   (068)
  160. 8:  0110111   (55)     0001001   (09)    1001000   (072)
  161. 9:  0001011   (11)     0010111   (23)    1110100   (116)
  162.  
  163. Borders:       101
  164. Centre:        01010
  165.  
  166. - The C graphic set is a "NOT A" graphic set.
  167. - The B graphic set is a "XOR C" graphic set.
  168. - each value has two couples of bars with different widths
  169.  
  170.  Now watch some labels yourself... see the difference between the
  171. numbers left and the numbers right? The first "half" of the
  172. barcode is coded using sets A and B, the second "half" using set
  173. C. As if that were not enough, A and B are used inside the first
  174. "half" in a combination that varies and depends from value #0,
  175. following 10 different patterns:
  176.               #1   #2   #3   #4   #5  #6
  177.    0          A    A    A    A    A    A
  178.    1          A    A    B    A    B    B
  179.    2          A    A    B    B    A    B
  180.    3          A    A    B    B    B    A
  181.    4          A    B    A    A    B    B
  182.    5          A    B    B    A    A    B
  183.    6          A    B    B    B    A    A
  184.    7          A    B    A    B    A    B
  185.    8          A    B    A    B    B    A
  186.    9          A    B    B    A    B    A
  187.  
  188. "Ah! Stupid buyer will never understand why the same values gives
  189. different bars! Nothing is as reliable as barcodes!" :=)
  190.  
  191. Let's take as example the codebar for Martini Dry:
  192. BARCODE:    8 0 00570 00425 7
  193. Let's see: we have a 8 0 0 = booze
  194. Then a 000570 as ABABBA and a 004257 as C
  195. "Even" sum: 8+0+5+0+0+2 = 15 (even sum)
  196. Then a 0+0+7+0+4+5= 16 and 16 *3 = 48 (odd sum)
  197. Then a 15+48=63
  198. 63 === 3
  199. 10 - 3 = 7 = checksum
  200. Pattern = 8 = ABABBA CCCCCC
  201.  
  202. OK, one more example: Osborne Windows programming series Volume
  203. 2 General purpose API functions (always here on my table)...
  204. BARCODE: 9 7 80078 81991 9
  205. Let's see: we have a 9 7 8 = book
  206. Then a 780078 as ABBABA and a 819919 as C
  207. "Even" sum: 9+8+5+8+8+4 = 42 (even sum)
  208. Then a 7+1+5+2+4+4= 23 and 23 * 3 = 69 (odd sum)
  209. Then a 42+69=111
  210. 111 === 1
  211. 10 - 1 = 9 = checksum
  212. Pattern = 9 = ABBABA
  213.  
  214. Well... what's the point of all this?
  215. The point, my pupils, is that who DOES NOT KNOW is taken along
  216. on a boat ride, who KNOWS and LEARNS can use his knowledge in
  217. order to try to beat blue and black the loathsome consumistic
  218. oligarchy where we are compelled to live. Try it out for
  219. yourself... if you crack correctly and wisely your supermarket,
  220. mall and library bills will be cut to almost zero.
  221.      Write a small program to print whichever codebar you fancy
  222. (or whichever your mall uses) in whichever size on whichever sort
  223. of label you (or better your targets) fancy... it's quickly done
  224. with Visualbasic or Delphy... but you'll not find much on the Web
  225. Alternatively you could also write, as I did long ago, a short
  226. c program in dos, using a modified upper char set... and there
  227. you are, have labels... see the world.
  228.      A small word of caution... crack only ONE item at time and
  229. try it out first with the SAME label for the same product... i.e.
  230. the correct code for that item, but on your own label. If it goes
  231. through your program works good, if not, nobody will ever be able
  232. to harm you. Anyway it never happens anything, never: the bar
  233. code reading equipments have great tolerance, coz the scanners
  234. must be able to recognize barcodes that have been printed on many
  235. different medias. You should choose labels similar to the ones
  236. effectively used only in order not to arise human suspects, coz
  237. for all the scanner itself cares, your label could be pink with
  238. green stripes and with orange hand-written, numbers. Mind you,
  239. we are still just academically imagining hypothetical situations,
  240. coz it would be extremely illegal to act in such an inconsiderate
  241. manner.
  242.      CRACKING POWER! It's true for barcodes, for Telecom bills,
  243. for Compuserve accounts, for Amexco cards, for banking cheques
  244. (do you know what MICR is? Magnetic Ink Character Recognition...
  245. the stylized little printing on the lower left of new cheques...
  246. there is a whole cracking school working on it), for registration
  247. numbers... you name it, they develope it, we crack it...
  248.      Begin with barcodes: it's easy, nice and pretty useful! Live
  249. in opulence, with the dignity and affluence that should always
  250. distinguish real crackers. Besides... you should see the
  251. assortment of 'Pomerols' in my "Cave-a-vin" :=)
  252.  
  253. [INSTANT ACCESS]
  254.      The (c) Instant access routines are a commercial protection
  255. scheme used to "unlock" complete commercial applications that
  256. have been encrypted on CD-
  257. ROMs which are distributed (mostly) through reviews.
  258.      This is an ideal cracking target: it's commercial software,
  259. complete, uncrippled and of (relatively) prominent quality, that
  260. you can get in tons for the price of a coke. Obviously this kind
  261. of protection represents an ideal subject for our lessons. This
  262. fairly intricate protection scheme has not yet been cracked by
  263. anybody that I am aware of, anyway not publicly, therefore it's
  264. an ideal candidate for a "strainer" to my university. I'll teach
  265. you here how to crack it in three lessons, C.1, C.2 and C.3. I warn
  266. you... it's a difficult cracking session, and this protection
  267. represents quite an intellectual challenge. But if you are
  268. seriously interested in our trade you will enjoy these lessons
  269. more than anything else.
  270.      This cracking is intended as an "assignment" for my +HCU
  271. "cracking university": you'll find inside lessons C.1 and C.2 a
  272. relatively deep "introduction" to Instant access cracking. This
  273. will teach you a lot anyway, and spare you hours of useless
  274. roaming around, bringing you straight to the cracking point. But
  275. I'll release the third part of this session, with the complete
  276. solution (lesson C.3) on the Web only in october 1996, not a day
  277. before. All the students that would like to apply to the Higher
  278. Cracking University, opening on the web 01/01/1997, should work
  279. in July, August and September (three months is more than enough
  280. time) on this assignment. They should crack completely the
  281. instant access scheme and send me their solutions, with a good
  282. documentation of their cracking sessions, before 30/09/1996
  283. (WATCH IT! You can crack this scheme in -at least- three
  284. different paths, be careful and choose the *best* one. WATCH IT!
  285. Some of the informations) in lesson C.1 and C.2 are slightly incorrect:
  286. check it!).
  287. There are four possibilities:
  288. 1)   The candidate has not found the crack or his solution is
  289.      not enough documented or not enough viable... the candidate
  290.      is therefore not (yet) crack-able, he will not be admitted
  291.      to the +HCU 1997 curses, better luck in 1998;
  292. 2)   The cracking solution proposed by the candidate is not as
  293.      good as mine (you'll judge for yourself in october) but it
  294.      works nevertheless... he'll be admitted at the 1997
  295.      courses;
  296. 3)   The cracking solution of the candidate is more or less
  297.      equal to mine, he'll be admitted, personally monitored, and
  298.      he'll get all the material he needs to crack on higher
  299.      paths;
  300. 4)   The cracking solution of the candidate is better than mine,
  301.      he'll be admitted, get all the material he wishes and asked
  302.      to teach us as well as study with us: "homines, dum docent,
  303.      discunt".
  304.  
  305. [Cracking Instant access]
  306.      The user that wants to "unlock" a software application
  307. protected with (c) Instant Access must enter first of all a
  308. REGISTRATION number string, which through a series of
  309. mathematical manipulations gives birth to a special "product"
  310. code. On the basis of this "product code" the user is asked to
  311. phone the commercial protectors (and pay) in order to get a
  312. special "unlock code" that will allow him to decrypt the relevant
  313. software.
  314.      This kind of "passnumber" protection routines are widely
  315. used for software unlocking, BBS access, server access, backdoor
  316. opening and many other protection schemes. We have already seen
  317. password cracks in different lessons of this tutorial (in
  318. particular Lessons 3.1 and 3.2 for DOS and Lessons 8.1, 8.2 and
  319. 9.1 for WIN) albeit on a more simplistic scale: there it did
  320. mostly not matter very much *HOW* you passed the protection: once
  321. passed, you could have access to the application. This is not the
  322. case with (c) Instant Access. Face it: it's a little boring, but
  323. important that you learn how to defeat intricate protection
  324. routines (you'll meet them often in the next years) and I believe
  325. that the following example will give you a "feeling" for the
  326. right cracking approach.
  327.      In this case we must not only "crack" this protection scheme
  328. but also study it thoroughly in order to achieve our blessed
  329. aims. This is a very good exercise: reverse disassembling will
  330. teach you a lot of little tricks that you'll be able to use in
  331. your other future cracking sessions.
  332.      Instant access (c) is a exceptionally widespread protection
  333. scheme, and it should be relatively easy for you to gather some
  334. encrypted software that has been protected with this method...
  335. *DO IT QUICKLY!!* After the Web publishing of this lessons (I am
  336. sending C.1 to 8 pages and 4 usenet groups on 25/06/1996) this
  337. protection is obviously as dead as a Dodo. The "Accessors" guys
  338. will have to conceive something smarter if they want to keep
  339. selling "protections" to the lamer producers of "big" software.
  340.      BTW, if you are reading this and are working for some
  341. commercial "protection" company, consider the possibility to
  342. double cross your masters! Deliver me anonymously all the future
  343. projects you are working on! That will amuse me, speed up the
  344. advent of a true altruistic society and earn you the respect of
  345. the better part of humanity.
  346.      As I said, many "huge" application are still protected with
  347. this "Instant access" system. I have personally bought at least
  348. 7 or 8 "second hand" CD-ROMs packed full with Microsoft, Lotus,
  349. Norton, Symantec, you name it, applications all "protected"
  350. through this crap. The cost of this bunch of CD-ROMs was the
  351. equivalent of a bottle of Dry Martini, maybe less. The same
  352. software is sold, unlocked, to zombies and lusers for ludicrous
  353. amounts of money.
  354.      Never buy CD-ROMs magazines when they appear! Be cool! Buy
  355. them two or three months after the publishing date! Buy
  356. "remainders" or "second hand" CD-ROM magazines "at kilo price"...
  357. Come to think of it, never buy *anything* when it appears or when
  358. some (paid) advertiser tells you to... remember that "trends",
  359. "vogues", "fashions" and "modes" are only different names for the
  360. whips that drill and chain the dull-witted slaves of this
  361. loathsome society: "clever crackers consider cool, crack cheap,
  362. cheat customary culture" (a rhetorical figure: an "Alliteration".
  363. To defend yourself learn rhetoric... it's a more powerful and
  364. more useful weapon than Kung-fu).
  365.      The "triple" password protection routine in (c) Instant
  366. Access is very interesting from a cracker point of view. It's a
  367. relatively complex scheme: I'll teach you to crack it in two
  368. phases: First of all you must find the "allowed" registration
  369. code, the one that "ignites" the "product code". We must crack
  370. and understand this re_code first if we want to crack the rest.
  371.      Just for the records, I am cracking here (c) Action Instant
  372. access version 1.0 (CD-ROM found on a old copy of "Personal
  373. Computer World" of August 1994, packed full with encrypted Lotus,
  374. Symantec, Claris and Wordperfect applications. Just to be sure
  375. I crosschecked my results with another CD-ROM which also has
  376. applications protected with (c) Instant Access: Paragon
  377. Publishing's PC OFFICE: the protection scheme remains the same).
  378. I am focusing for this lesson on the cracking of the specific
  379. protection for the encrypted Symantec's Norton Utilities v.8.0.
  380.      Please refer to the previous lessons for the basic
  381. techniques used in order to find the protection routine inside
  382. our babe... for "low" cracking purposes you -basically- type a
  383. number (in this case, where the input gets 10 numbers, we'll use
  384. "1212-1212-12"), do your search inside the memory (s 30:0
  385. lffffffff "your_string") and then set memory breakpoints on all
  386. the relevant memory locations till winice pops (I know, I know,
  387. buddies... there are more effective ways... but hold your mouth:
  388. for now we'll keep them among us: let's make things a little
  389. harder for the protectionists who read this... Besides: the old
  390. approach works here flawlessly). After getting the Registration
  391. window on screen the Winice standard procedure is:
  392.  :task                        ; how
  393.  :heap IABROWSE               ; where & what
  394.  :hwnd IABROWSE               ; get the Winhandle
  395.  :bpx [winhandle] WM_GETTEXT  ; pinpoint code
  396.  :bpx GetProcAddress          ; in case of funny routines
  397.  :dex 0 ds:dx                 ;          let's see their name
  398.  :gdt                         ; sniff the selectors
  399.  :s 30:0 lffffffff "Your_input_string" ; search in 4 giga data
  400.  :bpr [all memory ranges for your string that are above 80000000]
  401. and so on.  (continued in lesson C.2)
  402.  
  403. Well, that's it for this lesson, reader. Not all lessons of my
  404. tutorial are on the Web.
  405.      You 'll obtain the missing lessons IF AND ONLY IF you mail
  406. me back (via anon.penet.fi) with some tricks of the trade I may
  407. not know that YOU discovered. Mostly I'll actually know them
  408. already, but if they are really new you'll be given full credit,
  409. and even if they are not, should I judge that you rediscovered them
  410. with your work, or that you actually did good work on them,
  411. I'll send you the remaining lessons nevertheless. Your
  412. suggestions and critics on the whole crap I wrote are also
  413. welcomed.
  414.  
  415.                                 E-mail +ORC
  416.  
  417.                         +ORC an526164@anon.penet.fi
  418.