qira/README.md

148 lines
4.8 KiB
Markdown
Raw Normal View History

# QIRA
2019-03-24 06:32:31 +03:00
[![Build Status](https://travis-ci.org/geohot/qira.svg?branch=master)](https://travis-ci.org/geohot/qira)
2015-02-23 01:32:26 +03:00
* 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
2019-03-25 00:56:39 +03:00
## Supported OS
<pre>
Ubuntu 14.04 and 16.04 supported out of the box.
18.04 is having a problem with building QEMU
2019-03-25 01:08:58 +03:00
See forked QEMU source at https://github.com/geohot/qemu/tree/qira to fix.
2019-03-25 00:56:39 +03:00
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.
2019-03-25 00:58:26 +03:00
The Docker image in docker should work everywhere.
2019-03-25 00:56:39 +03:00
</pre>
2015-02-23 01:32:26 +03:00
## Installing release
See instructions on [qira.me](http://qira.me/) to install 1.3
2015-02-23 01:32:26 +03:00
## Installing trunk
2014-07-23 23:55:20 +04:00
2015-02-23 01:32:26 +03:00
<pre>
2015-02-16 22:56:52 +03:00
cd ~/
2018-03-14 21:35:12 +03:00
git clone https://github.com/geohot/qira.git
2015-02-16 22:56:52 +03:00
cd qira/
./install.sh
2015-02-23 01:32:26 +03:00
</pre>
2014-08-21 20:54:14 +04:00
2015-02-23 01:32:26 +03:00
## Installation Extras
2014-08-21 20:54:14 +04:00
* ./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
2014-07-23 23:55:20 +04:00
2014-09-13 19:15:57 +04:00
2015-02-23 01:32:26 +03:00
## Releases
2014-09-11 18:33:38 +04:00
* v1.3 -- Update using pinned python packages
2016-01-31 02:18:38 +03:00
* v1.2 -- Many many changes. Forced release due to v1.0 not working anymore.
2015-02-23 01:32:26 +03:00
* 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?
2015-02-23 01:32:26 +03:00
* 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
2015-02-23 01:32:26 +03:00
* v0.2 -- Removed dependency on mongodb, much faster. IDA plugin fixes, Mac version.
* v0.1 -- Initial release
2014-08-10 23:18:28 +04:00
2014-09-13 19:15:57 +04:00
2015-02-23 01:32:26 +03:00
## UI
2014-08-15 10:34:17 +04:00
2015-02-23 01:32:26 +03:00
<pre>
2014-08-15 10:34:17 +04:00
At the top, you have 4 boxes, called the controls.
Blue = change number, grey = fork number
red = instruction address (iaddr), yellow = data address (daddr).
2014-08-15 10:34:17 +04:00
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.
2014-08-15 10:34:17 +04:00
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.
2015-02-23 01:32:26 +03:00
</pre>
2014-08-15 10:34:17 +04:00
2015-02-23 01:32:26 +03:00
## 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.
2014-07-23 23:55:20 +04:00
2015-02-23 01:32:26 +03:00
## Keyboard Shortcuts in web/client/controls.js
<pre>
2014-07-31 23:27:16 +04:00
j -- next invocation of instruction
k -- prev invocation of instruction
2014-11-23 03:43:40 +03:00
shift-j -- next toucher of data
shift-k -- prev toucher of data
2014-07-31 23:27:16 +04:00
2014-08-18 23:45:27 +04:00
m -- go to return from current function
, -- go to start of current function
2014-07-31 23:27:16 +04:00
z -- zoom out max on vtimeline
left -- -1 fork
right -- +1 fork
up -- -1 clnum
down -- +1 clnum
esc -- back
2014-07-19 01:49:35 +04:00
2014-08-10 19:32:35 +04:00
shift-c -- clear all forks
n -- rename instruction
shift-n -- rename data
: -- add comment at instruction
shift-: -- add comment at data
2014-09-12 22:01:06 +04:00
g -- go to change, address, or name
2014-11-29 00:11:03 +03:00
space -- toggle flat/function view
2014-09-09 19:36:01 +04:00
2014-12-09 23:04:36 +03:00
p -- analyze function at iaddr
2014-11-23 03:25:48 +03:00
c -- make code at iaddr, one instruction
a -- make ascii at iaddr
d -- make data at iaddr
2014-11-29 00:11:03 +03:00
u -- make undefined at iaddr
2015-02-23 01:32:26 +03:00
</pre>
2014-08-10 23:18:28 +04:00
2015-02-23 01:32:26 +03:00
## Installation on Windows (experimental)
2015-02-23 01:17:34 +03:00
2015-02-23 01:32:26 +03:00
* Install git and python 2.7.9
* Run install.bat
2014-08-10 23:18:28 +04:00
2014-09-16 18:22:22 +04:00
2015-02-23 01:32:26 +03:00
## Session state
<pre>
clnum -- selected changelist number
forknum -- selected fork number
iaddr -- selected instruction address
daddr -- selected data address
2014-09-16 18:22:22 +04:00
cview -- viewed changelists in the vtimeline
dview -- viewed window into data in the hexeditor
iview -- viewed address in the static view
2014-09-16 18:22:22 +04:00
max_clnum -- max changelist number for each fork
dirtyiaddr -- whether we should update the clnum based on the iaddr or not
2014-09-16 18:22:22 +04:00
flat -- if we are in flat view
</pre>
2014-09-16 18:22:22 +04:00
2019-03-24 07:08:20 +03:00
## 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.