SSRF via DNS Rebinding (CVE-2022–4096)
2022-12-1 11:44:48 Author: infosecwriteups.com(查看原文) 阅读量:70 收藏

Hello everyone myself Basavaraj , Today in this writeup I will explain about my 2nd CVE i.e CVE-2022–4096

Let’s get started

SSRF Overview

SSRF using DNS rebinding found in Appsmith .

FYI : Appsmith is used to Build, ship, and maintain internal tools.

Initially I discovered the 2 SSRF’s in appsmith by using server side redirection method, But I don’t know how my exploit is got leaked(I reported to some of the companies and they might be client for cloudsek) and cloudsek got assigned with CVE for those.

And this is Bypass for those 2 Initial SSRF’s.

DNS Rebinding Overview:

DNS rebinding is a method of manipulating resolution of domain names that is commonly used as a form of computer attack. In this attack, a malicious web page causes visitors to run a client-side script that attacks machines elsewhere on the network. In theory, the same-origin policy prevents this from happening: client-side scripts are only allowed to access content on the same host that served the script. Comparing domain names is an essential part of enforcing this policy, so DNS rebinding circumvents this protection by abusing the Domain Name System (DNS).

Let’s generate the an hostname via DNS rebinding to bypass SSRF restrictions! https://lock.cmpxchg8b.com/rebinder.html

DNS Rebinding

We can see that our generated hostname got assigned with two different IP’s

Dig command

Now the vulnerable function is Create new API and Elasticsearch

Vulnerable Functions

Now add the generated hostname in url function and click on run and I got response as host not allowed

Host not allowed response

Now after hitting run again, Successfully got some response with AWS cloud metadata path

aws metadata path

Now appended the “latest” path to the url and again clicked on run and I got 404 (Because this time the server hitted my IP which I used in DNS rebinding).

404 Response

Now after continuous Hit and trial(Clicking “Run” again until I get some response) methods and appending the paths(Which I got in response) to url I successfully retrieved AWS Keys

AWS Keys Retrieved Successfully

Vulnerable Versions : Appsmith < v1.8.1

Now reported this to Appsmith and got acknowledgement and Reported the same to huntr.dev to get CVE for this issue and got assigned with this CVE-2022–4096

Please ignore grammatical and verbal mitsakes :)

Follow me on:

Twitter: https://twitter.com/basu_banakar

Instagram : https://instagram.com/basu_banakar

Linkedin: https://www.linkedin.com/basubanakar

From Infosec Writeups: A lot is coming up in the Infosec every day that it’s hard to keep up with. Join our weekly newsletter to get all the latest Infosec trends in the form of 5 articles, 4 Threads, 3 videos, 2 GitHub Repos and tools, and 1 job alert for FREE!


文章来源: https://infosecwriteups.com/ssrf-via-dns-rebinding-cve-2022-4096-b7bf75928bb2?source=rss----7b722bfd1b8d--bug_bounty
如有侵权请联系:admin#unsafe.sh