X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=compile%2Fvmware-detect.c;fp=compile%2Fvmware-detect.c;h=7662a5a9983fb815891020551edf723ec93c164d;hb=61261381f0fd824c577b0eb5ebf924e47c2d1659;hp=fad9b962ba7612d4d2032c466cda490b157083ba;hpb=ebf978230527071b156967e6b3298555122c31fa;p=grml-scripts.git diff --git a/compile/vmware-detect.c b/compile/vmware-detect.c index fad9b96..7662a5a 100644 --- a/compile/vmware-detect.c +++ b/compile/vmware-detect.c @@ -2,6 +2,7 @@ #include "unistd.h" #include "stdio.h" #include "stdlib.h" +#include "signal.h" #define WRITE(x) write(1, x, strlen(x)) #define DWRITE(x) do{ \ @@ -12,6 +13,12 @@ #define FALSE 0 #define TRUE !FALSE +/* doc: + * vmware IO backdoor: http://chitchat.at.infoseek.co.jp/vmware/backdoor.html + * http://www.honeynet.org/papers/bots/botnet-code.html + * http://www.codegurus.be/codegurus/Programming/virtualpc&vmware_en.htm + */ + // from libowfat {{{ static inline char tohex(char c) { return c>=10?c-10+'a':c+'0'; @@ -33,7 +40,7 @@ unsigned int fmt_xlong(char *dest,unsigned long i) { void printIdtr(const unsigned char* idtr, unsigned size) { unsigned i; - for(i=0; i<=size; ++i) { + for(i=0; i