01 / INFRASTRUCTURE
An app image covers only part of the stack
Applications fit into images. Host-side Docker, Kubernetes, and the shared kernel still need preparation. Metarget brings these layers into scenario construction.
CLOUD NATIVE SECURITY
Bring specific Docker, Kubernetes, and Linux versions together with application targets. Metarget is an open source project I created while working at NSFOCUS Xingyun Lab, helping practitioners prepare environments for cloud native security testing.
INDUSTRY / OPEN SOURCE · ORIGINAL ENVIRONMENT DIAGRAM
NSFOCUS / Xingyun Lab
Reusable scenario definitions
Open code, shared scenarios
Project talk at OpenInfra Days Asia
Testing a vulnerability may be quick. Finding versions, installing components, and configuring a suitable system can take much longer across a cloud native stack.
01 / INFRASTRUCTURE
Applications fit into images. Host-side Docker, Kubernetes, and the shared kernel still need preparation. Metarget brings these layers into scenario construction.
02 / TEST CONDITIONS
Specific versions, privileged Pods, and sensitive mounts all define test conditions. Scenario definitions express their class and dependencies for the appropriate installer or deployer.
03 / COMPOSITION & REUSE
Layer application targets onto prepared infrastructure to form a multilayer environment. Named scenarios can be reused for reproductions, security training, and defensive validation.
Switch between kernel, runtime, Kubernetes, and privileged Pod scenarios. Inspect the recipe, dependencies, and target layer. Click a construction step or an environment layer to learn more.
name: cve-2022-0847
class: kernel
type: container_escape
dependencies:
- name: kernel
version: "5.8"
Read the YAML for CVE-2022-0847 from the scenario directory. Its name, class, and dependencies describe a recipe the tool can process.
CORRESPONDING CLI COMMAND / DISPLAY ONLY
./metarget cnv install cve-2022-0847Containers share the host kernel. Kernel scenarios require the specified kernel packages and a reboot into the target version.
Prerequisites
A compatible Ubuntu release; root; reboot after installation
Recipe output
The specified kernel packages and boot configuration
Original demonstration based on repository YAML and installer/deployer code. The browser displays recipes and flow without installing components or running a PoC. Preparing an environment and triggering a vulnerability are separate steps. cnv.py ↗ · kernel_installer.py ↗
Scenario names are entry points; versions and resource manifests guide preparation. Version tasks go to installers, while configuration and application tasks go to the Kubernetes resource deployer.
Choose a known component version to prepare the base environment. Docker, Kubernetes, or the kernel can also be managed individually.
Load YAML from vulns_cn and dispatch by class. Install specified component versions or deploy Pods with risky configurations and mounts.
Read the resources listed in an application’s desc.yaml and apply them to an existing cluster. The --external option generates a NodePort configuration.
Scenario definitions are read with YAML SafeLoader; the deployer creates the metarget namespace before applying resources. Implementations: vuln_loader.py ↗ · internal.py ↗
Select a scenario to inspect its declared dependencies and prerequisites. These are eight selected repository recipes; the visualization does not validate a live installation.
Showing 8 selected recipes / 8 examples; not the full repository catalog
SCENARIO RECIPE / SOURCE SNAPSHOT
The recipe installs Docker 18.03.1 to prepare a runtime for studying the runC container escape. It does not declare a separate runc package dependency.
Recipes and code checked on 2026-10-10, using source snapshot 3cd1d62 ↗. Declared versions do not guarantee installation on every system. Distribution, package sources, images, and reboot requirements still apply.
Metarget: Auto-Construction of Vulnerable Cloud Native Infrastructure. The industry talk at OpenInfra Days Asia 2021 presents the project, practical scenarios, and defensive value. The write-up and repository document its design and usage.
Real deployment changes system components and requires root access. Use a dedicated test environment and follow the repository’s guidance on system versions and isolation.
./metarget cnv install cve-2019-5736 ./metarget cnv install cve-2018-1002105 ./metarget cnv install privileged-container ./metarget appv install dvwa --external
Four commands selected from the README’s multilayer example prepare the runtime, orchestration, a configured Pod, and an application. Real deployment requires checking the system and each step’s prerequisites; these commands do not execute exploits.