News for hackers. Stuff that matters.
Re:Pulling JPEGs out of thin air (2014) by lachenmayer on Sunday March 24, 2019 @06:40PM (#19479183)
Really cool! I recently happened to have a similar idea when I came across the rust-fuzz crate, which abstracts over afl, honggfuzz etc.

If you're interested, my notes are here: https://github.com/lachenmayer/insta-fuzz

I ended up "cheating" a little bit by providing a valid JPEG header - I found that rust-fuzz seemed to take far too long to generate any valid JPEG at all by starting from eg. an empty file. But maybe I just wasn't patient enough, after all I was only running it on my laptop :)

Re:Pulling JPEGs out of thin air (2014) by stordoff on Sunday March 24, 2019 @07:51PM (#19479421)
The author does note in the comments:

> Note that by default, afl-fuzz runs on a single core, so it may take several days to get results

Re:Pulling JPEGs out of thin air (2014) by yjftsjthsd-h on Sunday March 24, 2019 @10:41PM (#19479971)
That's a little annoying, but it looks like it's not too terrible to fix: https://github.com/mirrorer/afl/blob/master/docs/parallel_fu...
Re:Pulling JPEGs out of thin air (2014) by Cthulhu_ on Monday March 25, 2019 @08:01AM (#19481771)
Would a BMP be easier to generate? I'm sure you'd get 99.99% static though.
Re:Pulling JPEGs out of thin air (2014) by lachenmayer on Monday March 25, 2019 @05:12PM (#19486777)
Yeah definitely, a BMP doesn't really have any "interesting" structure though because it's more or less just an array of pixels. The visual artifacts in JPEG files come from all the downsampling / blocks / cosine transform stuff which is really what I wanted to explore.