scanning for VirtualBox tools

This commit is contained in:
Thorsten Sick 2014-04-03 15:07:12 +02:00
parent 75299a4fc9
commit 9477202717
4 changed files with 52 additions and 4 deletions

View File

@ -1,5 +1,5 @@
CC = i686-pc-mingw32-gcc
WINDRES = i686-pc-mingw32-windres
CC = i686-w64-mingw32-gcc
WINDRES = i686-w64-mingw32-windres
OBJDIR = Objects/MingW
SRC = $(wildcard *.c)
OBJ = $(SRC:%.c=$(OBJDIR)/%.o) $(OBJDIR)/pafish_private.res
@ -18,7 +18,7 @@ else
RM = rm -f
FixPath = $1
endif
LINK = i686-pc-mingw32-g++
LINK = i686-w64-mingw32-g++
.PHONY: all all-before all-after clean clean-custom
all: all-before $(BIN) all-after

View File

@ -290,6 +290,13 @@ int main(int argc, char *argv[])
print_not_traced();
}
printf("[*] Looking for guest tools ");
if (vbox_guest_tools() == 0) {
}
else {
print_not_traced();
}
/* VMware detection tricks */
printf("\n[-] VMware detection\n");
printf("[*] Scsi port->bus->target id->logical unit id-> 0 identifier ... ");

View File

@ -555,3 +555,42 @@ int vbox_processes() {
}
return res;
}
/**
* Checking for the VBoxControl and other vbox tools
**/
int vbox_guest_tools() {
int res=1;
HANDLE h;
h = CreateFile("c:\\windows\\system32\\VBoxControl.exe", GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
if (h != INVALID_HANDLE_VALUE){
write_log("VirtualBox VBoxControl.exe detected");
print_traced();
write_trace("hi_virtualbox");
res = 0;
CloseHandle(h);
}
h = CreateFile("c:\\program files\\oracle\\virtualbox guest additions\\VBoxDrvInst.exe", GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
if (h != INVALID_HANDLE_VALUE){
write_log("VirtualBox VBoxDrvInst.exe detected");
print_traced();
write_trace("hi_virtualbox");
res = 0;
CloseHandle(h);
}
h = CreateFile("c:\\program files\\oracle\\virtualbox guest additions\\VBoxWHQLFake.exe", GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
if (h != INVALID_HANDLE_VALUE){
write_log("VirtualBox VBoxWHQLFake.exe detected");
print_traced();
write_trace("hi_virtualbox");
res = 0;
CloseHandle(h);
}
return res;
}

View File

@ -36,4 +36,6 @@ int vbox_network_share();
int vbox_processes();
int vbox_guest_tools();
#endif