Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add dvkm example #237

Merged
merged 2 commits into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions deploy/intellabs/kafl/roles/examples/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
examples_url: https://github.com/IntelLabs/kafl.targets
examples_root: "{{ kafl_install_root }}/examples"

dvkm_sub_path: linux-user/dvkm/Damn_Vulnerable_Kernel_Module
linux_agent_sub_path: linux-user/linux_kafl_agent
15 changes: 15 additions & 0 deletions deploy/intellabs/kafl/roles/examples/tasks/dvkm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
- name: Install required packages
ansible.builtin.apt:
# required for lddtree
name: pax-utils
become: true

- name: Clone required submodules
ansible.builtin.command: >-
"git submodule update --init --depth 200
--jobs {{ ansible_processor_nproc }}
{{ dvkm_sub_path }}
{{ linux_agent_sub_path }}"
# noqa: command-instead-of-module
args:
chdir: "{{ examples_root }}"
4 changes: 4 additions & 0 deletions deploy/intellabs/kafl/roles/examples/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@
- name: Import template windows tasks
ansible.builtin.import_tasks: template_windows.yml
when: "'examples-template-windows' in ansible_run_tags"

- name: Import dvkm tasks
ansible.builtin.import_tasks: dvkm.yml
when: "'examples-linux-dvkm' in ansible_run_tags"
2 changes: 1 addition & 1 deletion docs/source/reference/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ They can be toggled or skipped with the [`--tags`](https://docs.ansible.com/ansi
| `build` | Selects all tasks where a component can be rebuild (`QEMU`, `libxdc`, etc ...). Developer oriented tag. |
| `clone` | Selects all tasks where a repository is cloned. Developer oriented tag. |
| `examples-template-windows` | Installs the required tooling to build the Windows template and run the examples. (Packer, Vagrant, agrant-plugins, qemu-bridge-helper, ...) |

| `examples-dvkm` | Installs the required packages and submodules to use the Damn Vulnerable Kernel Module linux example |

:::{note}
You can list available tags with
Expand Down