Skip to content

Commit bd1225f

Browse files
authored
Merge pull request #71 from kernelwernel/revert-70-dev
Revert "changes to contributors"
2 parents 6a82b30 + 5663a91 commit bd1225f

4 files changed

Lines changed: 18 additions & 56 deletions

File tree

.all-contributorsrc

Lines changed: 0 additions & 4 deletions
This file was deleted.

README.md

Lines changed: 11 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ This project also provides a tiny, but handy CLI tool utilising the full potenti
7272
<br>
7373

7474
## Installation 📥
75-
To install the library, download or copy paste the `vmaware.hpp` file in the latest [release section](https://github.com/kernelwernel/VMAware/releases/latest) to your project. No CMake or shared object linkages are necessary, it's literally that simple.
75+
To install the library, download or copy paste the `vmaware.hpp` file in the [release section](https://github.com/kernelwernel/VMAware/releases/) to your project. No CMake or shared object linkages are necessary, it's literally that simple.
7676

7777
However, if you want the full project (globally accessible headers with <vmaware.hpp> and the CLI tool), follow these commands:
7878
```bash
@@ -103,10 +103,10 @@ You can view the full docs [here](docs/documentation.md). Trust me, it's not too
103103

104104
## Q&A ❓
105105
- How does it work?
106-
> It utilises a comprehensive list of low-level and high-level anti-VM techniques that gets accounted in a scoring system. The scores for each technique are arbitrarily given, and a certain threshold score must be met to detect if it's running in a VM.
106+
> It utilises a comprehensive list of low-level and high-level anti-VM techniques that gets accounted in a scoring system. The scores for each technique are arbitrarily given, and a threshold must be met to detect if it's running in a VM.
107107
108108
- Who is this library for?
109-
> It's designed for security researchers, VM engineers, gamer developers, and pretty much anybody who needs a practical and rock-solid VM detection mechanism in their project. For example, if you're making a VM and you're testing the effectiveness of concealing itself, or if you're a malware analyst and you want to check if your VM environment is good enough to avoid detection. One of the major intentions is to thwart reverse engineers at probing your software in a VM for a legitimate software product (especially games).
109+
> It's designed for security researchers, VM engineers, and pretty much anybody who needs a practical and rock-solid VM detection mechanism in their project. For example, if you're making a VM and you're testing the effectiveness of concealing itself, or if you're a malware analyst and you want to check if your VM environment is good enough to avoid detection.
110110
111111
- Why another VM detection project?
112112
> There's already loads of projects that have the same goal such as [InviZzzible](https://github.com/CheckPointSW/InviZzzible), [pafish](https://github.com/a0rtega/pafish) and [Al-Khaser](https://github.com/LordNoteworthy/al-khaser). But the difference between the aforementioned projects is that they don't provide a programmable interface to interact with the detection mechanisms, on top of having little to no support for non-Windows systems. I wanted the core detection techniques to be accessible programmatically in a cross-platform way for everybody to get something useful out of it rather than providing just a CLI tool like those projects.
@@ -115,10 +115,10 @@ You can view the full docs [here](docs/documentation.md). Trust me, it's not too
115115
> Yes. There are some techniques that are trivially spoofable, and there's nothing the library can do about it whether it's a deliberate false negative or even a false positive. This is a problem that every VM detection project is facing, which is why the library is trying to test every technique possible to get the best result based on the environment it's running under.
116116
117117
- Can I use this for malware?
118-
> This project is not soliciting the development of malware for obvious reasons. Even if you intend to use it for concealment/evasion purposes, it'll most likely be flagged by antiviruses anyway and nothing is obfuscated to begin with. Good luck manually obfuscating 6000 lines of C++ code lmfao
118+
> This project is not soliciting the development of malware for obvious reasons. Even if you intend to use it for concealment purposes, it'll most likely be flagged by antiviruses anyway and nothing is obfuscated to begin with. Good luck manually obfuscating 6000 lines of C++ code lmfao
119119
120120
- Why GPL 3.0 and MIT?
121-
> I would've made it strictly MIT so proprietary software can make use of the library, but some of the techniques employed are from GPL 3.0 projects, and I have no choice but to use the same license for legal reasons. This gave me an idea to make an MIT version without the GPL code, so that proprietary software can make use of this library without the legal open-source requirement. It should be noted that the MIT version removes **10** GPL techniques out of the total 80+ as of the 1.2 release, which may slightly impact the overall result to be inaccurate.
121+
> I would've made it strictly MIT so proprietary software can make use of the library, but some of the techniques employed are from GPL 3.0 projects, and I have no choice but to use the same license for legal reasons. This gave me an idea to make an MIT version without all of the GPL code so it can also be used without forcing your code to be open-source. It should be noted that the MIT version removes **8** techniques, and the lesser the number of mechanisms, the less accurate the overall result might be.
122122
123123
- The tool has many false positives under a Windows 11 host, why?
124124
> This is because it is in fact running under a VM. More specifically, Hyper-V might be used by default for every program that's running in Windows 11.
@@ -133,23 +133,6 @@ And if you found this project useful, a star would be appreciated :)
133133
<br>
134134

135135
## Credits and contributors ✒️
136-
137-
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
138-
<!-- prettier-ignore-start -->
139-
<!-- markdownlint-disable -->
140-
141-
<!-- markdownlint-restore -->
142-
<!-- prettier-ignore-end -->
143-
144-
<!-- ALL-CONTRIBUTORS-LIST:END -->
145-
146-
[![All Contributors](https://img.shields.io/github/all-contributors/projectOwner/projectName?color=ee8449&style=flat-square)](#contributors)
147-
148-
- [Requiem](https://github.com/NotRequiem)
149-
- [Alex](https://github.com/greenozon)
150-
- [Marek Knápek](https://github.com/MarekKnapek)
151-
- [Vladyslav Miachkov](https://github.com/fameowner99)
152-
- [Alan Tse](https://github.com/alandtse)
153136
- [Check Point Research](https://research.checkpoint.com/)
154137
- [Unprotect Project](https://unprotect.it/)
155138
- [Al-Khaser](https://github.com/LordNoteworthy/al-khaser)
@@ -158,6 +141,10 @@ And if you found this project useful, a star would be appreciated :)
158141
- N. Rin, EP_X0FF
159142
- [Peter Ferrie, Symantec](https://github.com/peterferrie)
160143
- [Graham Sutherland, LRQA Nettitude](https://www.nettitude.com/uk/)
144+
- [Requiem](https://github.com/NotRequiem)
145+
- [Alex](https://github.com/greenozon)
146+
- [Marek Knápek](https://github.com/MarekKnapek)
147+
- [Vladyslav Miachkov](https://github.com/fameowner99)
161148
- [(Offensive Security) Danny Quist](chamuco@gmail.com)
162149
- [(Offensive Security) Val Smith](mvalsmith@metasploit.com)
163150
- Tom Liston + Ed Skoudis
@@ -168,6 +155,6 @@ And if you found this project useful, a star would be appreciated :)
168155
<br>
169156

170157
## Legal 📜
171-
I am not responsible nor liable for any damage you cause through any malicious usage (especially through malware) of this project.
158+
I am not responsible nor liable for any damage you cause through any malicious usage of this project.
172159

173-
License: GPL-3.0
160+
License: GPL-3.0

docs/documentation.md

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -128,22 +128,6 @@ int main() {
128128
}
129129
```
130130

131-
On rare occasions, there could be conflicting reports of multiple VM brands being detected, which could cause an inaccurate or buggy result. This is where `VM::MULTIPLE` comes in. This flag is specific to `VM::brand()`, and it will return a string with the format "`vm_brand1 or vm_brand2 [or vm_brand3 ...]`" ONLY IF it has found a collision between multiple VM brands. For example:
132-
133-
```cpp
134-
#include "vmaware.hpp"
135-
#include <string>
136-
137-
int main() {
138-
const std::string result = VM::brand(VM::MULTIPLE);
139-
140-
// the output could be something like "VirtualBox or VMware"
141-
// it could also be "Sandboxie or Wine or Anubis", there isn't
142-
// a limit to how many VM brands can be included in the string.
143-
std::cout << result << "\n";
144-
}
145-
```
146-
147131
<br>
148132

149133
## `VM::check()`
@@ -331,5 +315,4 @@ VMAware provides a convenient way to not only check for VMs, but also have the f
331315
| `VM::NO_MEMO` | This will disable memoization, meaning the result will not be fetched through a previous computation of the `VM::detect()` function. Use this if you're only using a single function from the `VM` struct for a performance boost.
332316
| `VM::EXTREME` | This will disregard the weights/biases and its scoring system. It will essentially treat any technique that found a hit as a VM detection no matter how low that technique's certainty is, so if a single technique is positive then it will return true. |
333317
| `VM::DEFAULT` | This represents a range of flags which are enabled if no default argument is provided. The reason why this exists is to easily disable any bits manually (shown in the is_vm6 example in the `VM::detect()` section)
334-
| `VM::WIN_HYPERV_DEFAULT` | This will take into account that Windows 11 (and sometimes 10) may have Hyper-V as a default virtualisation software for any program even if the OS is running as host. Essentially, this flag will count any techniques prone to this issue as running in a VM, while having a higher threshold bar to detect it as one. |
335-
| `VM::MULTIPLE` | This is exclusive for `VM::brand()`. It will output a string message of all the potential brands it has detected instead of only giving a single one, which may be buggy.
318+
| `VM::WIN_HYPERV_DEFAULT` | This will take into account that Windows 11 (and sometimes 10) may have Hyper-V as a default virtualisation software for any program even if the OS is running as host. Essentially, this flag will count any techniques prone to this issue as running in a VM, while having a higher threshold bar to detect it as one. |

src/vmaware.hpp

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
* - @Alex (https://github.com/greenozon)
1515
* - @Marek Knápek (https://github.com/MarekKnapek)
1616
* - @Vladyslav Miachkov (https://github.com/fameowner99)
17-
* - @Alan Tse (https://github.com/alandtse)
1817
* - Repository: https://github.com/kernelwernel/VMAware
1918
* - Docs: https://github.com/kernelwernel/VMAware/docs/documentation.md
2019
* - Full credits: https://github.com/kernelwernel/VMAware#credits
@@ -4263,11 +4262,11 @@ struct VM {
42634262
if (x1 || x2 || x3 || x4 || x5) {
42644263
is_vm = true;
42654264
#ifdef __VMAWARE_DEBUG__
4266-
if (x1) { debug("MSSMBIOS: x1 = ", x1); }
4267-
if (x2) { debug("MSSMBIOS: x2 = ", x2); }
4268-
if (x3) { debug("MSSMBIOS: x3 = ", x3); }
4269-
if (x4) { debug("MSSMBIOS: x4 = ", x4); }
4270-
if (x5) { debug("MSSMBIOS: x5 = ", x5); }
4265+
if (x1) { debug("VBOX_MSSMBIOS: x1 = ", x1); }
4266+
if (x2) { debug("VBOX_MSSMBIOS: x2 = ", x2); }
4267+
if (x3) { debug("VBOX_MSSMBIOS: x3 = ", x3); }
4268+
if (x4) { debug("VBOX_MSSMBIOS: x4 = ", x4); }
4269+
if (x5) { debug("VBOX_MSSMBIOS: x5 = ", x5); }
42714270
#endif
42724271
}
42734272

@@ -4276,9 +4275,6 @@ struct VM {
42764275

42774276
if (is_vm) {
42784277
if (x5) {
4279-
bool tmp = core::add(VBOX);
4280-
tmp = core::add(HYPERV);
4281-
UNUSED(tmp);
42824278
return true;
42834279
}
42844280

@@ -5841,7 +5837,7 @@ struct VM {
58415837
std::vector<std::string> potential_brands;
58425838

58435839
for (auto it = brands.cbegin(); it != brands.cend(); ++it) {
5844-
const int points = it->second;
5840+
const u8 points = it->second;
58455841
const std::string brand = it->first;
58465842

58475843
if (points > 0) {

0 commit comments

Comments
 (0)