exploit

package
v1.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 12, 2023 License: Apache-2.0 Imports: 40 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultFolderPerm = 0755

Variables

View Source
var K8sDeploymentsAPI = "/apis/apps/v1/namespaces/default/deployments"
View Source
var K8sMitmPayloadDeploy = `` /* 908-byte string literal not displayed */
View Source
var K8sMitmPayloadSvc = `` /* 447-byte string literal not displayed */
View Source
var K8sServicesApi = "/api/v1/namespaces/default/services"

Functions

func AllDiskMount

func AllDiskMount() (error, []string)

print all device and mount them to random path under /tmp

func CapDacReadSearchExploit added in v1.0.2

func CapDacReadSearchExploit(target, ref string, chroot bool, cmd []string) error

func CheckDebugfs added in v1.4.0

func CheckDebugfs() bool

CheckDebugfs check if debugfs is installed

func CheckDockerRemoteAPI added in v0.1.10

func CheckDockerRemoteAPI(url string) bool

func CheckDockerSock

func CheckDockerSock(path string) error

APIs Ref https://github.com/AbsoZed/DockerPwn.py/blob/master/createContainer.py curl --unix-socket /var/run/docker.sock http://127.0.0.1/info

func CheckFdisk

func CheckFdisk()

add this to check if the container have device priv

func CheckPidInject

func CheckPidInject() bool

func ContainerdPwn

func ContainerdPwn(shellCmd string, rhost string, rport string) error

func DeployBackdoorDaemonset added in v1.0.1

func DeployBackdoorDaemonset(serverAddr string, tokenPath string, image string, inputArgs string, k8sApp string) bool

func DockerAPIPull

func DockerAPIPull(path string, image string) error

func DockerAPIRun

func DockerAPIRun(path string, cmd string) error

APIs Ref https://github.com/AbsoZed/DockerPwn.py/blob/master/createContainer.py curl --unix-socket /var/run/docker.sock http://127.0.0.1/info

func DockerRemoteAPIExploit added in v0.1.10

func DockerRemoteAPIExploit(api string, cmd string)

func DockerSockExploit added in v1.0.1

func DockerSockExploit(sock string, cmd string) bool

func EscapeCgroup

func EscapeCgroup(cmd string, subSystemName string) error

func ExploitLXCFS added in v1.0.1

func ExploitLXCFS() bool

func ExploitLXCFSCgroup added in v1.4.0

func ExploitLXCFSCgroup() bool

func FindDir added in v1.4.0

func FindDir(path string) string

FindDir will return the first dir's absolute path in the given path

func FindReleaseAgentSubSystem added in v1.4.0

func FindReleaseAgentSubSystem() string

func GetDockerAbsPath

func GetDockerAbsPath() string

func GetK8sSATokenViaCreatePod added in v1.0.1

func GetK8sSATokenViaCreatePod(tokenPath string, targetServiceAccount string, rhost string, rport string) error

func GetNamespaces

func GetNamespaces(serverAddr string) string

func GetNodes

func GetNodes(serverAddr string) string

func IsDir added in v1.4.0

func IsDir(path string) bool

IsDir return if the path is a dir

func MountToRandomTarget

func MountToRandomTarget(device string) (error, string)

func ProcfsExploit

func ProcfsExploit(procDir string, shellPayload string)

func ReverseShell

func ReverseShell(connectString string)

func SearchLocalFileText

func SearchLocalFileText(StartDir string)

func UnprivUserNS added in v1.0.6

func UnprivUserNS(cmd string) error

Types

type CapDacReadSearch added in v1.0.2

type CapDacReadSearch struct{}

plugin interface

func (CapDacReadSearch) Desc added in v1.0.2

func (p CapDacReadSearch) Desc() string

func (CapDacReadSearch) Run added in v1.0.2

func (p CapDacReadSearch) Run() bool

type DINDAttackDeployS

type DINDAttackDeployS struct{}

plugin interface

func (DINDAttackDeployS) Desc

func (p DINDAttackDeployS) Desc() string

func (DINDAttackDeployS) Run

func (p DINDAttackDeployS) Run() bool

type DINDAttackS

type DINDAttackS struct{}

plugin interface

func (DINDAttackS) Desc

func (p DINDAttackS) Desc() string

func (DINDAttackS) Run

func (p DINDAttackS) Run() bool

type DockerRemoteAPIS added in v0.1.10

type DockerRemoteAPIS struct{}

plugin interface

func (DockerRemoteAPIS) Desc added in v0.1.10

func (p DockerRemoteAPIS) Desc() string

func (DockerRemoteAPIS) Run added in v0.1.10

func (p DockerRemoteAPIS) Run() bool

type EtcdGetToken added in v1.2.0

type EtcdGetToken struct{}

plugin interface

func (EtcdGetToken) Desc added in v1.2.0

func (p EtcdGetToken) Desc() string

func (EtcdGetToken) Run added in v1.2.0

func (p EtcdGetToken) Run() bool

type ExploitCgroupS

type ExploitCgroupS struct{}

plugin interface

func (ExploitCgroupS) Desc

func (p ExploitCgroupS) Desc() string

func (ExploitCgroupS) Run

func (p ExploitCgroupS) Run() bool

type ExploitUnprivUserNS added in v1.0.6

type ExploitUnprivUserNS struct{}

func (ExploitUnprivUserNS) Desc added in v1.0.6

func (exp ExploitUnprivUserNS) Desc() string

func (ExploitUnprivUserNS) Run added in v1.0.6

func (exp ExploitUnprivUserNS) Run() bool

type FileScanS

type FileScanS struct{}

plugin interface

func (FileScanS) Desc

func (p FileScanS) Desc() string

func (FileScanS) Run

func (p FileScanS) Run() bool

type K8SPodSecurityPolicy added in v1.0.1

type K8SPodSecurityPolicy struct{}

plugin interface

func (K8SPodSecurityPolicy) Desc added in v1.0.1

func (p K8SPodSecurityPolicy) Desc() string

func (K8SPodSecurityPolicy) Run added in v1.0.1

func (p K8SPodSecurityPolicy) Run() bool

type K8sBackDoorDaemonsetS

type K8sBackDoorDaemonsetS struct{}

plugin interface

func (K8sBackDoorDaemonsetS) Desc

func (p K8sBackDoorDaemonsetS) Desc() string

func (K8sBackDoorDaemonsetS) Run

func (p K8sBackDoorDaemonsetS) Run() bool

type K8sCronJobDeployS

type K8sCronJobDeployS struct{}

plugin interface

func (K8sCronJobDeployS) Desc

func (p K8sCronJobDeployS) Desc() string

func (K8sCronJobDeployS) Run

func (p K8sCronJobDeployS) Run() bool

type K8sGetSATokenViaCreatePodS added in v1.0.1

type K8sGetSATokenViaCreatePodS struct{}

plugin interface

func (K8sGetSATokenViaCreatePodS) Desc added in v1.0.1

func (K8sGetSATokenViaCreatePodS) Run added in v1.0.1

type K8sMitmClusteripS

type K8sMitmClusteripS struct{}

plugin interface

func (K8sMitmClusteripS) Desc

func (p K8sMitmClusteripS) Desc() string

func (K8sMitmClusteripS) Run

func (p K8sMitmClusteripS) Run() bool

type K8sSecretsDumpS

type K8sSecretsDumpS struct{}

plugin interface

func (K8sSecretsDumpS) Desc

func (p K8sSecretsDumpS) Desc() string

func (K8sSecretsDumpS) Run

func (p K8sSecretsDumpS) Run() bool

type K8sShadowApiServerS

type K8sShadowApiServerS struct{}

plugin interface

func (K8sShadowApiServerS) Desc

func (p K8sShadowApiServerS) Desc() string

func (K8sShadowApiServerS) Run

func (p K8sShadowApiServerS) Run() bool

type KubeletExec added in v1.3.0

type KubeletExec struct{}

func (KubeletExec) Desc added in v1.3.0

func (p KubeletExec) Desc() string

func (KubeletExec) Run added in v1.3.0

func (p KubeletExec) Run() bool

type PidInject

type PidInject struct{}

plugin interface

func (PidInject) Desc

func (p PidInject) Desc() string

func (PidInject) Run

func (p PidInject) Run() bool

type RegistryBruteS added in v1.0.3

type RegistryBruteS struct{}

plugin interface

func (RegistryBruteS) Desc added in v1.0.3

func (p RegistryBruteS) Desc() string

func (RegistryBruteS) Run added in v1.0.3

func (p RegistryBruteS) Run() bool

type TEST

type TEST struct{}

plugin interface

func (TEST) Desc

func (p TEST) Desc() string

func (TEST) Run

func (p TEST) Run() bool

type VarLogEscape added in v1.3.0

type VarLogEscape struct{}

func (VarLogEscape) Desc added in v1.3.0

func (p VarLogEscape) Desc() string

func (VarLogEscape) Run added in v1.3.0

func (p VarLogEscape) Run() bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL