Coder Social home page Coder Social logo

basedpill / detectvm Goto Github PK

View Code? Open in Web Editor NEW
29.0 3.0 10.0 294 KB

Small program to detect if it is running on a virtual machine (windows only) and self deletes if it is.

C++ 96.04% CMake 3.96%
virtualbox vmware vm-detection vm-detect cpp

detectvm's Introduction

VMware and VBox Detector ๐Ÿ‘‹

Swagger Validator GitHub last commit rating

โœจ Overview โœจ

  • Can detect VMware (If VMware tools are installed)
  • Can detect Oracle VirtualBox
  • Can self delete if a vm is detected
  • Header file is included with all the functions in a namespace DetectVM

Checks for the psuedo device \\.\VBoxMiniRdrDN which exists in virtualbox vms.
Checks for the vmware tools registry SOFTWARE\VMware, Inc.\VMware Tool .
Self Delete function spawns a hidden cmd shell which gets the file path and deletes it.

Prerequisites

Uses standard libraries
Can be built using g++ (Sometimes cannot run on VMs using gcc unsure why)

g++ antivm.cpp -o antivm.exe -static-libgcc -static-libstdc++

Demo ๐ŸŽฅ

VMware Demonstration

VMware Demonstration

VirtualBox Demonstration

VirtualBox Demonstration

Author

  • char*#1337 on discord
  • mayhapsDev on GitHub

๐Ÿค Contributing

Contributions, issues and feature requests are welcome!

Feel free to check

Show your support

Give a โญ๏ธ if this project helped you!

To-Do

  • Add KVM detection
  • Add Hyper-V detection
  • Add QEMU detection
  • Improve VMware detection

detectvm's People

Contributors

370rokas avatar basedpill avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

detectvm's Issues

Error while compiling

In file included from antivm.cpp:3:
antivm.hpp: In function 'BOOL DetectVM::SelfDelete()':
antivm.hpp:32:74: error: cast from 'HINSTANCE' {aka 'HINSTANCE__*'} to 'int' loses precision [-fpermissive]
32 | if((GetEnvironmentVariable(_T("ComSpec"),szFile,MAX_PATH)!=0) &&((int) ShellExecute(0,0,szFile,szCmd,0,SW_HIDE) > 32))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.