Threat Level: green Handler on Duty: Didier Stevens

SANS ISC: Odd Vanishing Signatures in OS X XProtect SANS ISC InfoSec Forums

Watch ISC TV. Great for NOCs, SOCs and Living Rooms: https://isctv.sans.edu

Sign Up for Free!   Forgot Password?
Log In or Sign Up for Free!
Odd Vanishing Signatures in OS X XProtect

With OS X Snow Leopard, Apple for the first time introduced its own anti malware technology, XProtect. Ever since then, Apple has been pushing new signatures, and XProtect itself has undergone some subtle changes allowing it to pull signature updates more frequently. The list of signatures is still rather small, but unlike other OS X anti virus software, which covers Windows malware as well as OS X malware, XProtect only covers OS X malware. At this point, two larger "families" of OS X malware emerged: The fake anti virus software MacDefender and the malicious "flash updater" Flashback.

Ever since late last year, I am running a cron job on one of my Macs to watch for XProtect updates. The updates are delivered "silently", but the cron job keeps monitoring the definition file and keeps a copy of each version.

 

Ever since late last year, I am running a cron job on one of my Macs to watch for XProtect updates. The updates are delivered "silently", but the cron job keeps monitoring the definition file and keeps a copy of each version.

When reviewing the files yesterday, I found an odd behavior: On February 4th, the file "shrunk" by almost half. Instead of 15 signatures, the file contained only 6. On February 7th, the file went back to its old size. Has anybody else seen this? You can find the file in /System/Library/CoreServices/CoreTypes.bundle /Contents/Resources/XProtect.plist . It is a readable XML file. The current size of my file is 32516 Bytes.

 

 

------

Johannes B. Ullrich, Ph.D.
SANS Technology Institute
Twitter

I will be teaching next: Defending Web Applications Security Essentials - SANS San Francisco Spring 2020

Johannes

3693 Posts
ISC Handler
I'm on 10.6.8, I didn't have Security Update 2012-001 and my XProtect.plist was 41505 bytes, last updated January 19. I just applied the Security Update, and size is still the same but the last-updated date is today. Don't know what to make of it really...
Anonymous
I'm showing 32516 as well. You should post the cron script you're using.
Anonymous
Did your cron job maybe catch it in the *MIDDLE* of an update, while the file was incomplete?
Moriah

133 Posts
I doubt that this was an issue of the cron job catching a partial update. The next run of the job an hour later should have fixed that, and the file looked complete (valid XML syntax and a complete file)

The cron job is very simple:


#!/bin/sh
xpfile=/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/XProtect.plist
xpfilebackup=~/XProtect.plist
if ! cmp $xpfile $xpfilebackup; then
cp $xpfile $xpfilebackup
cp $xpfile $xpfilebackup.`date +%s`
fi
Johannes

3693 Posts
ISC Handler

Sign Up for Free or Log In to start participating in the conversation!