Game: tianlong Babu, version: 0.16.0108,
System Windows XP,
Tools : Ce5.2 + od1.10 + C #2005
Objective: To find the array format and location of strange data in the memory
First, correct the search method of the character base address in Note 1. The specific search method is described below:1. Ce finds a unique address based on the person's experience or blood (in reality, I am based on experience)2. OD writes a breakpoint to memory under an empirical address0044bc28 8b46 0C mov eax, dword
*): decompile the code section of A. obj.Open the ursoft w32dasm tool (I use version 8.93)Select all files when opening the file, because the software mainly targets file formats such as PE, le, and NE. SoThe offset must be specified to decompile the OBJ file. Above attention! (Note: another way to obtain this information is to use dumpbin/section:. text ). That is, the file offset of the Code section.Therefore, in the prompt dialog box that opens the OBJ file, enter 00000355Start disassembly f
ESI, dword ptr [ESI + 78 H] // data directory Table offsetAdd ESI, EBXMoV EDI, dword ptr [ESI + 20 h] // function name array offsetAdd EDI, EBXMoV ECx, dword ptr [ESI + 14 h] // number of elements in the function address ArrayPush ESIXOR eax, eaxMoV edX, dword ptr [ESI + 24 h] // function name sequence number table array offsetAdd edX, EBXSHL eax, 1 // count * 2Add eax, EDX // count + function name sequenc
sufficiently compatible with the real attack features? Through vulnerability analysis, we will naturally draw a conclusion. Czy82 on the nsfocus Technology Forum published a detailed analysis of this vulnerability, see the original article: http://bbs.nsfocus.net/index.php? Act = se F = 3 t = 159298 P = 299648
The code analysis snippets of server processing commands and parameters in the analysis document are as follows:
========================================================== ============
determines whether the returned result is near or far (of course, the pseudo command is not visible from the executable file ).In wvin7 + vs2008 + release, this situation is much more complicated.
--- D: \ coding \ helloworld \ testc \ main. c optional int main () {00331370 push EBP 00331371 mov EBP, esp 00331373 sub ESP, 0c0h 00331379 push EBX 0033137a push ESI 0033137b push EDI 0033137c Lea EDI, [ebp-0C
Reading Tips:
《Delphi Image ProcessingThe series focuses on efficiency. The general code is Pascal, and the core code is BaSm.
《C ++ Image ProcessingThe series focuses on code clarity and readability, and all uses C ++ code.
Make sure that the two items are consistent and can be compared with each other.
The code in this article must include the imagedata. Pas unit in "Delphi Image Processing-data type and public process.
The minimum value processing of an image is centered on the current pixel
the API function address we want to intercept, modify it.
Invoke GetModuleHandle, addr DllName; get the name of the DLL where the API is to be intercepted
Invoke GetProcAddress, eax, addr ApiName
Mov ProcAddr, eax; gets the address of the API we want to intercept and stores it in ProcAddr.
. While! ([Esi]. originalFirstThunk = 0 [esi]. timeDateStamp = 0 [esi]. forwarderChain = 0 [esi]. name1 = 0 [esi]. firstThunk = 0); The imported table is ended by an IMAGE_IMPORT_DESCRIPTOR of all 0.
Mov
The place that strcpy didn't take into account
Original posted Address:Http://eparg.spaces.live.com/blog/cns!59BFC22C0E7E1A76!1498.entryOriginal Paste Time:2006-08-16Original Paste Author:EpargThe discussions of the year were in:
Http://eparg.spaces.live.com/blog/cns!59BFC22C0E7E1A76!533.entry
When Http://eparg.spaces.live.com/blog/cns!59BFC22C0E7E1A76!875.entry first considered the performance of strcpy, only 4bytes copies were considered. But ignoring a key question is how to judge the end of
,
Then use SoftICE to set a breakpoint on the address, SoftICE should be immediately broken,
You'll see mov DWORD PTR ds:[eax+ecx*8+eb4],edi,
In the client, the position is 0x4b2c74,
You can change the course of the game,
Put mov DWORD PTR ds:[eax+ecx*8+eb4],
EDI changed into a E9 xx xx xx xx 90 90,
JMP the free address between the rsrc and. Data in the process.
The code (xx xx xx xx) + 0x4b2c74 + 5 is modi
#include #include int main (){__asm{CLD//empty flag bit DFPush 0X1E380A6A//press-in Messageboxa-->user32.dllPush 0x4fd18963//press-in Exitprocess-->kernel32.dllPush 0x0c917432//press-in Loadlibrarya-->kernel32.dllmov Esi,esp//esi=esp, pointing to the address in the stack where LoadLibraryA is storedLea Edi,[esi-0xc]//edi = stack top position -0xc, e.g. 0x0012ff28-0xc==0x0012ff1c====== open up some stack spa
("[+] Trying to unload: % s", argv [2]);Delete_driver (SC, name );}Getch ();}/* Wdl. c ends */
Driver samples with Vulnerabilities
This is a sample code with a vulnerability driver. We will try to attack it later in this article. This driven framework model is based on Iczelion.
; Buggy. asm start. 386. Model flat, STDCALLOption casemap: NONEInclude d: masm32demodewindows. incINCLUDE incstring. INCINCLUDE inctstruc. INCINCLUDE inctddk. INCINCLUDE inctoskrnl. INCINCLUDE incNtDll. INCIncludelib d
information is used for debugging:
Cmp [esi + eax-06h], 'kcuf'
Jne DisableOnBusy
ENDIF
Determine whether the file exists. if not, switch to DisableOnBusy.
Cmp word ptr [ebx + 18 h], 01 h
Jne DisableOnBusy
; Get file attributes
Mov ax, 4300 h
Int 20 h; call IFSMgr_Ring0_FileIO to obtain file attributes
IFSMgr_Ring0_FileIO = $
Dd 00400032 h; call number
Jc DisableOnBusy
Push ecx
; Get the IFSMgr_Ring0_FileIO address
Mov edi, dword ptr (I
relatively * sure everything is OK. this routine will be over-* written by the page tables. * // ** the following section sets the Interrupt Descriptor Table subroutine setup_idt. ** Set the idt of the Interrupt Descriptor Table to have 256 Items and point to the ignore_int interrupt gate. Then load the interrupt * Descriptor Table register (using the lidt command ). Install the service after a real and practical disconnection door. Enable the interrupt when we think everything is normal elsewh
code. The complete code for searching getprocaddress in Kernel32 is as follows:
Push ESI; ESI = va kernel32.base; EDI = RVA k32.pehdrMoV EBP, ESIMoV EDI, [EBP + EDI + Peh. datadirectory]
Push EDI ESI
MoV eax, [EBP + EDI + peexc. addressofnames]MoV edX, [EBP +
00 ................
0x00401010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x00401020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
All are 0.1.1.2 dynamic compilation
According to the online materials, this section is related to incremental links and dynamic compilation. Check the linker parameters to ensure that the incremental link is opened for verification.
Insert a test function before the main function and call it in main:
Int add (int A, int B)
{
Return A +
, special registers (control, debug, segment)Can only be transmitted to the general register, or to the content transmitted from the General Register.When referencing a label:Cases:. Section. DataValue. int 100_start:MOVL value,%eaxMOVL $value,%eaxMovl%ebx, (%edi)MOVL%EBX, 4 (%edi)Where: Movl value,%eax simply passes the memory value currently referenced by the tag value to EAXMOVL $value,%eax passes the me
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.