1
0
Fork 0
out-of-tree/README.md

84 lines
3.1 KiB
Markdown
Raw Normal View History

2019-06-20 10:11:30 +00:00
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/aba4aad2046b4d1a9a99cf98e22c018b)](https://app.codacy.com/app/jollheef/out-of-tree?utm_source=github.com&utm_medium=referral&utm_content=jollheef/out-of-tree&utm_campaign=Badge_Grade_Dashboard)
2019-02-02 21:24:29 +00:00
[![Go Report Card](https://goreportcard.com/badge/code.dumpstack.io/tools/out-of-tree)](https://goreportcard.com/report/code.dumpstack.io/tools/out-of-tree)
2019-08-16 20:51:45 +00:00
[![Documentation Status](https://readthedocs.org/projects/out-of-tree/badge/?version=latest)](https://out-of-tree.readthedocs.io/en/latest/?badge=latest)
2019-08-18 18:00:29 +00:00
[![Donate](https://img.shields.io/badge/donate-paypal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=R8W2UQPZ5X5JE&source=url)
[![Donate](https://img.shields.io/badge/donate-bitcoin-green.svg)](https://blockchair.com/bitcoin/address/bc1q23fyuq7kmngrgqgp6yq9hk8a5q460f39m8nv87)
2018-10-05 07:47:49 +00:00
2018-12-02 02:29:58 +00:00
# [out-of-tree](https://out-of-tree.io)
2018-12-02 00:27:07 +00:00
2018-10-05 07:47:49 +00:00
out-of-tree kernel {module, exploit} development tool
2019-08-21 08:08:35 +00:00
out-of-tree is for automating some routine actions for creating development environments for debugging kernel modules and exploits, generating reliability statistics for exploits, and also provides the ability to easily integrate into CI (Continuous Integration).
2018-11-19 19:39:03 +00:00
![Screenshot](https://cloudflare-ipfs.com/ipfs/Qmb88fgdDjbWkxz91sWsgmoZZNfVThnCtj37u3mF2s3T3T)
2018-10-08 19:35:54 +00:00
2019-12-27 07:12:09 +00:00
## Installation
### GNU/Linux (with [Nix](https://nixos.org/nix/))
2019-12-27 08:18:45 +00:00
$ curl -fsSL https://get.docker.com | sh
2019-12-27 08:25:55 +00:00
$ sudo usermod -aG docker user && newgrp docker
2019-12-27 07:12:09 +00:00
$ curl https://nixos.org/nix/install | sh
$ nix-env -iA nixpkgs.out-of-tree
2019-12-28 08:50:10 +00:00
Note that adding a user to group *docker* has serious security implications. Check Docker documentation for more information.
2019-12-27 07:12:09 +00:00
### macOS
2019-12-27 08:18:45 +00:00
$ brew cask install docker
$ open --background -a Docker && sleep 1m
2019-12-27 07:12:09 +00:00
$ brew tap jollheef/repo
$ brew install out-of-tree
Read [documentation](https://out-of-tree.readthedocs.io) for further info.
2019-12-27 08:25:55 +00:00
## Examples
2018-10-27 17:37:58 +00:00
Run by absolute path
$ out-of-tree --path /path/to/exploit/directory pew
Test only with one kernel:
$ out-of-tree pew --kernel='Ubuntu:4.10.0-30-generic'
2018-10-27 15:33:54 +00:00
2018-11-25 14:46:29 +00:00
Run debug environment:
$ out-of-tree debug --kernel='Ubuntu:4.10.0-30-generic'
2018-10-27 20:07:52 +00:00
Test binary module/exploit with implicit defined test ($BINARY_test)
$ out-of-tree pew --binary /path/to/exploit
Test binary module/exploit with explicit defined test
$ out-of-tree pew --binary /path/to/exploit --test /path/to/exploit_test
2018-10-27 15:33:54 +00:00
Guess work kernels:
$ out-of-tree pew --guess
2018-10-27 17:37:58 +00:00
Use custom kernels config
$ out-of-tree --kernels /path/to/kernels.toml pew
Generate all kernels
2018-12-01 17:16:34 +00:00
$ out-of-tree kernel genall --distro Ubuntu --ver 16.04
2018-12-01 17:16:34 +00:00
2019-08-20 21:55:40 +00:00
## Troubleshooting
If anything happens that you cannot solve -- just remove `$HOME/.out-of-tree`.
But it'll be better if you'll write the bug report.
## Development
Read [Qemu API](qemu/README.md).
### Generate images
2019-02-02 21:24:29 +00:00
$ cd $GOPATH/src/code.dumpstack.io/tools/out-of-tree/tools/qemu-debian-img/
$ docker run --privileged -v $(pwd):/shared -e IMAGE=/shared/ubuntu1404.img -e RELEASE=trusty -t gen-ubuntu1804-image
$ docker run --privileged -v $(pwd):/shared -e IMAGE=/shared/ubuntu1604.img -e RELEASE=xenial -t gen-ubuntu1804-image