Go to file
2022-07-02 09:49:08 -07:00
docker add 32bit gcc support to docker 2019-05-13 20:59:05 +02:00
extra cda can live in extra 2019-04-15 22:04:07 -07:00
ida remove prints 2016-05-02 02:57:06 +09:00
middleware [qira_program] fix strace parsing (mmap files opened with openat syscall) 2020-12-09 06:50:39 +03:00
qira_tests print from tests, segfaults in travis-ci 2019-03-23 17:05:14 -07:00
static2 fix x64 rip relative instruction eval 2020-03-16 21:26:44 +03:00
tests_auto update static tests for python3 2019-03-23 21:52:42 -07:00
tests_manual Add example 32-bit and 64-bit Mach-O binaries to tests_manual. 2016-02-03 19:56:11 -05:00
tracers Merge pull request #230 from janbbeck/janbbeck-patch-1 2020-03-22 22:57:18 -07:00
web update socket.io 2022-07-02 09:49:08 -07:00
.gitignore switch qemu build to clone from github 2019-03-24 13:51:20 -07:00
.travis.yml little fix travis was failing on line 33 at install.sh 2016-03-25 02:22:44 +01:00
fetchlibs.sh wow i'm dumb, already supported 2016-05-01 18:34:49 +00:00
install.sh Updated install.sh to pip install python venv 2020-07-09 00:50:37 -04:00
LICENSE switch license to MIT, update links, prepare for 1.3 2019-03-22 21:04:28 -07:00
qira switch the default back to python2, minimal dockerfile 2019-03-24 14:09:51 -07:00
README.md Update README.md 2019-05-28 13:06:52 +00:00
requirements.txt qiradb depends on Cython, so it has to be installed afterward 2019-03-23 16:10:20 -07:00
run_tests_static.sh update run_tests_static 2015-08-27 07:17:06 +00:00
run_tests.sh update installer to warn about non linux 2019-03-24 14:46:15 -07:00
VERSION qiradb is no longer a module 2019-03-23 16:43:38 -07:00

QIRA

Build Status

  • QIRA is a competitor to strace and gdb
  • See http://qira.me/ for high level usage information
  • All QIRA code is released under MIT license
  • Other code in this repo released under its respective license

Supported OS

Ubuntu 14.04 and 16.04 supported out of the box.
18.04 is having a problem with building QEMU
See forked QEMU source at https://github.com/geohot/qemu/tree/qira to fix.

Non Linux hosts may run the rest of QIRA, but cannot run the QEMU tracer.
Very limited support for Mac OS X and Windows natively.
The Docker image in docker should work everywhere.

Installing release

See instructions on qira.me to install 1.3

Installing trunk

cd ~/
git clone https://github.com/geohot/qira.git
cd qira/
./install.sh

Installation Extras

  • ./fetchlibs.sh will fetch the libraries for i386, armhf, armel, aarch64, mips, mipsel, and ppc
  • ./tracers/pin_build.sh will install the QIRA PIN plugin, allowing --pin to work

Releases

  • v1.3 -- Update using pinned python packages
  • v1.2 -- Many many changes. Forced release due to v1.0 not working anymore.
  • v1.1 -- Support for names and comments. Static stuff added. Register colors.
  • v1.0 -- Perf is good! Tons of bugfixes. Quality software. http://qira.me/
  • v0.9 -- Function indentation. haddrline added (look familiar?). Register highlighting in hexdump.
  • v0.8 -- Intel syntax! Shipping CDA (cda a.out) and experimental PIN backend. Bugfixes. Windows support?
  • v0.7 -- DWARF support. Builds QEMU if distributed binaries don't work. Windows IDA plugin.
  • v0.6 -- Added changes before webforking. Highlight strace addresses. Default on analysis.
  • v0.5 -- Fixed regression in C++ database causing wrong values. Added PowerPC support. Added "A" button.
  • v0.4 -- Using 50x faster C++ database. strace support. argv and envp are there.
  • v0.3 -- Built in socat, multiple traces, forks (experimental). Somewhat working x86-64 and ARM support
  • v0.2 -- Removed dependency on mongodb, much faster. IDA plugin fixes, Mac version.
  • v0.1 -- Initial release

UI

At the top, you have 4 boxes, called the controls.
  Blue = change number, grey = fork number
  red = instruction address (iaddr), yellow = data address (daddr).

On the left you have the vtimeline, this is the full trace of the program.
  The top is the start of the program, the bottom is the end/current state.
  More green = deeper into a function.
  The currently selected change is blue, red is every passthrough of the current iaddr
  Bright yellow is a write to the daddr, dark yellow is a read from the daddr.
  This color scheme is followed everywhere.

Below the controls, you have the idump, showing instructions near the current change
Under that is the regviewer, datachanges, hexeditor, and strace, all self explanatory.

Mouse Actions

Click on vtimeline to navigate around. Right-click forks to delete them. Click on data (or doubleclick if highlightable) to follow in data. Right-click on instruction address to follow in instruction.

Keyboard Shortcuts in web/client/controls.js

j -- next invocation of instruction
k -- prev invocation of instruction

shift-j -- next toucher of data
shift-k -- prev toucher of data

m -- go to return from current function
, -- go to start of current function

z -- zoom out max on vtimeline

left  -- -1 fork
right -- +1 fork
up    -- -1 clnum
down  -- +1 clnum

esc -- back

shift-c -- clear all forks

n -- rename instruction
shift-n -- rename data
: -- add comment at instruction
shift-: -- add comment at data

g -- go to change, address, or name
space -- toggle flat/function view

p -- analyze function at iaddr
c -- make code at iaddr, one instruction
a -- make ascii at iaddr
d -- make data at iaddr
u -- make undefined at iaddr

Installation on Windows (experimental)

  • Install git and python 2.7.9
  • Run install.bat

Session state

clnum -- selected changelist number
forknum -- selected fork number
iaddr -- selected instruction address
daddr -- selected data address

cview -- viewed changelists in the vtimeline
dview -- viewed window into data in the hexeditor
iview -- viewed address in the static view

max_clnum -- max changelist number for each fork
dirtyiaddr -- whether we should update the clnum based on the iaddr or not
flat -- if we are in flat view

Static

QIRA static has historically been such a trash heap it's gated behind -S. QIRA should not be trying to compete with IDA.

User input and the actual traces of the program should drive creation of the static database. Don't try to recover all CFGs, only what ran.

The basic idea of static is that it exists at change -1 and doesn't change ever. Each address has a set of tags, including things like name.