1
votes

I want to open an elf file in Linux kernel mode. and find whether it contains "in" and "out" instruction. How to do that? Any idea? Thanks.

1
You can put a hooks on execve when code is mapped and just scan the raw memory for particular instruction codes - Alex Hoppus
Alex Hoppus, do you know an algorithm to scan binary file? X86 instruction lenth is variable. It is a little difficult to obtain opcode. - siyuan
siyuan, You can perform part of work in userspace with objdump like utility. Another way is to write your own disassembler - Alex Hoppus

1 Answers

1
votes

How to do that?

objdump -d /lib/modules/`uname -r`/.../some-module.ko