rapid7/metasploit-framework — pull request #2698 by OJ (2013-11-27 06:12:42+00:00)
Title: Add RDI submodule and port Kitrap0d exploit to use the submodule

This commit is the first in a series that will move all the exploits that use RDI over to the R7 fork. The RDI source will be in a single known location and each exploit will have to work from that location.

The kitrap0d exploit has been migrated over to use this submodule so that there's one example of how it's done for future contributions to follow.

Also, this commit contains a new `make.bat` which is located in the `source/external/exploits` folder. The intent for this file is to have a single location which can build ALL the exploits. This means that down the track we'll have a single command to build all the exploits in the case that RDI is modified resulting in a submodule update.

Here's a sample `make` run as it currently stands:
```
Z:\code\metasploit-framework\external\source\exploits>make
"Building Exploits x64 and x86 (Release)"
"Building CVE-2010-0232 (KiTrap0D)"
Microsoft (R) Build Engine version 12.0.21005.1
[Microsoft .NET Framework, version 4.0.30319.18408]
Copyright (C) Microsoft Corporation. All rights reserved.

Build started 11/27/2013 4:01:36 PM.
Project "Z:\code\metasploit-framework\external\source\exploits\CVE-2010-0232\make.msbuild" on node 1 (all target(s)).
x86:
Building CVE-2010-0232 KiTrap0D x86 Release version

... snip ...

FinalizeBuildStatus:
Deleting file "Release\Win32\kitrap0d.tlog\unsuccessfulbuild".
Touching "Release\Win32\kitrap0d.tlog\kitrap0d.lastbuildstate".
Done Building Project "Z:\code\metasploit-framework\external\source\exploits\CVE-2010-0232\kitrap0d\kitrap0d.vcxproj" (
Rebuild target(s)).

Done Building Project "Z:\code\metasploit-framework\external\source\exploits\CVE-2010-0232\kitrap0d\kitrap0d.vcxproj.me
taproj" (Rebuild target(s)).

Done Building Project "Z:\code\metasploit-framework\external\source\exploits\CVE-2010-0232\kitrap0d.sln" (Clean;Rebuild target(s)).

Done Building Project "Z:\code\metasploit-framework\external\source\exploits\CVE-2010-0232\make.msbuild" (all target(s)).

Build succeeded.
0 Warning(s)
0 Error(s)

Time Elapsed 00:00:03.16
Finished 2013-11-27 16:01:39.340
```

When existing exploits are ported, and when new exploits are added, this make file should be updated to include that exploit. Also, there should be a post-build step for each of the exploits which results in the binary being copied to the appropriate location.