Jump to content

3 posts in this topic

Recommended Posts

Posted

Code:
 

 

// Check if the Module and Interceptor objects are available
if (typeof Module === "undefined") {
    console.log("[Error] Frida could not be properly loaded. 'Module' is not defined.");
} else {
    console.log("[Info] 'Module' is available.");
}

if (typeof Interceptor === "undefined") {
    console.log("[Error] Frida could not be properly loaded. 'Interceptor' is not defined.");
} else {
    console.log("[Info] 'Interceptor' is available.");
}

// Function to hide Frida and H5GG
function hideFridaAndH5GG() {
    try {
        // Check if frida-gadget.dylib is loaded in memory
        var fridaModule = Module.findBaseAddress('frida-gadget.dylib');
        if (fridaModule) {
            console.log("Frida-Gadget found, trying to hide...");
            var base = fridaModule.add(0);
            Memory.writeByte(base, 0x00); // Patch the Frida module
            console.log("Frida-Gadget hidden!");
        }

        // Check if H5GG.dylib is loaded in memory
        var h5ggModule = Module.findBaseAddress('H5GG.dylib');
        if (h5ggModule) {
            console.log("H5GG found, trying to hide...");
            var base = h5ggModule.add(0);
            Memory.writeByte(base, 0x00); // Patch the H5GG module
            console.log("H5GG hidden!");
        }
    } catch (error) {
        console.log("[Error] Error hiding Frida or H5GG: " + error);
    }
}

// Function to enumerate and list loaded modules
function enumerateLoadedModules() {
    console.log("[Debug] Listing loaded modules...");
    Module.enumerateModules({
        onMatch: function(module) {
            console.log("Found module: " + module.name);
        },
        onComplete: function() {
            console.log("[Debug] All modules listed.");
        }
    });
}

// Function to hide sysctl calls (used for system requests)
function hideSysctlCalls() {
    try {
        var sysctl = Module.findExportByName("libsystem_kernel.dylib", "sysctl");
        if (sysctl) {
            Interceptor.attach(sysctl, {
                onEnter: function(args) {
                    console.log("[Info] Hiding sysctl calls...");
                    args[0] = ptr(0);  // Manipulate sysctl calls
                }
            });
        }
    } catch (error) {
        console.log("[Error] Error hiding sysctl calls: " + error);
    }
}

// Start module check and patching functions
setTimeout(function() {
    enumerateLoadedModules();
    hideFridaAndH5GG(); // Hide Frida and H5GG
    hideSysctlCalls(); // Hide sysctl calls
}, 3000); // Delay 3 seconds after game start

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines