Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix VM::ALL, add missing techniques to flag_to_string and replace COUTs with debug(...) #130

Merged
merged 4 commits into from
Aug 21, 2024

Conversation

D00Movenok
Copy link
Contributor

Hi there!

Thank you for this awesome project. To make it better, I made some bug fixes:

  • VM::ALL missed RDTSC and RDTSC_VMEXIT techniques, so I've added them;
  • flag_to_string function missed a lot of new techniques, so I've appended them;
  • Some functions used cout << instead of debug(...), so now they use debug(...).

I hope, 2 first fixes are easy to understand, but the last one needs some explanation: actually, in your lib debug() and core_debug() macroses can be replaced with end-user's debugging library, so if you use cout, it won't work.

Also I have a question about VM::ALL - maybe it also must enable VM::SPOOFABLE flag, because without it not all techniques are executed?

@D00Movenok D00Movenok changed the title Fix VM:: ALL, add missing techniques to flag_to_string and replace COUTs with debug(...) Fix VM::ALL, add missing techniques to flag_to_string and replace COUTs with debug(...) Aug 21, 2024
@kernelwernel
Copy link
Owner

Hi there!

Thank you for this awesome project. To make it better, I made some bug fixes:

* `VM::ALL` missed `RDTSC` and `RDTSC_VMEXIT` techniques, so I've added them;

* `flag_to_string` function missed a lot of new techniques, so I've appended them;

* Some functions used `cout <<` instead of `debug(...)`, so now they use `debug(...)`.

I hope, 2 first fixes are easy to understand, but the last one needs some explanation: actually, in your lib debug() and core_debug() macroses can be replaced with end-user's debugging library, so if you use cout, it won't work.

Also I have a question about VM::ALL - maybe it also must enable VM::SPOOFABLE flag, because without it not all techniques are executed?

Hi, thanks for the PR! I'm sure it wasn't easy reading through 10k lines of my awful C++ code lol

  1. I did in fact miss both RDTSC techniques
  2. Again, I completely forgot to add the missing techniques for that function. Nice eye though!
  3. I often forget to replace those std::couts with debug() during development, thanks for catching that one as well. They shouldn't be there in the first place.

About the VM::ALL flag, that's also something I overlooked since it's been a while I ever used this or tested this flag due to how uncommon it is for me to do anything with it. It should indeed be activating VM::SPOOFABLE.

I also appreciate the MIT update as well, that's updated automatically based on the original GPL vmaware.hpp file for each release, but thanks for the effort.

@kernelwernel kernelwernel merged commit ff3bf59 into kernelwernel:main Aug 21, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants