Advertisement
Guest User

Untitled

a guest
Sep 16th, 2013
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.04 KB | None | 0 0
  1. Line of code that causes breakage:
  2. https://github.com/rapid7/meterpreter/blob/master/source/extensions/stdapi/server/net/config/interface.c#L215
  3.  
  4. prefixes[prefixes_cnt] = htonl(pPrefix->PrefixLength);
  5.  
  6. Dereferencing pPrefix causes the problem. Here's the memory properties at the time of call for 3 diff scenarios:
  7.  
  8.  
  9. ms08-067 (Broken):
  10. [940] [INTERFACE] pPrefix: 0x0069006D
  11. [940] [INTERFACE][pPrefix] BaseAddress: 00690000
  12. [940] [INTERFACE][pPrefix] AllocationBase: 00680000
  13. [940] [INTERFACE][pPrefix] AllocationProtect: 4
  14. [940] [INTERFACE] Protection Flag: PAGE_READWRITE
  15. [940] [INTERFACE][pPrefix] RegionSize: 176128
  16. [940] [INTERFACE][pPrefix] State: 8192
  17. [940] [INTERFACE][pPrefix] State Flag: MEM_RESERVE
  18. [940] [INTERFACE][pPrefix] Protect: 0
  19. [940] [INTERFACE][pPrefix] Type: 131072
  20. [940] [INTERFACE][pPrefix] Type Flag: MEM_PRIVATE
  21.  
  22.  
  23. msfpayload generated exe (works fine):
  24. [888] [INTERFACE] pPrefix: 0x0069006D
  25. [888] [INTERFACE][pPrefix] BaseAddress: 00690000
  26. [888] [INTERFACE][pPrefix] AllocationBase: 00680000
  27. [888] [INTERFACE][pPrefix] AllocationProtect: 2
  28. [888] [INTERFACE] Protection Flag: PAGE_READONLY
  29. [888] [INTERFACE][pPrefix] RegionSize: 995328
  30. [888] [INTERFACE][pPrefix] State: 4096
  31. [888] [INTERFACE][pPrefix] State Flag: MEM_COMMIT
  32. [888] [INTERFACE][pPrefix] Protect: 2
  33. [888] [INTERFACE] Protection Flag: PAGE_READONLY
  34. [888] [INTERFACE][pPrefix] Type: 262144
  35. [888] [INTERFACE][pPrefix] Type Flag: MEM_MAPPED
  36.  
  37. ms03-026 (works fine):
  38. [840] [INTERFACE] pPrefix: 0x0069006D
  39. [840] [INTERFACE][pPrefix] BaseAddress: 00690000
  40. [840] [INTERFACE][pPrefix] AllocationBase: 00690000
  41. [840] [INTERFACE][pPrefix] AllocationProtect: 4
  42. [840] [INTERFACE] Protection Flag: PAGE_READWRITE
  43. [840] [INTERFACE][pPrefix] RegionSize: 4096
  44. [840] [INTERFACE][pPrefix] State: 4096
  45. [840] [INTERFACE][pPrefix] State Flag: MEM_COMMIT
  46. [840] [INTERFACE][pPrefix] Protect: 4
  47. [840] [INTERFACE] Protection Flag: PAGE_READWRITE
  48. [840] [INTERFACE][pPrefix] Type: 262144
  49. [840] [INTERFACE][pPrefix] Type Flag: MEM_MAPPED
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement