Code Monkey home page Code Monkey logo

robust-pdf-malware's Introduction

Robust PDF Malware

Project Goals

PDFs are one of the most popular formats to access documents, it is crucial that the level of security keeps up with their usage. This project introduces two approaches to analyzing the security of PDF documents: first, by creating adversarial examples of malicious PDFs (through noise injection) to spoof standard PDF malware detectors such as VirusTotal, and second, by fine-tuning ResNet18 to identify malicious PDFs based on their Markov plots.

Malicious PDFs that can bypass VirusTotal scanning (32/60 tools did not correctly classify the PDF as malicious)

In order to create a malicious PDF, you can use ./attacks/find_perturbable.ipynb. This notebook provides methods to find the areas in the PDF that can have noise injected, as well as methods to inject JavaScript attacks. The example in the notebook causes the Calculator app to be opened when the user opens the PDF.

ResNet18 Fine-Tuning

Using code in ./data/generate_dataset.py, create a .pkl file with the Markov plot data saved. This is demonstrated in cells 1-53 of ./finetune.ipynb. Once the datasets have been generated, use the code in ./resnet18_classifier.ipynb to train our fine-tuned version of ResNet to classify malicious and safe PDFs based on their Markov plots!

robust-pdf-malware's People

Contributors

rathull avatar theamandawang avatar neilk1317 avatar gwjm 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.