private-octopus / fuzi_q

Over the net fuzzing of QUIC servers or clients.
MIT License
19 stars 4 forks source link

Q:Please provide example commands #22

Closed Karthikdasari0423 closed 4 days ago

Karthikdasari0423 commented 1 year ago

Could you please provide example command with fuzi_q

How to run client with fuzi_q and how to run server with fuzi_q

this would be very helpful for beginers

huitema commented 1 year ago

Yes, the doc is pretty minimal. Doing ./fuzi-q -? will print the "usage" message, which is a bit more explicit.

Example of testing a server, such as "example.com" running on port 443, with a scenario of loading "index.html":

fuzi_q client example.com 443 /index.html

Karthikdasari0423 commented 1 year ago

okay,got it

Karthikdasari0423 commented 1 year ago

anyway to run ./fuzi_qt on example.com 443 like how we run fuzi_q

Karthikdasari0423 commented 4 days ago
root@ubuntu:~/fuzi_q# ./fuzi_q --help
./fuzi_q: invalid option -- '-'
Unknown option: -?
fuzi_q: over the net quic fuzzer
Usage: fuzi_q <options> fuzz_mode [server_name port [scenario]]
  fuzz_mode can be one of client, clean or server.  For the client or clean fuzz_mode, specify server_name and port.
  For the server fuzz_mode, use -p to specify the port,
  and also -c and -k for certificate and matching private key.
Picoquic options:
  -c file         cert file
  -k file         key file
  -p number       server port
  -v              Version proposed by client, e.g. -v ff000012
  -o folder       Folder where client writes downloaded files, defaults to current directory.
  -w folder       Folder containing web pages served by server
  -x number       Maximum number of concurrent connections, default 256
  -r              Do Retry Request
  -R option       Randomize packet number spaces: none(0), initial(1, default), all(2).
  -s <32 hex chars> Reset seed
  -X              Disable the check for blocked ports
  -S folder       Set the path to the source files to find the default files
  -G cc_algorithm Use the specified congestion control algorithm: reno, cubic, bbr or fast. Defaults to bbr.
  -P number       Set the default spinbit policy
  -O number       Set the default lossbit policy
  -M              Enable QUIC multipath extension
  -e if           Send on interface (default: -1)
  -C cipher_suite_id specify cipher suite (e.g. -C 20 = chacha20)
  -i per-text-lb-spec See documentation for LB compatible CID configuration
  -l file         Log file, Log to stdout if file = "-". No text logging if absent.
  -L              Log all packets. If absent, log stops after 100 packets.
  -b folder       Binary logging to this directory. No binary logging if absent.
  -q folder       Qlog logging to this directory. No qlog logging if absent, but qlogs could be produced using picolog if binary logs are available.
  -m mtu_max      Largest mtu value that can be tried for discovery.
  -n sni          sni (default: server name)
  -a alpn         alpn (default function of version)
  -t file         root trust file
  -z              Set TLS zero share behavior on client, to force HRR
  -I length       Length of CNX_ID used by the client, default=8
  -d ms           Duration of idle timeout in milliseconds
  -D              no disk: do not save received files on disk
  -Q              send a large client hello in order to test post quantum readiness
  -T file         File storing the session tickets
  -N file         File storing the new tokens
  -B number       Set buffer size with SO_SNDBUF SO_RCVBUF
  -F file         Append performance reports to performance log
  -V              enable preemptive repeat
  -U              Version upgrade if server agrees, e.g. -U 6b3343cf
  -0              Do not use UDP GSO or equivalent
  -j number       use bdp extension frame(1) or don't (0). Default=0
  -W bytes        Max value for CWIN. Default=UINT64_MAX
  -8              Enable SSLKEYLOG
  -J mode         provider (0), receiver (1) or both (2).
  -h              This help message
fuzi_q options:
  -f nb_fuzz_trials     Number of trials to be attempted.
  -d duration_max       Duration of the test, in seconds.
  -X initial_cid        CID of first client connection.

The scenario argument is same as for picoquicdemo.

The fuzzing of a connection depends on the value of the initial CID for that connection. On the client,
these CIDs are derived from the previous one using SHA 256. By default, the very first CID is picked
at random, but it can be specifed using the parameter -X when reproducing a previous fuzz.
root@ubuntu:~/fuzi_q#