id: cargo-toml-file

info:
  name: Cargo TOML File Disclosure
  author: DhiyaneshDk
  severity: info
  reference:
    - https://doc.rust-lang.org/cargo/reference/manifest.html
  classification:
    cpe: cpe:2.3:a:rust-lang:cargo:*:*:*:*:rust:*:*:*
  metadata:
    verified: true
    max-request: 1
    vendor: rust-lang
    product: cargo
    shodan-query: html:"Cargo.toml"
  tags: exposure,files,cargo,vuln

http:
  - method: GET
    path:
      - '{{BaseURL}}/Cargo.toml'

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "[package]"
          - "[dependencies]"
        condition: and

      - type: status
        status:
          - 200
# digest: 4b0a00483046022100e18fcf1b1815215255a14dd3d15a66592c6150af89ac3c41006afefc6dfed0e10221009e205b35b3cbedf9040f007139bb0ae10fd708292a54532f5f6f8c84505fcdfe:922c64590222798bb761d5b6d8e72950