摘要: 杀号: 76 64 59 55 42 41 24 13 05 04 02 01 75 31 27 06 79 48 40 26 阅读全文
posted @ 2024-04-06 14:47 admrty 阅读(11) 评论(9) 推荐(0)
摘要: #include "windows.h" #include "stdio.h" _declspec(naked) void Fun() { _asm { push ebp; mov ebp ,esp; sub esp ,0x40; push esi; push edi; push ecx; mov 阅读全文
posted @ 2022-05-24 11:55 admrty 阅读(125) 评论(0) 推荐(0)
摘要: //获取导入表首地址 IMAGE_DOS_HEADER* pDosHdr = (IMAGE_DOS_HEADER*)pImageBaseAddr; IMAGE_NT_HEADERS* pNtHdr = (IMAGE_NT_HEADERS*)(pDosHdr->e_lfanew + (DWORD)pI 阅读全文
posted @ 2022-05-24 10:54 admrty 阅读(132) 评论(0) 推荐(0)
摘要: //计算DLL路径名所需的字节数 DWORD dwSize = (lstrlenW(pszLibFile) + 1) * sizeof(wchar_t); // 获取传递进程ID的进程句柄 HANDLE hProcess = OpenProcess( PROCESS_QUERY_INFORMATIO 阅读全文
posted @ 2021-10-14 10:36 admrty 阅读(51) 评论(0) 推荐(0)
摘要: #include "stdio.h" #include "stdlib.h" int mystrlen(char* dest) { int length=0; while (*dest!='\0') { length++; dest++; } return length; } char *mystr 阅读全文
posted @ 2021-10-13 15:58 admrty 阅读(58) 评论(0) 推荐(0)
摘要: #include "stdio.h" #include "stdlib.h" void main() { int a[3][4]={1,2,3,4,5,6,7,8,9,10,11,12}; for (int i=0;i<3;i++) { for (int j=0;j<4;j++) { printf( 阅读全文
posted @ 2021-10-12 20:53 admrty 阅读(93) 评论(0) 推荐(0)
摘要: #include "stdio.h" #include "stdlib.h" #include "time.h" #define N 1024 void main() { int a[N]={0}; for (int i=0;i<N;i++) { a[i]=i; printf("%-6d",a[i] 阅读全文
posted @ 2021-10-07 22:01 admrty 阅读(23) 评论(0) 推荐(0)
摘要: #include "stdio.h" #include "stdlib.h" #include "time.h" #define N 100 void main() { int a[N]={0}; time_t ts; srand(unsigned int(time(&ts))); for (int 阅读全文
posted @ 2021-10-07 21:11 admrty 阅读(31) 评论(0) 推荐(0)
摘要: #include "stdio.h" #include "stdlib.h" #include "time.h" void main() { int a[10]={0}; time_t ts; srand(unsigned int(time(&ts))); for (int i=0;i<10;i++ 阅读全文
posted @ 2021-10-07 17:59 admrty 阅读(17) 评论(0) 推荐(0)
摘要: #include "stdio.h" #include "stdlib.h" //二维数组的初始化 #define N 10 void mainx() { int a[3][4]={0}; for (int i=0;i<3;i++) { for (int j=0;j<4;j++) { a[i][j] 阅读全文
posted @ 2021-10-07 13:06 admrty 阅读(268) 评论(0) 推荐(0)
摘要: #include "stdio.h" #include "stdlib.h" #define PATH "c:\\demo.txt" #define NewPATH "c:\\demonew.txt" #define N 100 void mainx() { char Arry[N]={0}; FI 阅读全文
posted @ 2021-10-01 19:15 admrty 阅读(295) 评论(0) 推荐(0)
摘要: #include "stdio.h" #include "stdlib.h" #include <malloc.h> #include "string.h" #include "windows.h" #define path "c:\\calc.exe" #define Newpath "c:\\c 阅读全文
posted @ 2021-09-30 20:50 admrty 阅读(44) 评论(0) 推荐(0)
摘要: // 数据分离和逆序输出.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include "stdio.h" #include "stdlib.h" int Getwei(int n 阅读全文
posted @ 2021-09-30 00:15 admrty 阅读(32) 评论(0) 推荐(0)
摘要: #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 阅读(80) 评论(0) 推荐(0)
摘要: #include "stdio.h"//#include "string.h" int Mystrlen(char* dest){ int length=0; while (*dest!=0) { dest++; length++; } return length;} char* Mystrcat( 阅读全文
posted @ 2021-09-24 11:05 admrty 阅读(108) 评论(0) 推荐(0)
摘要: #include <stdio.h> unsigned char Buff[20]={0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A, 0x0B,0x0c,0x0d,0x0e,0x0f,0x10,0x11,0x12,0x13,0x14 }; cha 阅读全文
posted @ 2021-09-24 10:42 admrty 阅读(83) 评论(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 阅读(85) 评论(0) 推荐(0)
摘要: #include <stdio.h> struct A { int a; int b; }; struct AA { char a; short b; int c; int d[10]; A s; }; AA xx; void Function() { xx.a=1; xx.b=2; xx.c=3; 阅读全文
posted @ 2021-09-23 14:43 admrty 阅读(157) 评论(0) 推荐(0)
摘要: #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CHS) #ifdef _WIN32 LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED #pragma code_page(936) #endif 阅读全文
posted @ 2021-09-21 16:59 admrty 阅读(39) 评论(0) 推荐(0)
摘要: #include "stdio.h" void Function() { char c=0x10; char* pc=(char*)&c; char** ppc=(char**)&pc; char***pppc=(char***)&ppc; printf("c=%x\n",c); printf("p 阅读全文
posted @ 2021-09-21 16:31 admrty 阅读(25) 评论(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 阅读(28) 评论(0) 推荐(0)
摘要: 1 /* 2 * Memory DLL loading code 3 * Version 0.0.3 4 * 5 * Copyright (c) 2004-2013 by Joachim Bauch / mail@joachim-bauch.de 6 * http://www.joachim-bau 阅读全文
posted @ 2021-09-15 09:54 admrty 阅读(59) 评论(0) 推荐(0)
摘要: 思路:扫描启动项下的启动exe。然后将其替换 bool IsInsideVMWare() { bool rc = true; __try { __asm { push edx push ecx push ebx mov eax, 'VMXh' mov ebx, 0 // any value but 阅读全文
posted @ 2021-09-13 23:09 admrty 阅读(56) 评论(0) 推荐(0)
摘要: 反调试技术,恶意代码用它识别是否被调试,或者让调试器失效。恶意代码编写者意识到分析人员经常使用调试器来观察恶意代码的操作,因此他们使用反调试技术尽可能地延长恶意代码的分析时间。为了阻止调试器的分析,当恶意代码意识到自己被调试时,它们可能改变正常的执行路径或者修改自身程序让自己崩溃,从而增加调试时间和 阅读全文
posted @ 2021-09-13 23:07 admrty 阅读(90) 评论(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 阅读(135) 评论(0) 推荐(0)
摘要: #include "stdafx.h" #include "stdio.h" #include "windows.h" int LoadAddr=NULL; int GetAddr=NULL; int kernel32Addr=NULL; __declspec(naked) int GetApi() 阅读全文
posted @ 2021-09-12 13:31 admrty 阅读(47) 评论(0) 推荐(0)
摘要: 00401000 > /64:A1 3000000>MOV EAX,DWORD PTR FS:[30] 00401006 . |8B40 0C MOV EAX,DWORD PTR DS:[EAX+C] 00401009 . |8B40 0C MOV EAX,DWORD PTR DS:[EAX+C] 阅读全文
posted @ 2021-09-11 19:05 admrty 阅读(138) 评论(0) 推荐(0)
摘要: 1 通过上方代码生成二进制shellcode.bin文件,然后将其动态读入内存,并执行即可. 2 3 #include <stdio.h> 4 #include <Windows.h> 5 6 int main(int argc, char * argv[]) 7 { 8 HANDLE fp; 9 阅读全文
posted @ 2021-09-11 16:52 admrty 阅读(608) 评论(0) 推荐(0)
摘要: //生成shellcode并自动提取: #include <stdio.h> #include <Windows.h> int main(int argc, char * argv[]) { DWORD Start, End, Len; goto GetShellCode; __asm { Shel 阅读全文
posted @ 2021-09-11 16:49 admrty 阅读(195) 评论(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 阅读(84) 评论(0) 推荐(0)
摘要: 获取 LoadLibrary 与 GetProcAddress 地址 直接给出代码: # include<Windows.h> # include<stdio.h> /*获取kernel32.dll的基地址因为vc程序main函数之前会有初始化,所以不能通过堆栈栈顶值获取kernel32.dll中的 阅读全文
posted @ 2021-09-10 22:50 admrty 阅读(45) 评论(0) 推荐(0)
摘要: #include <windows.h> #include <stdio.h> FARPROC getProcAddress(HMODULE hModuleBase); DWORD getKernel32(); int EntryMain() { //声明定义GetProcAddress typed 阅读全文
posted @ 2021-09-10 22:08 admrty 阅读(144) 评论(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 阅读(775) 评论(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 阅读(180) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2021-09-04 22:31 admrty 阅读(46) 评论(0) 推荐(0)
摘要: //注意事项 //先执行OnInitDialog()函数,然后执行构造函数! //98下没有新宋体 //XP下窗口高度加8 ………1,滚动条处理方法 //1,设置范围 m_spscroll.SetScrollRange(0,200); SCROLLINFO si; si.cbSize=sizeof( 阅读全文
posted @ 2021-09-04 09:40 admrty 阅读(155) 评论(0) 推荐(0)
摘要: 遍历进程需要几个API,和一个结构体 1.创建进程快照 2.遍历首次进程 3.继续下次遍历 4.进程信息结构体 API 分别是: 1.创建进程快照 HANDLE WINAPI CreateToolhelp32Snapshot( 进程快照API DWORD dwFlags, 遍历的标志,表示你要遍历什 阅读全文
posted @ 2021-09-04 09:26 admrty 阅读(150) 评论(0) 推荐(0)
摘要: 1 有时候,我们需要创建一个运行后能够自己删除自己的可执行程序即自删除程序。很明显如果一个进程通过直接调用DeleteFile()来删除自己是不可能的。必须另想办法,经过本人在网上参考很多资料后实际测试并集众家之所长,发现有二种方法效果比较好。现在将其封装成函数,这样使用将更加容易: 2 3 4 5 阅读全文
posted @ 2021-09-04 09:15 admrty 阅读(101) 评论(0) 推荐(0)
摘要: 1 #include "windows.h" 2 #include "stdio.h" 3 4 5 6 7 LRESULT CALLBACK winQZproc( 8 HWND hwnd, // handle to window 9 UINT uMsg, // message identifier 阅读全文
posted @ 2021-09-03 21:42 admrty 阅读(73) 评论(0) 推荐(0)
摘要: // //自写函数实现字符串比较 #include "stdafx.h" #include "stdio.h" #include "stdlib.h" //#include "string.h" int mystrlen(char *pstr) { int num=0; while(*pstr!=' 阅读全文
posted @ 2021-08-24 15:47 admrty 阅读(116) 评论(0) 推荐(0)