Advertisement
Guest User

Reversing PE on Windows 7 Issue

a guest
Nov 6th, 2015
686
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. The binary is a Flareon 2015 challenge (#4), was compiled with "/GS" and packed with UPX. The unpacked binary executes fine on windows XP but not on Windows 7. The challenge is quite easy to solve but I'm very curious to understanding why the hell this guy is not executing on Windows 7.
  2.  
  3. The problem is happening when the function "__init_security_cookie" is called. This function is trying to access the security_cookie somewhere inside the data segment and my guess is that the DS doesn't hold the correct value for the base address of the data segment. When I disassemble the binary it shows a direct reference for the address of __security_cookie, like:
  4.  
  5. <blah> mov eax, __security_cookie (0x407018)
  6.  
  7. But when I execute the binary the code changes for:
  8.  
  9. <blah> mov eax, ds:407018h
  10.  
  11. and the following exception is raised:
  12.  
  13. "the instruction <blah> references a memory at 0x407018. The memory could not be read -> 00407018"
  14.  
  15. The weird thing is that this problem does not happen when I execute the packed binary (on Windows 7 and XP) and when I execute the same binary on Windows XP. My guess is that the PE loader for Windows 7 is modifying something at run time.
  16.  
  17. Any tip? or suggestions how to understanding this issue?
  18.  
  19. Thanks,
  20. Marcos Alvares
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement