Turns out converting files into images is a highly effective way to detect malware

(Image credit: Pixabay)

A branch of artificial intelligence called machine learning is all around us. It's employed by Facebook to help curate content (and target us with ads), Google uses it to filter millions of spam messages each day, and it's part of what enabled the OpenAI bot to beat the reigning Dota 2 champions last year in two out of three matches. There are seemingly endless uses. Adding one more to the pile, Microsoft and Intel have come up with a clever machine learning framework that is surprisingly accurate at detecting malware through a grayscale image conversion process.

Microsoft detailed the technology in a blog post (via ZDNet), which it calls static malware-as-image network analysis, or STAMINA. It consists of a three-step process. In simple terms, the machine learning project starts out by taking binary files and converting them into two-dimensional images.

(Image credit: Microsoft)

The images are then fed into the framework. This second step is a process called transfer learning, which essentially helps the algorithm build upon its existing knowledge, while comparing images against its existing training.

Finally, the results are analyzed to see how effective the process was at detecting malware samples, how many it missed, and how many it incorrectly classified as malware (known as a false positive).

As part of the study, Microsoft and Intel sampled a dataset of 2.2 million files. Out of those, 60 percent were known malware files that were used to train the algorithm, and 20 percent were used to validate it. The remaining 20 percent were used to test the the actual effectiveness of the scheme.

Applying STAMINA to the files, Microsoft says the method accurately detected and classified 99.07 percent of the malware files, with a 2.58 percent false positive rate. Those are stellar results.

"The results certainly encourage the use of deep transfer learning for the purpose of malware classification. It helps accelerate training by bypassing the search for optimal hyperparameters and architecture searches, saving time and compute resources in the process," Microsoft says.

STAMINA is not without its limitations. Part of the process entails resizing images to make the number of pixels manageable for an application like this. However, for deeper analysis and bigger size applications, Microsoft says the method "becomes less effective due to limitations in converting billions of pixels into JPEG images and then resizing them."

In other words, STAMINA works great for testing files in a lab, but requires some fine tuning before it could feasibly be employed in greater capacity. This probably means Windows Defender won't benefit from STAMINA right away, but perhaps sometime down the line it will.

Paul Lilly

Paul has been playing PC games and raking his knuckles on computer hardware since the Commodore 64. He does not have any tattoos, but thinks it would be cool to get one that reads LOAD"*",8,1. In his off time, he rides motorcycles and wrestles alligators (only one of those is true).

Latest in Hardware
Crucial X9 external SSD on blue background
You can pick up the 2 TB version of my favorite budget external SSD for less than $0.06 per GB, transfers 300+ GB of data in 6 minutes
AMD Strix Point APU chip, held in a hand, with the reflected light showing the various processing blocks in the chip die
AMD's next-gen 'Gorgon Point' APU outted and seemingly sticks with RDNA 3.5 graphics which is disappointing for handheld gaming PCs if accurate
The Lenovo Legion LOQ gaming laptop on a blue background
Okay, so it's not technically in the Amazon Big Spring Sale, but this is the cheapest RTX 4070 gaming laptop you'll find today
A close-up photo of an Nvidia RTX 4070, with its heatsink removed, showing the AD104 GPU die and the surrounding Micron GDDR6X VRAM chips
With Nvidia Ace taking up 1 GB of VRAM in Inzoi, Team Green will need to up its memory game if AI NPCs take off in PC gaming
A collage of Radeon RX 9000 series graphics cards, as shown in AMD's promotional video for the launch of RDNA 4 at CES 2025
AMD's CEO claims 9070 XT sales are 10x higher than all previous Radeon generations but that's just for the first week of availability
Samsung 3D monitor
Samsung has a crack at ye olde glasses-free 3D monitor thing but its new cheaper 49-inch ultrawide OLED is far more interesting
Latest in News
Starfield's companion robot giving a thumbs-up
Former Bethesda dev who quit Starfield to go solo says it's 'much less stressful as an indie' without daily meetings or 'office politics': it's 'very refreshing to just care about the game'
Schedule I drug deal going down
Forget REPO, Monster Hunter Wilds and Assassin's Creed Shadows, Steam's current global top seller is an early access game about managing a drug empire
Naoe looking at the wrist blade in Assassin's Creed Shadows
Ubisoft says don't compare Assassin's Creed Shadows' success to Valhalla: The latter launched in Covid's 'perfect storm' and feedback on platforms 'less affected by review bombing' is stellar
Tarn Adams, who cofounded Bay 12 Games with his brother Zach, talks about their single-player simulation game "Dwarf Fortress" during an interview at their home office in Poulsbo, Washington, west of Seattle, on December 9, 2022. - A cult favorite among indie game fans, "Dwarf Fortress" has been available for purchase on the Steam online store since December 6, a first for this title that has been distributed for free since its debut in 2006. The real-time management game, set in a medieval-fantasy world and involving overseeing a group of dwarves seeking to build a mighty fortress, has climbed to the fourth best-selling weekly title on Steam. (Photo by Jason Redmond / AFP) (Photo by JASON REDMOND/AFP via Getty Images)
Dwarf Fortress' creator is so tired of hearing about AI: 'Press a button and it writes a really sh*tty, wrong essay about something—and they still take your job'
Crucial X9 external SSD on blue background
You can pick up the 2 TB version of my favorite budget external SSD for less than $0.06 per GB, transfers 300+ GB of data in 6 minutes
Image of illuminated manuscript-style drawings from the game Pentiment.
Random characters kept swearing in Obsidian's font-obsessed murder-mystery when its procedural error system ran amok: 'Naughtiness abounded'