Use virt-what to Get VPS Virtualization Technology - NETSEC

Latest

Learning, Sharing, Creating

Cybersecurity Memo

Thursday, April 16, 2020

Use virt-what to Get VPS Virtualization Technology

VPS has a variety of virtualization technologies. Common VPS virtualization architectures are VMWare, Hyper-v, OpenVZ, Xen, and KVM. We can use the "virt-what" tool to judge and refer to our own VPS virtualization architecture. Now Lets take a look those popular main Cloud Vendor's Virtualization technology. virt-what is a shell script which can be used to detect if the program is running in a virtual machine. Virt-what supports a very large number of different hypervisor types, including common open source hypervisors (KVM, Xen, QEMU, VirtualBox), mainframe systems like IBM Systemz, LPAR, z/VM, hardware partitioning schemes like Hitachi Virtage, proprietary hypervisors like VMWare, Microsoft Hyper-V and much more.

It supports following virtualization platforms:
VMware、Hyper-V、VirtualPC、VirtualBox、OpenVZ / Virtuozzo、Linux-VServer、UML、IBM PowerVM Lx86 Linux/x86 emulator、Hitachi Virtualization Manager (HVM) Virtage logical 、partitioning、IBM SystemZ、Parallels、Xen、QEMU/KVM


Here are some running examples:
The program prints out a list of facts about the virtual machine, derived from heuristics. One fact is printed per line.
# virt-what
xen
xen-domU
# virt-what
kvm
# virt-what
(nothing printed ⇒ baremetal)

Method 1: Compile it from code



1. Download tool
wget https://people.redhat.com/~rjones/virt-what/files/virt-what-1.20.tar.gz
2. Installation
tar zxf virt-what-1.20.tar.gz   #untar the download file
cd virt-what-1.11               #enter the directory
./configure                     #configure it using default settings
make && make install            #compile and get executable file
3. View
virt-what

Method 2: Download it and Run

Mostly, it has been installed in to your VPS. If not, you can use 'yum install virt-what -y' or 'apt-get install virt-what' to get it installed.


1. https://labs.play-with-docker.com/

$ apk add virt-what
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.10/community/x86_64/APKINDEX.tar.gz
(1/1) Installing virt-what (1.19-r1)
Executing busybox-1.30.1-r2.trigger
OK: 303 MiB in 109 packages
[node1] (local) [email protected] ~/virt-what-1.11
$ virt-what
hyperv
[node1] (local) [email protected] ~/virt-what-1.11
$

2. Google Cloud
# virt-what
kvm

3. AWS
Xen-HVM

4. Azure
#virt-what
hyperv



5. Oracle
# virt-what
kvm








Method 3: Directly Install it

yum -y install virt-what
sudo apt install virt-what
Run:
virt-what
Check the Azure output
netsec@Ubuntu18-EU-Small:~$ sudo apt install virt-what
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  virt-what
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 14.7 kB of archives.
After this operation, 39.9 kB of additional disk space will be used.
Get:1 http://azure.archive.ubuntu.com/ubuntu bionic/universe amd64 virt-what amd64 1.18-2 [14.7 kB]
Fetched 14.7 kB in 0s (213 kB/s)
Selecting previously unselected package virt-what.
(Reading database ... 88964 files and directories currently installed.)
Preparing to unpack .../virt-what_1.18-2_amd64.deb ...
Unpacking virt-what (1.18-2) ...
Setting up virt-what (1.18-2) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
netsec@Ubuntu18-EU-Small:~$ virt-what
virt-what: this script must be run as root
netsec@Ubuntu18-EU-Small:~$ sudo virt-what
hyperv
netsec@Ubuntu18-EU-Small:~$







No comments:

Post a Comment