Jenkins功能未授权访问导致的远程命令执行漏洞
一、漏洞介绍
Jenkins管理登陆之后,后台”系统管理”功能,有个”脚本命令行的”功能,它的作用是执行用于管理或故障探测或诊断的任意脚本命令,利用该功能,可以执行系统命令,该功能实际上Jenkins正常的功能,由于很多管理账号使用了弱口令,或者管理后台存在未授权访问,导致该功能会对Jenkins系统服务器产生比较严重的影响和危害。
二、漏洞危害
三、漏洞验证
找到“系统管理”——“脚本命令行”。
Type in an arbitrary Groovy script and execute it on the server. Useful for trouble-shooting and diagnostics. Use the
println
command to see the output (if you useSystem.out
, it will go to the server’s stdout, which is harder to see.) Example:
println(Jenkins.instance.pluginManager.plugins)
A