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

creating a linker flag to not merge ANY sections. #79

Closed
CR3Swapper opened this issue Feb 2, 2024 · 0 comments
Closed

creating a linker flag to not merge ANY sections. #79

CR3Swapper opened this issue Feb 2, 2024 · 0 comments
Assignees
Labels

Comments

@CR3Swapper
Copy link
Contributor

Overview

instead of writing shellcode by hand i want to compile a single C file into a dll and then disassemble/lift this DLL into an already existing symbol table.

Obfuscation passes can then use the functions/data added from these tiny little dlls. Additionally I can apply llvm obfuscation to these functions.

The issue

The linker shoves like-permission symbols into the same section. This will cause bloat, for example the import directory, export directory, debug directory, etc etc all get shoved into rdata with my strings and other data! As you may know, determining the size of data in compiled binary is not really possible (besides for strings~~). Id like to seperate the PE information into individual sections so that i can include the entire rdata/data section + lifted functions into the symbol table of an already lifted binary.

rdata/data section before i add my changes to llvm-msvc

  • export data
  • import data
  • exception data..? (sometimes)
  • debug information
  • load config information
  • my codes rdata like strings and shit

rdata/data section after I add my changes to llvm-msvc

  • my codes rdata like strings and shit

Solution

add a simple little commandline flag to LLD. -dont-merge-sections.

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

No branches or pull requests

2 participants