Add a CVE to the library.
Built a vulnerable target that works? Send it to us as a pull request. Here is what we need and how it goes.
Why contribute
The library grows one CVE at a time. If you have built a vulnerable target that others could use, we want it here.
You can add a new playbook, write the doc for one that has none, or fix a mistake in an old one. Small fixes count too.
Every contribution comes in as a pull request. We don't take files by email or chat.
What we accept
- A new Ansible playbook for a CVE, with its write-up.
- A write-up for an existing playbook that has no doc yet.
- Fixes for broken playbooks, wrong versions, typos or dead links.
- Translations of the site pages.
The one rule
This site and its write-ups cover how to get the vulnerable service running and confirm it is up. They stop there.
- No exploit code, PoCs, payloads or shellcode.
- No commands that trigger the bug.
- No step-by-step on how the attack works.
CVE IDs, product names and version numbers are fine. A PR that includes attack content will be asked to remove it before we merge.
How to send a PR
Fork the repo, make a branch, and add your files.
git clone https://github.com/YOUR-NAME/ansible.git cd ansible git checkout -b add-CVE-YYYY-NNNNN
- Build the playbook at
cve/cve-yyyy-nnnnn.yml. Use a lowercase file name. Put any service files or configs it copies incve/files/cve-yyyy-nnnnn/. - Start the playbook with the clean-base guard (see below).
- Add a
verifytag that checks the service is up and on the affected version. - Copy the write-up template and fill it in. Delete the comment at the top before you open the PR.
- Test it on a fresh
clean-basesnapshot. Run it, verify, restore, run it again. - Push your branch and open a pull request.
The guard stops the playbook if the VM already has a lab on it. It checks for /etc/lab-state and writes that marker before the build starts. Put it at the top of your playbook:
pre_tasks:
- name: Guard against a non-clean-base VM
import_tasks: _guard.yml
vars:
lab_cve: CVE-YYYY-NNNNN
Leave the guard without a tag. That way --tags verify skips it and the check still works on a VM that is already built.
git add . git commit -m "Add CVE-YYYY-NNNNN playbook and write-up" git push origin add-CVE-YYYY-NNNNN
The write-up template
Every CVE write-up follows the same shape, so the pages read the same. Use cve-writeup.md.
It has these parts, in this order:
- Front matter: CVE, title, product, version, severity, CVSS, type, difficulty, tags, added date, author. Add
githubif you want your name linked. - About this target: what the product is, what the CVE affects, and a small table with product, version, type, CVSS and port.
- Before you start: the base VM, the
ansiblerepo,base/bootstrap.yml, and aclean-basesnapshot. Add anything extra, like more RAM. - Run the playbook: what it installs and sets up, and the guard.
- Verify the target: the
verifytag and what the reader should see. - Files in the pull request
- What defenders can look for
- How it was fixed
- Reset
- References
- Credit
Keep sentences short and plain. Use exact commands and exact version numbers.
PR checklist
- Playbook runs clean from
clean-baseand ends withfailed=0. - The playbook starts with the clean-base guard, and the guard has no tag.
- A second run on a used VM fails and names the lab already installed.
- The
verifytag passes and printstarget OK. - Files sit at
cve/cve-yyyy-nnnnn.ymlandcve/files/cve-yyyy-nnnnn/. - Write-up uses the template, the top comment is deleted, and there is no attack content.
- The write-up has the defenders, fix, reset and references sections filled in.
- Product, version and CVSS match the NVD entry.
- Inventory file, host IP and snapshot name match the get-started steps.
- The
authorfield is set to your name.
What happens next
A maintainer reads your PR, builds the playbook on a clean VM, and leaves comments if something needs a change. Once it passes, we merge it and the CVE shows up in the library.
Reviews can take a few days. If nobody has replied after a week, leave a comment on the PR.
Credit
Your name goes on the CVE page under Credit. Write-ups the core team wrote show TheHackingMachine Team. Everything else shows the name in the author field.