mirror of https://github.com/CISOfy/lynis.git
Added more extensions for virtual machine detection
This commit is contained in:
parent
fb53e586fe
commit
fb52ee9239
|
@ -550,12 +550,27 @@
|
|||
*) ReportException "IsVirtualMachine" "Unknown virtualization type received from systemctl" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
else
|
||||
|
||||
# Try common guest processes
|
||||
logtext "Test: trying to guess virtual machine type by running processes"
|
||||
IsRunning vmware-guestd
|
||||
if [ ${RUNNING} -eq 1 ]; then ISVIRTUALMACHINE=1; VMTYPE="vmware"; VMFULLTYPE="VMware product"; fi
|
||||
|
||||
# VMware
|
||||
IsRunning vmware-guestd
|
||||
if [ ${RUNNING} -eq 1 ]; then ISVIRTUALMACHINE=1; VMTYPE="vmware"; VMFULLTYPE="VMware product"; fi
|
||||
|
||||
# VirtualBox based on guest services
|
||||
IsRunning vboxguest-service
|
||||
if [ ${RUNNING} -eq 1 ]; then ISVIRTUALMACHINE=1; VMTYPE="virtualbox"; VMFULLTYPE="Oracle VM VirtualBox"; fi
|
||||
IsRunning VBoxClient
|
||||
if [ ${RUNNING} -eq 1 ]; then ISVIRTUALMACHINE=1; VMTYPE="virtualbox"; VMFULLTYPE="Oracle VM VirtualBox"; fi
|
||||
|
||||
# Amazon EC2 Instance
|
||||
if [ -f /etc/ec2_version -a ! -z /etc/ec2_version ]; then ISVIRTUALMACHINE=1; VMTYPE="amazon-ec2"; VMFULLTYPE="Amazon AWS EC2 Instance"; fi
|
||||
fi
|
||||
|
||||
# Check final status
|
||||
if [ ${ISVIRTUALMACHINE} -eq 1 ]; then
|
||||
logtext "Result: found virtual machine (type: ${VMTYPE}, ${VMFULLTYPE})"
|
||||
report "vm=1"
|
||||
|
@ -566,7 +581,6 @@
|
|||
fi
|
||||
}
|
||||
|
||||
|
||||
# Function IsWorldExecutable
|
||||
IsWorldExecutable()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue