Skip to content
Memory corruption Write-up Advanced

CVE-2024-22058 Ivanti Landesk LPE

A stack-based buffer overflow in Ivanti LanDesk's issuser.exe allows a local attacker to overwrite a function pointer and execute arbitrary code with elevated privileges. The vulnerability is triggered by sending a specially crafted packet to the LanDesk service on port 9535/TCP.

mantodeasecurity.de

Published on mantodeasecurity.de

In this post we describe a vulnerability we discovered in the Ivanti LanDesk software and how it can be exploited to achieve local privilege escalation via arbitrary code execution.

Niels Pfau, on mantodeasecurity.de

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

The program uses strncpy to copy user-controlled data into a fixed-size global buffer without checking the length, leading to a buffer overflow.

Impact

A local attacker could execute arbitrary code with elevated privileges, potentially taking full control of the affected system.

What the attacker needed

Local access to the LanDesk service

The fix

The vulnerability was fixed in Ivanti Endpoint Manager 2022 and later versions.

How it was found

  1. Connect to the LanDesk service on port 9535/TCP.
  2. Send a packet with the header '1HCR' and a size field up to 0x7FFC.
  3. Set the opcode field to 0x15 to reach the vulnerable function.
  4. Provide a packet body that overflows the global buffer and overwrites a function pointer.
  5. Trigger an exception by writing to read-only memory, causing __CxxFrameHandler3 to call the overwritten function pointer.
  6. Use a ROP chain to mark the stack executable and run shellcode.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

This is a bug in a program that runs on Windows computers. A part of the program that receives network messages copies data into a fixed-size memory area without checking if the data is too long. An attacker can send a very long message to overwrite nearby memory, including a pointer to a function, and then make the program run their own code with higher privileges.

What is Memory corruption?

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.