Skip to content

Conversation

@akopetsch
Copy link

Extended the kallsyms parser to support x86/i386 Android kernels in addition to existing ARM and ARM64 support.

Changes:

  • Architecture detection: Added fuzzy_x86() heuristic and pattern matching for x86 kernel identification (searches for i386/i486/i586/i686/x86 strings)
  • Address handling: Added x86-specific base address (0xC0000000) for kernel space validation and symbol table parsing
  • Miasm emulation: Added x86_32 CPU support with proper register handling (EAX, EBX, ECX, EDX, ESI, EDI, ESP) and x86 calling convention (return address on stack)
  • Syscall table detection: Added x86 syscall pattern (sys_restart_syscall, sys_exit, sys_fork, sys_read)
  • Tool integration:
    • IDA Pro: Set processor type to "metapc" for x86 kernels
    • Radare2: Set architecture to "x86" instead of "arm"
    • Updated plugin description to indicate ARM/x86 support
  • Symbol filtering: Added x86-specific address range checks (< 0xF0000000)
  • Vermagic detection: Added x86 vermagic pattern matching

Tested successfully with Intel Atom Android kernel (me302c_vmlinux):

  • Correctly identified as x86 architecture
  • Extracted 78,515 kernel symbols
  • Located sys_call_table and other critical symbols
  • Proper address ranges (0xC1200000-0xC2448000)

This enables kallsyms extraction and reverse engineering of x86-based Android kernels commonly found on Intel Atom tablets and devices.

Note: The me302c_vmlinux (from my ASUS FHD 10 ME302C) is not part of the commit because I am legally unsure about that because of copyright etc. It was taken from WW_ME302C-V5.0.21-0-ota-user (found on ASUS support website) > boot.img > bzImage. I am working on an RE toolset for that device (unpublished so far), but you should be able to unpack with osm0sis/mboot

Extended the kallsyms parser to support x86/i386 Android kernels in addition
to existing ARM and ARM64 support.

Changes:
- Architecture detection: Added fuzzy_x86() heuristic and pattern matching for
  x86 kernel identification (searches for i386/i486/i586/i686/x86 strings)
- Address handling: Added x86-specific base address (0xC0000000) for kernel
  space validation and symbol table parsing
- Miasm emulation: Added x86_32 CPU support with proper register handling
  (EAX, EBX, ECX, EDX, ESI, EDI, ESP) and x86 calling convention (return
  address on stack)
- Syscall table detection: Added x86 syscall pattern (sys_restart_syscall,
  sys_exit, sys_fork, sys_read)
- Tool integration:
  * IDA Pro: Set processor type to "metapc" for x86 kernels
  * Radare2: Set architecture to "x86" instead of "arm"
  * Updated plugin description to indicate ARM/x86 support
- Symbol filtering: Added x86-specific address range checks (< 0xF0000000)
- Vermagic detection: Added x86 vermagic pattern matching

Tested successfully with Intel Atom Android kernel (me302c_vmlinux):
- Correctly identified as x86 architecture
- Extracted 78,515 kernel symbols
- Located sys_call_table and other critical symbols
- Proper address ranges (0xC1200000-0xC2448000)

This enables kallsyms extraction and reverse engineering of x86-based Android
kernels commonly found on Intel Atom tablets and devices.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant