├── .gitignore ├── README.md ├── instracelog.sln └── instracelog.vcxproj /.gitignore: -------------------------------------------------------------------------------- 1 | *.user 2 | .vs/ 3 | x64/ 4 | Release/ 5 | Debug/ 6 | 7 | /instracelog.cpp -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # instracelog 2 | 3 | Windows build files for [VMHunt PIN Trace tool](https://github.com/s3team/VMHunt/tree/master/tracer). Based on the [tiny_tracer](https://github.com/hasherezade/tiny_tracer) project by [hasherezade](http://hasherezade.net). 4 | 5 | ## How to build? 6 | 7 | To compile the prepared project you need to use [Visual Studio 2017](https://visualstudio.microsoft.com/downloads/). It was tested with [Intel Pin 3.7](https://software.intel.com/en-us/articles/pin-a-binary-instrumentation-tool-downloads). 8 | 9 | - Clone this repo into `\source\tools` that is inside your PIN root directory. 10 | - Copy `instracelog.cpp` next to `instracelog.sln` 11 | - Open the project in VS 2017 and build. 12 | -------------------------------------------------------------------------------- /instracelog.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.27428.2027 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "instracelog", "instracelog.vcxproj", "{639EF517-FCFC-408E-9500-71F0DC0458DB}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x64 = Debug|x64 11 | Debug|x86 = Debug|x86 12 | Release|x64 = Release|x64 13 | Release|x86 = Release|x86 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {639EF517-FCFC-408E-9500-71F0DC0458DB}.Debug|x64.ActiveCfg = Debug|x64 17 | {639EF517-FCFC-408E-9500-71F0DC0458DB}.Debug|x64.Build.0 = Debug|x64 18 | {639EF517-FCFC-408E-9500-71F0DC0458DB}.Debug|x86.ActiveCfg = Debug|Win32 19 | {639EF517-FCFC-408E-9500-71F0DC0458DB}.Debug|x86.Build.0 = Debug|Win32 20 | {639EF517-FCFC-408E-9500-71F0DC0458DB}.Release|x64.ActiveCfg = Release|x64 21 | {639EF517-FCFC-408E-9500-71F0DC0458DB}.Release|x64.Build.0 = Release|x64 22 | {639EF517-FCFC-408E-9500-71F0DC0458DB}.Release|x86.ActiveCfg = Release|Win32 23 | {639EF517-FCFC-408E-9500-71F0DC0458DB}.Release|x86.Build.0 = Release|Win32 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | GlobalSection(ExtensibilityGlobals) = postSolution 29 | SolutionGuid = {0EE68F07-BB92-4DD8-ABA3-10B8017F04DB} 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /instracelog.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Debug 10 | x64 11 | 12 | 13 | Release 14 | Win32 15 | 16 | 17 | Release 18 | x64 19 | 20 | 21 | 22 | {639EF517-FCFC-408E-9500-71F0DC0458DB} 23 | instracelog 24 | Win32Proj 25 | 10.0.17134.0 26 | instracelog 27 | 28 | 29 | 30 | DynamicLibrary 31 | MultiByte 32 | true 33 | v141 34 | 35 | 36 | DynamicLibrary 37 | MultiByte 38 | v141 39 | 40 | 41 | DynamicLibrary 42 | MultiByte 43 | true 44 | v141 45 | 46 | 47 | DynamicLibrary 48 | MultiByte 49 | v141 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | <_ProjectFileVersion>10.0.40219.1 69 | $(ProjectDir)$(Configuration)\ 70 | $(Configuration)\ 71 | false 72 | false 73 | $(ProjectDir)$(Platform)\$(Configuration)\ 74 | $(Platform)\$(Configuration)\ 75 | false 76 | false 77 | $(ProjectDir)$(Configuration)\ 78 | $(Configuration)\ 79 | false 80 | false 81 | $(ProjectDir)$(Platform)\$(Configuration)\ 82 | $(Platform)\$(Configuration)\ 83 | false 84 | false 85 | AllRules.ruleset 86 | 87 | 88 | AllRules.ruleset 89 | 90 | 91 | AllRules.ruleset 92 | 93 | 94 | AllRules.ruleset 95 | 96 | 97 | 98 | 99 | 100 | /GR- /GS- /EHs- /EHa- /Oi- /FIinclude/msvc_compat.h %(AdditionalOptions) 101 | Disabled 102 | ..\..\include\pin;..\..\include\pin\gen;..\InstLib;..\..\..\extras\xed-ia32\include;..\..\..\extras\components\include;..\..\..\extras\stlport\include;..\..\..\extras;..\..\..\extras\libstdc++\include;..\..\..\extras\crt\include;..\..\..\extras\crt;..\..\..\extras\crt\include\arch-x86;..\..\..\extras\crt\include\kernel\uapi;..\..\..\extras\crt\include\kernel\uapi\asm-x86;..\..\..\extras\xed-ia32\include\xed;%(AdditionalIncludeDirectories) 103 | TARGET_IA32;HOST_IA32;TARGET_WINDOWS;WIN32;__PIN__=1;PIN_CRT=1;__i386__ 104 | false 105 | 106 | 107 | Default 108 | MultiThreaded 109 | false 110 | true 111 | NotSet 112 | false 113 | 114 | 115 | Level3 116 | ProgramDatabase 117 | 4530;%(DisableSpecificWarnings) 118 | Strict 119 | 120 | 121 | /export:main /ignore:4049 /ignore:4210 /ignore:4217 %(AdditionalOptions) 122 | pin.lib;xed.lib;pinvm.lib;kernel32.lib;stlport-static.lib;m-static.lib;c-static.lib;os-apis.lib;ntdll-32.lib;crtbeginS.obj 123 | ..\..\..\ia32\lib;..\..\..\ia32\lib-ext;..\..\..\extras\xed-ia32\lib;..\..\..\ia32\runtime\pincrt;%(AdditionalLibraryDirectories) 124 | true 125 | %(IgnoreSpecificDefaultLibraries) 126 | true 127 | NotSet 128 | false 129 | Ptrace_DllMainCRTStartup%4012 130 | 0x55000000 131 | MachineX86 132 | true 133 | false 134 | 135 | 136 | 137 | 138 | X64 139 | 140 | 141 | /GR- /GS- /EHs- /EHa- /Oi- /FIinclude/msvc_compat.h %(AdditionalOptions) 142 | Disabled 143 | ..\..\include\pin;..\..\include\pin\gen;..\InstLib;..\..\..\extras\xed-intel64\include;..\..\..\extras\components\include;..\..\..\extras\stlport\include;..\..\..\extras;..\..\..\extras\libstdc++\include;..\..\..\extras\crt\include;..\..\..\extras\crt;..\..\..\extras\crt\include\arch-x86_64;..\..\..\extras\crt\include\kernel\uapi;..\..\..\extras\crt\include\kernel\uapi\asm-x86;..\..\..\extras\xed-ia32\include\xed;%(AdditionalIncludeDirectories) 144 | TARGET_IA32E;HOST_IA32E;TARGET_WINDOWS;WIN32;__PIN__=1;PIN_CRT=1;__LP64__ 145 | false 146 | 147 | 148 | Default 149 | MultiThreaded 150 | false 151 | true 152 | false 153 | 154 | 155 | Level3 156 | ProgramDatabase 157 | 4530;%(DisableSpecificWarnings) 158 | Strict 159 | 160 | 161 | /export:main /ignore:4049 /ignore:4210 /ignore:4217 %(AdditionalOptions) 162 | pin.lib;xed.lib;pinvm.lib;kernel32.lib;stlport-static.lib;m-static.lib;c-static.lib;os-apis.lib;ntdll-64.lib;crtbeginS.obj 163 | ..\..\..\intel64\lib;..\..\..\intel64\lib-ext;..\..\..\extras\xed-intel64\lib;..\..\..\intel64\runtime\pincrt;%(AdditionalLibraryDirectories) 164 | true 165 | %(IgnoreSpecificDefaultLibraries) 166 | true 167 | NotSet 168 | false 169 | Ptrace_DllMainCRTStartup 170 | 0xC5000000 171 | MachineX64 172 | true 173 | 174 | 175 | 176 | 177 | /GR- /GS- /EHs- /EHa- /Oi- /FIinclude/msvc_compat.h %(AdditionalOptions) 178 | false 179 | false 180 | ..\..\include\pin;..\..\include\pin\gen;..\InstLib;..\..\..\extras\xed-ia32\include;..\..\..\extras\components\include;..\..\..\extras\stlport\include;..\..\..\extras;..\..\..\extras\libstdc++\include;..\..\..\extras\crt\include;..\..\..\extras\crt;..\..\..\extras\crt\include\arch-x86;..\..\..\extras\crt\include\kernel\uapi;..\..\..\extras\crt\include\kernel\uapi\asm-x86;..\..\..\extras\xed-ia32\include\xed;%(AdditionalIncludeDirectories) 181 | TARGET_IA32;HOST_IA32;TARGET_WINDOWS;WIN32;__PIN__=1;PIN_CRT=1;__i386__ 182 | false 183 | 184 | 185 | Default 186 | MultiThreaded 187 | false 188 | true 189 | NotSet 190 | false 191 | 192 | 193 | Level3 194 | 195 | 196 | 4530;%(DisableSpecificWarnings) 197 | Strict 198 | 199 | 200 | /export:main /ignore:4049 /ignore:4210 /ignore:4217 %(AdditionalOptions) 201 | pin.lib;xed.lib;pinvm.lib;kernel32.lib;stlport-static.lib;m-static.lib;c-static.lib;os-apis.lib;ntdll-32.lib;crtbeginS.obj; 202 | ..\..\..\ia32\lib;..\..\..\ia32\lib-ext;..\..\..\extras\xed-ia32\lib;..\..\..\ia32\runtime\pincrt;%(AdditionalLibraryDirectories) 203 | true 204 | %(IgnoreSpecificDefaultLibraries) 205 | true 206 | NotSet 207 | true 208 | 209 | 210 | 211 | 212 | Ptrace_DllMainCRTStartup%4012 213 | 0x55000000 214 | MachineX86 215 | false 216 | 217 | 218 | 219 | 220 | X64 221 | 222 | 223 | /GR- /GS- /EHs- /EHa- /Oi- /FIinclude/msvc_compat.h %(AdditionalOptions) 224 | false 225 | false 226 | ..\..\include\pin;..\..\include\pin\gen;..\InstLib;..\..\..\extras\xed-intel64\include;..\..\..\extras\components\include;..\..\..\extras\stlport\include;..\..\..\extras;..\..\..\extras\libstdc++\include;..\..\..\extras\crt\include;..\..\..\extras\crt;..\..\..\extras\crt\include\arch-x86_64;..\..\..\extras\crt\include\kernel\uapi;..\..\..\extras\crt\include\kernel\uapi\asm-x86;..\..\..\extras\xed-ia32\include\xed;%(AdditionalIncludeDirectories) 227 | TARGET_IA32E;HOST_IA32E;TARGET_WINDOWS;WIN32;__PIN__=1;PIN_CRT=1;__LP64__ 228 | false 229 | 230 | 231 | Default 232 | MultiThreaded 233 | false 234 | true 235 | false 236 | 237 | 238 | Level3 239 | 240 | 241 | 4530;%(DisableSpecificWarnings) 242 | Strict 243 | 244 | 245 | /export:main /ignore:4049 /ignore:4210 /ignore:4217 %(AdditionalOptions) 246 | pin.lib;xed.lib;pinvm.lib;kernel32.lib;stlport-static.lib;m-static.lib;c-static.lib;os-apis.lib;ntdll-64.lib;crtbeginS.obj; 247 | ..\..\..\intel64\lib;..\..\..\intel64\lib-ext;..\..\..\extras\xed-intel64\lib;..\..\..\intel64\runtime\pincrt;%(AdditionalLibraryDirectories) 248 | true 249 | %(IgnoreSpecificDefaultLibraries) 250 | true 251 | NotSet 252 | true 253 | 254 | 255 | 256 | 257 | Ptrace_DllMainCRTStartup 258 | 0xC5000000 259 | MachineX64 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | --------------------------------------------------------------------------------