Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Underflow when processing module.ko file generated from an Android kernel (goldfish) #51

Closed
Alexander1609 opened this issue Jul 28, 2023 · 1 comment

Comments

@Alexander1609
Copy link

Hey, im having trouble generating the ISF from an Android kernel:

  • Goldfish 3.18
  • Arch: x86_64
  • dwarf2json: linux-module-method branch

I've tried 2 different ways (linux_build_module & vol2/tools/linux folders) to retrieve the module.ko from this kernel. But when trying to generate the ISF using dwarf2json im always getting the following error:

dwarf2json linux --elf linux_build_module/module.ko 
Failed linux processing: error processing DWARF: decoding dwarf section str at offset 0x0: underflow

The Makefile im using to retrieve the module.ko looks as follows:

obj-m += module.o
KDIR := ~/goldfish/
CCPATH := ~/x86_64-linux-android-4.8/bin/

-include version.mk

all: dwarf 

dwarf: module.c
	$(MAKE) ARCH=x86_64 CROSS_COMPILE=$(CCPATH)/x86_64-linux-android- -C $(KDIR) CONFIG_DEBUG_INFO=y M="$(PWD)" modules

Am I doing something wrong here or is this a problem with dwarf2json?
Any help would be greatly appreciated!

@Alexander1609
Copy link
Author

I solved this error using the patch mentioned at #12 (comment).

Unfortunately the resulting ISF didnt work with Volatility 3 but in the end i managed to get it working with the following steps:

  1. Build the kernel with CONFIG_DEBUG_INFO=y
  2. Create the ISF on the goldfish/vmlinux
  3. Start the Android VD with the newly compiled kernel
  4. Dump the memory using LiME

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

No branches or pull requests

1 participant