1,088 questions
6 votes
0 answers
280 views
Local static variables are not initialized if app is loaded as dll
We have sandbox.exe, app.exe and app.dll. If users want to run the not sandboxed application, they run app.exe. If users want to run the application in the sandbox, they run sandbox.exe that loads app....
2 votes
0 answers
75 views
Control-flow obfuscation without increasing code size? [closed]
I'm developing a PE executable packer and want to implement some form of lightweight, simple control-flow obfuscation that doesn't add any extra bytes to the original exe's .text section (i.e. no ...
0 votes
1 answer
63 views
How can I pad the bytes in a section defined by a pragma directive?
So I have these two macros #define ESTART \ _Pragma("optimize(\"\", off)") \ _Pragma("section(\".secure\", execute, read, write)") \ _Pragma("...
0 votes
2 answers
106 views
winapi WriteFileA crashes the program in assembly (nasm)
(I'm on Windows 11) CreateFileA is crashing, but I have no clue why. I know that CreateFileA is crashing because the program doesn't loop at "wat: jmp wat"; instead it stops immediately. I ...
0 votes
0 answers
30 views
nasm, windows PE WriteFile in kernel.dll causes program to stop [duplicate]
When I run this program in cmd, it instantly ends without printing anything and doesn't even reach the loop "wat2: jmp wat2" right after WriteFile. if I place the wat2 loop before WriteFile, ...
4 votes
1 answer
93 views
NASM assembly PE format handwritten imports doesn't import anything
This PE format .EXE program should print "owwwmagawd" in cmd when run, but instead the program hangs without printing anything. I figured there could be a problem with Windows not filling ...
2 votes
2 answers
169 views
Replace-Files Powershell
I'm having some struggles with my PowerShell script. I am trying to make an Automated Script that will Perform the Utilman.exe Hack. The script has menus and options: Load, Unload, List Disk and ...
0 votes
0 answers
136 views
GetProcAddress always returning 0x00000000 after changing the DllBase in the PEB
I'm trying to understand why I'm getting nothing from GetProcAddress(). I have been learning to build my own protected executable. I load a copy of ntdll.dll and map it into memory and then read the ...
2 votes
1 answer
334 views
x64 Reflective DLL Injector (translate C++ to Delphi)
I need an x64 Reflective DLL Injector written in Delphi. I found a C version that works fine (compiled with DevC++ with 64bit app support). I made a Delphi version that compiles fine and without any ...
0 votes
1 answer
81 views
How to find .text section in PE file without PE headers
This is my code to get text section section get_text_section(std::uintptr_t module) { section text_section = {}; PIMAGE_DOS_HEADER dosheader = reinterpret_cast<...
1 vote
0 answers
32 views
Why don't I get the correct function RVA from the PE export table in my loader code?
I'm writing a minimal PE loader that parses the export table to locate functions by name, in my hypervisor. However, when I try to retrieve the RVA of a function, the value seems incorrect. Here's the ...
0 votes
2 answers
124 views
How can I inject user-specific data (like a public key) into a pre-built Go binary without needing Go installed?
I am working on a Go application that encrypts sensitive files using a public key. The goal of my project is to create a customizable encryption tool that allows users to generate an executable ...
3 votes
1 answer
85 views
Read variable value from PE file
I got following C code compiled with GCC on Windows #include <stdio.h> #include <conio.h> int main() { int a = 68639977; printf("int: %d", a); getch(); a++; ...
1 vote
1 answer
142 views
What is `PhysicalAddress` used for in `IMAGE_SECTION_HEADER`?
PhysicalAddress is a member of the Misc union, defined as follows: typedef struct _IMAGE_SECTION_HEADER { BYTE Name[IMAGE_SIZEOF_SHORT_NAME]; union { DWORD PhysicalAddress; ...
1 vote
0 answers
142 views
Why the type of `e_lfanew` field in struct IMAGE_DOS_HEADER(winnt.h) is LONG?
struct IMAGE_DOS_HEADER from Win11 SDK: typedef struct _IMAGE_DOS_HEADER { // DOS .EXE header WORD e_magic; // Magic number WORD e_cblp; // ...