CISA Warns of Exploited Adobe ColdFusion, Windows Vulnerabilities

CISA has warned organizations that two vulnerabilities affecting Adobe ColdFusion and Windows have been exploited in the wild. 

The post CISA Warns of Exploited Adobe ColdFusion, Windows Vulnerabilities appeared first on SecurityWeek.

SecurityWeek – ​Read More

A Nifty Initial Access Payload

Red Teaming engagements are “realistic” attack simulations designed to test the security posture of an organization and its Blue Team. This term is used in many different ways, so if you’re not sure where to draw the line, Michael Schneier’s latest blog post provides a good comparison of different types of assessment.

Anyway, when doing attack simulations or red teaming engagements, we often want to run code on a victim machine of our customer. Due to the presence of an Endpoint Detection and Response (EDR) software, this is not an easy task. However, a combination of some well-known techniques will usually do the trick for what we call initial access.

But what do we do when the known techniques fail and we cannot use known initial access methods? In that case, we need to develop a custom payload. Since it’s nice to run our code in a signed process to better blend in, we then check the installed software.

A wild screenshot tool appears

In a recent engagement, we found an outdated screenshot tool running on startup on our victim machine that allowed users to install plugins. Double-clicking on a file with a custom extension would extract its (zipped) contents and the software would load the plugin DLL. No mark-of-the-web, no execution restrictions, etc. Nice.

First attempt: Replace the plugin DLL

Can we just make a fake plugin with our malicious DLL? No. Plugins contain a manifest and the plugin DLL has to be signed by the vendor of the software, so it’s secure, right?

Second attempt: Replace the dependency DLL

We were lucky enough to find an existing plugin that was signed by the vendor, which in turn would load an unsigned DLL. My first thought is, let’s build a dumb payload with a dllmain, replace the unsigned DLL, win.

#define WIN32_LEAN_AND_MEAN
#include <windows.h>
__declspec(dllexport) BOOL APIENTRY DllMain(HMODULE hModule,
	DWORD ul_reason_for_call,
	LPVOID lpReserved
)
{
	switch (ul_reason_for_call) {

	case DLL_PROCESS_ATTACH:
	{
		MessageBox(
			0,            /* HWND    hWnd,      */
			"Burp!=B33F", /* LPCTSTR lpText,    */
			"Burp!=B33F", /* LPCTSTR lpCaption, */
			1             /* UINT    uType      */
		);
		break;
	}
	case DLL_PROCESS_DETACH:
	{
		break;
	}
	case DLL_THREAD_ATTACH:
	{
		break;
	}
	case DLL_THREAD_DETACH:
	{
		break;
	}

	}
	return TRUE;
}

It didn’t work, the plugin couldn’t be installed.

This unsigned DLL is a managed (.NET ) DLL, which means that when it is loaded, the CLR will check its manifest before anything else. Hm, how do we execute code then? A couple of ideas came to mind.

Third attempt: Decompile, add code, recompile

It’s .NET, right? Simple: decompile, add code recompile. That might work, but when we decompile we notice something annoying. The DLL is used for interoperation with COM and contains only interfaces. Interfaces cannot contain code.

Fourth attempt: Module initializer

Can we not run static code in C#? The answer is that we can, it’s called a module initializer. Let’s create a class and a method that will execute our shellcode:

using System;
using System.IO;
using System.Runtime.InteropServices;
using Microsoft.Win32;

internal static class ModuleInitializer
{
    internal static void Run()
    {
		ModuleInitializer.MessageBox(IntPtr.Zero, "Burp!=B33F", "Burp!=B33F", 1U);
	}

	[DllImport("user32.dll", SetLastError = true, CharSet= CharSet.Auto)]
	public static extern int MessageBox(IntPtr hWnd, String text, String caption, uint type);
}

Using https://github.com/kzu/InjectModuleInitializer, we inject the above code into the module initializer.

.InjectModuleInitializer.exe .interoplib.dll
InjectModuleInitializer v1.3

Module Initializer successfully injected in assembly .interoplib.dll

The plugin is installed successfully but the code is not executed. When we use the functionality provided by the plugin (i.e. some parts of the .NET module are actually used), our code (and our shellcode) is executed. This is fine, but not perfect, we would prefer to have the code run on the first click.

Fifth attempt: PE native entry point

Googling into how to execute code when the DLL is loaded by the CLR led us to this great blog post: https://blog.washi.dev/posts/entry-points/.

Adding a PE native entry point to our DLL could do the trick. It would run as soon as the DLL is loaded, which as we can see using Process Monitor happens when the plugin is installed.

Using the author’s AsmResolver tool, and building on top of the example from the blog post, we inject code into the DLL and put its address in the PE native entrypoint.

Result, it works, our (shell)code runs on plugin installation!

Conclusion

This (rather long) journey allowed us to have a simple payload, that we could deliver via a web page (using HTML smuggling) and which, when double-clicked, would run our shellcode in the signed process of the screenshot tool. Nifty!

Here are our key takeaways:

  • Custom extension handlers are a nice way to phish.
  • Living in a signed and known process confuses both EDR and Blue Team
  • Sometimes you have to get past the first four failed attempts!

Compass Security Blog – ​Read More

CISA and FBI Raise Alerts on Exploited Flaws and Expanding HiatusRAT Campaign

The U.S. Cybersecurity and Infrastructure Security Agency (CISA) on Monday added two security flaws to its Known Exploited Vulnerabilities (KEV) catalog, citing evidence of active exploitation in the wild.
The list of flaws is below –

CVE-2024-20767 (CVSS score: 7.4) – Adobe ColdFusion contains an improper access control vulnerability that could allow an attacker to access or modify restricted

The Hacker News – ​Read More

The Mask APT Resurfaces with Sophisticated Multi-Platform Malware Arsenal

A little-known cyber espionage actor known as The Mask has been linked to a new set of attacks targeting an unnamed organization in Latin America twice in 2019 and 2022.
“The Mask APT is a legendary threat actor that has been performing highly sophisticated attacks since at least 2007,” Kaspersky researchers Georgy Kucherin and Marc Rivero said in an analysis published last week. “Their targets

The Hacker News – ​Read More

Slack’s AI agents are learning from your office chats—here’s what’s next

Credit: VentureBeat made with Midjourney


Slack CPO Rob Seaman reveals how Agentforce 2.0 will transform workplace AI by leveraging contextual intelligence and deep platform integration, transforming how enterprises use AI agents for automation and collaboration.Read More

Security News | VentureBeat – ​Read More

Cicada3301 Ransomware Claims Attack on French Peugeot Dealership

SUMMARY Cicada3301, a ransomware group, has claimed responsibility for a data breach targeting Concession Peugeot (concessions.peugeot.fr), a prominent…

Hackread – Latest Cybersecurity, Tech, Crypto & Hacking News – ​Read More

Ransomware to Cause ‘Bumpy’ Security Ride in 2025

Cashed-up ransomware criminals may exploit more zero days while potential blanket ransomware payment bans hang over defenders like a shadow.

Security | TechRepublic – ​Read More

Does Desktop AI Come With a Side of Risk?

Artificial intelligence capabilities are coming to a desktop near you — with Microsoft 365 Copilot, Google Gemini with Project Jarvis, and Apple Intelligence all arriving (or having arrived). But what are the risks?

darkreading – ​Read More

Citizen Development Moves Too Fast for Its Own Good

While low-code/no-code tools can speed up application development, sometimes it’s worth taking a slower approach for a safer product.

darkreading – ​Read More

Called your doctor after-hours? ConnectOnCall hackers may have stolen your medical data

The hackers stole names, phone numbers, dates of birth and information related to health conditions, treatments and prescriptions.

© 2024 TechCrunch. All rights reserved. For personal use only.

Security News | TechCrunch – ​Read More