Browse Source

Implements fallback to default test for kernel exploit

tags/v0.2
dump_stack() 1 year ago
parent
commit
a0c9a8f8e6
1 changed files with 7 additions and 0 deletions
  1. 7
    0
      pew.go

+ 7
- 0
pew.go View File

@@ -212,6 +212,13 @@ func whatever(swg *sizedwaitgroup.SizedWaitGroup, ka config.Artifact,
log.Println("copy file err", err)
// we should not exit because of testing 'insmod' part
// for kernel module
if ka.Type == config.KernelExploit {
log.Println("Use `echo touch FILE | exploit` for test")
q.Command("user",
"echo -e '#!/bin/sh\necho touch $2 | $1' "+
"> "+remoteTest+
" && chmod +x "+remoteTest)
}
}

_, err = q.Command("root", "chmod +x "+remoteTest)

Loading…
Cancel
Save