Skip to content

Commit

Permalink
Merge pull request #115 from cdk-team/main-dev
Browse files Browse the repository at this point in the history
fix #114 (shim_pwn): a new log for debug, need to fix the bug in future
  • Loading branch information
neargle authored Feb 22, 2025
2 parents 2ed837a + ae411af commit b410542
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 b410542

Please sign in to comment.