id: CVE-2021-30047

info:
  name: vsftpd < 3.0.3 - DoS
  author: pussycat0x
  severity: high
  description: |
    vsftpd before 3.0.3 allows remote attackers to cause a denial of service by sending a crafted FTP command.
  impact: |
    Attackers can send crafted FTP commands to crash the vsftpd daemon, causing denial of service and interrupting FTP services for legitimate users.
  remediation: |
    Upgrade to vsftpd version 3.0.3 or later that addresses the denial of service vulnerability.
  reference:
    - https://github.com/kuppamjohari/vsftpd-3.0.3-DoS
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
    cvss-score: 7.5
    cve-id: CVE-2021-30047
    epss-score: 0.03073
    epss-percentile: 0.85947
    cpe: cpe:2.3:a:vsftpd_project:vsftpd:3.0.3:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 1
    vendor: vsftpd_project
    product: vsftpd
    shodan-query:
      - vsftpd
      - product:"vsftpd"
  tags: cve,cve2021,network,ftp,vsftpd,tcp,passive,vuln

tcp:
  - inputs:
      - data: 00000000
        type: hex

    host:
      - "{{Hostname}}"

    port: 21
    read-size: 1024

    matchers:
      - type: dsl
        dsl:
          - "contains(raw, 'vsFTPd')"
          - "compare_versions(version, '< 3.0.3')"
        condition: and

    extractors:
      - type: regex
        group: 1
        name: version
        regex:
          - "vsFTPd ([0-9.]+)"
# digest: 490a0046304402207989fa6694f09025b807e8d698825aed2560610b4f879a27b8c65caf47305708022012822e104628cfdf5bcd8619c63efb323ad6d71866362d5573e913e4a93f9f97:922c64590222798bb761d5b6d8e72950