Skip to content

Instantly share code, notes, and snippets.

@hyuunnn
Created August 1, 2018 16:54
Show Gist options
  • Save hyuunnn/ff2ae70b563df5290cedaf5b0ba3879f to your computer and use it in GitHub Desktop.
Save hyuunnn/ff2ae70b563df5290cedaf5b0ba3879f to your computer and use it in GitHub Desktop.
RVA to RAW
RAW = 파일에서의 주소
RVA = 메모리에서의 주소
VirtualAddress = 메모리에서의 섹션 시작 위치 (idaapi Segments()로 가능) SegStart
PointerToRawData = 파일에서의 섹션 시작 위치 (offset = idaapi.get_fileregion_offset(ea))
0x1c094 = 0x41E494 - 0x41c000 + 0x19c00
RAW = RVA - VirtualAddress + PointerToRawData
VirtualAddress = RVA + ImageBase
RVA = VirtualAddress + PointerToRawData - RAW
-----> 그냥 idaapi.get_fileregion_ea(addr) 이거 쓰면 해결..
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment