passing through gate ):That is, after JMP or call, follow the 48-bit full pointer (the 16-bit segment selects the child + 32-bit address offset), and the segment selects the child pointing to the segment descriptor, such a jump is called a direct (normal) Jump.Normal jumps do not cause a jump to the privileged level, that is, they do not cause CPL changes., See the following detailed description:
The target is a consistent code segment:Requirements:C
DPL, RPL, CPL
DPL is placed in the segment/gate descriptor, and RPL is located in the Selection Sub-, CPL is the CS. RPL that loads the visible part of the Selection Sub-CS
Data Segment: The data segment is always the same segment. The data segment must meet the requirements of max (RPL, CPL)
There is a metaphor:
The Prime Minister (CPL = 1) can access the mayor (DPL = 3) in the name of the Governor (RPL = 2. Of course, in the name of the village chief (RPL = 4), it is estimated that no one
1. Change the program execution path to obtain the EIP;
Obtain an EIPWhy EIP? The answer is simple, because the execution program needs to locate it for itself. If you have an understanding of the virus writing technology, do you know how the virus program locates? It is implemented using call/pop. Readers familiar with Assembly know that the call XXX command is equivalent to push EIP, jmp xxx, that is, the call command First pushes the next command
. OBJ
According to the information obtained in the. textbss section, we can know that when incremental links are enabled, this space is used to store ILT tables.1.1.2 functions in DLL
There are also some interesting symbols in the symbol table:
0002: 12724e2 _ getcurrentprocessid @ 0 004134e2 F Kernel32: kernel32.dll
0002: 12724e8 _ getsystemtimeasfiletime @ 4 004134e8 F Kernel32: kernel32.dll
These functions should be implemented in DLL. Why is there a symbol table? In addition, each function h
Let me start with a simple analysis on how to escape anti-virus software detection and removal.
This is my previous article. It is said that this technology can be used for active defense.. 386
. Model flat, stdcall
Option Casemap: None
Include windows. inc
Include user32.inc
Include kernel32.inc
Includelib user32.lib
Includelib kernel32.lib
. Data
Szdllkernel dB 'user32. dll ', 0
Szmessagebox dB 'messageboxa ', 0
. Data?
Lpmessagebox dd?
. Code
Start:
Invoke getmodulehandle, ADDR szdllkernel
Source: http://www.groad.net/bbs/read.php? Added or deleted tid-3000.html
For the CPU, it is essentially not differentiated between commands and data. Data can also be considered as command execution. This is revealed in a simple example of hard coding.
The following is a common Assembler:
.section .text .global _start_start: nop nop jmp start_of_setup nop nop nopstart_of_setup: movl $42, %edx int $0x
"hitOpen crash dump "loads the saved files. The following is an example of using the trap handler to directly call kebugcheckex.
After loading the memory dump file, windbg displays the following:
Windbg shows that kebugcheckex is called by the self-trapping program kitrapoe and the trap token address is 0x8054199c. Now we use the "trap address" command to display the content of the trap token.
Now we can see the status of all registers when an exception is throw
indirectly call the near-far process (or subroutine)Call far proc 28 (36) 2 5-Call M16 21 (29) + EA 2 2-4-Call M32 37 (57) + EA 4 2-4-Call R16 16 (24) 1 2-
JMP short number 15-2-the same below: unconditionally redirects to the position indicated by the operand to obtain the commandJMP near-label 15-3-JMP far-label 15-5-JMP M16 18 + EA-2-4-
Shell learning 2: ASPack 2.12 shelling
SkyjackerHttp: // blog.csdn.net/skyjackerEmail: hemiaoyu QQ: 677055172007-2-10
1. Shelling Process
Automatically write a simple form program.Use aspack2.12 shelling (by using a volume) to generate the nullformaspack.exe program.
Description of the original file and the file after shelling:Original file size: 379 KB (388,096 bytes)Space occupied by the original file: 384 KB (393,216 bytes)Shelling file size: 157 KB (161,280 bytes)Shell file space: 160 KB (16
P90Purge release statement P91DUP operand field using the copy operator p93Segment, ends segment definition command P95Assume segment Address Allocation command P95Org start offset Address Setting command p96$ Current address counter value P97Proc, endp Process Definition Statement P97Name, title, end start and end p98Macro, endm macro definition command P99
CIDR Block for short jump to JMP short OPRDirect near-transfer of
construct the real mode section in the protection mode to jump back to the real mode.
When switching from the protection mode to the real mode, because each segment register is equipped with a segment descriptor high-speed buffer register, its content will be taken from the protection mode to the real mode,
However, the content "format (in fact, it is the segment attribute in the real mode and cannot be manually modified in the real mode)" is the format in the protection mode, which does not ma
): Integer;The "Enter company name" window should pop up, and continue.
Next, an SQL statement is executed. According to the subsequent analysis, the information about the user organization is saved after the registration is completed.* Possible String Reference to: 'Update Sys_Company Set enterprise name =: Company, enterprise Address =: Address, contact number =: tel, url =: Web ,'* Possible String Reference to: 'email =: Email, hard disk number =: HardWareId, registration number =: serialno'*
Before analyzing the MBR structure, let's take a look at the computer's boot sequence)
Step 1. Enable and initialize the internal power supply, and wait for a short period of time to generate a stable current. If the motherboard chip and CPU receive an invalid current, a reset signal is automatically generated. Repeat Step 1 before the motherboard receives the power good signal from the power supply.
Step 2. ExecuteCode. There is only one JMP comm
transfer word. Lodsd transfers two-character data. )STOs save string.Is the lods inverse process.Rep is repeated when CX/ECx Repe/repz is repeated when ZF = 1 or the comparison result is equal and CX/ECx Repne/repnz is repeated when ZF = 0 or comparison results are not equal and CX/ECx Repc repeats when cf = 1 and CX/ECx Repnc repeats when cf = 0 and CX/ECx V. Program transfer instructions── ─1> unconditional transfer instruction (long transfer)JMP u
://bbs.pediy.com/showthread.php?p=1401094#post14010940x02 cheat "F5" Hex-raysThe simple "Push+ret" combination (like jmp) does not deceive Ida at all, and it is easy to be F5 to restore the "C language". and the extra memset () function is the code that f5 the compiler to automatically open up the stack of space.We continue to change, replacing the "Push+ret" combination with another form:The result was a bit disappointing, or was F5 directly restored
.
Mov a and B send the value of B to a, and regard it as a value assignment statement in programming, that is, B is assigned to a. Then the value of a is B.
Nop does not work, that is, nothing is done.
Retn retrieves the return address from the stack and jumps to the address for execution.
Here are some arithmetic operation commands:
ADD Addition
Sub Subtraction
Inc plus 1
Dec minus 1
Finally, the jump command:
Jmp unconditional jump
Je or jz jump if
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.