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

[Feat] - Add functions encryption #14

Open
jenaye opened this issue Jul 25, 2023 · 1 comment
Open

[Feat] - Add functions encryption #14

jenaye opened this issue Jul 25, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@jenaye
Copy link
Member

jenaye commented Jul 25, 2023

As you can see below, some functions appear in plain text inside the binary :

image

to hide this, here's a technique (example in cpp ):

// sVirtualAllocEx  = xor of string "VirtualAlloc" with key (outside of the packer)
unsigned char sVirtualAllocEx[] = { 0x3b, 0x10, 0x1, 0x11, 0x16, 0xa, 0x6, 0x28, 0x1};

// xor second time to obtain the plain text string 
XOR((char *) sVirtualAllocEx, sizeof(sVirtualAllocEx), key, sizeof(key));

// call the fonction
pVirtualAllocEx = GetProcAddress(GetModuleHandle("kernel32.dll"), sVirtualAllocEx);

in the end, we add an abstraction layer, so that if we run the "strings" command again, we won't see our function appear.

@jenaye jenaye added the enhancement New feature or request label Jul 25, 2023
@jenaye
Copy link
Member Author

jenaye commented Jul 25, 2023

An option should be added to allow the user to choose whether or not to encrypt functions, as this behavior can sometimes be reported as suspicious.

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

No branches or pull requests

1 participant