280 likes | 393 Views
In-Band Detection of Virtual Machines. Estefan Ortiz & Cory Hayes Computer Science and Engineering Graduate Operating Systems December 16, 2011. Introduction.
E N D
In-Band Detection of Virtual Machines Estefan Ortiz & Cory Hayes Computer Science and Engineering Graduate Operating Systems December 16, 2011
Introduction • Malicious programs (malware) need to know if they are in a virtual environment so they can modify their behavior and avoid detection • Related work • Red Pill Tests: Examine byte-level behavior of instructions for physical and emulated CPUs. If any disagreements in output, create one or more “red pills” that can avoid detection • SubVirt: Virtual machine-based rootkit installed underneath host OS that runs OS as a guest to remain nearly undetectable
Our Approach • Similar to Red Pill and SubVirt, but client-server based • Idea: Instead of monitoring system call discrepancies, analyze network data sent to/from physical and virtual machines • Goal: Determine if there are sufficient differences in network traffic to detect if aclient/server is being run on a virtual machine
Goal Byte 0 Byte k1 Difference Found Byte k2 Byte n Client <-> Native TCP/IP Packet Client <-> Virtual Machine TCP/IP Packet
Actual Setup Host Server (Apache) Port Switch Client Functions as the “MITM” Port Network output saved for analysis Wireshark
Experiment Setup • Using Wireshark, capture and compare the raw info of TCP/IP packets sent back and forth between a client and a physical/virtual server running Apache • Bits 1-160: IP • Remainder: TCP • Virtual machine OS matches the OS of the host (Ubuntu-Ubuntu, Vista-Vista) • Use a small set of Matlab commands to send regular and malformed packets • Dynex 5-port 10/100/1000 Gigabit Ethernet Switch
Sample Captured Wireshark Output 8th Packet sent between Client & VM running Apache VM Host Client 8th Packet sent between Client & Host running Apache
Metrics Bit Difference Comparison: Fractional Hamming distance between two packets
Metrics (cont.) Round trip time: Time from SYN request sent by client to received ACK from server
Metrics (cont.)* Pairwise Packet Length Comparison: Number of concurrent packet pairs that differ in length
Experiment #1 • Client: Windows Vista (4GB RAM, 2.6GHz) • Server: Ubuntu 11.04 32-bit w/ Apache Web Server 2.2 • Server: Host OS Ubuntu: VirtualBoxw/ Ubuntu running Apache • On isolated switch network (no other traffic)
Example: Packet #9 These bits correspond to the header length & flags in the TCP header
Experiment #2 • Client: Mac (4GB RAM, 2.4GHz, MacOSX 10.6.8) • Server: Windows Vista 32-bit w/ Apache Web Server 2.2 • Server: Host OS Windows Vista: VirtualBoxw/ Windows Vista running Apache • On isolated switch network (no other traffic)
Example: Packet #4 Destination Address in IP header Flags in TCP header
Experiment #3 • Client:Windows Vista (4GB RAM, 2.6GHz) • Server: Ubuntu 11.04 32-bit w/ Apache Web Server 2.2 • Server: Host OS Ubuntu: VirtualBoxw/ Ubuntu running Apache • Both client and server on CVRL subnet (at ~3:00 am)
Example: Packet #3 Destination Address in IP header
Experiment #4 Client Host Server (Apache) F I R E W A L L Port Internet Port Sprint Mobile Hotspot ND/CVRL subnet
Experiment #4 • Client: Windows Vista (4GB RAM, 2.6GHz) • Server: Ubuntu 11.04 32-bit w/ Apache Web Server 2.2 • Server: Host OS Ubuntu: VirtualBoxw/ Ubuntu running Apache • Could not monitor packet information; only ping tests • Varied number of bytes sent using ping • Performed 100 per fixed byte amount • Calculated avg. & std. dev • Executed at ~3:30 am
Conclusion • Examined packet information from a high level (packet-length) down to specific bit difference comparisons • Packet length provided no insight • Timing tests didn’t provide conclusive evidence of a connection to a virtual machine • Fractional hamming dist. provided first level of insight • Further analysis of differences at the bit level provided clues where to look for VM traces
Future Direction • Experiments 1-3 were conducted under somewhat “ideal” scenarios • More realistic approach would be packet analysis on multi-hop connections with knowledge of which sections of the TCP/IP packets to monitor