1. Trang chủ
  2. » Công Nghệ Thông Tin

Cracker Handbook 1.0 part 176 pptx

6 223 1

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Nội dung

00612000 00010000 uedit32 .adata code Imag R RWE 00622000 00020000 uedit32 .data1 imports Imag R RWE 00642000 00110000 uedit32 .pdata Imag R RWE 00752000 0006F000 uedit32 .rsrc resources Imag R RWE Let us use the section adata, this is a section of the Armadillo, we modify the base of 00F81440 to 00612000 and was thus Chúng ta hảy sử dụng section adata, đây là một trong những section của Armadillo, chúng ta thay đổi base 00F81440 thành 00612000 và nó sẽ như vầy: 00129538 00 20 61 00 00 E0 15 00 .b à. 00129540 75 46 00 00 E8 EF EA 00 uF èïê. Let us clear the Breakpoint Hardware and we put a Breakpoint Hardware on execution in the OEP that is 00514CB5, we give a F9 and stops in Chúng ta xóa Breakpoint Hardware và put một Breakpoint Hardware on execution tại OEP là 00514CB5, và chúng ta nhấn F9 và dừng lại tại : 00514CB5 55 PUSH EBP 00514CB6 8BEC MOV EBP,ESP 00514CB8 6A FF PUSH -1 00514CBA 68 80885700 PUSH uedit32.00578880 00514CBF 68 A0855100 PUSH uedit32.005185A0 00514CC4 64:A1 00000000 MOV EAX,DWORD PTR FS:[0] 00514CCA 50 PUSH EAX 00514CCB 64:8925 00000000 MOV DWORD PTR FS:[0],ESP 00514CD2 83EC 58 SUB ESP,58 00514CD5 53 PUSH EBX 00514CD6 56 PUSH ESI 00514CD7 57 PUSH EDI 00514CD8 8965 E8 MOV DWORD PTR SS:[EBP-18],ESP 00514CDB FF15 18156200 CALL DWORD PTR DS:[612518] 00514CE1 33D2 XOR EDX,EDX 00514CE3 8AD4 MOV DL,AH The first mark is the OEP, if they notice the second mark is the first call that must aim at GetVersion, this call that before pointed at [ 00F81990 ] now aims at [ 00612518 ] that he is in the section adata within the memory of our feasible one, executes the LordPE and gives dump full… [ if enginé to IntelliDump gives single error change ` activates dump ] to the process uedit32.exe, we keep the file like uedit32_dmp.exe Mark đầu tiên là OEP, chúng ta chú ý rằng tại mark thứ 2 là hàm call đầu tiên phải trỏ đến là hàm GetVersion, hàm này trước đây trỏ đến [ 00F81990] , còn bây giờ trỏ đến [ 00612518 ] mà nó nằm trong section adata trong vùng memory có thể thực thi được, mở LordPE và dump full [ nếu máy móc mà IntelliDump thì sẽ cho ra lỗi ‘activates dump’ ] process uedit32.exe, chúng ta sẽ lưu file này là uedit32_dmp.exe The file uedit32_dmp.exe will have the redirigidas calls to the APIs to the memory that begins in 00612000 which adata of the memory of our feasible one is in the section, now what lacks is to write a code which is executed before the OEP, which it loaded the modules and it solves the directions of the APIs, places in its respective place in the section adata and later the control to the OEP returns to him, here is where we will use Tools Armadillo, we execute this utility, we fence to the section of IATScrambler and will see File uedit32_dmp.exe sẽ có redirect calls đến các hàm APIs trong memory mà chúng bắt đầu tại addr 00612000 là memory của adata là vùng section có thể thực thi ( feasible ) , bây giờ còn thiếu là viết vào file một đọan code chúng đươc thực thi trước OEP, nó là những gì mà module tải lên và nó sẽ giải quyết các chỉ thị của hàm APIs, vị trí code này nằm trong vùng tương ứng của nó trong section adata và sau nó sẽ trả điều khiển về cho OEP. Ở đây chúng ta dùng tool Armadillo, chúng ta tiến hành chạy ứng dụng này, chúng ta nhảy đến tab IATScrambler và sẽ thấy như sau: Here it requests several data to us, some already we have them and others we will have to obtain them Ở đây yêu cầu ta nhâp vài dữ liêu cho tool,một số dữ liêu chúng ta đã có sẳn, và các dữ liệu khác chúng ta sẽ tìm chúng 1. Route to file IAT that we kept with the ImpRec 2. Dumpeado route of our feasible one with the calls to the APIs already redirigidas 3. Base GOES to which the directions of the APIs were copied 4. IT GOES where it was begun to execute the code that repaired the IAT and will give back the control to the OEP 5. IT GOES of the OEP 6. Amount of bytes available for the code of the repair of the IAT 7. IT GOES in the IAT of the Armadillo where the direction keeps from the API LoadLibrary 8. IT GOES in the IAT of the Armadillo where the direction keeps from the API GetProcAddress 1. File IAT mà chúng ta đã save bằng ImpREC 2. File dumped có section có thể thực thi chứa các hàm calls gọi đến APIs đã sẳn sàng để redirect 3. Base của các derections của hàm APIs đã đươc copy trước đó 4. Address bắt đầu thực thi code sữa chửa IAT và sẽ trả lại điều khiển cho OEP 5. Address OEP 6. Số lượng bytes dành cho code sữa chữa IAT 7. Là address trong bảng IAT của Armadillo chứa direction hàm API LoadLibrary 8. Là address trong bảng IAT của Armadillo chứa direction hàm API GetProcAddress We have the data 1, 2, 3, and 5, axial one that we look for 4, 6, 7 and 8 Chúng ta có các dữ liệu trong mục 1,2,3 và 5, chúng ta sẽ tìm các dữ liệu trong mục 4,6,7 và 8 còn lại Let us see the Memory Map see as section we can use Chúng ta nhìn vào Memory Map để tìm section mà chúng ta có thể sử dụng Memory map Address Size Owner Section Contains Type Access Initial 00400000 00001000 uedit32 PE header Imag R RWE 00401000 0015D000 uedit32 .text Imag R RWE 0055E000 00039000 uedit32 .rdata Imag R RWE 00597000 0004A000 uedit32 .data Imag R RWE 005E1000 00001000 uedit32 .SHARED data Imag R RWE 005E2000 00030000 uedit32 .text1 code Imag R RWE 00612000 00010000 uedit32 .adata code Imag R RWE 00622000 00020000 uedit32 .data1 imports Imag R RWE 00642000 00110000 uedit32 .pdata Imag R RWE 00752000 0006F000 uedit32 .rsrc resources Imag R RWE We cannot use the section adata since it is in that section where the IAT was armed, the section data1 contains imports that will be to us of utility, so our obvious option is text1 that it begins in 005E2000 and it has a size of 00030000 bytes, this is an excessive size for our necessities, in addition we remember that even we need the CodeSplicing, so we clear, if our EP is 005E2000 and single we wished to use until the direction 005F0000, then Chúng ta ko dùng section adata vì nó là section chứa IAT mà chúng đã “nạp đạn” sẳn sàng. Section data1 chứa imports mà chúng ta sẽ dùng nó cho ứng dụng, vì vậy rõ ràng là chúng ta phải chọn section text1 rồi, mà nó bắt đầu tại 005E2000 và nó có size là 00030000 bytes, đây là size quá dư thừa cho yêu cầu của chúng ta; hơn nữa chúng ta nhớ rằng chúng ta còn cần cho CodeSplicing, vì vậy chúng ta đã sáng tỏ mọi vấn đề, nếu EP của chúng ta là 005E2000 và đơn giản là chúng ta chỉ muốn sữ dụng cho đến chỉ thị 005F0000, vì vậy: 005F0000 – 005E2000 = E000 We already have the value for data 4 and the 6, for the 7 and the 8 it is necessary to load in the Olly our feasible one dumpeado uedit32_dmp.exe, in the Dump to go to the section data1 that is where the imports keep and to look for where the directions keep from the APIs LoadLibrary and GetProcAddress, for this we wrote in the bar of commandos Chúng ta đã có dữ liệu mục 4 và 6, đối với mục 7 và 8 thì cần phải load file dumped uedit32_dmp.exe vào olly, trong win Dump goto đến section data1 mà nó chứa các imports và tìm nơi chứa directions của các hàm the APIs LoadLibrary và GetProcAddress, ở đây chúng ta gỏ vào command như sau: In the Dump window that this in direction 00622000 [ beginning of data1 ] we give a Ctrl+B and we put value HEX: that it gave the bar us of commandos but of inverted way Trong Dump window tại 00622000 [ bắt đầu section data1] chúng ta gỏ Ctrl+B và put giá trị HEX: trong thanh bar command. . 00 400 000 00 0 01 0 00 uedit32 PE header Imag R RWE 00 4 01 0 00 0 015 D 000 uedit32 .text Imag R RWE 00 55E 000 00 03 900 0 uedit32 .rdata Imag R RWE 00 59 700 0 00 04A 000 uedit32 .data Imag R RWE 00 5E 100 0 00 0 01 0 00 . 00 612 00 0 00 01 0 00 0 uedit32 .adata code Imag R RWE 00 62 200 0 00 0 200 00 uedit32 .data1 imports Imag R RWE 00 64 200 0 0 011 00 00 uedit32 .pdata Imag R RWE 00 75 200 0 00 06F 000 uedit32 .rsrc. 00 5E 100 0 00 0 01 0 00 uedit32 .SHARED data Imag R RWE 00 5E 200 0 00 0 300 00 uedit32 .text1 code Imag R RWE 00 612 00 0 00 01 0 00 0 uedit32 .adata code Imag R RWE 00 62 200 0 00 0 200 00 uedit32 .data1 imports

Ngày đăng: 03/07/2014, 17:21

TỪ KHÓA LIÊN QUAN