kubehunter常用命令
时间: 2023-06-23 08:51:54 浏览: 58
KubeHunter是一个用于Kubernetes集群渗透测试的工具,以下是常用的命令:
1. 列出所有可用的测试:
```
kube-hunter --list
```
2. 扫描单个集群:
```
kube-hunter --target <cluster_ip_or_dns>
```
3. 远程扫描集群:
```
kube-hunter --remote <ssh_user@remote_host> --target <cluster_ip_or_dns>
```
4. 使用快速扫描(仅扫描端口10250、10255和10256):
```
kube-hunter --quick --target <cluster_ip_or_dns>
```
5. 显示集群的服务帐户权限:
```
kube-hunter --mapping --target <cluster_ip_or_dns>
```
6. 扫描CIDR范围而不是单个集群:
```
kube-hunter --cidr <cidr_range>
```
7. 测试特定的Pod:
```
kube-hunter --pod <pod_name>
```
8. 设置报告文件名/路径:
```
kube-hunter --target <cluster_ip_or_dns> --report <report_file_path>
```
9. 设置日志文件名/路径:
```
kube-hunter --target <cluster_ip_or_dns> --log <log_file_path>
```
10. 以文本格式编写报告:
```
kube-hunter --target <cluster_ip_or_dns> --text --report <report_file_path>
```
11. 在本地运行Hunter(而不是作为容器):
```
kube-hunter --local --target <cluster_ip_or_dns>
```
12. 仅测试正在运行的Pod(只与“--pod”参数结合使用):
```
kube-hunter --pod-running --pod <pod_name>
```
相关推荐
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![7z](https://img-home.csdnimg.cn/images/20210720083312.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![7z](https://img-home.csdnimg.cn/images/20210720083312.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![7z](https://img-home.csdnimg.cn/images/20210720083312.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![7z](https://img-home.csdnimg.cn/images/20210720083312.png)
![7z](https://img-home.csdnimg.cn/images/20210720083312.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![7z](https://img-home.csdnimg.cn/images/20210720083312.png)