GithubHelp home page GithubHelp logo

montyly / gueb Goto Github PK

View Code? Open in Web Editor NEW
236.0 236.0 50.0 11.02 MB

Home Page: https://tel.archives-ouvertes.fr/tel-01681707v2/document

License: MIT License

Python 2.14% Makefile 0.08% OCaml 97.78%

gueb's People

Contributors

montyly avatar

Stargazers

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

Watchers

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

gueb's Issues

Compile error

when I compile on my ubuntu . It shows :

ocamlfind ocamlc -package piqirun.ext,piqilib,unix -c graph.ml
File "graph.ml", line 418, characters 30-44:
Error: Unbound value List.sort_uniq
OCamlMakefile:1076: recipe for target 'graph.cmo' failed
make[1]: *** [graph.cmo] Error 2
make[1]: Leaving directory '/home/zwjj/gueb/src'
OCamlMakefile:761: recipe for target 'byte-code' failed
make: *** [byte-code] Error 2

How to solve this problem ?

I got error when doing make piqi

~/Downloads/RESEARCH/Lab_ubuntu/gith/RES_NEW/gueb/src$ export PATH=$PATH:~/.opam/system/bin/ && make
make[1]: Entering directory '/home/a967a038/Downloads/RESEARCH/Lab_ubuntu/gith/RES_NEW/gueb/src'
ocamlfind ocamldep gueb.ml > ._d/gueb.d
ocamlfind ocamldep graph.ml > ._d/graph.d
ocamlfind ocamldep uafgroupbyuse.ml > ._d/uafgroupbyuse.d
ocamlfind ocamldep uafgroupbyalloc.ml > ._d/uafgroupbyalloc.d
ocamlfind ocamldep uafgroupbyfree.ml > ._d/uafgroupbyfree.d
ocamlfind ocamldep uafastree.ml > ._d/uafastree.d
ocamlfind ocamldep uafgenerique.ml > ._d/uafgenerique.d
ocamlfind ocamldep stubfunc.ml > ._d/stubfunc.d
ocamlfind ocamldep reil.ml > ._d/reil.d
ocamlfind ocamldep ir.ml > ._d/ir.d
ocamlfind ocamldep absenv3notop.ml > ._d/absenv3notop.d
ocamlfind ocamldep absenv2notop.ml > ._d/absenv2notop.d
ocamlfind ocamldep absenvnotop.ml > ._d/absenvnotop.d
ocamlfind ocamldep absenv3.ml > ._d/absenv3.d
ocamlfind ocamldep absenv2.ml > ._d/absenv2.d
ocamlfind ocamldep absenv.ml > ._d/absenv.d
ocamlfind ocamldep absenvgenerique.ml > ._d/absenvgenerique.d
ocamlfind ocamldep gueb_type.ml > ._d/gueb_type.d
ocamlfind ocamldep program_piqi.ml > ._d/program_piqi.d
ocamlfind ocamlopt -package piqirun.ext,piqilib,unix -c -w A -warn-error A program_piqi.ml
File "program_piqi.ml", line 62, characters 25-48:
62 | let rec parse_uint64 x = Piqirun.int64_of_varint x
                              ^^^^^^^^^^^^^^^^^^^^^^^
Error: Unbound module Piqirun
make[1]: *** [OCamlMakefile:1076: program_piqi.cmx] Error 2
make[1]: Leaving directory '/home/a967a038/Downloads/RESEARCH/Lab_ubuntu/gith/RES_NEW/gueb/src'
make: *** [OCamlMakefile:777: native-code] Error 2

how do i fix this?

GUEB OVA ?

Hi!

I found that the gueb ova link is broken.

Is it possible to reupload it ?

Thanks!

gueb on vm or vagrant

Hello there . I am looking for a version of gueb in top of vargrant or virtualbox. the equivalent paper on gueb mentioned a ready to use vm for gueb but I could not find that .
How can I find one ready to use or already configured (ex, docker) version of gueb?

Best
Arash

Add support for radare2

radare2 has it's own IL - ESIL, but it can be converted into REIL, using 'aetr' command. Or there is another option - to reuse radecoIL from radeco-lib.

VM

Hi,
can you please reupload the VM with gueb installed?
Thank you

Problems installing dependency piqilib 0.6.6

Hi,

I was following the installation instructions using debian testing with ocaml 4.02.3 and wasn't able to build piqilib. I did a opam switch 4.02.1 and retried, but still no luck.

I'm currently stuck with the following error:

### stdout ###
# for dir in piqilib src; do \
# [...]
# done
# make[1]: Entering directory '/home/daniel/.opam/4.02.1/build/piqilib.0.6.6/piqilib'
# echo "let version = \"`head -1 ../VERSION`\"" >piqi_version.ml
# echo "version = \"`head -1 ../VERSION`\"" >META
# cat META.in >>META
# ocamlfind ocamlc -package ulex,easy-format,xmlm -c -pp "camlp4orf " -I +camlp4 pa_labelscope.ml
# /home/daniel/.opam/4.02.1/build/piqilib.0.6.6/make/OCamlMakefile:1065: recipe for target 'pa_labelscope.cmo' failed
# make[1]: Leaving directory '/home/daniel/.opam/4.02.1/build/piqilib.0.6.6/piqilib'
# /home/daniel/.opam/4.02.1/build/piqilib.0.6.6/make/Makefile.dirs:7: recipe for target 'dirs' failed
### stderr ###
# [...]
# File "pa_labelscope.ml", line 29, characters 17-22:
# While expanding quotation "expr" in a position of "expr":
#   Parse error: illegal begin of quotation of expression
#
# File "pa_labelscope.ml", line 1:
# Error: Error while running external preprocessor
# Command line: camlp4orf  'pa_labelscope.ml' > /tmp/ocamlppdafaae
#
# make[1]: *** [pa_labelscope.cmo] Error 2
# make: *** [dirs] Error 2

opam list has the following packages installed:

base-bigarray    base  Bigarray library distributed with the OCaml compiler
base-bytes       base  Bytes library distributed with the OCaml compiler
base-threads     base  Threads library distributed with the OCaml compiler
base-unix        base  Unix library distributed with the OCaml compiler
camlp4         4.02+6  Camlp4 is a system for writing extensible parsers for programming languages
cmdliner        0.9.8  Declarative definition of command line interfaces for OCaml
depext          0.9.0  Query and install external dependencies of OPAM packages
easy-format     1.2.0  High-level and functional interface to the Format module of the OCaml standard library
ocamlbuild          0  Build system distributed with the OCaml compiler since OCaml 3.10.0
ocamlfind       1.5.6  A library manager for OCaml
optcomp           1.6  Optional compilation with cpp-like directives
ulex              1.1  lexer generator for Unicode and OCaml
xmlm            1.2.0  Streaming XML codec for OCaml

there is already an outstanding bug at alavrik/piqi#52, also someone else had the problem with BAP & piqi (BinaryAnalysisPlatform/bap#323), the piqi project does not seem active anymore?

Any other version of ocaml I can switch to to get this working?

Thanks!

Export error

Hi montyly,

(sorry, couldn't think of a better title)

on a fresh installed VM, I have a rather strange problem with the export GUI

Setup:

  • debian experimental
  • ocaml/opam/building went all fine
  • tried both openjdk8 and oracle-jdk 1.8_101 (build and installed with make-jpkg)
  • tried both jython 2.5.x (distro) and self-installed jython 2.7.0
  • python2.7
  • tried with both binnavi 6.0 and 6.1 (binnavi-all.jar)
  • tried with both protobuf-3.0.0-pre (shipped) and protobuf-3.0.0-release
  • a sample test case (malloc + free, compiled with gcc 6.1.1, imported into binnavi 6.0.0 via IDA Pro)

in Gueb Export:

  • Loaded module "malloc"
  • Select only malloc as alloc func
  • Select only free as free func

When done, I get the following error & stack-trace:

[...]
Module selected malloc
Start exporting
_init_proc
-----^-------- this is what's bothering me
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException: IE02052: Instruction argument can not be null
        at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:226)
        at com.google.security.zynamics.binnavi.REIL.InstructionFinders.findInstruction(InstructionFinders.java:97)
        at com.google.security.zynamics.binnavi.API.disassembly.Function.getReilCode(Function.java:337)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:186)
        at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:204)
        at org.python.core.PyObject.__call__(PyObject.java:461)
        at org.python.core.PyObject.__call__(PyObject.java:465)
        at org.python.core.PyMethod.__call__(PyMethod.java:126)
        at export_protobuf$py.exportLib$1(/home/daniel/gueb/export/export_protobuf.py:107)
                                nevermind the line#, this is "p.addFunctions(func)" ----^
        at export_protobuf$py.call_function(/home/daniel/gueb/export/export_protobuf.py)
        at org.python.core.PyTableCode.call(PyTableCode.java:167)
        at org.python.core.PyBaseCode.call(PyBaseCode.java:170)
        at org.python.core.PyFunction.__call__(PyFunction.java:434)
        at export_protobuf$py.export_mod$10(/home/daniel/gueb/export/export_protobuf.py:211)
        at export_protobuf$py.call_function(/home/daniel/gueb/export/export_protobuf.py)
        at org.python.core.PyTableCode.call(PyTableCode.java:167)
        at org.python.core.PyBaseCode.call(PyBaseCode.java:170)
        at org.python.core.PyFunction.__call__(PyFunction.java:434)
        at org.python.pycode._pyx0.listSelect$2(gui.py:28)
        at org.python.pycode._pyx0.call_function(gui.py)
        at org.python.core.PyTableCode.call(PyTableCode.java:167)
        at org.python.core.PyBaseCode.call(PyBaseCode.java:307)
        at org.python.core.PyBaseCode.call(PyBaseCode.java:198)
        at org.python.core.PyFunction.__call__(PyFunction.java:482)
        at org.python.core.PyMethod.instancemethod___call__(PyMethod.java:237)
        at org.python.core.PyMethod.__call__(PyMethod.java:228)
        at org.python.core.PyMethod.__call__(PyMethod.java:223)
        at org.python.core.PyCompoundCallable.__call__(PyCompoundCallable.java:26)
        at org.python.core.PyObject.__call__(PyObject.java:431)
        at org.python.core.PyObject._jcallexc(PyObject.java:3626)
        at org.python.core.PyObject._jcall(PyObject.java:3658)
        at org.python.proxies.java.awt.event.ActionListener.actionPerformed(Unknown Source)
        at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
        at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
        at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
        at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
        at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
        at java.awt.Component.processMouseEvent(Component.java:6533)
        at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
        at java.awt.Component.processEvent(Component.java:6298)
        at java.awt.Container.processEvent(Container.java:2236)
        at java.awt.Component.dispatchEventImpl(Component.java:4889)
        at java.awt.Container.dispatchEventImpl(Container.java:2294)
        at java.awt.Component.dispatchEvent(Component.java:4711)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
        at java.awt.Container.dispatchEventImpl(Container.java:2280)
        at java.awt.Window.dispatchEventImpl(Window.java:2746)
        at java.awt.Component.dispatchEvent(Component.java:4711)
        at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
        at java.awt.EventQueue.access$500(EventQueue.java:97)
        at java.awt.EventQueue$3.run(EventQueue.java:709)
        at java.awt.EventQueue$3.run(EventQueue.java:703)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
        at java.awt.EventQueue$4.run(EventQueue.java:731)
        at java.awt.EventQueue$4.run(EventQueue.java:729)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

I don't think _init_proc should be in here at all if it wasn't selected? Or did I get lost somehow interpreting this error?

Any pointer in the right direction would be greatly appreciated, thanks!

exceptions testing any binary

Hello Montyly,

I've been testing gueb using your public VM and installed everything on a new one. Seems to work everything, IDA 6.9 with Binnavi 6.1 (latest) and binexport 6 (latest). Using your example seems to be working fine, but gui.py fails with any binary. For example /bin/echo, from ubuntu 32-bit build.

Unknown mnemonic: ud2
Unknown mnemonic: ud2
sub_10F63
Exception in thread "AWT-EventQueue-0" at com.google.security.zynamics.binnavi.API.disassembly.Function.getReilCode(Function.java:337)
at sun.reflect.GeneratedMethodAccessor33.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)

com.google.security.zynamics.binnavi.API.reil.InternalTranslationException: com.google.security.zynamics.binnavi.API.reil.InternalTranslationException: com.google.security.zynamics.reil.translators.InternalTranslationException: Error: The operands of SBB instructions must have equal size

I don't know if you're familiar with this exception. I'm using Binnavi 6.1 release binnavi-all.jar.

Thank you

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.