Skip to content

Commit 7b5c462

Browse files
author
Requiem
committed
chore: merged kernelwernel changes
2 parents de115f2 + 6d2a0d2 commit 7b5c462

1 file changed

Lines changed: 15 additions & 12 deletions

File tree

src/vmaware.hpp

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
*
9595
* Firstly, the lib is completely static, meaning that there's no need for struct
9696
* constructors to be initialized (unless you're using the VM::vmaware struct).
97-
* The main focus of the lib is the tables:
97+
* The main focus of the lib are the tables:
9898
* - the TECHNIQUE table stores all the VM detection technique information in a std::map
9999
*
100100
* - the BRAND table stores every VM brand as a std::map as well, but as a scoreboard.
@@ -114,7 +114,7 @@
114114
* the standard structure for how VM techniques are organised, functionalities
115115
* to run all the techniques in the technique table, functionalities to run
116116
* custom-made techniques by the user, and an argument handler based on the
117-
* arguments input by the user.
117+
* argument input by the user.
118118
*
119119
* - cpu module:
120120
* As the name suggests, this contains functionalities for the CPU. There are
@@ -151,20 +151,20 @@
151151
* 2. After the bitset has been generated, this information is then
152152
* passed to the core module of the lib. It analyses the bitset,
153153
* and runs every VM detection technique that has been selected,
154-
* while ignoring the ones that weren't selected (by default most
155-
* of them are already selected anyway). The function that does
156-
* this mechanism is core::run_all()
154+
* while ignoring the ones that weren't (by default most of them
155+
* are already selected anyway). The function that does this
156+
* mechanism is core::run_all()
157157
*
158158
* 3. While the core::run_all() function is being run, it checks if
159159
* each technique has already been memoized or not. If it has,
160-
* retrieves the result from the cache and moves to the next technique.
161-
* If it hasn't, runs the technique and caches the result in the
160+
* retrieve the result from the cache and move to the next technique.
161+
* If it hasn't, run the technique and cache the result in the
162162
* cache table.
163163
*
164164
* 4. After every technique has been executed, this generates a
165165
* uint16_t score. Every technique has a score value between 0 to
166166
* 100, and if a VM is detected then this score is accumulated to
167-
* a total score. If the total is above 150, that means it's a VM[1].
167+
* a total. If the total is above 150, that means it's a VM[1].
168168
*
169169
*
170170
* There are other functions such as VM::brand(), which returns a std::string of the most
@@ -176,15 +176,17 @@
176176
* important is because a lot of techniques increment a point for its
177177
* respected brand that was detected. For example, if the VM::QEMU_USB
178178
* technique has detected a VM, it'll add a score to the QEMU brand in
179-
* the scoreboard. If no technique have been run, then there's no way to
179+
* the scoreboard. If no technique were run, then there's no way to
180180
* populate the scoreboard with any points. After every VM detection
181181
* technique has been invoked/retrieved, the brand scoreboard is now
182182
* ready to be analysed.
183183
*
184-
* 3. Create a filter for the scoreboard, where every brand that have a score
184+
* 3. Create a filter for the scoreboard, where every brand that has a score
185185
* of 0 are erased for abstraction purposes. Now the scoreboard is only
186186
* populated with relevant brands where they all have at least a single
187187
* point. These are the contenders for which brand will be outputted.
188+
* Think of it as fetching candidates with potential while discarding
189+
* those that don't.
188190
*
189191
* 4. Merge certain brand combinations together. For example, Azure's cloud
190192
* is based on Hyper-V, but Hyper-V may have a higher score due to the
@@ -199,7 +201,7 @@
199201
* output of the VM::brand() function.
200202
*
201203
* 6. The result is then cached in the memo module, so if another function
202-
* invokes VM:brand() again, "the result is retrieved from the cache
204+
* invokes VM::brand() again, the result is retrieved from the cache
203205
* without needing to run all of the previous steps again.
204206
*
205207
* (NOTE: it's a bit more complicated than this, but that's the gist of how this function works)
@@ -212,6 +214,7 @@
212214
* the threshold becomes 300 instead of 150.
213215
*/
214216

217+
215218
#pragma once
216219

217220
#ifndef __VMAWARE_DEBUG__
@@ -8825,7 +8828,7 @@ struct VM {
88258828

88268829

88278830
/**
8828-
* @brief Check for known VM objects
8831+
* @brief Check for any signs of VMs in Windows kernel object entities
88298832
* @category Windows
88308833
* @implements VM::OBJECTS
88318834
*/

0 commit comments

Comments
 (0)