Mercurial > dropbear-fuzzcorpus
changeset 0:ec5e2b121e57
Dropbear fuzz corpus
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Mon, 22 May 2017 22:44:32 +0800 |
parents | |
children | 60619c0e8ac6 |
files | LICENSE Makefile README fuzzer-preauth/oldafll4 fuzzer-preauth/oldafll7 fuzzer-preauth/oldafll8 make_fuzzinput.py |
diffstat | 7 files changed, 57 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/LICENSE Mon May 22 22:44:32 2017 +0800 @@ -0,0 +1,20 @@ +Copyright (c) 2017 Matt Johnston +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Makefile Mon May 22 22:44:32 2017 +0800 @@ -0,0 +1,13 @@ +FUZZ_TARGETS=fuzzer-preauth + +CORPUSES = $(addsuffix _seed_corpus.zip, $(FUZZ_TARGETS)) + +all: $(CORPUSES) + +%_seed_corpus.zip: %/* Makefile + -rm $@ + cd $*; zip ../$@ * + +list-fuzz-targets: + @echo $(FUZZ_TARGETS) +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/README Mon May 22 22:44:32 2017 +0800 @@ -0,0 +1,6 @@ +Dropbear SSH Fuzz Corpus +======================== + +Fuzzing inputs for [Dropbear SSH](https://matt.ucc.asn.au/dropbear/dropbear.html) + +Useful as input for OSS-Fuzz, see https://github.com/google/oss-fuzz/blob/master/docs/new_project_guide.md#seed-corpus
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/make_fuzzinput.py Mon May 22 22:44:32 2017 +0800 @@ -0,0 +1,18 @@ +#!/usr/bin/env python3 + +# A fuzz input consists of a SSH-string header followed by the SSH stream. +# This program prepends a basic prefix. + +import struct +import sys + +stream = sys.stdin.buffer.read() + +header = b'' +# uint32 wrapfd random seed +header += struct.pack(">I", 0xafaf1234) + +# prepend length +header = struct.pack(">I", len(header)) + header +sys.stdout.buffer.write(header) +sys.stdout.buffer.write(stream)