← Back to SOC feed Coverage →

hiding-java-class-file

kql MEDIUM Azure-Sentinel
DeviceFileEventsDeviceProcessEvents
aptbackdoorevasionhuntingmicrosoftofficial
This rule was pulled from an open-source repository and enriched with AI. Validate in a test environment before deploying to production.
View original rule at Azure-Sentinel →
Retrieved: 2026-05-08T11:00:00Z · Confidence: medium

Hunt Hypothesis

Adversaries may be using Java class files to execute malicious code across different platforms, leveraging the cross-platform capabilities of Java to maintain persistence and evade detection. SOC teams should proactively hunt for this behavior in Azure Sentinel to identify potential Adwind RAT activity and prevent lateral movement and data exfiltration.

KQL Query

union DeviceFileEvents, DeviceProcessEvents
| where ProcessCommandLine has "attrib +h +s +r " 
and ProcessCommandLine contains ".class"

Analytic Rule Definition

id: c5196191-609a-407f-a623-f37785eca019
name: hiding-java-class-file
description: |
  This query was originally published in the threat analytics report, Adwind utilizes Java for cross-platform impact.
  Adwind is a remote access tool (RAT) that takes advantage of the cross-platform capabilities of the Java framework. It can check which operating system a target is running and adapt accordingly, allowing it to successfully compromise both Windows and macOS devices.
  The query below checks for attempts to disguise Java class files (i.e., complied code with a .class extension). Although the behavior detected by this query is typical of attacks that use Adwind malware, unrelated attacks may use the same or similar defense evasion techniques.
  See Detecting a JAR attachment for an additional query that detects behavior associated with Adwind attacks.
requiredDataConnectors:
- connectorId: MicrosoftThreatProtection
  dataTypes:
  - DeviceFileEvents
  - DeviceProcessEvents
tactics:
- Defense evasion
query: |
  union DeviceFileEvents, DeviceProcessEvents
  | where ProcessCommandLine has "attrib +h +s +r " 
  and ProcessCommandLine contains ".class"

Required Data Sources

Sentinel TableNotes
DeviceFileEventsEnsure this data connector is enabled
DeviceProcessEventsEnsure this data connector is enabled

MITRE ATT&CK Context

References

False Positive Guidance

Original source: https://github.com/Azure/Azure-Sentinel/blob/main/Hunting Queries/Microsoft 365 Defender/Defense evasion/hiding-java-class-file.yaml