Address
instruction or data content
...
...
020
Cla
0→AC, accumulator AC zeroing
021
ADD 30
(AC) + (30)? AC, the value of the accumulator AC is added to the data in main memory address 30, and the result is stored in the accumulator AC
022
STA 40
(AC) 40, the value of the accumulator AC is stored in the main memory address 40
023
NOP
Empty operation,
must be four bytes. Therefore, this method is not feasible. It seems that you can't steal a lazy.We need to take a path. So, what else is associated with this address on the stack? The closest thing to the stack is the ebp,esp of the two registers, which, as you probably already know. Yes, when the function ret instruction returns, after taking away the saved EIP, the location that the ESP points to is the initial address of the shellcode.Figure 31So, to get the program to execute Shellcode, ju
Fragmented records:The 8086CPU registers are 16-bit and can hold two bytes; The 4 registers, AX, BX, CX, DX, are commonly used to hold general data, known as general-purpose registers.Ax:In 8086CPU, the four registers can be divided into two independent use of 8-bit registers, with the-H and-L for the left and right eight bits;Instruction Mov,add: Left operand = left operand and right operand operation result.Physical Address method in 8086CPU: Two 16-bit addresses synthesize a 20-bit physical a
Storage of words in memoryThe main meaning of this passage is: a word =2b=16bit,the CPU is a two memory units stored in a word (if the 0 address to store the font data, is to get its high-byte 0+1 bit and low byte 0 bits data, the data is read by the high address bit to the low address bit)Questions:(1) What is the byte-type data stored in the 0 address unit? # 20H(2) What is the font data stored in the 0 address word cell? # 4e20h(3) What is the byte-type data stored in the 2 address word cell?
oriented to assembly language programming, my posts are machine-oriented and disassembly, hoping to play a complementary role. With the previous two foundation, the assembly language book on most of the instructions should be able to understand, understand. Here are a few more common and more complicated instructions. I am talking here about the hard instructions of the machine, not for any assembler.
Unconditional Transfer Instruction JMP:
There a
large scope is determined, we can use a small script in metasploit to complete this task:/opt/metasploit/apps/pro/msf3/tools/pattern_create.rb
Generate a pattern string (200-2100 = 1900) with a length of 200. We will send such a packet:
STOR +/../+ A * 1900 + pattern
PCMAN collapsed after receiving the data. In windbg, we can see that the eip is 0x41346441:
Return to kali and use pattern_offset to calculate the offset:
The offset is 102, that is, the value 0x41346441 appears in 200 of the 10
finally obtain the physical address corresponding to CreateProcessW, using \ phymem, we can avoid the copy-on-write mechanism and directly rewrite CreateProcessW.
3. achieve the goal through the most common means, first enumerate all processes in the system, then modify the page attributes of each process through functions such as VirtualQueryEx, VirtualAllocEx, and VirtualProtectEx, and allocate new space. Finally, we use WriteProcessMemory to write our code to the space of each process, an
, and find that there is a layer of Aspack in the layer.
We have read Telock0.98 in the advanced Article, which is troublesome. resumable data cannot be stored in disorder, for example, normal Int3 breakpoint data and hardware breakpoint data. However, it can still be interrupted through the memory breakpoint. Telock0.96 is weaker than Telock0.98.
The OD loader does not ignore invalid command exceptions and memory exceptions.
First, the fire detection Telock has a memory exception and two invali
the user event processing step-by-step.Therefore, we need to find the language to give users a place to distribute messages.Tracking down:00411688 |.FFD0 call eax; Ewnd. Processnotifysys (Int,ulong,ulong)One of the steps to process the message, go ahead.004116b4 |. E8 77c7ff call Ckrnlapp::notify (Int,ulong,ulong)To continue:0040e36d |> \8b4424 mov eax, dword ptr ss:[arg2]; Case 7D8 of Switch ewnd.40de4f0040E371 |. 8BCE mov ecx, esi0040E373 |.-Push eax; /ARG1 = [ARG2]0040E374 |.E8 67a600 call C
instruction Sub R are as follows:(1) The Beat is 0 o'clock, irom→ instruction register IR, metronome plus one;(2) The Beat is 1 o'clock, the IR high 5 bit is 00111, let the sign sub=1, will be low 11 bit to send the Mar, the metronome plus one;(3) The Beat is 2 o'clock, and the Mark Sub=1,pc+1, the metronome plus one;(4) The Beat is 3 o'clock, and the Mark Sub=1, the DRAM is sent to register B, the metronome plus one;(5) The Beat is 4 o'clock, and the Mark Sub=1, will da send register a, metron
, which should probably be called binary dynamic programming! How dark the technology, completely ignoring the logic of the source code. Completely ignoring the painstaking effort of the compiler, directly to the binary machine code to change.Kprobe works very easy, for example, you have a function func, you can insert a piece of code before and after Func is called, we assume that the Func Directive isBeginGoEndKprobe to do is to replace the begin. Change it to:JMP PrefuncOf course, before the
6.3.1 The main process of generating assembly code from intermediate directivesIn this section, we can focus on "how to translate an intermediate code into assembly code". The intermediate code for the UCC compiler is a four-tuple, including operators and 3 operands, as shown below.Of course, some intermediate code only need to use opcode and DST, for example, the unconditional jump instruction "goto BB2;" There is no need for SRC1 and SRC2. To facilitate the generation of assembly code, the UCC
instructions(we'll look into it later .). We now introduce a simplest can be modifiedCS,IPthe instructions:jmp instructions. If you want to modify CS,IP content, can be used as the "jmp Segment Address: Offset address " instructions to complete, such asJMP 2ae3:3, after execution:cs=2ae3h,ip=0003h,theCPU will be from 2ae33h read instructions at the same place. JMP 3:0b16, after execution:cs=0003h,ip=0b16h,
downward jump. there is a return hop, And the next line of code-F4 (right-click the code breakpoint to run to the selected), a large jump (large span segment, JMP ***, je ***, or retn.
2. ESP Law
F8: Check whether ESP is implemented (red) in the upper-right register of OD ),. command line dd ****** (current Code ESP value), press enter, DD selects the lower end address, breakpoint-hardware access-DWORD breakpoint, F9 run, press F8 to Dep at the jump
architecture, the first address of the got table in this running module is always stored in the % EBX register. The CompilerA short code is generated at the function entry to initialize the % EBX register. This step is necessary. Otherwise, ifThe call to this function comes from another operation module. % EBX is the got table address of the caller module.% EBX is used to reference global variables and functions. Of course, an error occurs.
3.3 PLT table
Each item in the PLT (Procedure linkage
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.