home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / HTOCRK61.ZIP / HTOCRK61.TXT < prev    next >
Text File  |  1996-05-20  |  24KB  |  854 lines

  1.                      HOW TO CRACK, by +ORC, A TUTORIAL
  2.  
  3. ---------------------------------------------------------------------------
  4.  
  5.                         Lesson 6.1: Funny tricks (1)
  6.  
  7. ---------------------------------------------------------------------------
  8.  
  9. LESSON 6 (1) - Funny tricks.  Xoring, Junking, Sliding
  10.  
  11. EXERCISE 01: [LARRY in search of the King]
  12.  
  13.      Before the next step let's resume what you have learned in
  14.  
  15. the lessons 3-5, beginning with a very simple crack exercise
  16.  
  17. (again, we'll use the protection scheme of a game, for the
  18.  
  19. reasons explained in lesson 1): SEARCH FOR THE KING (Version
  20.  
  21. 1.1.). This old "Larry" protection sequence, is a "paper
  22.  
  23. protection" primitive. It's a very widespread (and therefore easy
  24.  
  25. to find) program, and one of the first programs that instead of
  26.  
  27. asking meaningful passwords (which offer us the possibility to
  28.  
  29. immediately track them down in memory) asked for a random number
  30.  
  31. that the good buyer could find on the manual, whereby the bad
  32.  
  33. cracker could not. (Here you choose -with the mouse- one number
  34.  
  35. out of 5 possible for a "gadget" choosen at random). I don't need
  36.  
  37. any more to teach you how to find the relevant section of code
  38.  
  39. (-> see lesson 3). Once you find the protection, this is what you
  40.  
  41. get:
  42.  
  43. :protection_loop
  44.  
  45.  :C922 8E0614A3       MOV     ES,[A314]
  46.  
  47. ...
  48.  
  49.  :C952 50 0E          PUSH    AX & CS
  50.  
  51.  :C954 E81BFF         CALL    C872      <- call protection scheme
  52.  
  53.  :C957 5B             POP     BX twice
  54.  
  55.  :C959 8B76FA         MOV     SI,[BP-06] <- prepare store_room
  56.  
  57.  :C95C D1E6           SHL     SI,1       <- final prepare
  58.  
  59.  :C95E 8942FC         MOV     [BP+SI-04],AX  <- store AX
  60.  
  61.  :C961 837EFA00       CMP     Word Ptr [BP-06],+00  <- good_guy?
  62.  
  63.  :C965 75BB           JNZ     C922           <- loop, bad guy
  64.  
  65.  :C967 8E0614A3       MOV     ES,[A314]
  66.  
  67.  :C96B 26F606BE3501   TEST    Byte Ptr ES:[35BE],01  <- bad_guy?
  68.  
  69.  :C971 74AF           JZ C922                <- loop, bad guy
  70.  
  71.  :C973 8B46FC         MOV     AX,[BP-04]...  <- go on good guy
  72.  
  73. Let's see now the protection scheme called from :C954
  74.  
  75.  :C872 55             PUSH    BP
  76.  
  77. ...
  78.  
  79.  :C8F7 90             NOP
  80.  
  81.  :C8F8 0E             PUSH    CS
  82.  
  83.  :C8F9 E87234         CALL    FD6E <- call user input
  84.  
  85.  :C8FC 5B             POP     BX
  86.  
  87.  :C8FD 5B             POP     BX
  88.  
  89.  :C8FE 8B5E06         MOV     BX,[BP+06]
  90.  
  91.  :C901 D1E3           SHL     BX,1
  92.  
  93.  :C903 39872266       CMP     [BX+6622],AX  <- right answer?
  94.  
  95.  :C907 7505           JNZ     C90E      <- no, beggar_off
  96.  
  97.  :C909 B80100         MOV     AX,0001   <- yes, AX=1
  98.  
  99.  :C90C EB02           JMP     C910
  100.  
  101.  :C90E 2BC0           SUB     AX,AX     <- beggar_off with AX=0
  102.  
  103.  :C910 8BE5           MOV     SP,BP
  104.  
  105.  :C912 5D             POP     BP
  106.  
  107.  :C913 CB             RETF              <- back to main
  108.  
  109. Here follow 5 questions, please answer all of them:
  110.  
  111. 1)   Where in memory (in which locations) are stored the "right"
  112.  
  113.      passnumbers? Where in memory is the SEGMENT of this
  114.  
  115.      locations stored? How does the scheme get the OFFSET?
  116.  
  117. 2)   Would setting NOPs instructions at :C965 and :C971 crack?
  118.  
  119.      Would it be a good idea?
  120.  
  121. 3)   Would changing :C907 to JZ crack? Would it be a good idea?
  122.  
  123. 4)   Would changing :C907 to JNZ C909 crack? Would it be a good
  124.  
  125.      idea?
  126.  
  127. 5)   Write down (and try) at least 7 OTHER different patches to
  128.  
  129.      crack this scheme in spades (without using any NOP!).
  130.  
  131. Uff! By now you should be able to do the above 5 exercises in
  132.  
  133. less than 15 minutes WITHOUT USING THE DEBUGGER! Just look at the
  134.  
  135. data above and find the right answers feeling them... (you 'll
  136.  
  137. now which one are the right one checking with your debugger...
  138.  
  139. score as many points as you like for each correct answer and sip
  140.  
  141. a good Martini-Wodka... do you know that the sequence should
  142.  
  143. ALWAYS be 1) Ice cubes 2) Martini Dry 3) Wodka Moskovskaja 4)
  144.  
  145. olive 5) lemon 6) Schweppes Indian tonic?
  146.  
  147. Let's now come to the subject of this lesson:
  148.  
  149. -----> [Xoring] (Simple encryption methods)
  150.  
  151.      One easy way to encrypt data is the XOR method. XOR is a bit
  152.  
  153. manipulation instruction that can be used in order to cipher and
  154.  
  155. decipher data with the same key:
  156.  
  157.  Byte to encrypt                   key            result
  158.  
  159.      FF                  XOR       A1               5E
  160.  
  161.      5E                  XOR       A1               FF
  162.  
  163. As you can see XOR offers a very easy way to encrypt or to
  164.  
  165. decrypt data, for instance using the following routine:
  166.  
  167.  encrypt_decrypt:
  168.  
  169.      mov  bx, offset_where_encryption/decryption_starts
  170.  
  171.  xor_loop:
  172.  
  173.      mov  ah, [bx]            <-   get current byte
  174.  
  175.      xor  ah, encrypt_value   <-   engage/disengage xor
  176.  
  177.      mov [bx], ah             <-   back where you got it
  178.  
  179.      inc  bx                  <-   ahead one byte
  180.  
  181.      cmp  bx, offset_start_+_size  <- are we done?
  182.  
  183.      jle  xor_loop            <-   no, then next cycle
  184.  
  185.      ret                      <-   back where we came from
  186.  
  187. The encrypt_value can be always the same (fixed) or chosen at
  188.  
  189. random, for instance using INT_21, service 2Ch (get current time)
  190.  
  191. and choosing as encrypt_value the value reported in DL (but
  192.  
  193. remembering to discard the eventual value 0, coz otherwise it
  194.  
  195. would not xor anything at all!)
  196.  
  197.  random_value:
  198.  
  199.      mov  ah,2Ch
  200.  
  201.      int  21h
  202.  
  203.      cmp  dl,0
  204.  
  205.      je   random_value
  206.  
  207.      mov  encrypt_value,dl
  208.  
  209.      The problem with XORing (and with many other encryption
  210.  
  211. methods), is that the part of the code that calls the encryption
  212.  
  213. routine cannot be itself encrypted. You'll somewhere have, "in
  214.  
  215. clear" the encryption key.
  216.  
  217.      The protectionist do at times their best to hide the
  218.  
  219. decrypting routine, here are some common methods:
  220.  
  221. -----> JUNK FILLING, SLIDING KEYS AND MUTATING DECRYPTORS
  222.  
  223.   These are the more common protection method for the small
  224.  
  225. decryption part of the program code. This methods, originally
  226.  
  227. devised to fool signature virus scanners, have been pinched from
  228.  
  229. the polymorphic virus engines of our fellows viriwriters, and are
  230.  
  231. still in use for many simple decryption protection schemes. For
  232.  
  233. parts of the following many thanks go to the [Black Baron], it's
  234.  
  235. a real pity that so many potential good crackers dedicate so much
  236.  
  237. time to useless (and pretty repetitive) virus writing instead of
  238.  
  239. helping in our work. This said, virus studying is VERY important
  240.  
  241. for crackers coz the code of the viri is
  242.  
  243. *    ULTRAPROTECTED
  244.  
  245. *    TIGHT AND EFFECTIVE
  246.  
  247. *    CLOAKED AND CONCEALED.
  248.  
  249. Let's show as example of the abovementioned protection tactics
  250.  
  251. the following ultra-simple decryptor:
  252.  
  253.           MOV      SI,jumbled_data     ;Point to the jumbled data
  254.  
  255.           MOV      CX,10               ;Ten bytes to decrypt
  256.  
  257. mn_loop:  XOR      BYTE PTR [SI],44    ;XOR (un_scramble!) a byte
  258.  
  259.           INC      SI                  ;Next byte
  260.  
  261.           LOOP     mn_loop             ;Loop the 9 other bytes
  262.  
  263. This small program will XOR the ten bytes at the location pointed
  264.  
  265. to by SI with the value 44.  Providing the ten bytes were XORed
  266.  
  267. with 44 prior to running this decryptor the ten bytes will be
  268.  
  269. restored to their original state.
  270.  
  271. In this very simple case the "key" is the value 44. But there are
  272.  
  273. several tricks involving keys, the simplest one being the use of
  274.  
  275. a "sliding" key: a key that will be increased, or decreased, or
  276.  
  277. multiplied, or bit-shifted, or whatever, at every pass of the
  278.  
  279. loop.
  280.  
  281. A possible protection can also create a true "Polymorph"
  282.  
  283. decryptor, a whole decryptor ROUTINE that looks completely
  284.  
  285. different on each generation. The trick is to pepper totally
  286.  
  287. random amounts of totally random instructions, including JUMPS
  288.  
  289. and CALLS, that DO NOT AFFECT the registers that are used for the
  290.  
  291. decryption. Also this kind of protection oft uses a different
  292.  
  293. main decryptor (possibly from a selection of pre-coded ones) and
  294.  
  295. oft alters on each generation also all the registers that the
  296.  
  297. decryptor uses, invariably making sure that the JUNK code that
  298.  
  299. it generates doesn't destroy any of the registers used by the
  300.  
  301. real decryptor!  So, with these rules in mind, here is our simple
  302.  
  303. decryptor again:
  304.  
  305.          MOV      DX,10              ;Real part of the decryptor!
  306.  
  307.          MOV      SI,1234            ;junk
  308.  
  309.          AND      AX,[SI+1234]       ;junk
  310.  
  311.          CLD                         ;junk
  312.  
  313.          MOV      DI,jumbled_data    ;Real part of the decryptor!
  314.  
  315.          TEST     [SI+1234],BL       ;junk
  316.  
  317.          OR       AL,CL              ;junk
  318.  
  319. mn_loop: ADD      SI,SI              ;junk instr, but real loop!
  320.  
  321.          XOR      AX,1234            ;junk
  322.  
  323.          XOR      BYTE PTR [DI],44   ;Real part of the decryptor!
  324.  
  325.          SUB      SI,123             ;junk
  326.  
  327.          INC      DI                 ;Real part of the decryptor!
  328.  
  329.          TEST     DX,1234            ;junk
  330.  
  331.          AND      AL,[BP+1234]       ;junk
  332.  
  333.          DEC      DX                 ;Real part of the decryptor!
  334.  
  335.          NOP                         ;junk
  336.  
  337.          XOR      AX,DX              ;junk
  338.  
  339.          SBB      AX,[SI+1234]       ;junk
  340.  
  341.          AND      DX,DX              ;Real part of the decryptor!
  342.  
  343.          JNZ      mn_loop            ;Real part of the decryptor!
  344.  
  345. As you should be able to see, quite a mess! But still executable
  346.  
  347. code. It is essential that any junk code generated by the
  348.  
  349. Polymorph protection is executable, as it is going to be peppered
  350.  
  351. throughout the decryptor. Note, in this example, that some of the
  352.  
  353. junk instructions use registers that are actually used in the
  354.  
  355. decryptor! This is fine, providing the values in these
  356.  
  357. registers aren't destroyed. Also note, that now we have random
  358.  
  359. registers and random instructions on each generation. So, a
  360.  
  361. Polymorph protection Engine can be summed up into three major
  362.  
  363. parts:
  364.  
  365.   1 .. The random number generator.
  366.  
  367.   2 .. The junk code generator.
  368.  
  369.   3 .. The decryptor generator.
  370.  
  371. There are other discrete parts but these three are the ones where
  372.  
  373. most of the work goes on!
  374.  
  375. How does it all work?  Well a good protection would
  376.  
  377. *    choose a random selection of registers to use for the
  378.  
  379. decryptor and leave the remaining registers as "junk" registers
  380.  
  381. for the junk code generator.
  382.  
  383. *    choose one of the compressed pre-coded decryptors.
  384.  
  385. *    go into a loop generating the real decryptor, peppered with
  386.  
  387. junk code.
  388.  
  389. From the protectionist's point of view, the advantages of this
  390.  
  391. kind of method are mainly:
  392.  
  393. *    the casual cracker will have to sweat to find the decryptor.
  394.  
  395. *    the casual cracker will not be able to prepare a "patch" for
  396.  
  397. the lamers, unless he locates and patches the generators, (that
  398.  
  399. may be compressed) coz otherwise the decryptor will vary every
  400.  
  401. time.
  402.  
  403. To defeat this kind of protection you need a little "zen" feeling
  404.  
  405. and a moderate knowledge of assembler language... some of the
  406.  
  407. junk instructions "feel" quite singular when you look at them
  408.  
  409. (->see lesson B). Besides, you (now) know what may be going on
  410.  
  411. and memory breakpoints will immediately trigger on decryption...
  412.  
  413. the road is open and the rest is easy (->see lessons 3-5).
  414.  
  415. -----> Starting point number magic
  416.  
  417. For example, say the encrypted code started at address 10h, the
  418.  
  419. following could be used to index this address:
  420.  
  421.  MOV   SI,10h         ;Start address
  422.  
  423.  MOV   AL,[SI]        ;Index from initial address
  424.  
  425. But sometimes you'll instead find something like the following,
  426.  
  427. again based on the encrypted code starting at address 10h:
  428.  
  429.  MOV   DI,0BFAAh      ;Indirect start address
  430.  
  431.  MOV   AL,[DI+4066h)  ;4066h + 0BFAAh = 10010h (and FFFF = 10h)!!
  432.  
  433. The possible combinations are obviously infinite.
  434.  
  435. [BIG KEYS] (Complicated encryption methods)
  436.  
  437.      Prime number factoring is the encryption used to protect
  438.  
  439. sensible data and very expensive applications. Obviously for few
  440.  
  441. digit keys the decoding is much easier than for, say, 129 or 250
  442.  
  443. digit keys. Nevertheless you can crack those huge encryption too,
  444.  
  445. using distributed processing of quadratic sieve equations (which
  446.  
  447. is far superior for cracking purpose to the sequential processing
  448.  
  449. methods) in order to break the key into prime numbers. To teach
  450.  
  451. you how to do this sort of "high" cracking is a little outside
  452.  
  453. the scope of my tutorial: you'll have to write a specific short
  454.  
  455. dedicated program, linking together more or less half a thousand
  456.  
  457. PC for a couple of hours, for a 250 bit key, this kind of things
  458.  
  459. have been done quite often on Internet, were you can also find
  460.  
  461. many sites that do untangle the mysteries (and vagaries) of such
  462.  
  463. techniques.
  464.  
  465.   As References I would advocate the works of Lai Xueejia, those
  466.  
  467. swiss guys can crack *everything*. Begin with the following:
  468.  
  469. Xuejia Lai, James Massey, Sean Murphy, "Markov Ciphers and
  470.  
  471.      Differential Cryptanalysis", Advances in Cryptology,
  472.  
  473.      Eurocrypt 1991.
  474.  
  475. Xuejia Lai, "On the Design and Security of Block Ciphers",
  476.  
  477.      Institute for Signal and Information Processing,
  478.  
  479.      ETH-Zentrum, Zurich, Switzerland, 1992
  480.  
  481. Factoring and primality testing is obviously very important for
  482.  
  483. this kind of crack. The most comprehensive work I know of is:
  484.  
  485. (300 pages with lengthy bibliography!)
  486.  
  487.     W. Bosma & M. van der Hulst
  488.  
  489.     Primality Testing with Cyclotomy
  490.  
  491.     Thesis, University of Amsterdam Press.
  492.  
  493. A very good old book you can incorporate in your probes to build
  494.  
  495. very effective crack programs (not only for BBS accesses :=) is
  496.  
  497. *the* "pomerance" catalog:
  498.  
  499. Pomerance, Selfridge, & Wagstaff Jr.
  500.  
  501.     The pseudoprimes to 25*10^9
  502.  
  503.     Math. Comp. Vol 35 1980 pp. 1003-1026
  504.  
  505. Anyway... make a good search with Lykos, and visit the relevant
  506.  
  507. sites... if encryption really interests you, you'll be back in
  508.  
  509. two or three (or thirty) years and you'll resume cracking with
  510.  
  511. deeper erudite knowledge.
  512.  
  513. [PATENTED PROTECTION SYSTEMS]
  514.  
  515.   The study of the patented enciphering methods is also *quite*
  516.  
  517. interesting for our aims :=) Here are some interesting patents,
  518.  
  519. if you want to walk these paths get the complete texts:
  520.  
  521.      [BEST]    USPat 4168396 to Best discloses a microprocessor
  522.  
  523. for executing enciphered programs. Computer programs which have
  524.  
  525. been enciphered during manufacture to deter the execution of the
  526.  
  527. programs in unauthorized computers, must be decrypted before
  528.  
  529. execution. The disclosed microprocessor deciphers and executes
  530.  
  531. an enciphered program one instruction at a time, instead of on
  532.  
  533. a continuous basis, through a combination of substitutions,
  534.  
  535. transpositions, and exclusive OR additions, in which the address
  536.  
  537. of each instruction is combined with the instruction. Each unit
  538.  
  539. may use a unique set of substitutions so that a program which can
  540.  
  541. be executed on one microprocessor cannot be run on any other
  542.  
  543. microprocessor. Further, Best cannot accommodate a mixture of
  544.  
  545. encrypted and plain text programs.
  546.  
  547.      [JOHNSTONE]    USPat 4120030 to Johnstone describes a
  548.  
  549. computer in which the data portion of instructions are scrambled
  550.  
  551. and in which the data is of necessity stored in a separate
  552.  
  553. memory. There is no disclosure of operating with instructions
  554.  
  555. which are completely encrypted with both the operation code and
  556.  
  557. the data address portion being unreadable without a corresponding
  558.  
  559. key kernel.
  560.  
  561.      [TWINPROGS]    USPat 4183085 describes a technique for
  562.  
  563. protecting software by providing two separate program storages.
  564.  
  565. The first program storage is a secure storage and the second
  566.  
  567. program storage is a free storage. Security logic is provided to
  568.  
  569. check whether an output instruction has originated in the secure
  570.  
  571. store and to prevent operation of an output unit which receives
  572.  
  573. output instructions from the free storage. This makes it
  574.  
  575. difficult to produce information by loading a program into free
  576.  
  577. storage.
  578.  
  579.      [AUTHENTICATOR]     USPat 3996449 entitled "Operating System
  580.  
  581. Authenticator," discloses a technique for authenticating the
  582.  
  583. validity of a plain text program read into a computer, by
  584.  
  585. exclusive OR'ing the plain text of the program with a key to
  586.  
  587. generate a code word which must be a standard recognizable code
  588.  
  589. word which is successfully compared with a standard corresponding
  590.  
  591. code word stored in the computer. If there is a successful
  592.  
  593. compare, then the plain text program is considered to be
  594.  
  595. authenticated and is allowed to run, otherwise the program
  596.  
  597. is not allowed to run.
  598.  
  599. ELEMENTS OF [PGP] CRACKING
  600.  
  601. In order to try to crack PGP, you need to understand how these
  602.  
  603. public/private keys systems work. Cracking PGP seems extremely
  604.  
  605. difficult, though... I have a special dedicated "attack" computer
  606.  
  607. that runs 24 hours on 24 only to this aim and yet have only begun
  608.  
  609. to see the light at the famous other end of the tunnel. It's
  610.  
  611. hard, but good crackers never resign! We'll see... I publish here
  612.  
  613. the following only in the hope that somebody else will one day
  614.  
  615. be able to help...
  616.  
  617. In the public key cryptosystems, like PGP, each user has an
  618.  
  619. associated encryption key E=(e,n) and decryption key D=(d,n),
  620.  
  621. wherein the encryption keys for all users are available in a
  622.  
  623. public file, while the decryption keys for the users are only
  624.  
  625. known to the respective users. In order to maintain a high level
  626.  
  627. of security a user's decoding key is not determinable in a
  628.  
  629. practical manner from that user's encoding (public) key. Normally
  630.  
  631. in such systems, since
  632.  
  633.      e.multidot.d.ident.1 (mod(1 cm((p-1),(q-1)))),
  634.  
  635. (where "1 cm((p-1),(q-1))" is the least common multiple of the
  636.  
  637. numbers p-1 and q-1)
  638.  
  639. d can be determined from e provided p and q are also known.
  640.  
  641. Accordingly, the security of the system is dependent upon the
  642.  
  643. ability to determine p and q which are the prime factors of n.
  644.  
  645. By selecting p and q to be large primes, the resultant composite
  646.  
  647. number n is also large, and correspondingly difficult to factor.
  648.  
  649. For example, using known computer-implemented factorization
  650.  
  651. methods, on the order of 10.sup.9 years is required to factor a
  652.  
  653. 200 digit long number. Thus, as a practical matter, although a
  654.  
  655. user's encryption key E=(e,n) is public, the prime factors p and
  656.  
  657. q of n are effectively hidden from anyone due to the enormous
  658.  
  659. difficulty in factoring n. These aspects are described more fully
  660.  
  661. in the abundant publications on digital signatures and Public-Key
  662.  
  663. Cryptosystems. Most public/private systems relies on a message-
  664.  
  665. digest algorithm.
  666.  
  667.   A message-digest algorithm maps a message of arbitrary length
  668.  
  669. to a "digest" of fixed length, and has three properties:
  670.  
  671. Computing the digest is easy, finding a message with a given
  672.  
  673. digest "inversion" is hard, and finding two messages with the
  674.  
  675. same digest "collision" is also hard. Message-digest algorithms
  676.  
  677. have many applications, not only digital signatures and message
  678.  
  679. authentication. RSA Data Security's MD5 message-digest algorithm,
  680.  
  681. developed by Ron Rivest, maps a message to a 128-bit message
  682.  
  683. digest. Computing the digest of a one-megabyte message takes as
  684.  
  685. little as a second.  While no message-digest algorithm can yet
  686.  
  687. be secure, MD5 is believed to be at least as good as any other
  688.  
  689. that maps to a 128-bit digest.
  690.  
  691.   As a final gift, I'll tell you that PGP relies on MD5 for a
  692.  
  693. secure one-way hash function. For PGP this is troublesome, to say
  694.  
  695. the least, coz an approximate relation exists between any four
  696.  
  697. consecutive additive constants. This means that one of the design
  698.  
  699. principles behind MD4 (and MD5), namely to design a collision
  700.  
  701. resistant function, is not satisfied. You can construct two
  702.  
  703. chaining variables (that only differ in the most significant bit
  704.  
  705. of every word) and a single message block that yield the same
  706.  
  707. hashcode. The attack takes a few minutes on a PC. From here you
  708.  
  709. should start, as I did.
  710.  
  711. [DOS 4GW] cracking - This is only a very provisory part of this
  712.  
  713. tutorial. DOS 4GW cracking will be much better described as soon
  714.  
  715. as [Lost soul] sends his stuff, if he ever does. For (parts of)
  716.  
  717. the following I thank [The Interrupt].
  718.  
  719.      Most applications of every OS, and also of DOS 4GW, are
  720.  
  721. written in C language, coz as you'll have already learned or,
  722.  
  723. either, you'll learn, only C allows you to get the "guts" of a
  724.  
  725. program, almost approaching the effectiveness of assembler
  726.  
  727. language.
  728.  
  729.      C is therefore the LANGUAGE OF CHOICE for crackers, when you
  730.  
  731. prepare your tools and do not directly use assembler routines.
  732.  
  733. Besides... you'll be able to find VERY GOOD books about C for
  734.  
  735. next to nothing in the second hand bookshops. All the lusers are
  736.  
  737. throwing money away in spades buying huge, coloured and
  738.  
  739. absolutely useless books on unproductive "bloated" languages like
  740.  
  741. Visual basic, C++ and Delphy. Good C new books are now rare
  742.  
  743. (books on assembler language have always been) and can be found
  744.  
  745. almost exclusively on the second hand market. Find them, buy
  746.  
  747. them, read them, use them for your/our aims. You can find a lot
  748.  
  749. of C tutorials and of C material on the Web, by all means DO IT!
  750.  
  751. Be a conscientious cracker... learn C! It's cheap, lean, mean and
  752.  
  753. very productive (and creative) :=)
  754.  
  755.      Back to the point: most stuff is written in C and therefore
  756.  
  757. you need to find the "main" sub-routine inside the asm. With
  758.  
  759. DOS/4GW programs, search the exe file for "90 90 90 90", almost
  760.  
  761. always it'll be at the start of the compiled code. Now search for
  762.  
  763. an INT_21 executed with 4C in AH, the exec to dos code (if you
  764.  
  765. cannot "BPINT 21 AH=4C" with your tool, then search for the
  766.  
  767. sequence "b4 4c cd 21". This is the equivalent to [mov AH,4C &
  768.  
  769. int 21]: it's the most direct call, but as you'll have already
  770.  
  771. learned, there are half a dozen ways to put 4C in AX, try them
  772.  
  773. all in the order of their frequency).
  774.  
  775.      A few bytes above the INT_21 service 4C, you'll find the
  776.  
  777. call to the "main" subroutine: "E8 xx xx". Now place a "CC" byte
  778.  
  779. a few bytes above the call in the exe and run the exe under a
  780.  
  781. debugger. When the computer tries to execute the instruction
  782.  
  783. you'll be throw back in the debugger coz the "CC" byte acts as
  784.  
  785. INT_01 instruction. Then proceed as usual.
  786.  
  787. [THE "STEGONATED" PASSWORD HIDEOUT]
  788.  
  789.   A last, very nice trick should be explained to every wannabe
  790.  
  791. cracker, coz it would be embarrassing to search for passwords or
  792.  
  793. protection routines that (apparently) are not there. They may be
  794.  
  795. hidden INSIDE a picture (or a *.waw file for that matter). This
  796.  
  797. is steganography, a method of disguising messages within other
  798.  
  799. media.
  800.  
  801.   Depending on how many shades of grey or hues of colour you want
  802.  
  803. to have, a pixel can be expressed using 8. 16, 32 or even more
  804.  
  805. bits. If the least significant bit is changed. the shade of the
  806.  
  807. pixel is altered only one-256th, one-65,OOOth or even less. No
  808.  
  809. human eye could tell the difference.
  810.  
  811.   What the protectionist does, is hijack the least significant
  812.  
  813. bit in each pixel of a picture. It uses that bit to store one bit
  814.  
  815. of a protection, or of a password (or of a file, or of a secret
  816.  
  817. message). Because digitized pictures have lots of pixels, it's
  818.  
  819. possible to store lots of data in a single picture. A simple
  820.  
  821. algorithm will transfer them to the relevant parts of the program
  822.  
  823. when it needs be, and there we'll intercept them. You'll need to
  824.  
  825. learn very well the zen-cracking techniques to smell this kind
  826.  
  827. of stuff though (-> see lesson B).
  828.  
  829. Well, that's it for this lesson, reader. Not all lessons of my
  830.  
  831. tutorial are on the Web.
  832.  
  833.      You 'll obtain the OTHER missing lessons IF AND ONLY IF you
  834.  
  835. mail me back (via anon.penet.fi) with some tricks of the trade
  836.  
  837. I may not know that YOU discovered. Mostly I'll actually know
  838.  
  839. them already, but if they are really new you'll be given full
  840.  
  841. credit, and even if they are not, should I judge that you
  842.  
  843. "rediscovered" them with your work, or that you actually did good
  844.  
  845. work on them, I'll send you the remaining lessons nevertheless.
  846.  
  847. Your suggestions and critics on the whole crap I wrote are also
  848.  
  849. welcomed.
  850.  
  851.                                 E-mail +ORC
  852.  
  853.                        an526164@anon.penet.fi (+ORC)
  854.