Skip to content

BPF Processor for IDA Python, for Python 3.7+ and IDA 7.4+

License

Notifications You must be signed in to change notification settings

securechicken/ida-bpf-processor-74

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BPF Bytecode Processor for IDA (python)

Processor

Supports the old BPF bytecode only (no eBPF).

The processor will display conditional branches with a 0 value true-offset as their opposite logical counterpart, e.g. JEQ 0xFF, 0, 1 as JNE 0xFF, 1, 0.

Loader

The loader accepts files that have a custom bpf header and sets up several symbolic constants for seccomp:

SECCOMP_RET_KILL = 0x00000000
SECCOMP_RET_TRAP = 0x00030000
SECCOMP_RET_ERRNO = 0x00050000
SECCOMP_RET_TRACE = 0x7ff00000
SECCOMP_RET_ALLOW = 0x7fff0000
// --------------
AUDIT_ARCH_I386 = 0x40000003
AUDIT_ARCH_X86_64 = 0xC000003E

File Format

The loader accepts files in the following format (see 010template):

int magic;
int reserved;
struct sock_filter bpf_c[0];

where magic must be "bpf\0" and reserved must be 0.

Installation

put the processor plugin bpf.py in:

<IDA_INSTALL_DIR>\procs\

put the file loader bpf_loader.py in:

<IDA_INSTALL_DIR>\loaders\

Supported Versions

  • IDA 7.x (tested on 7.0).
  • For older IDA versions use this.

License

MIT 2018 @bnbdr

Relevant References

About

BPF Processor for IDA Python, for Python 3.7+ and IDA 7.4+

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 82.1%
  • C 17.9%