Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adds Dalvik VM/DEX support #976

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions oasis/dalvik
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Flag mips
Description: Build Dalvik/DEX lifter
Default: true

Library mips_plugin
XMETADescription: provide Dalvik/DEX lifter
Path: plugins/dalvik
FindlibName: bap-plugin-dalvik
Build$: flag(everything) || flag (dalvik)
BuildDepends: bap, bap-abi, bap-c, bap-core-theory
InternalModules:
Dalvik,
Dalvik_disasm,
Dalvik_dex,
Dalvik_java,
Dalvik_lifter

XMETAExtraLines: tags="dalvik,lifter,arch,abi"
12 changes: 12 additions & 0 deletions plugins/dalvik/dalvik.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
open Core_kernel
open Bap_core_theory
open KB.Syntax

let package = "dalvik"

let () = Project.Input.register_loader "dex" @@ fun filename ->
let empty = Memmap.empty in
let prog = prog_of_dex filename in
Project.Input.create `dalvik filename ~code:empty ~data:empty
~finish:(fun proj -> Project.with_program prog)

Loading