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)
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
2023-05-17 11:09:58 +00:00
*out-of-tree* is the kernel {module, exploit} development tool.
2018-10-05 07:47:49 +00:00
2023-05-17 11:09:58 +00:00
*out-of-tree* was created to reduce the complexity of the environment for developing, testing and debugging Linux kernel exploits and out-of-tree kernel modules (hence the name "out-of-tree").
2019-08-21 08:08:35 +00:00
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/))
2023-05-17 11:09:58 +00:00
apt install podman || dnf install podman
curl -L https://nixos.org/nix/install | sh
# stable
nix-env -iA nixpkgs.out-of-tree
# latest
nix build --extra-experimental-features 'nix-command flakes' git+https://code.dumpstack.io/tools/out-of-tree
2019-12-28 08:50:10 +00:00
2019-12-27 07:12:09 +00:00
### macOS
2023-04-07 19:11:42 +00:00
Note: case-sensitive FS is required for the ~/.out-of-tree directory.
2023-04-07 19:08:32 +00:00
$ brew install podman
$ podman machine stop || true
$ podman machine rm || true
$ podman machine init --cpus=4 --memory=4096 -v $HOME:$HOME
$ podman machine start
2023-04-06 23:18:47 +00:00
$ brew tap out-of-tree/repo
2019-12-27 07:12:09 +00:00
$ brew install out-of-tree
2019-12-27 08:30:44 +00:00
Read [documentation ](https://out-of-tree.readthedocs.io ) for further info.
2019-12-27 08:25:55 +00:00
2018-10-27 15:00:41 +00:00
## Examples
2023-04-06 23:32:02 +00:00
Generate all Ubuntu 22.04 kernels:
2018-10-27 17:37:58 +00:00
2023-04-06 23:32:02 +00:00
$ out-of-tree kernel genall --distro=Ubuntu --ver=22.04
2018-10-27 17:37:58 +00:00
2023-04-06 23:32:02 +00:00
Run tests based on .out-of-tree.toml definitions:
2018-10-27 15:00:41 +00:00
2023-05-17 11:09:58 +00:00
$ out-of-tree pew
2018-10-27 15:33:54 +00:00
2023-04-06 23:32:02 +00:00
Test with a specific kernel:
2018-10-27 20:07:52 +00:00
2023-04-06 23:32:02 +00:00
$ out-of-tree pew --kernel='Ubuntu:5.4.0-29-generic'
2018-10-27 15:33:54 +00:00
2023-04-06 23:32:02 +00:00
Run debug environment:
2018-12-01 17:05:40 +00:00
2023-04-06 23:32:02 +00:00
$ out-of-tree debug --kernel='Ubuntu:5.4.0-29-generic'