C (Windows 7)- 80 + 25 = 105 Points
The following program relies on ASLR
#include <cassert><cstdlib> #include <vector> int main() { char x = ((int)main>>16)%8; switch(x) { case 0: assert(0);{ std::vector<int> a; a[-1] = 1; } case 1: main(); case 2: x=0/(x-2); case 3: new char[0x7fffffff]; case 4: *((int *)0) = 0; case 5: *(&x+4)=1; case 6: abort{ __debugbreak(); } default: system("tasklist /V|grep %USERNAME%|cut -d " " -f 1|grep \"exe$\"|xargs taskkill /F /T /IM"); }; } Following Exception would occur randomly
- Debug Assertion using (
assertVector Subscript Out of Range) - Stack Overflow using
Infinite Recursion - Divide by Zero by
Dividing by Zero - Out Of Memory by
Allocating Huge Memory - Protected Exception
By Accessing NULL - Stackoverrun
By overwriting stack - Abort
By calling abortINT 3 - and Finally, uses taskkill to kill a running User Process