随笔分类 -  ASM

ASM
摘要:#include "stdio.h" unsigned char Addbuff[]={0x55 ,0x8B, 0xEC , 0x83, 0xEC, 0x48, 0x57 ,0x56, 0x51, 0xB8, 0xCC, 0xCC, 0xCC, 0xCC, 0xB9, 0x0C, 0x00, 0x0 阅读全文
posted @ 2021-09-24 11:56 admrty 阅读(98) 评论(0) 推荐(0)
摘要:#include "stdio.h" _declspec(naked) int Add(int x,int y) { _asm { push ebp; mov ebp,esp; sub esp,0x48; push ecx push edi push esi mov ecx,0xc; xor eax 阅读全文
posted @ 2021-09-24 10:09 admrty 阅读(91) 评论(0) 推荐(0)
摘要:01012475 > 6A 02 PUSH 2 01012477 6A 01 PUSH 1 01012479 E8 22000000 CALL calc.010124A0 0101247E 83C4 08 ADD ESP,8 01012481 90 NOP 01012482 90 NOP 01012 阅读全文
posted @ 2021-09-17 22:05 admrty 阅读(32) 评论(0) 推荐(0)
摘要:1 // BinToTxt.cpp : Defines the entry point for the console application. 2 // 3 4 #include "stdafx.h" 5 #include "stdio.h" 6 #include "stdlib.h" 7 8 i 阅读全文
posted @ 2021-09-13 14:55 admrty 阅读(145) 评论(0) 推荐(0)
摘要:1 执行代码如下: 2 3 # include<Windows.h> 4 5 # include<stdio.h> 6 7 /*获取kernel32.dll的基地址因为vc程序main函数之前会有初始化,所以不能通过堆栈栈顶值获取kernel32.dll中的地址因此通过 PEB 结构获取Kernel 阅读全文
posted @ 2021-09-10 22:55 admrty 阅读(103) 评论(0) 推荐(0)
摘要:获取 LoadLibrary 与 GetProcAddress 地址 直接给出代码: # include<Windows.h> # include<stdio.h> /*获取kernel32.dll的基地址因为vc程序main函数之前会有初始化,所以不能通过堆栈栈顶值获取kernel32.dll中的 阅读全文
posted @ 2021-09-10 22:50 admrty 阅读(59) 评论(0) 推荐(0)
摘要:1 #include <windows.h> 2 #include <stdio.h> 3 4 //内嵌汇编获取Kernel32的地址 5 __declspec(naked) DWORD getKernel32() 6 { 7 __asm 8 { 9 mov eax,fs:[30h] 10 mov 阅读全文
posted @ 2021-09-10 22:05 admrty 阅读(801) 评论(0) 推荐(0)
摘要:// #include "stdafx.h" # include <Windows.h> //代码来自看雪论坛 int main1() { DWORD dwPEB; DWORD dwLDR; DWORD dwInitList; DWORD dwDllBase;//当前地址 PIMAGE_DOS_HE 阅读全文
posted @ 2021-09-10 22:03 admrty 阅读(204) 评论(0) 推荐(0)