viprajput

G2 s4 Reverse Engineering

Sep 22nd, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.76 KB | None | 0 0
  1. Grade 2 Session 4
  2. ==================
  3.  
  4. Reverse Engineering
  5. ====================
  6.  
  7. Engineering : To manufacture a product.
  8. = Forward Engineering
  9. = Reverse Engineering
  10.  
  11. Forward Engineering
  12. ====================
  13. To use raw material and to make a fully working product
  14. Engineer a car :
  15. Tyre
  16. Engine
  17. Seats
  18.  
  19. Windows - Olly Debugger, Immunity Debugger
  20. Linux - GDB
  21.  
  22.  
  23.  
  24. 1. Memory Address Register (MAR):
  25. This register holds the address of memory where CPU wants to read or write data. When CPU wants to store some data in the memory or reads the data from the memory, it places the address of the required memory location in the MAR.
  26. 2. Memory Buffer Register (MBR):
  27. This register holds the contents of data or instruction read from, or written in memory. The contents of instruction placed in this register are transferred to the Instruction Register, while the contents of data are transferred to the accumulator or I/O register. In other words you can say that this register is used to store data/instruction coming from the memory or going to the memory.
  28. 3. Flag Register:
  29. The Flag register is used to indicate occurrence of a certain condition during an operation of the CPU. It is a special purpose register with size one byte or two bytes. Each bit of the flag register constitutes a flag (or alarm), such that the bit value indicates if a specified condition was encountered while executing an instruction.
  30.  
  31.  
  32. Reverse Engineering
  33. =====================
  34. We got the car, we will dismantle it, and will get the juicy stuff out of it.
  35. Softwares and products,
  36. CD keys
  37. Registration IDS
  38. To convert a demo software into a full working software
  39.  
  40. Eg.
  41.  
  42. Install Games in computer ----> Copy ---> crack|Patch and paste it, where it is installed. ---> Patching
  43.  
  44. Assembely Language Basics
  45. =========================
  46. 1. ADD
  47. add eax, ebx
  48. eax = eax + ebx
  49. add eax, 45
  50. eax = eax + 45
  51. 2. MUL
  52. 3. SUB
  53. 4. DIV
  54. 5. Push --> Enter data into the data structure
  55. 6. POP ---> Deletes the top most data from the stack.
  56.  
  57. Conditional Branching
  58. =====================
  59. 1. CMP --> Compare
  60. 2. JMP --> To Jump on certain memory address
  61. 3. JZ ---> Jump if the result is zero, to a certain memory location
  62. 4. JNZ --> Jump If the result is non zero
  63. 5. JE --> Jump if the data is equal to the data in accumulator
  64. 6. JNE --> Jump if the data is not equal to the data in accumulator
  65.  
  66.  
  67. Application Patching
  68. ====================
  69. There are some application, which are very badly coded and can be cracked and there are many bugs inside those application. We use application patching for fixing these bugs.
  70. We do not need to enter any CD keys, Seriel Number, or any sort of registery keys for getting the license and full fledge version of the application.
  71.  
  72. Tool > Debugger Tool
  73. Windows OS > OllyDBG
  74. > Immunity Debugger
  75. Linux > GDB > By Default installed in every linux based OS
  76.  
  77. OllyDBG
  78. =======
  79. It is GUI Based tool, which is used in application patching and used for reverse engineering as well.
  80. 1. Address Column
  81. 2. Referencce Column
  82. 3. Instruction Column
  83. 4. String Column
  84.  
  85. Reverse Engineering via Algorithm Reversing
  86. ===========================================
  87. We are going to make some changes in the application's algorithm and will make it work as we want it to do.
  88. It shows, Please enter the serial keys for making it a full version
  89.  
  90.  
  91. OLly Debugger : http://www.ollydbg.de/download.htm
  92.  
  93. Walkthrough :
  94. We Enter something
  95. THe Error Message came
  96. - We will search in the algorithm
  97. - Make the algorithm to jump
  98.  
  99. 1. Custom Based Application : Small application in C programming Language
  100. 2. BPK Keylogger Detector
  101. 3. POWER ISO
  102.  
  103. Requirements
  104. ============
  105. 1. Debugger - OllyDBG, Immunity Debugger
  106. http://www.immunityinc.com/products/debugger/
  107. Linux - GDB
  108. 2. OS : Windows 7 ultimate, XP(any service pack)
  109. 3. Vulnerable applications
  110.  
  111.  
  112. 1. Custom Based Applciation Cracking
  113. ====================================
  114.  
  115.  
  116. #include <stdio.h>
  117. #include <stdlib.h>
  118. #include <conio.h>
  119. int main()
  120. {
  121. int key, inp;
  122. key = 112233;
  123. printf("Please Enter the CD-KEY for continue = ");
  124. scanf("%d",&inp);
  125. if(key == inp)
  126. {
  127. printf("Successfully Registered, You can continue with the full version\n");
  128. }
  129. else
  130. {
  131. printf("Invalid Key\n");
  132. }
  133. getch();
  134. return 0;
  135. }
  136.  
  137. C to exe converter :http://www.onlinecompiler.net/
  138.  
  139.  
  140. Convert this into .exe via Online Convertors.
  141. -----------------------------------------------------------------------------
  142.  
  143. Steps to Reverse Engineer :
  144.  
  145. 004012E8 |. C70424 2C30400>MOV DWORD PTR SS:[ESP],reee.0040302C ; |ASCII "Successfully Registered....
  146. You can continue with the full version
  147. "
  148.  
  149. JMP 004012E8
  150.  
  151.  
  152. 2. BPK Keylogger Detector
  153. =========================
  154.  
  155. Download Link : https://www.sendspace.com/file/722rb6
  156. https://ufile.io/q9xgl
  157.  
  158.  
  159. ---------------------------
  160. Registration error
  161. ---------------------------
  162. Registration code or user name is invalid. Please check all fields and try again!
  163. ---------------------------
  164. OK
  165. ---------------------------
  166.  
  167. Successfull MEssage
  168. 004049A5 |. 68 504B4900 PUSH antispy.00494B50 ; |Text = "Registration succeeded. Thank you for choosing Keylogger Detector!"
  169.  
  170. Copy the address
  171.  
  172. JMP 004049A5
  173.  
  174. ------------------------------------------------------------------------------------
  175.  
  176.  
  177. 3. Power ISO
  178. ============
  179. Download Link : https://www.filehorse.com/download-poweriso-32/
  180.  
  181. ---------------------------
  182. PowerISO
  183. ---------------------------
  184. The username or serial number is invalid.
  185. ---------------------------
  186. OK
  187. ---------------------------
  188.  
  189.  
  190. Successfull Message
  191.  
  192. 00467D3F . 68 84066A00 PUSH PowerISO.006A0684 ; UNICODE "Thank you for your registration."
  193.  
  194. JMP 00467D3F
Add Comment
Please, Sign In to add comment