Komodia's Redirector Compile Insturctions

From Komodia
Jump to: navigation, search

VS6 environment

When compiling with VS6 you need to make sure that:

  1. XPSP2 SDK is installed and configured as the first dirs on the: Executable, Library, Include
  2. One time change to the file "xstring" under: C:\Program files\Microsoft Visual Studio\VC98\Include, you need to search for 255 and change it to 0, this will change the std::string to be multithreaded compatible, if this change is not made, the binary produced will detect it and will refuse to run.

Komodia's Redirector

The project is located under: PCProxy - Redirect.

To compile it you need to open the project: VS6 - PCProxy.dsw, for VS2003 and above: PCProxy.sln and build debug or release according to your needs.

All the names and compile time settings (which affect all components) are located at the file: KomodiaProduct.h

LSP component

There are two LSP components:

  • LSP\NonIFSLSP, This is the regular LSP used for the Redirector.
  • LSP\NonIFSLSP - DNS, This is the LSP used for the DNS Hijack module.

To compile the LSP (either one of them) you need to open the project: VS6 - NonIFSLSP.dsw, for VS2003 and above: NonIFSLSP.sln and build debug or release according to your needs.

RegisterLSP component

The component is located under: LSP\RegisterLSP.

To compile it you need to open the project: VS6 - RegisterLSP.dsw, for VS2003 and above: RegisterLSP.sln and build debug or release according to your needs.

RegisterLSP DLL component

This component is the DLL form of the RegisterLSP which you might prefer to use over the EXE version.

The component is located under: LSP\InstallDLL.

To compile it you need to open the project: VS6 - InstallDLL.dsw, for VS2003 and above: InstallDLL.sln and build debug or release according to your needs.

afxres.h missing

If you get this error, look at this link [1].

64bit compilation

For code sent before 15th September 2010 or for VS6 and VS2005

  1. For 64bit you need to compile only the LSP and RegisterLSP modules, first you must have Microsoft Platform SDK Windows 2003R2 (it may work with newer version, it is tested to work with this version), make sure that you install all.
  2. Open Build Environemt by going to: Start -> Programs -> Microsoft Platform SDK for Windows Server 2003 R2 -> Open Build Environment Window -> Windows XP 64-bit Build Environment -> Set Windows XP x64 Build Environment (Retail)
  3. Run your development IDE:
    1. VS6: "C:\Program files\Microsoft Visual Studio\Common\MSDev98\Bin\MSDEV.EXE" /useenv
    2. VS2005: "C:\Program files\Microsoft Visual Studio 8\Common7\IDE\devenv.exe" /useenv
    3. VS2008: "C:\Program files\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe" /useenv
  4. compile Debug64 or Release64 builds, according to your needs.

For code sent after 15th September 2010 and with VS2008 and above

  1. For 64bit you need to compile only the LSP and RegisterLSP modules.
  2. Compile the LSP and RegisterLSP with Release64\x64 project type.
  3. The code compiles with VS2008, VS2010, VS2012, VS2013, VS2015, you can request the project to come with VS of your choice.

How to integrate with the code

You have three methods to integrate with the SDK to receive and control the traffic:

  1. Directly into the source code (only if you have the source code version), all changes goes into the class CClientCustomizations (it's similar to the DLL interface), you also need to uncomment this line: #define SERVICE_CUSTOM_EXTENSIONS inside KomodiaProduct.h, you can see the interface definition here: Komodia's Redirector DLL framework guide.
  2. Write a DLL using the DLL framework, you can see the interface definition here: Komodia's Redirector DLL framework guide.
  3. Use the COM framework to interface from your process to the SDK, you can see the interface definition here: Komodia's Redirector COM framework guide.

Special compilation

These components are compiled regularly:

  • WFP
  • WD

The components you need to compile and place under src\original\

  • PCProxy - DLL x32 (and x64 if provided)
  • LSP\NonIFSLSP (or LSP\NonIFSLSP - DLL) x32 and x64
  • LSP\InstallDLL x32 and x64
  • KomodiaCertDLL x32 and (and x64 if provided), this is for SSL Digestor only

The components you need to compile and place under src\loader\

  • Spoofer\PCProxy x32 (and x64 if provided)
  • Spoofer\LSP (and x64 if provided)
  • Spoofer\RegisterLSP x32 and x64
  • Spoofer\KomodiaCertDLL x32 and (and x64 if provided), this is for SSL Digestor only

Run merge.bat and if exists merge64.bat, it will build all files under src\loader and those are your final binaries