2011年11月11日

统计c盘的PE文件的个数 (遍历所有文件)

摘要: PE文件有 if(tmp=="exe"||tmp=="sys"||tmp=="dll"||tmp=="ocx"||tmp=="com") 这几种格式。代码如下View Code #pragma warning (disable:4786)#include <iostream>#include <io.h> // _findfirst() _findnext()#include <string.h> //strcat()#include <stdio.h& 阅读全文

posted @ 2011-11-11 00:05 zhxfl 阅读(1077) 评论(9) 推荐(0)

2011年11月10日

采用个hook技术对writefile函数进行拦截(2)

摘要: http://www.cnblogs.com/zhxfl/archive/2011/11/03/2233846.html 这个是笔者之前写过的WriteFile HOOK代码必须补充对这几个函数的HOOK,才能对WriteFile的所有操作做“比较彻底的拦截”,笔者知道应用层的拦截很容易出现遗漏的,只有编写驱动做文件过滤才会有比较好的效果,不过在实现那个之前,想再应用层做好这些实验,看一下效果。具体的api函数参数可以在http://msdn.microsoft.com/en-us/library/aa365749%28VS.85%29.aspx里面翻出来BOOL WriteFileEx( H 阅读全文

posted @ 2011-11-10 02:17 zhxfl 阅读(1923) 评论(2) 推荐(0)

2011年11月3日

采用个hook技术对writefile函数进行拦截

摘要: DLL部分:View Code #include <windows.h>#include <ImageHlp.h>#include <TlHelp32.h>#pragma comment(lib,"ImageHlp")#pragma data_seg("Shared")HHOOK hhk = NULL;#pragma data_seg()#pragma comment(linker, "/Section:Shared,rws")HMODULE hmodThisDll;#define MyName & 阅读全文

posted @ 2011-11-03 01:47 zhxfl 阅读(1215) 评论(0) 推荐(0)

通过文件句柄获取文件的路径

摘要: View Code #include "StdAfx.h"#include <stdio.h>#include <windows.h>typedef struct _IO_STATUS_BLOCK{ LONG Status; LONG Information;} IO_STATUS_BLOCK, *PIO_STATUS_BLOCK;typedef struct _FILE_NAME_INFORMATION{ ULONG FileNameLength; WCHAR FileName[MAX_PATH];} FILE_NAME_INFORMATION;F 阅读全文

posted @ 2011-11-03 01:24 zhxfl 阅读(1309) 评论(0) 推荐(0)

2011年11月2日

win 32 PE文件病毒检测系统的提出--锁定病毒自身复制特性

摘要: 这个定理是没错,可是存在一些悖论,我把这个简化如下:如果病毒把自己读入内存,区间为[a,b],同时把[a,b]的部分或者全部写入另外一个PE文件,那么这个就是病毒复制行为。 阅读全文

posted @ 2011-11-02 12:34 zhxfl 阅读(266) 评论(0) 推荐(0)

导航