NginX DNS Resolver Off-by-One Heap Write Vulnerability
by Larry-Hoover - Monday September 9, 2024 at 11:44 AM
#1
Hello,

I was recently looking into Nginx vulnerabilities and I stumbled on (CVE-2021-23017). The vulnerability exists in the way Nginx receives DNS responses.

Apparently, the issue lies in the "ngx_resolver_copy()" function causing a heap overflow. This type of vulnerability was labeled as Dos as it caused server crash.
The PoC provided demonstrated how to basically crash Nginx server.

As I was digging deeper, I came across an article describing in detail the vulnerability and also mentioning the following "A network attacker capable of providing DNS responses to a Nginx server can achieve Denial-of-Service and likely remote code execution."
Now that was definitely interesting, but the problem is that I wasn't able to generate RCE yet. There was no PoC for it, simply nothing as it was never possible.

This vulnerability affects many versions of Nginx (0.6.18 - 1.20.0) and I was hoping we could make this thread a collaborative work in creating PoC for this potential RCE.
You can find all resources I visited: 
1. https://github.com/advisories/GHSA-83p9-mcpm-374v
2. https://www.x41-dsec.de/lab/advisories/x...lver-copy/

P.S: I am currently working on it. I have been in the field for years, but never wrote any heap/buffer exploitation from scratch like this one before.
Reply
#2
Quote:A specially crafted packet allows overwriting the least significant byte of next heap chunk metadata with 0x2E.

Seems to me that House of Einherjar is relevant here.

I'm not up to date on heap exploit mitigations on recent libc versions but there a poc for a relatively modern house of einherjar here: https://github.com/shellphish/how2heap/b...inherjar.c
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [FREE] Database Searcher Telegram odanbtw 1,010 81,687 4 hours ago
Last Post: vladimirPuk1ng
  Cardable Giftcard Websites AKASHIC 11 449 6 hours ago
Last Post: yuhang
  ✅ Top 10 Google Dorks For SQL Injections NextSoftGroup 10 301 10 hours ago
Last Post: auhfgkjasfhaj
  Top 10 Phishing Tools To Use 2024 Frontman 578 37,049 Yesterday, 03:02 PM
Last Post: cwel321
  Bypassing Modern AV (Metasploit Method) godco99 5 364 Yesterday, 02:11 PM
Last Post: UnknownUser01

Forum Jump:


 Users browsing this forum: 1 Guest(s)