mirror of
https://github.com/a0rtega/pafish
synced 2024-11-22 14:21:19 +03:00
scanning for VirtualBox tools
This commit is contained in:
parent
75299a4fc9
commit
9477202717
@ -1,5 +1,5 @@
|
|||||||
CC = i686-pc-mingw32-gcc
|
CC = i686-w64-mingw32-gcc
|
||||||
WINDRES = i686-pc-mingw32-windres
|
WINDRES = i686-w64-mingw32-windres
|
||||||
OBJDIR = Objects/MingW
|
OBJDIR = Objects/MingW
|
||||||
SRC = $(wildcard *.c)
|
SRC = $(wildcard *.c)
|
||||||
OBJ = $(SRC:%.c=$(OBJDIR)/%.o) $(OBJDIR)/pafish_private.res
|
OBJ = $(SRC:%.c=$(OBJDIR)/%.o) $(OBJDIR)/pafish_private.res
|
||||||
@ -18,7 +18,7 @@ else
|
|||||||
RM = rm -f
|
RM = rm -f
|
||||||
FixPath = $1
|
FixPath = $1
|
||||||
endif
|
endif
|
||||||
LINK = i686-pc-mingw32-g++
|
LINK = i686-w64-mingw32-g++
|
||||||
|
|
||||||
.PHONY: all all-before all-after clean clean-custom
|
.PHONY: all all-before all-after clean clean-custom
|
||||||
all: all-before $(BIN) all-after
|
all: all-before $(BIN) all-after
|
||||||
|
@ -290,6 +290,13 @@ int main(int argc, char *argv[])
|
|||||||
print_not_traced();
|
print_not_traced();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
printf("[*] Looking for guest tools ");
|
||||||
|
if (vbox_guest_tools() == 0) {
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
print_not_traced();
|
||||||
|
}
|
||||||
|
|
||||||
/* VMware detection tricks */
|
/* VMware detection tricks */
|
||||||
printf("\n[-] VMware detection\n");
|
printf("\n[-] VMware detection\n");
|
||||||
printf("[*] Scsi port->bus->target id->logical unit id-> 0 identifier ... ");
|
printf("[*] Scsi port->bus->target id->logical unit id-> 0 identifier ... ");
|
||||||
|
@ -555,3 +555,42 @@ int vbox_processes() {
|
|||||||
}
|
}
|
||||||
return res;
|
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;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -36,4 +36,6 @@ int vbox_network_share();
|
|||||||
|
|
||||||
int vbox_processes();
|
int vbox_processes();
|
||||||
|
|
||||||
|
int vbox_guest_tools();
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user