fuzzer | Python interface to AFL , allowing for easy injection

 by   shellphish Python Version: Current License: BSD-2-Clause

kandi X-RAY | fuzzer Summary

kandi X-RAY | fuzzer Summary

fuzzer is a Python library typically used in Testing applications. fuzzer has no bugs, it has build file available, it has a Permissive License and it has high support. However fuzzer has 2 vulnerabilities. You can download it from GitHub.

This module provides a Python wrapper for interacting with AFL (American Fuzzy Lop: It supports starting an AFL instance, adding slave workers, injecting and retrieving testcases, and checking various performance metrics. Shellphish used it in Mechanical Phish (our CRS for the Cyber Grand Challenge) to interact with AFL.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              fuzzer has a highly active ecosystem.
              It has 613 star(s) with 138 fork(s). There are 43 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 10 open issues and 13 have been closed. On average issues are closed in 18 days. There are 1 open pull requests and 0 closed requests.
              OutlinedDot
              It has a negative sentiment in the developer community.
              The latest version of fuzzer is current.

            kandi-Quality Quality

              fuzzer has 0 bugs and 15 code smells.

            kandi-Security Security

              fuzzer has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              OutlinedDot
              fuzzer code analysis shows 2 unresolved vulnerabilities (2 blocker, 0 critical, 0 major, 0 minor).
              There are 7 security hotspots that need review.

            kandi-License License

              fuzzer is licensed under the BSD-2-Clause License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              fuzzer releases are not available. You will need to build from source code and install.
              Build file is available. You can build the component from source.
              Installation instructions, examples and code snippets are available.
              fuzzer saves you 539 person hours of effort in developing the same functionality from scratch.
              It has 1262 lines of code, 104 functions and 12 files.
              It has high code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed fuzzer and discovered the below as its top functions. This is intended to give you an instant insight into fuzzer implemented functionality, and help decide if they suit your requirements.
            • This callback is called when the fuzz is found
            • Start the showmap
            • Return bitmap for fuzzing
            • Show map
            • Return the library path
            • Create a project from binary data
            • Escape a string
            • Perform environment checks
            • Returns the number of lines in the file
            • Collect fuzzer stats
            • Return a list of queued states
            • Remove n fuzzers
            • Remove the fuzzer
            • Kill all running processes
            • Removes cycles from the graph
            • Creates a directed graph
            • Return the output of the process
            • Return a dict of technique contributors
            • Generate a list of contributions from the given inputs
            • Resolve source ids
            • Plot the graph
            • Reloads the configuration
            • Load all the inputs from an instance
            • Load all instances
            • Run the main loop
            • Perform fuzzing
            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

            Generate a random numeric tensor .
            pythondot img1Lines of Code : 48dot img1License : Non-SPDX (Apache License 2.0)
            copy iconCopy
            def get_random_numeric_tensor(self,
                                            dtype=None,
                                            min_size=_MIN_SIZE,
                                            max_size=_MAX_SIZE,
                                            min_val=_MIN_INT,
                              

            Community Discussions

            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

            QUESTION

            How to call a renamed symbol in an external object file?
            Asked 2020-Nov-13 at 17:03

            I am trying to fuzz a particular piece of code using LLVM libFuzzer that only exposes its main() function externally. I have access to the source of the target code, but cannot change it.

            If I try to directly include the object file, it conflicts with the main definition provided by -fsanitize=fuzzer. I thought I might be able to solve this by renaming the main symbol in the object file:

            ...

            ANSWER

            Answered 2020-Nov-13 at 17:03

            You are not accounting for C++'s name mangling. The symbol for stub_main is likely a string containing main as well as some obfuscated info about arguments, type of function, and return type. In my platform it's __Z9stub_mainiPPc. The symbol for main would likely just be main or main_.

            You can try looking how main and stub_main definitions mangle in your platform with objdump -d *.o, and then you can replace these strings with objcopy --redefine-sym.

            Alternatively, as matoro said, you can declare the function as extern "C" so that no name mangling takes place.

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

            QUESTION

            Creating Makefile for source file in parent directory
            Asked 2020-Oct-11 at 13:46
            ---src
                ---U
                   ---B
                     ---D
                       ---L
                         ---T
                            ---F
                             main.c
                             Makefile 
            
            ...

            ANSWER

            Answered 2020-Oct-11 at 13:46
            x.o: x.c  //do I need to specify other header file dependencies here?
                $(CC) $(INC) -g -c -o x.o x.c
            

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

            QUESTION

            Using Factory Boy inside a dict for a data model factory in Django? Alternatively, getting FactoryBoy to evaluate subfactory on demand?
            Asked 2020-Sep-29 at 21:17

            I have the following ModelFactory:

            ...

            ANSWER

            Answered 2020-Sep-29 at 21:17

            You have a first issue: all the calls to random or .fuzz() that you put in the content dict are evaluated when the class is imported: each instance will use the exact same values.

            In order to perform lazy evaluation, you MUST wrap them in some factory_boy-provided declaration:

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

            QUESTION

            How do you instrument binaries for afl fuzzing?
            Asked 2020-Sep-21 at 13:52

            I'm trying to fuzz with afl, and its telling me to instrument the binary or just run a dumb fuzzer. How do Instrument the binary?

            ...

            ANSWER

            Answered 2020-Sep-21 at 13:52

            To fuzz a binary you should re-compile it's source-code with either afl-gcc (for C-code) or afl-g++ (for C++-code).

            You can find more info here.

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

            QUESTION

            Limit recursion on C++ target
            Asked 2020-Jul-30 at 07:43

            While fuzzing a language made with antlr, the fuzzer reported a slow testcase that was using quite a lot of parens.

            One of the rules in the grammar is somewhat like:

            paren_expression: '(' expression ')';

            Even if it was reported as a slow unit, it underlies the bigger problem of being able to somewhat easily crash the application with enough parens used (and it does on windows which has smaller stack size by default).

            From what I searched, there's no option to generate code that checks the stack depth and exits after a reasonable depth, and recovering from stack overflow in C++ is not really a good or portable thing to do.

            So, what can be done in this case? Crashing from bad input is not very nice.

            ...

            ANSWER

            Answered 2020-Jul-29 at 17:48

            You could add a predicate that checks how deep the nested expression is, and let the predicate fail if it exceeds a certain number.

            For example, you allow a maximum of 3 nested expressions, you could do that like this:

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

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

            Vulnerabilities

            No vulnerabilities reported

            Install fuzzer

            /!\ We recommend installing our Python packages in a Python virtual environment. That is how we do it, and you'll likely run into problems if you do it otherwise.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            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/shellphish/fuzzer.git

          • CLI

            gh repo clone shellphish/fuzzer

          • sshUrl

            git@github.com:shellphish/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

            Explore Related Topics

            Consider Popular Python Libraries

            public-apis

            by public-apis

            system-design-primer

            by donnemartin

            Python

            by TheAlgorithms

            Python-100-Days

            by jackfrued

            youtube-dl

            by ytdl-org

            Try Top Libraries by shellphish

            how2heap

            by shellphishC

            driller

            by shellphishPython

            ictf-framework

            by shellphishPython

            afl-other-arch

            by shellphishC

            shellphish-afl

            by shellphishPython