Jump to content

Unity framework support vmadder_slide


Red16

5 posts in this topic

Recommended Posts

Posted

below is the code im working with im trying to get unity framework support but it crashes at launch. Any body has suggestions?
 

uint64_t getRealOffset(uint64_t offset){
    for (int i = 0; i < _dyld_image_count(); i++){
        const char *image_name = _dyld_get_image_name(i);
        if(strcmp(image_name,"UnityFramework") == 0){
            return _dyld_get_image_vmaddr_slide(i) + offset;
        }
    }
    return _dyld_get_image_vmaddr_slide(0) + offset;
}

Posted

Try this. If you trying to do a function pointer and it crash, create a function pointer inside a function then call it

uint64_t aslr_for_framework(const char* framework)
{
  int image_count = _dyld_image_count();
	  for (int i = 0; i < image_count; i++)
  {
    if (strstr(_dyld_get_image_name(i), framework))
    {
      return _dyld_get_image_vmaddr_slide(i);
      }
    }
    return 0; // could not find image
}
	uint64_t getRealOffset(uint64_t offset)
{
    uint64_t aslr = aslr_for_framework("UnityFramework"); //frameworks binary name
	    NSLog(@"ASLR %#llx", aslr);
    return aslr+offset;
}
	uint64_t getRealOffset(uint64_t offset);
Posted

ayo thanks brother this is working looks like i didn’t return 0 but instead returned regular vmadder slide that fixed the issue:)

Posted
On 12/1/2020 at 7:01 AM, Laxus said:

Try this. If you trying to do a function pointer and it crash, create a function pointer inside a function then call it


uint64_t aslr_for_framework(const char* framework)
{
  int image_count = _dyld_image_count();
	  for (int i = 0; i < image_count; i++)
  {
    if (strstr(_dyld_get_image_name(i), framework))
    {
      return _dyld_get_image_vmaddr_slide(i);
      }
    }
    return 0; // could not find image
}
	uint64_t getRealOffset(uint64_t offset)
{
    uint64_t aslr = aslr_for_framework("UnityFramework"); //frameworks binary name
	    NSLog(@"ASLR %#llx", aslr);
    return aslr+offset;
}
	uint64_t getRealOffset(uint64_t offset);

nothing happened when I used this code any help plz :(

@Red16

@Laxus

Archived

This topic is now archived and is closed to further replies.

×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines