Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var PatchCmd = &cobra.Command{ Use: "patch", Short: "Patch the specified function", Long: ``, Run: func(cmd *cobra.Command, args []string) { if ppid { fmt.Printf("PPID: %d\n", os.Getppid()) os.Exit(0) } if pid == 0 { cmd.Help() fmt.Println("\n[!] Required flag \"pid\" not set") os.Exit(0) } m := strings.ToLower(method) if m == "amsi" { err := PatchAmsi(pid) if err != nil { fmt.Println(err) os.Exit(1) } fmt.Printf("Successfully patched AMSI.AmsiOpenSession in remote process with PID: %d\n", pid) } else if m == "etw" { err := PatchETW(pid) if err != nil { fmt.Println(err) os.Exit(1) } fmt.Printf("Successfully patched NTDLL.EtwEventWrite in remote process with PID: %d\n", pid) } else { fmt.Printf("Invalid method provided: %s\n", method) } }, }
PatchCmd represents the patch command
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.