1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2017
    Rep Power

    Seeking Debugging Wisdom

    I'm a n00b "C" programmer - but constantly trying to improve - so here I am with my coding tin cup out hoping for a helpful tip to solve this current problem - and - help me understand the "C" compiling process itself better and avoid a little bit of pain in future situations.

    As a pentester I frequently need to convert PoC code from various sites to working code. I've worked through many of them over the last couple of month's but this one (downloaded from: exploit-dbDOTcom ID: 895) has me going in circles and I'm beginning to suspect there may be an easy solution an experienced "C" programmer can spot.

    Debugging steps so far:
    1) Library paths for missing header files, fine. Got that, then I needed "asm/unistd_64_x32.h". Update, upgrade (on kali 2.0) no luck. Finally went over to Mint 17.3, found it there.

    2) Change <linux/pages.h> to: <sys/pages.h>, that solved about the next half dozen errors.

    3) I'm stuck on about a hundred or so errors mostly "unknown type name __kernel_pid_t" and "error: conflicting types for fd_set

    Before I spend another couple of days sorting these out I'm wondering is there some compile option or other obvious omission that would solve these errors (see compile command below) ?

    gcc 895_modified.c -o lcl_pagefile_privesc \
    -I/usr/src/linux-headers-3.19.0-32/include/ \
    -I/usr/src/linux-headers-3.19.0-32/arch/x86/include/ \

    ..dozens of errors I' left with
    pages and pages of these types of errors....
    /usr/include/asm-generic/fcntl.h:203:2: error: unknown type name __kernel_pid_t
    __kernel_pid_t l_pid;

    /usr/src/linux-headers-3.19.0-32/include/linux/types.h:14:26: error: conflicting types for fd_set
    typedef __kernel_fd_set fd_set;
  2. #2
  3. Contributing User
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Aug 2011
    Rep Power
    ar t libove.a
    lists content of archive libove.a

    sudo updatedb

    followed by

    locate filenam

    is a quick way to find files by name on linux.

    Otherwise you may be stuck with hunting the missing pieces one by one. You could find instructions?

    "pentester" and "PoC" are meaningless jargon to me.
    Last edited by b49P23TIvg; August 9th, 2017 at 05:04 PM.
    [code]Code tags[/code] are essential for python code and Makefiles!

IMN logo majestic logo threadwatch logo seochat tools logo