和谐掉系统的文件保护一分钟

lonkil 从某AutoRun中逆出来的,利用微软未公布的API,sfc_os.dll中的ordinal为5函数,关闭文件保护一分钟。在网上查了一下资料,C代码如下:

 

//C code demo typedef DWORD(__stdcall *CPP) (DWORD param1, PWCHAR param2, DWORD param3); void Disable_WFP() { HINSTANCE hmod=LoadLibrary(_T"sfc_os.dll")); SetSfcFileException; // the function is stored at the fifth ordinal in sfc_os.dll SetSfcFileException= (CPP)GetProcAddress(hmod,(LPCSTR)5); SetSfcFileException(0, _T("c://windows//system32//calc.exe"),-1); //Now we can modify the system file in a complete stealth. ...... }

 

原文链接:http://www.vcfans.com/2009/12/harmony-out-the-system-file-protection-for-one-minute.html

你可能感兴趣的:(c,function,api,File,System,微软)