Git Product home page Git Product logo

corpus_pdfs's Introduction

corpus_pdfs

A set of pdf documents used during the fuzzing process

The pdfs are coming from the following sources:

There is a folder for each binary we've minimized for. The pdfall folder contains all of the pdfs which can be used to minimize with other binaries.

The pdfs_all folder also contains the uncompressed pdfs obtained with:

find . -type f -exec qpdf --stream-data=uncompress {} {}_uncompressed.pdf \;

The redo the corpus (for a different software or because we have more pdfs), it is necessary to follow the next steps:

rm -rf pdfs_all_* &&
mkdir pdfs_all_10k &&
mkdir pdfs_all_100k &&
mkdir pdfs_all_1M &&
mkdir pdfs_all_10M &&
find corpus_pdfs/pdfs_all/ -size -10k  -exec cp "{}" pdfs_all_10k/ \; &&
find corpus_pdfs/pdfs_all/ -size -100k -size +10k -exec cp "{}" pdfs_all_100k/ \; &&
find corpus_pdfs/pdfs_all/ -size -1000k -size +100k -exec cp "{}" pdfs_all_1M/ \; &&
find corpus_pdfs/pdfs_all/ -size -10000k -size +1000k -exec cp "{}" pdfs_all_10M/ \; &&
rm -rf corpus_pdfs/poppler/10k_min/ &&
rm -rf corpus_pdfs/poppler/100k_min/ &&
rm -rf corpus_pdfs/poppler/1M_min/ &&
rm -rf corpus_pdfs/poppler/10M_min/ &&
afl-cmin -t 1000 -m 100 -i pdfs_all_10k/ -o corpus_pdfs/poppler/10k_min/ -- poppler-latest/utils/pdftocairo @@ &&
afl-cmin -t 1000 -m 100 -i pdfs_all_100k/ -o corpus_pdfs/poppler/100k_min/ -- poppler-latest/utils/pdftocairo @@ &&
afl-cmin -t 1000 -m 100 -i pdfs_all_1M/ -o corpus_pdfs/poppler/1M_min/ -- poppler-latest/utils/pdftocairo @@ &&
afl-cmin -t 1000 -m 100 -i pdfs_all_10M/ -o corpus_pdfs/poppler/10M_min/ -- poppler-latest/utils/pdftocairo @@

It's very important to do first the size filtering and then the corpus minimization.

The idea is to skip all the pdfs taking more than 1 second to be processed or more than 100MB of memory.

corpus_pdfs's People

Contributors

0ca avatar ret2lib avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.