About a ELF packing issue

Issues related to VMProtect
Post Reply
ImFl0wow
Posts: 3
Joined: Thu Sep 21, 2023 11:39 am

About a ELF packing issue

Post by ImFl0wow »

I am coding a jni dynamic library
It uses a array to save method information to register native method on jvm

JNINativeMethod table[] = {
{"method_name", "method_dec", (void *) &method_ptr}
};

After compiled, it will become "memcopy" like

memcopy (dest,tables_offset,sizeof (dest))

But the offset is in .rcdata
As I packing it, it will be deleted by vmprotect
Admin
Site Admin
Posts: 2586
Joined: Mon Aug 21, 2006 8:19 pm
Location: Russia, E-burg
Contact:

Re: About a ELF packing issue

Post by Admin »

I don't understand where you use memcopy and what is ".rcdata". Do you have a simple example (EXE+original DLL+VMP files) that shows your problem?
ImFl0wow
Posts: 3
Joined: Thu Sep 21, 2023 11:39 am

Re: About a ELF packing issue

Post by ImFl0wow »

Admin wrote: Sat Sep 23, 2023 6:42 am I don't understand where you use memcopy and what is ".rcdata". Do you have a simple example (EXE+original DLL+VMP files) that shows your problem?
It's a Java application using java8
Install java8 in linux_x86_64

Just use "java -jar obftest.jar" to run the application

If disappear unsatisfied link excepetion,try use "sudo ln -s /usr/lib/libc.so.6 /usr/lib64/libc.so"

The vmprotect project file didn't turn on any protection options, but it runs well before packing.

After packing the x64-linux.so file(didn't turn on any protection options just pack), the output file will occurre a jvm error(SIGSEGV 0xb)

By the way, if you want to test the packed file, just rename x64-linux.vmp.so to x64-linux.so and put the renamed file into the jar file (in the package fl0wowP4rty/%randomname/x64-linux.so)
Attachments
output.zip
(45.32 KiB) Downloaded 208 times
ImFl0wow
Posts: 3
Joined: Thu Sep 21, 2023 11:39 am

Re: About a ELF packing issue

Post by ImFl0wow »

Admin wrote: Sat Sep 23, 2023 6:42 am I don't understand where you use memcopy and what is ".rcdata". Do you have a simple example (EXE+original DLL+VMP files) that shows your problem?
I tried it using the official vmprotect latest demo version
Admin
Site Admin
Posts: 2586
Joined: Mon Aug 21, 2006 8:19 pm
Location: Russia, E-burg
Contact:

Re: About a ELF packing issue

Post by Admin »

If disappear unsatisfied link excepetion,try use "sudo ln -s /usr/lib/libc.so.6 /usr/lib64/libc.so"
Only the following symbol link works for my Ubuntu 20.04:
"sudo ln -s /usr/lib/x86-64-linux-gnu/libc.so.6 /usr/lib/libc.so"
Admin
Site Admin
Posts: 2586
Joined: Mon Aug 21, 2006 8:19 pm
Location: Russia, E-burg
Contact:

Re: About a ELF packing issue

Post by Admin »

Fixed in the 1832 build.
Post Reply