There's some neat stuff we've played with (though nothing short of manual analysis is giving really high confidence at this point). Some of the ideas we played with but haven't written about yet: * Feed the output through a parser that finds domains, URLs, and IPs. Feed those into threat feeds and passive DNS APIs. Occasionally this surfaces interesting stuff. * Feed all the hashes to VirusTotal, cymru, or known lists of nasty stuff. Hits are generally nasty. * We've got some known indicators of commodity malware persistence in launch agents. We grep for those cause we know they've hit us before.
One of the recent things we did add to OSXCollector was pulling xattr's from downloads. This allows us to find the source URL - sometimes even the redirect chain - for a download by reading extended attributes of the file. This has been helpful.
import Foundation, import calendar, import os, import sys, import shutil
I assuming os, sys, and shutil are part of the system (are they?). What about the other two? Also, which version of Python do I run this under?
It appears the OSX specific modules are located (on latest Mavericks) in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python
So you need to add that directory (for xattr) as well as that directory + PyObjC (for Foundation) to your PYTHONPATH
After getting the error again, I looked at that location - it exists but the mods in question (Foundation and Calendar) are not there. I'm on OSX 10.9.4.
It doesn't really matter enough to waste time on though. Thanks for your help.
I just want to point out that in the docs "self contained" doesn't mean the user has to go hunting for mods.
sudo /usr/bin/python osxcollector.py
Pip is an excellent package management system.
Take for example, when we travelling into Australia, and they asked if we had any criminal convictions - I didn't know that a conviction was still an entry requirement for the island!