From http://zerray.com/
Looking at the hooks in Win32 compilation, I was wondering how to write a whole-person program that changed the keyboard layout.
Check the information and find that the underlying keyboard hook (wh_keyboard_ll) can be implemented. First, install and uninstall the HOOK:
Installhook proc hins: DWORDInvoke setwindowshookex, wh_keyboard_ll, ADDR keyproc, hins, nullMoV hhook, eaxRETInstallhook endp
Uninstallhook procInvoke unhookwindowshookex, hhookRETUninstallhook endp
Like
: cannot resolve external symbol yyyyy". Second, the call syntax. Invoke obviously does not work, it will only press the parameter stack and then call it, but this is not the form of _ fastcall. it is also because it does not support _ fastcall, which makes assembly and other languages (such as C) mixed programming difficult once _ fastcall is involved.
We all want to adopt some strategies to make MASM support the _ fastcall call method. In other words, it enables MASM to define and call functi
; all reference text strings and click:
Of course, it is more convenient to use the above super string reference + plug-in. However, our goal is to be familiar with some OllyDBG operations. I will try to use the built-in functions of OllyDBG with less plug-ins. Now, in another dialog box, right-click it, select the "Search Text" menu item, and enter "Wrong Serial, try again !" The start WORD "Wrong" (note that the search content is case-sensitive) to find one:
Right-click the string we found,
Codefunction Strtohex (Const str:ansistring): ansistring;AsmPush EBXPush ESIPush EDITest Eax,eaxJZ @ @ExitMOV Esi,edx//Save the EdX value, the address used to generate the new stringMOV edi,eax//Save original stringMOV edx,[eax-4]//Get string lengthTest Edx,edx//Check length
Virus program source code instance analysis-CIH virus [3] code, you need to refer to the jmp ExitRing0Init; exit Ring0 level
; Size of the merged code
CodeSizeOfMergeVirusCodeSection = offset $
; New IFSMgr_InstallFileSystemApiHook function call
InstallFileSystemApiHook:
Push ebx
Call @ 4
@ 4:
Pop ebx; get the offset address of the current command
Add ebx, FileSystemApiHook-@ 4; the offset difference is equal to the offset of FileSystemApiHook.
Push ebx
Int 20 h; call Vxd to remov
programming software is basically an English kernel. What is the English pass or pass? The four letters PASS! Right-click the string and choose "drop-down menu"> "Search"> "all reference text strings". Find the strings below:
004E7F29 ASCII "newunit"004E7F6B mov edx, 123.004E8270 ASCII "book. mdb" → this file is generated in the directory after being decompressed!004E8045 PUSH 123.004E82F4 ASCII "book. mdb"004E809E PUSH 123.004E8208 ASCII ". mdb"004E
Protection Mechanism
[Statement]I write articles mainly for communication, and hope that you can maintain the integrity of the article during reprinting.
[Preface]This time I focused on the protection mechanism and did not write any shell removal method. In fact, I have misled many kind audiences. The most important thing to know about a shell software is its protection mechanism, which I learned later. The following describes some protection mechanisms. This is only for everyone and me to lear
class address instead of the Child class address? This involves implementing restrictions within compilation and a comprehensive understanding of a system problem. It is difficult to find the answer by analyzing the phenomenon.
We call it again through pointers.C150 * PT = OBJ;Pt-> Foo ();The Assembly command corresponding to the second line of code is:01 00423f8b mov eax, dword ptr [EBP + fffff73ch]02 00423f91 mov ECx, dword ptr [eax]03 00423f93 mov edX
follows:The program uses readfile to input data from the console, and uses writeconsole to output the calculation result to the console. Conversion from string to numberSubprograms are self-written. See myatoi. The number of String Conversion calls Windows API function wsprintf. In additionGetstdhandle and exitprocess are also used in sequence. If you are interested, you can check msdn to get more information.
In the C language version, the while (FAC * FAC For instructions, seeMoV
understand, copy data, not from one address to move data to another address, with memcpy not good.
Because of the possible occurrence of page fault, memcpy has no treatment for this situation and may cause unknown consequences.
And Copy_from_user is dealing with this situation by adding a. Fixup in the code, which is read in Do_page_fault and combined with exception table to modify the method, No time for in-depth study, interested can continue to see.
The Copy_from_user code is as follows:
Sta
condition code register is loaded only when Integer Operation commands are executed.
Data storage is written only when mov, push, and call commands are executed.
To control the time sequence of operations in the processor, you only need to control the registers and memory clock..
Because the command runs the calculation result, write the RegisterOrMemory.
We can regard the process of taking the pointer, decoding, execution, and so on as the process of combining logic (because they do not invol
With the front: + + (-) There are too many confusing places, (i++) + (i++) and (++i) + (++i) What is the difference? If you understand it from the machine's point of view, it will be enlightened.
Let's take a look at the procedure:
int main() { int i=3; int j=(i++)+(i++); // int j=(++i)+(++i); printf("%d,%d\n",i,j); }
(1) Under VC 6.0:
for (i++) + (i++):
Result: i=5,j=6
The corresponding assembly code is (with detailed comments):
8B 45 FC mov eax,dw
@1DWORD key3; // eax@1DWORD key2; // edx@1unsigned int v7; // eax@1unsigned int v8; // ecx@1unsigned int v9; // edx@1unsigned int v10; // esi@1unsigned int v11; // eax@1unsigned int v12; // ecx@1unsigned int v13; // edx@1unsigned int v14; // esi@1unsigned int v15; // eax@1unsigned int v16; // ecx@1unsigned int v17; // edx
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.