Loader changed

This commit is contained in:
violet-devsec
2025-08-17 21:27:47 +01:00
parent 0948d602d8
commit 1d680db8a4
3 changed files with 12 additions and 9 deletions
+4 -4
View File
@@ -14,12 +14,12 @@ This is done step by step as,\
### Steps to try:
- [Compiling target.dll](#CompilingDll)
> g++ -shared -o target.dll target.cpp -Wl,--out-implib,libtdll.a
- [Create shellcode](#usage)
> python shellcode.py
- [Create shellcode](#CreateShellcode)
> python shellcode.py (This step will create shellcode.bin which is shellcode+target.dll)
- [Compiling loader.exe](#CompilingExe)
> g++ loader.c -o loader.exe
- [Running loader.exe](#CRunningExe)
> loader.exe
- [Running loader.exe](#RunningExe)
> loader.exe shellcode.bin
## Usage
+8 -5
View File
@@ -3,16 +3,19 @@
#include <stdio.h>
#include <string.h>
int main()
int main(int argc, char* argv[])
{
DWORD bytesRead;
const TCHAR* filePath;
const char* filePath;
BOOL fileReadSuccess, filePermChangeSuccess, processCreateSuccess;
//scanf("Enter the shellcode(shellcode+dll) binary file path: %d", filePath);
filePath = _T("shellcode.bin");
if(argc < 2)
{
printf("Shellcode file name is required. Usage: loader.exe <shellcode_file>\n");
return 0;
}
filePath = argv[1];
printf("Loader started!\n");
printf("Shellcode path: %s\n", filePath);
HANDLE hFile = CreateFile(filePath, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
DWORD fileSize = GetFileSize(hFile, NULL);
BIN
View File
Binary file not shown.