57{
59
60 ShowMessages("This command is deprecated, you should not use it anymore!\n");
61 return;
62
63 if (CommandTokens.size() >= 3)
64 {
65 ShowMessages("incorrect use of the '%s'\n\n",
68 return;
69 }
70
72 {
73 ShowMessages("incorrect use of the '%s'\n\n",
76 return;
77 }
78 else if (CommandTokens.size() == 2 &&
80 {
82 }
83
84
85
86
88 {
89 ShowMessages(
90 "Debugger is loaded and your machine is already in a hypervisor, you "
91 "should measure the times before 'load'-ing the debugger, please "
92 "'unload' the debugger and use '!measure' again or use '!measure "
93 "default' to use hardcoded measurements\n");
94 return;
95 }
96
97 if (!DefaultMode)
98 {
103 {
104 ShowMessages(
105 "we detected that there is a hypervisor, on your system, it "
106 "leads to wrong measurement results for our transparent-mode, please "
107 "make sure that you're not in a hypervisor then measure the result "
108 "again; otherwise the transparent-mode will not work but you can use "
109 "'!measure default' to use the hardcoded measurements !\n\n");
110
111 return;
112 }
113
118 {
119 ShowMessages(
120 "we detected that there is a hypervisor, on your system, it "
121 "leads to wrong measurement results for our transparent-mode, please "
122 "make sure that you're not in a hypervisor then measure the result "
123 "again; otherwise the transparent-mode will not work but you can use "
124 "'!measure default' to use the hardcoded measurements !\n\n");
125
126 return;
127 }
128 }
129 else
130 {
131
132
133
134
135
136
137
141
142
143
144
148 }
149
150 ShowMessages("the measurements were successful\nyou can use the '!hide' command now\n");
151
152
153
154
156}
std::string GetCaseSensitiveStringFromCommandToken(CommandToken TargetToken)
Get case sensitive string from command token.
Definition common.cpp:467
BOOLEAN CompareLowerCaseStrings(CommandToken TargetToken, const CHAR *StringToCompare)
Compare lower case strings.
Definition common.cpp:503
HANDLE g_DeviceHandle
Holds the global handle of device which is used to send the request to the kernel by IOCTL,...
Definition globals.h:481
UINT64 g_CpuidStandardDeviation
The standard deviation calculated from the measurements of cpuid '!measure' command.
Definition globals.h:542
UINT64 g_RdtscAverage
The average calculated from the measurements of rdtsc/p '!measure' command.
Definition globals.h:554
VOID CommandMeasureHelp()
help of the !measure command
Definition measure.cpp:33
UINT64 g_RdtscMedian
The median calculated from the measurements of rdtsc/p '!measure' command.
Definition globals.h:566
BOOLEAN g_TransparentResultsMeasured
Shows whether the user executed and mesaured '!measure' command or not, it is because we want to use ...
Definition globals.h:530
UINT64 g_CpuidMedian
The median calculated from the measurements of cpuid '!measure' command.
Definition globals.h:548
UINT64 g_RdtscStandardDeviation
The standard deviation calculated from the measurements of rdtsc/p '!measure' command.
Definition globals.h:560
UINT64 g_CpuidAverage
The average calculated from the measurements of cpuid '!measure' command.
Definition globals.h:536
BOOLEAN TransparentModeCheckRdtscpVmexit(UINT64 *Average, UINT64 *StandardDeviation, UINT64 *Median)
compute the average, standard deviation and median if rdtsc+rdtsc
Definition transparency.cpp:212
BOOLEAN TransparentModeCheckHypervisorPresence(UINT64 *Average, UINT64 *StandardDeviation, UINT64 *Median)
compute the average, standard deviation and median if rdtsc+cpuid+rdtsc
Definition transparency.cpp:182