1
0

Implements kernel debug environment

This commit is contained in:
2018-11-25 14:46:29 +00:00
parent 29dbe09a94
commit b6dc7e892f
3 changed files with 154 additions and 0 deletions

View File

@@ -64,6 +64,10 @@ func main() {
genExploitCommand := genCommand.Command("exploit",
"Generate .out-of-tree.toml skeleton for kernel exploit")
debugCommand := app.Command("debug", "Kernel debug environment")
debugCommandFlag := debugCommand.Flag("kernel", "Regex (first match)")
debugKernel := debugCommandFlag.Required().String()
// Check for required commands
for _, cmd := range []string{"timeout", "docker", "qemu"} {
_, err := exec.Command("which", cmd).CombinedOutput()
@@ -89,6 +93,8 @@ func main() {
err = genConfig(config.KernelModule)
case genExploitCommand.FullCommand():
err = genConfig(config.KernelExploit)
case debugCommand.FullCommand():
err = debugHandler(kcfg, *path, *debugKernel, *dockerTimeout)
}
if err != nil {