"Reprint" http://bbs.pediy.com/showthread.php?t=199036Although the skills are relatively old, but common sense is to understand1._declspec (Naked) tells the compiler not to optimize the codeFor JMP type hooks, if your own process does not use _DECLSPEC (naked), then the system will automatically add some extra code to control the stack balance, but these additional code will break the stack of the hook function.For call type hooks, be careful to resto
SIGFPE can report arithmetic anomalies. including overflow, except 0 and so on.C standard library says:
the exception types that are reported by various implementations are also very different, but almost no implementation reports an integer overflow.
Are you sure? I tested it and found that on GCC, integer, floating-point overflow would not be reported, except that 0 would be reported. After using the -O3 compile option, even if 0 is not reported, continue execution directly.It see
4.1 Program hack20135206 at Jia Xin?Basic directives:The NOP:NOP instruction is the "null instruction". When executing to the NOP instruction, the CPU does nothing, just as an instruction to execute the past and continue executing a command behind NOP. (Machine code: 90)JNE: Conditional transfer directives, if not equal, jumps. (Machine code: 75)JE: Conditional transfer instruction, if equal, jumps. (Machine code: 74)JMP: Unconditional transfer instru
following dialog box is displayed:You can set both of them to a breakpoint. This program only needs to set a breakpoint in the first command. Okay. Now, the first method we mentioned above is to set a breakpoint for each reference. In this way, the two Commands will set a breakpoint. After the breakpoint is set, we go to the program we are debugging. Now we click the "check it" button on the program we are debugging and it is broken by ollydbg:00401323 |. E8 4c010000 call 00401328 |. E8 a500000
instructions1. Unconditional Transfer Instruction. JMP (JMP) jump command1) Direct Short transfer within a segmentFormat: JMP short OPROperation: (IP) 2) Direct near transfer within the segmentFormat: JMP near PTR OPROperation: (IP) 3) indirect transfer within the segmentFormat: J
small hard disk): 0001.0048 7732 ja 007c; if the value is greater than 0: 0001.004a 668b461c mov eax, [bp + 1C]; eax = number of hidden sectors: 0001.004e 6683c00c add eax, 0000000c; number of hidden sectors + 0c: 0001.0052 bb0080 mov BX, 8000; BX = 8000: 0001.0055 b90100 mov CX, 0001; Cx = 1: 0001.0058 e82b00 call 0086: 0001.005b e94803 JMP 03a6; 03a6 ??????
* Referenced by a (u) nconditional or (c) onditional jump at address:|: 0001.0106 (c)|: 0001
main boot program moves itself from 0000: 7c00; 0000: 0600 place, for the DOS partition boot program Teng; Outbound Space0018 ea1d060000 JMP 0000: 061d; jump to 0000: 061d to continue execution, which is actually; Execute the following mov command (at the offset of 001d)001d bebe07 mov Si, 07be; 07be-0600 = 01be, 01be is the first address of the Partition Table0020 b304 mov BL, 04; up to four partition tables, that is, up to four partitions0022 803c8
Once accused by cnns of being plagiarized, see blind tone for specific events.
Overflow programming skills in WINDOWSAuthor: Yuan GeAfter reading some overflow programs in WINDOWS, I felt that they were not uniform and perfect. I decided to write a relatively unified method and tried to solve some problems.1. jmp esp problems.KERNERL32 is used to ensure consistency. DLL code, because at least the same system KERNEL32. The DLL module load address may
determined that the content of the hidden part is consistent with the content of the segment descriptor (see the format of the segment description ), however, the format may be different. But the format is not important for us to understand this, because it is impossible for programmers to directly operate on it.
We use the CS register as an example. The same is true for other registers:
In real mode, when we execute a command to load the CS register (JMP
], ECx. Text: 42cf7326 mov edX, [EBP + arg_0]. Text: 42cf7329 mov eax, [EBP + var_224]. Text: 42cf732f mov ECx, [eax]
We can find that the above values mainly involveOverwrite address-8Overwrite address + 4Overwrite address + 8Overwrite address + cOverwrite address + 10Overwrite address + 14These addresses are mainly write operations.In addition, if you want to override address-4 and overwrite address + 4, you can perform an add operation. The address range of the operation should also be read/w
CLD; fill 0, clear the last input file name
MoV CX, 128; the maximum file name is 128 characters, including carriage return characters
MoV Al, 0
Lea Di, fname
Rep stosb
;-------------
Lea dx, fbuffer; input file name
MoV ah, 0ah
Int 21 h
;------------------
MoV BL, [fbuffer + 1]; Replace the last carriage return of the input file name with 0, because the created file name cannot contain invisible characters
Xor bh, BH
MoV Si, offset fname
Add Si, BX
MoV byte PTR [Si], 0
;---------------------
L
return address Ra at runtime. Then, use tx0 to record the position of the current symbol table and generate a JMP command to jump to the starting position of the main program. As we do not know where the main program is started, therefore, the JMP target is set to 0 for the time being and will be changed later. At the same time, the position of the JMP command i
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.