Replies: 1 comment 1 reply
-
Good question, I think you're not the only one who ran into this problem. We could perhaps add a simple example.
You need to define a Monitor class that starts/stops and monitors your target: class TcpPingMonitor(boofuzz.monitors.BaseMonitor):
def post_send(self, target=None, fuzz_data_logger=None, session=None):
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
try:
sock.connect((target._target_connection.host, target._target_connection.port))
return True
except socket.error as e:
fuzz_data_logger.log_fail(f"Opening TCP connection failed: {e}")
return False
finally:
sock.close()
def __repr__(self):
return "TCP Ping Monitor" Then add the monitor to your target: session = Session(
target=Target(connection=TCPSocketConnection("127.0.0.1", 80),
monitors=[TcpPingMonitor()]))
With the |
Beta Was this translation helpful? Give feedback.
-
We are using boofuzz for fuzzing remote service with tcp protocol. The fuzzer script is as follows.
After a while, we noticed the remote service is crashed but the fuzzer just repeatly tried to restart. The fuzzer did not detect the remote service is closed and the crashed test case is not stored.
How can we customize the boofuzz script so that:
Beta Was this translation helpful? Give feedback.
All reactions