Elastic Security Labs evaluated fine-tuned Hugging Face RoBERTa and DistilRoBERTa models to classify command lines as malicious or benign, focusing on living-off-the-land techniques. The team imported the models into Elastic with Eland and tested them against roughly 66,000 command lines; transformer models delivered higher sensitivity for malicious activity than Elastic's existing tree-based classifier.
The initial RoBERTa run required about four hours of inference, versus roughly three minutes for the tree-based model. Distributed inference, multithreading, dynamic quantization, and knowledge distillation reduced transformer processing to 35 minutes, but at greater CPU cost and with weaker benign-sample specificity; Elastic proposed a weighted or voting ensemble and planned inference caching in Elastic Stack 8.4 to reduce repeat processing of duplicate samples.

Track how attackers are adapting to this technology.
4 events from the most recent confirmed update back to the earliest known activity.
Elastic concluded that transformer models had better malicious-sample sensitivity while the tree-based classifier had better benign-sample specificity, and proposed a weighted or voting ensemble. It also planned inference caching in Elastic Stack 8.4 to avoid repeat inference for duplicate samples.
On approximately 66,000 command lines, Elastic reduced transformer inference time from about four hours to 35 minutes using distributed processing, multithreading, quantization, and distillation; its tree-based model processed the dataset in about three minutes.
Elastic researchers fine-tuned RoBERTa and DistilRoBERTa classifiers, imported them through Eland, and evaluated them for detecting malicious Living off the Land command lines.
Elastic introduced support for importing third-party NLP models into Elastic Stack Machine Learning in version 8.3.
Vulnerabilities, threat actors, malware, products, organizations, and breaches Mallory has linked to this story.
Follow how adversaries are adapting to this technology, and where it touches your stack today.
2 references tracked. Mallory keeps watching after this page renders.
Map indicators from this story to your assets and identify affected systems in minutes.
Every observed campaign, victim, and pivot linked to actors named in this story.
Malware, exploits, and IOCs connected to the activity described here.
YARA, Sigma, and Snort rules deployed to your SIEM as soon as they’re published.
Get matching new stories delivered to your team as they break — not the next morning.
Ask questions about this story and take action on the answers.