CatalogLOOBins

ORCHARD · Tool

ioreg

4 techniquesmacOSLOOBinsGPL-3.0

Use ioreg to check whether the remote macOS screen is locked.

DiscoverymacOS

The following command will display a list of keys that contain "CGSSession". If the key "CGSSessionScreenIsLocked" is present, the screen is actively locked.

ioreg -n Root -d1 -a | grep CGSSession
Evidence
Upstream reference
Environment
Local host
Compatibility
Imported from LOOBins; availability and behaviour depend on macOS version, privacy permissions and installed components. Not lab tested here.
Native
Discovery

Use ioreg to check whether the host is on a physical machine or a VM

DiscoveryCollectionmacOS

Check the output of this command (specifically the IOPlatformSerialNumber, board-id, and manufacturer fields) to check whether or not this host is in a virtual machine.

ioreg -rd1 -c IOPlatformExpertDevice
Evidence
Upstream reference
Environment
Local host
Compatibility
Imported from LOOBins; availability and behaviour depend on macOS version, privacy permissions and installed components. Not lab tested here.
Native
Discovery, Collection

Use ioreg to check USB device vendor names

DiscoveryCollectionmacOS

Grep for "USB Vendor Name" values to view USB vendor names. On virtualized hardware these values may contain the hypervisor name such as "VirtualBox". This is an additional way to check for virtualization.

ioreg -rd1 -c IOUSBHostDevice
Evidence
Upstream reference
Environment
Local host
Compatibility
Imported from LOOBins; availability and behaviour depend on macOS version, privacy permissions and installed components. Not lab tested here.
Native
Discovery, Collection

Check all ioreg properties for hypervisor names.

DiscoveryCollectionmacOS

Grep for "virtual box", "oracle", and "vmware" from the output of the ioreg -l command. This is an additional way to check for virtualization.

ioreg -l
Evidence
Upstream reference
Environment
Local host
Compatibility
Imported from LOOBins; availability and behaviour depend on macOS version, privacy permissions and installed components. Not lab tested here.
Native
Discovery, Collection