fuzzer | Ptrace fuzzer experiments

 by   marcinguy C Version: Current License: No License

kandi X-RAY | fuzzer Summary

kandi X-RAY | fuzzer Summary

fuzzer is a C library. fuzzer has no bugs, it has no vulnerabilities and it has low support. You can download it from GitHub.

Code and approach is EXPERIMENTAL. YMMV. Ptrace fuzzer experiments based on Fuzzing at ca. 60k exec/s. I can imagine you can scale it even more with 25% drop per total cores. With 4 cores I achieved 60k exec/s (25% total drop, since 1 core was ca 20k). Below you can also see how I trigger Stack Protector with my crash. #fuzzing #speed Fuzzing older "Oniguruma" regular expression library. With shared memory corpus and increase of speed on one core to 50%, it could be even 90k exec per second (didn't try yet) on 4 cores.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              fuzzer has a low active ecosystem.
              It has 35 star(s) with 11 fork(s). There are 6 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              fuzzer has no issues reported. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of fuzzer is current.

            kandi-Quality Quality

              fuzzer has 0 bugs and 0 code smells.

            kandi-Security Security

              fuzzer has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              fuzzer code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              fuzzer does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              fuzzer releases are not available. You will need to build from source code and install.
              Installation instructions, examples and code snippets are available.
              It has 8 lines of code, 0 functions and 1 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of fuzzer
            Get all kandi verified functions for this library.

            fuzzer Key Features

            No Key Features are available at this moment for fuzzer.

            fuzzer Examples and Code Snippets

            No Code Snippets are available at this moment for fuzzer.

            Community Discussions

            QUESTION

            How to fuzz test API as a whole and not with file inputs?
            Asked 2022-Mar-09 at 10:02

            I'm learning my way around fuzz testing C applications. As I understand it, most of the time when fuzzing, one has a C function that takes/reads files. The fuzzer is given a valid sample file, mutates it randomly or with coverage heuristics, and executes the function with this new input.

            But now I don't want to fuzz a function that takes file inputs but a few functions that together make up an API. For example:

            ...

            ANSWER

            Answered 2022-Feb-24 at 20:29

            To answer my own question:

            Yes, that's how API fuzzing can be done. For consuming the data bytewise the functions provided by libFuzzer #include (C++) could be used. Problem with this: The crash dump and fuzzer corpus won't be human readable.

            For a more readable fuzzer, implementing a structure aware custom data mutator for libFuzzer is beneficial.

            I used the premade data mutator libprotobuf-mutator (C++) to fuzz the example API. It generates valid input data based on a protocol buffer definition and not just (semi) random bytes. It does make the fuzzing a bit slower though. The bug in the given contrived example API was found after ~2min, compared to ~30secs with the basic byte consuming setup. But I do think that it would scale much better for larger (real) API's.

            Source https://stackoverflow.com/questions/71173169

            QUESTION

            Apply fuzzing to a function that parses some string
            Asked 2021-Dec-16 at 09:46

            Recently the Go team released a fuzzer https://blog.golang.org/fuzz-beta

            Can you help to describe what I can expect from the fuzzer in terms of test goals?

            How to apply the fuzzer?

            Give some insight about how long we would run it before considering it good enough

            How to correlate execution failure with the code (i expect having GB of results, I am wondering how overwhelming that could be and how to handle that)

            See this intentionally terrific piece of code which would definitely need to be fuzzed

            ...

            ANSWER

            Answered 2021-Dec-16 at 09:46

            So, I dug a bit into the fuzz draft design. Here's some insights.

            First, as recommended in the blog post, you have to run the Go tip:

            Source https://stackoverflow.com/questions/68690476

            QUESTION

            How is Symbolic Execution different from Whitebox Fuzzing?
            Asked 2021-Nov-08 at 16:13

            I do not understand how symbolic execution is different from Whitebox fuzzing? From what I understand, Whitebox Fuzzers symbolically execute the code with some initial input format. Additionally, it will be helpful if someone could differentiate between these two forms with reference to KLEE and AFL tools.

            ...

            ANSWER

            Answered 2021-Nov-08 at 16:13

            Whitebox fuzzing can be done not only with symbolic execution. SAGE from Microsoft Research is an example of a whitebox fuzzer that uses concolic execution, also called dynamic symbolic execution, see NDSS08.

            Yes, Whitebox Fuzzers get some seed/seeds (initial input/inputs) and symbolically execute the code with these. Concolic fuzzers also run the code with these inputs in parallel with symbolic execution.

            KLEE is a whitebox fuzzer that uses symbolic execution.

            AFL is a greybox fuzzer - it uses internal structure information only to calculate coverage and not to get new paths. There are tools for AFL that get constants from comparisions in the code and add these to AFLs dictionaries, but this is still not whitebox fuzzing.

            Source https://stackoverflow.com/questions/69748863

            QUESTION

            Understanding and different usage between libfuzzer and AFL
            Asked 2021-Aug-23 at 18:15

            I'm a noob to fuzz area and looked AFL implementation.

            AFL seems to replace stdin file descriptor to input file descriptor. Whenever the target program encounters standard input, the target program takes input from the input file, not the stdin.

            So, my question is popped from on this.

            Let's say we made a library and we'd like to unit test to find some implementation bug using fuzzer. In this case, we don't take any standard input, just takes only function parameters from developers who use our library. Therefore, AFL doesn't work in this case.

            Libfuzzer seems proper solution in this case since generated input can be fed into our specific interesting function.

            Is this right understand? or does AFL also can work as libfuzzer for the unit test?

            Thank you

            ...

            ANSWER

            Answered 2021-Aug-23 at 18:15

            Afl supports feeding inputs through files, not only stdin. To test a library that receives input through arguments, you can write a simple executable that will open an input file, read it's contents, call the needed library functions with argument values read from this file and close the file.

            Source https://stackoverflow.com/questions/68890003

            QUESTION

            What are PCs and PC tables in LibFuzzer
            Asked 2021-Jun-24 at 13:17

            I am trying to understand how code instrumentation works in LibFuzzer. From the documentation, i get that I can choose different type of instrumentation with the option -fsanitize-coverage.

            When starting the fuzzer, the INFO section indicates which instrumentation is used (here 8-bit counters)

            ...

            ANSWER

            Answered 2021-Jun-24 at 13:17

            In this context, PC means Program Counter as explained in this blog post

            In order to log coverage, the function trace_pc will log the program counter. With this information, the fuzzer knows, which paths are traversed on the given input values. Each fuzzing engine runs through this process differently.

            Source https://stackoverflow.com/questions/68065958

            QUESTION

            Patching a closed source network application to read from file
            Asked 2021-Jun-07 at 22:23

            So let me explain, I want to fuzz a closed source application named Y that implements a custom protocol let's name the protocol X. Y is written in C.
            Is there a way to patch the send/read family functions to read from file instead of the socket?
            Could this potentially work for the AFL/AFL++ fuzzer?
            Keep in mind the application is developed for UNIX-like ecosystems.

            ...

            ANSWER

            Answered 2021-Jun-07 at 22:23

            Yes, you can do that easily by making bridges between named pipes (fifos) and TCP connections through netcat.

            Create two files (named pipes):

            Source https://stackoverflow.com/questions/67868416

            QUESTION

            How to generate random unicode strings in rust?
            Asked 2021-Mar-25 at 18:04

            I'm implementing a fuzzer and I'd like to generate random unicode strings. I came up with this solution, however, it's very inefficient and seldomly produces some string. Is there a better way to generate unicode strings?

            Thank you.

            ...

            ANSWER

            Answered 2021-Mar-25 at 18:04

            Use something like this:

            Source https://stackoverflow.com/questions/66805060

            QUESTION

            Porting docker build commands to Singularity
            Asked 2021-Feb-22 at 12:26
                docker build \
                --tag gcr.io/fuzzbench/runners/afl/libpng-1.2.56-intermediate \
                --build-arg BUILDKIT_INLINE_CACHE=1 \
                --cache-from gcr.io/fuzzbench/runners/afl/libpng-1.2.56-intermediate \
                --file fuzzers/afl/runner.Dockerfile \
                fuzzers/afl
            
            ...

            ANSWER

            Answered 2021-Feb-22 at 12:26

            The simplest way to "port" a Docker image to Singularity is to build the Singularity image directly from the Docker image: singularity build libpng_1.2.56.sif docker://gcr.io/fuzzbench/runners/afl/libpng-1.2.56-intermediate. If the source docker image has been built locally and is not in a remote registry use docker-daemon:// instead of docker://.

            The documentation also has a pretty sizable Singularity and Docker section that goes over using Docker images with Singularity and similarities/differences between a Singularity definition file and a Dockerfile.

            If you want to maintain separate Dockerfile and Singularity files for creating images, keep in mind there is not always a direct equivalent. e.g,. --tag in Docker is effectively equivalent to the filename of the Singularity image, buildkit settings are specific to the Docker build process and do not have a counterpart in Singularity.

            Source https://stackoverflow.com/questions/66272215

            QUESTION

            "Fork server handshake failed" Error when fuzzing an arm binary without source code
            Asked 2021-Feb-09 at 11:42

            anybody here? I have been working on using afl-qemu mode fuzzing IoT binaries. But I got a "Fork server handshake failed" problem when started to run the binary. I have read the previous related session but none of those fix my problem.

            The information of the binary is here:

            ...

            ANSWER

            Answered 2021-Feb-09 at 11:42

            You've tried to upgrade the version of QEMU that afl-qemu uses. Because afl-qemu makes modifications to QEMU's source, this is not a trivial thing to do. In particular, these commands that you commented out:

            Source https://stackoverflow.com/questions/66095549

            QUESTION

            Not able to build LLVM from its source code
            Asked 2021-Jan-09 at 07:17

            I am referring to https://llvm.org/docs/GettingStarted.html to build the LLVM from its source code. I am using Ubuntu 18.04.

            ...

            ANSWER

            Answered 2021-Jan-09 at 07:17

            As mentioned in comments you are most likely running out of memory: by default all executables are linked statically so lds use a lot of RAM. There are several ways to counteract this:

            1. Reduce link parallelism via -DLLVM_PARALLEL_LINK_JOBS=1 to avoid starting too many links in parallel (BTW for generic codebase one could use ld-limiter to achieve the same).

            2. Reduce consumed memory by using either or both of -Wl,-no-keep-memory and -Wl,--reduce-memory-overheads linker flags (add them to CMAKE_EXE_LINKER_FLAGS).

            3. Switch to Gold (via -fuse-ld=gold) or lld (via -fuse-ld=lld) linkers (add switch to CMAKE_EXE_LINKER_FLAGS).

            4. In case you plan to frequently rebuild Clang (e.g. for debugging), you may use -DBUILD_SHARED_LIBS=ON to use shared, instead of static, links. You'll no longer have OOMs and also incremental Clang builds are sped up by 100x (at the cost of 2-3x slower Clang runtimes).

            Source https://stackoverflow.com/questions/65633304

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install fuzzer

            Thats how proc maps looked on my system (see snapshot.c). Hopefully, rest you can figure out.

            Support

            Comment those lines out:.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/marcinguy/fuzzer.git

          • CLI

            gh repo clone marcinguy/fuzzer

          • sshUrl

            git@github.com:marcinguy/fuzzer.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link