Skip to content

Network fuzzing functionality Issues - bind socket failure (addr in use), test cases time out (during dry_run) #3

Description

Summary
I am a student currently trying to create a base test case for the network fuzzer with a simple TCP server that merely creates, binds, listens, accepts, receives a string, and closes a socket. However, I'm stuck on two errors I'm receiving when attempting to fuzz the application. While running the application by itself or using strace it functions properly and exits appropriately.

Do you mind helping me with these errors? I feel I don't quite understand how the network fuzzer functionality works.

Error 1
Possible bad values for -t flag and -D flag?

When attempting to run the fuzzer:

afl-fuzz -i testcases/ -o findings/ -t 5000+ -D 1000 -N tcp://127.0.0.1:8080 -- ./netprog/tcpserver 8080

I receive the following error:

[-] SYSTEM ERROR : Attempt to bind socket to source address & port failed (TCP case)
Stop location  : network_send(), afl-fuzz.c:2188
OS message  : Address already in use

Following a netstat -an | grep 8080 I found this:

tcp    0    0 0.0.0.0:8080             0.0.0.0:*              LISTEN
tcp    0    0 127.0.0.1:32800       127.0.0.1:8080            TIME_WAIT

Error 2
Test case is simply a file containing the string "test string"
How does the fuzzer send this data to the application?

Is the file parsed and the string data sent in an afl-formed TCP packet?
OR
Is the file itself sent?

When attempting to run the fuzzer:

afl-fuzz -i testcases/ -o findings/ -t 10000+ -D 5000 -N tcp://127.0.0.1:8080 -- ./netprog/tcpserver 8080

I receive the following error:

[-] PROGRAM ABORT : All test cases time out, giving up!
Location : perform_dry_run(), afl-fuzz.c:3240

Trying to determine if I need to tweak the application itself to be compatible with the fuzzer or if I don't quite understand how the network fuzzer works.

Thank you for your consideration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions