hbowden / nextgen

A Genetic File, Syscall and Network Fuzzer.
Other
58 stars 15 forks source link

Finish system call entry generator. #9

Closed hbowden closed 7 years ago

hbowden commented 7 years ago

nextgen uses a bunch of structs to hold information necessary to fuzz system calls. Below is an example. These struct are annoying and time consuming to write by hand so I wrote a code generator. Which can be found here: https://github.com/hbowden/entrygen . The generator is almost finished but currently can not generate the arg_type_array and get_arg_array arrays.

struct syscall_entry entry_getsockname = {

    .syscall_name = "getsockname",
    .syscall_symbol = SYS_getsockname,
    .total_args = 3,
    .status = ON,
    .requires_root = NX_NO,
    .need_alarm = NX_NO,
    .id = VPV_ID,

    .arg_type_array[FIRST_ARG] = SOCKET,
    .get_arg_array[FIRST_ARG] = &generate_socket,

    .arg_type_array[SECOND_ARG] = SOCKADDR,
    .get_arg_array[SECOND_ARG] = &generate_sockaddr,

    .arg_type_array[THIRD_ARG] = SOCKLEN,
    .get_arg_array[THIRD_ARG] = &generate_socklen,
};
hbowden commented 7 years ago

The generator is in a workable state, so we can close this.