IDA script for parsing kallsyms.
git clone https://github.com/mephi42/ida-kallsyms.git- Open the kernel in IDA, let the autoanalysis finish.
- From
File→Script file...(Alt+F7 / Alt+F9) runida-kallsyms/ida-kallsyms.pyscript.
git clone https://github.com/mephi42/ida-kallsyms.git- Open the kernel in Ghidra, let the autoanalysis finish.
- Go to
Window→Script manager. - Once: press
Script Directoriesbutton and addida-kallsyms. - In
Filteredit box, typekallsyms. - Double-click
ghidra-kallsyms.pyand wait.
git clone https://github.com/mephi42/ida-kallsyms.gitida-kallsyms/find-kallsyms vmlinux >vmlinux.kallsyms- The resulting
vmlinux.kallsymsfile can be imported into IDA usingida-kallsyms-import.pyscript.
Script for obtaining function signatures and struct layouts. Works by building a Linux Kernel that is similar to the one being analyzed and extracting debug information from it.
-
Load kallsyms into IDA as described above.
-
ida-kallsyms/build-vmlinux --like vmlinuxThis will run for a while and generate
vmlinux.like.jsonfile.Check out
ida-kallsyms/build-vmlinux --helpin case you already havebinutils-gdb/gcc/linuxlocal git repos or a.configthat matchesvmlinux. -
Import
vmlinux.like.jsoninto IDA usingida-kallsyms/ida-like-import.pyscript. -
If there are import errors, check
vmlinux.like.json.logfile.