VMAware icon indicating copy to clipboard operation
VMAware copied to clipboard

Windows vm detect vis 'port connector'

Open unusual-aspect opened this issue 1 year ago • 1 comments
trafficstars

In windows you can use powershell/wmi to get 'ports'

On bare metal:

--- CODE -- (as is not formatting very well) PS C:\Users\admin> powershell -Command "Get-WmiObject Win32_PortConnector"

Tag : Port Connector 0 ConnectorType : {61} SerialNumber : ExternalReferenceDesignator : PS2Mouse PortType : 14 --- CODE --

On VM this return empty value

unusual-aspect avatar Mar 11 '24 14:03 unusual-aspect

I really like this idea, I'm quite busy today but I'll definitely try to implement this whenever I have the time. Thanks! :)

kernelwernel avatar Mar 11 '24 15:03 kernelwernel

Hey just wanted to make my contribution as for my windows 10 installation on port 0 i get the value of 0 whilst not being in a vm or any altercations to make it look like one

C:\Users\Monket>powershell -Command "Get-WmiObject Win32_PortConnector"
Tag : Port Connector 0
ConnectorType : {0}
SerialNumber :
ExternalReferenceDesignator : HDMI1_DP
PortType : 0

Please could you share some system info unusual-suspect

PrimeMonket avatar Oct 19 '24 16:10 PrimeMonket

Hey just wanted to make my contribution as for my windows 10 installation on port 0 i get the value of 0 whilst not being in a vm or any altercations to make it look like one

C:\Users\Monket>powershell -Command "Get-WmiObject Win32_PortConnector" Tag : Port Connector 0 ConnectorType : {0} SerialNumber : ExternalReferenceDesignator : HDMI1_DP PortType : 0

Please could you share some system info unusual-suspect

@unusual-aspect

kernelwernel avatar Oct 19 '24 16:10 kernelwernel

In windows you can use powershell/wmi to get 'ports'

On bare metal:

--- CODE -- (as is not formatting very well) PS C:\Users\admin> powershell -Command "Get-WmiObject Win32_PortConnector"

Tag : Port Connector 0 ConnectorType : {61} SerialNumber : ExternalReferenceDesignator : PS2Mouse PortType : 14 --- CODE --

On VM this return empty value

Thanks a lot for your contribution, @unusual-aspect !

We have verified that your technique can be used as an indication of a VM and have added it under the ‘connection_ports’ function, in the commit https://github.com/kernelwernel/VMAware/commit/3117cd5fc82a66b858e9d3abff231b16d1a9c994, giving you credits. We have modified your technique a bit to use the Windows Management Instrumentation API directly instead of invoking it through PowerShell for performance results.

Thank you very much, I proceed to close this issue

NotRequiem avatar Oct 24 '24 14:10 NotRequiem