I'm building a lua script (tool) that retrieves the Elf Binary information from the memory of a running process. The script contains three Main functions:
----- this part work fine ---
getElfBinaryStartAddress(): This function retrieves the start address of the Elf Binary.
getElfBinaryHeader(startadr): This function retrieves the Elf Binary header information. It takes the start address of the Elf Binary as a parameter and returns an object with the following information: magicNumber, class, data, version, osAbi, abiVersion, type, machine, version, entry, phoff, shoff, e_phentsize, e_phnum, e_phoff, e_shnum, e_shentsize, and e_shstrndx.
getProgramHeader(elfHeader): This function retrieves the Program Header information of the Elf Binary. It takes the Elf Binary header information as a parameter and returns an array of objects with information about each program header entry, such as type, offset, virtual address, physical address, file size, memory size, flags, and alignment.
---this part get bugged--->
getSymbolTable()
getElfFunctions()
these functions are the core it get the offset of every function within the lib and get it's pointers and name at real-time (here is the goal)
the problem is I cant get symbolTable correctly ,always nil
I dumped the symtab and all the sections are 0
I get burn out and I cant solve it in 3 days ...
you can download the source code below (223 lines .. + comments)
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.
Question
XEKEX
I'm building a lua script (tool) that retrieves the Elf Binary information from the memory of a running process. The script contains three Main functions:
----- this part work fine ---
getElfBinaryStartAddress(): This function retrieves the start address of the Elf Binary.
getElfBinaryHeader(startadr): This function retrieves the Elf Binary header information. It takes the start address of the Elf Binary as a parameter and returns an object with the following information: magicNumber, class, data, version, osAbi, abiVersion, type, machine, version, entry, phoff, shoff, e_phentsize, e_phnum, e_phoff, e_shnum, e_shentsize, and e_shstrndx.
getProgramHeader(elfHeader): This function retrieves the Program Header information of the Elf Binary. It takes the Elf Binary header information as a parameter and returns an array of objects with information about each program header entry, such as type, offset, virtual address, physical address, file size, memory size, flags, and alignment.
---this part get bugged--->
getSymbolTable()
getElfFunctions()
these functions are the core it get the offset of every function within the lib and get it's pointers and name at real-time (here is the goal)
the problem is I cant get symbolTable correctly ,always nil
I dumped the symtab and all the sections are 0
I get burn out and I cant solve it in 3 days ...
you can download the source code below (223 lines .. + comments)
ElfTest.lua
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.