[+] Kernel Binary and Configuration Identifier

This module tries to identify the Linux kernel binary and extracts the kernel with the vmlinux-to-elf project
Additionally, it tries to extract the kernel configuration.
Based on this extraction it is possible to further analyze the kernel configuration and the kernel


[+] Possible Linux Kernel found: /logs/firmware/unblob_extracted/firmware_extract/DIR-600_fw_revb5_214b01_ALL_de_20130122/dir600b_v2.14_d1mg.bin_extract/108-1146762.lzma_extract/lzma.uncompressed / Linux version 2.6.33.2 


[*] Testing possible Linux kernel file /logs/firmware/unblob_extracted/firmware_extract/DIR-600_fw_revb5_214b01_ALL_de_20130122/dir600b_v2.14_d1mg.bin_extract/108-1146762.lzma_extract/lzma.uncompressed with vmlinux-to-elf:

[+] Version string: Linux version 2.6.33.2 (eric@localhost.localdomain) (gcc version 4.3.3 (GCC) ) #1 Wed Oct 10 10:09:43 CST 2012
[+]   Other related strings containing the version number: [b'Linux version 2.6.33.2 (eric@localhost.localdomain) (gcc version 4.3.3 (GCC) ) #1 Wed Oct 10 10:09:43 CST 2012', b'2.6.33.2 mod_unload MIPS32_R2 32BIT ', b'2.6.33.2']
[+]   Architecture string: mod_unload MIPS32_R2 32BIT 
[+] Guessed architecture: mipsle successfully in 0.98 seconds
[+] Kernel found in database
[+]   Read kernel source: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/?id=v2.6.33
[+]   Download kernel: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/snapshot/v2.6.33.tar.gz
[+]   Kernel release date: 2010-02-24 10:52:17-08:00
[+]   Interesting files:
[~]     - kernel/kallsyms.c: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/kernel/kallsyms.c?id=v2.6.33
[~]     - scripts/kallsyms.c: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/scripts/kallsyms.c?id=v2.6.33
[~]     - include/linux/elf-em.h: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/linux/elf-em.h?id=v2.6.33
[~]     - include/linux/elf.h: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/linux/elf.h?id=v2.6.33
[~]     - Documentation/Changes: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/Changes?id=v2.6.33
[+]   Architecture mips (EM_MIPS) supports 32-bit, 64-bit, big-endian, little-endian
[~]     - arch/mips/boot/compressed/head.S: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/mips/boot/compressed/head.S?id=v2.6.33
[~]     - arch/mips/boot/compressed/Makefile: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/mips/boot/compressed/Makefile?id=v2.6.33
[~]     - arch/mips/kernel/vmlinux.lds.S: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/mips/kernel/vmlinux.lds.S?id=v2.6.33
[~]     - arch/mips/kernel/head.S: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/mips/kernel/head.S?id=v2.6.33
[~]     - arch/mips/kernel/Makefile: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/mips/kernel/Makefile?id=v2.6.33
[~]     - arch/mips/boot/Makefile: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/mips/boot/Makefile?id=v2.6.33
[~]     - arch/mips/include/asm/elf.h: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/mips/include/asm/elf.h?id=v2.6.33
[+]   Suggested build environment: docker run -it debian/eol:lenny (Debian 5.0 "Lenny" released 2009-02-14)
[+] Found kallsyms_token_table at file offset 0x002d2b10
[+] Found kallsyms_token_index at file offset 0x002d2e60
[+] Found kallsyms_markers at file offset 0x002d2a60
[+] Found kallsyms_names at file offset 0x002b66a0 (11209 symbols)
[+] Found kallsyms_num_syms at file offset 0x002b6690
[+] Null addresses overall: 0 %
[+] Found kallsyms_addresses at file offset 0x002ab760
[+] Guessed the base address using the first_symbol_virtual_address fallback heuristic (80000000)
[+] Reconstructing ELF with guessed base address (80000000)
[+] Successfully wrote the new ELF kernel to /logs/firmware/unblob_extracted/firmware_extract/DIR-600_fw_revb5_214b01_ALL_de_20130122/dir600b_v2.14_d1mg.bin_extract/108-1146762.lzma_extract/lzma.uncompressed.elf

[+] Successfully generated Linux kernel elf file: /logs/firmware/unblob_extracted/firmware_extract/DIR-600_fw_revb5_214b01_ALL_de_20130122/dir600b_v2.14_d1mg.bin_extract/108-1146762.lzma_extract/lzma.uncompressed.elf


[*] Trying to extract kernel configuration from /logs/firmware/unblob_extracted/firmware_extract/DIR-600_fw_revb5_214b01_ALL_de_20130122/dir600b_v2.14_d1mg.bin_extract/108-1146762.lzma_extract/lzma.uncompressed.elf
[-] No valid kernel configuration extracted from lzma.uncompressed.elf