Git Product home page Git Product logo

syscalldb's Introduction

syscallDB

Syscall database

Have you ever been doing some assembly and finding yourself looking furiously for some nisch syscall
Well, that will no longer be a problem with syscallDB's reverse lookup. It displays all relevant registers
For the query that is given. The database currently supports x86, i386, arm64, powerpc and mips n64.
More is to come. If you have any suggestion for additions or improvements, mail me at [email protected]

Installation

sysDB now also exists as a python package, install with python3 -m pip install sysDB For more regularly updated versions:

git clone https://github.com/marwenn02/syscallDB/
cd syscallDB/
./install.sh

Usage

x86

$ python3
>>> import sysDB
>>> sysDB.syscalli386("exec") # you do not need to know the whole name of the syscall.
[{'syscall': 'sys_execve', 'eax': 11, 'ebx': 'char __user *', 'ecx': 'char __user *__user *', 'edx': 'char __user *__user *', 'esi': 'struct pt_regs *', 'edi': ''}, {'syscall': 'sys_kexec_load', 'eax': 263, 'ebx': 'unsigned long entry', 'ecx': 'unsigned long nr_segments', 'edx': 'struct kexec_segment __user *segments', 'esi': 'unsigned long flags', 'edi': ''}]

i386

$ python3
>>> import sysDB
>>> sysDB.syscallx86("execve")
[{'syscall': 'sys_execve', 'rax': 59, 'rdi': 'const char *filename', 'rsi': 'const char *const argv[]', 'rdx': 'const char *const envp[]'}, {'syscall': 'stub_execveat', 'rax': 322, 'rdi': 'int dfd', 'rsi': 'const char __user *filename', 'rdx': 'const char __user *const __user *argv', 'r10': 'const char __user *const __user *envp', 'r8': 'int flags'}]

arm64

$ python3
>>> import sysDB
>>> sysDB.syscallArm64("execve")
[{'syscall': 'execve', 'x8': '0xDD', 'x0': 'const char __user *filename', 'x1': 'const char __user *const __user *argv', 'x2': 'const char __user *const __user *envp', 'x3': '', 'x4': '', 'x5': ''}, {'syscall': 'execveat', 'x8': '0x119', 'x0': 'int dfd', 'x1': 'const char __user *filename', 'x2': 'const char __user *const __user *argv', 'x3': 'const char __user *const __user *envp', 'x4': 'int flags', 'x5': ''}]

powerpc

$ python3
>>> import sysDB
>>> sysDB.sysprint(sysDB.syscallPowerPC(4))
sc: sys_write
r0: 4
r3: unsigned int fd
r4: const char *buf
r5: size_t count
r6: 
r7: 
r8:

mips64

$ python3
>>> import sysDB
>>> sysDb.syscallMips64(5009)
{'syscall': 'sys_mmap', 'v0': 5009, 'a0': 'struct mmap_arg_struct', 'a1': '', 'a2': '', 'a3': '', 'a4': '', 'a5': ''}

mips n32

$ python3
>>> import sysDB
>>> sysDB.syscallMips32(6002)
{'syscall': 'sys_open', 'v0': 6002, 'a0': 'const char *filename', 'a1': 'int flags', 'a2': 'umode_t mode', 'a3': '', 'a4': '', 'a5': ''}

mips o32

$ python3
>>> import sysDB
>>> sysDB.syscallMipso32(4005)
{'syscall': 'sys_open', 'v0': 4005, 'a0': 'const char *filename', 'a1': 'int flags', 'a2': 'umode_t mode', 'a3': '', 'stack1': '', 'stack2': ''}

sparc64

$ python3
>>> import sysDB
>>> sysDB.syscallSparc64(0)
{'t 0x6d': 'sys_restart_syscall', 'g1': 0, 'o0': '', 'o1': '', 'o2': '', 'o3': '', 'o4': '', 'o5': ''}

sparc32

$ python3
>>> import sysDB
>>> sysDB.syscallSparc32(0)
{'t 0x10': 'sys_restart_syscall', 'g1': 0, 'o0': '', 'o1': '', 'o2': '', 'o3': '', 'o4': '', 'o5': ''}

syscalldb's People

Contributors

nnewram avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.