GithubHelp home page GithubHelp logo

palmtree's Introduction

🌴PalmTree

This is the official repository for 🌴PalmTree, which is a pre-train Language model for assembly. We will actively update it. Currently supported platforms: x86

You can find pre-trained PalmTree model here

please consider citing our paper Xuezixiang Li, Yu Qu, and Heng Yin, "PalmTree: Learning an Assembly Language Model for Instruction Embedding", [CCS'2021]

@inproceedings{li2021palmtree,
  title={Palmtree: learning an assembly language model for instruction embedding},
  author={Li, Xuezixiang and Qu, Yu and Yin, Heng},
  booktitle={Proceedings of the 2021 ACM SIGSAC Conference on Computer and Communications Security},
  pages={3236--3251},
  year={2021}
}

Acknowledgement:

This implementation is based on bert-pytorch, we add our training tasks for CFGs and DFGs.

Requirements:

  • cuda >= 10.1
  • pytorch >= 1.3.1
  • binary ninja (optional, for dataset generation)

Updates

extrinsic evaluations

We released code for extrinsic evaluations.

Extrinsic evluations including:

  • Gemini
  • EKALVYA

intrinsic evaluations

Intrinsic evlautions including:

  • Opcode Outlier detection
  • Operand Outlier detection
  • Basicblock matching

Dataset generator

dataflow_gen.py: generate dataflow dataset for PalmTree model via Binary Ninja and Binary ninja mid-level IR. control_flow_gen.py: generate control flow dataset for PalmTree model using Binary Ninja API.

Dataset format

TXT files. Data-flow and control-flow graph will be sampled by random walk algorithm. And then splitted into instruction pairs. For a given instruction sequence

push rbp
mov rbp, rsp
sub rsp, 0x20

Two lines of instruction pairs will be generated:

push rbp    mov rbp rsp
mov rbp rsp sub rsp 0x20

In detail:

push\<SPACE\>rbp<\t>mov\<SPACE\>rbp\<SPACE\>rsp<\n>

TODO:

  • Support more binary tools (Ghidra, IDA pro, etc.)
  • Support Docker

palmtree's People

Contributors

sidekicklx avatar

Watchers

 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.