pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/python-hyper/h11/tree/master/fuzz

sets.com/assets/primer-70be7debc79a8eff.css" /> h11/fuzz at master · python-hyper/h11 · GitHub
Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Some harness code for using afl and python-afl to fuzz-test h11.

See Alex Gaynor's tutorial, or just:

sudo apt install afl
pip install python-afl
cd fuzz
PYTHONPATH=.. py-afl-fuzz -o results -i afl-server-examples/ -- python ./afl-server.py

Note 1: You may need to add AFL_SKIP_CPUFREQ=1 if you want to play with it on a laptop and don't want to bother messing with your cpufreq config.

Note 2: You may see some false "hangs" due to afl's aggressive default timeouts. I think this might be intentional, and serve to discourage afl from wasting time exploring arbitrarily longer and longer inputs? Or you can set the timeout explicitly with -t $MILLISECONDS.

Note 3: Parallel fuzzing is a good thing.

Right now we just have a simple test that throws garbage at the server receive_data and makes sure that it's either accepted or raises RemoteProtocolError, never any other exceptions. (As an example of how even this relatively simple thing can catch bugs, here's a bug in gunicorn that was found by this approach, and here's a bug this found in h11... though that one's so simple that even basic fuzz-testing would have found it without any of afl's cleverness.)

Ideas for further additions

  • Teach afl-server.py to watch the state machine and send responses back to get things unpaused, to allow for fuzzing of pipelined requests and unsuccessful protocol switches
  • Add a client-side fuzzer too
  • Add a dictionary tuned for HTTP
  • add more seed examples: Connection: close? more complicated chunked examples? pipelining and protocol switch examples?
  • check that the all-at-once and byte-by-byte processing give the same event stream (modulo data splits)
  • maybe should split apart fancy checks versus non-fancy checks b/c speed is important
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy