Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

How do I create an applescript virus scanner?

I was trying to create an Applescript antivirus scanner. I'm just trying to get a basic concept of a scanner. Not anything like Norton.

MacBook Pro, OS X Mavericks (10.9)

Posted on Oct 24, 2013 3:21 PM

Reply
Question marked as Best reply

Posted on Oct 24, 2013 3:54 PM

How are you going to do that? Not to mention Why?


There are many forms of ‘Malware’ that can affect a computer system, of which ‘a virus’ is but one type, ‘trojans’ another. Using the strict definition of a computer virus, no viruses that can attack OS X have so far been detected 'in the wild', i.e. in anything other than laboratory conditions. The same is not true of other forms of malware, such as Trojans. Whilst it is a fairly safe bet that your Mac will NOT be infected by a virus, it may have other security-related problem, but more likely a technical problem unrelated to any malware threat.




You may find this User Tip on Viruses, Trojan Detection and Removal, as well as general Internet Security and Privacy, useful: The User Tip seeks to offer guidance on the main security threats and how to avoid them.


https://discussions.apple.com/docs/DOC-2435

4 replies
Question marked as Best reply

Oct 24, 2013 3:54 PM in response to Jake3231

How are you going to do that? Not to mention Why?


There are many forms of ‘Malware’ that can affect a computer system, of which ‘a virus’ is but one type, ‘trojans’ another. Using the strict definition of a computer virus, no viruses that can attack OS X have so far been detected 'in the wild', i.e. in anything other than laboratory conditions. The same is not true of other forms of malware, such as Trojans. Whilst it is a fairly safe bet that your Mac will NOT be infected by a virus, it may have other security-related problem, but more likely a technical problem unrelated to any malware threat.




You may find this User Tip on Viruses, Trojan Detection and Removal, as well as general Internet Security and Privacy, useful: The User Tip seeks to offer guidance on the main security threats and how to avoid them.


https://discussions.apple.com/docs/DOC-2435

Oct 24, 2013 5:02 PM in response to Jake3231

You mean you're planning to write it in AppleScript? I don't know that that will work very well, though I'm far from an AppleScript expert.


Writing a malware scanner is not an easy task. You would need some method of creating "signatures" that can match known malware, and then you would need to compare files being scanned against those signatures. Then, you would need malware samples from which to make those signatures. You would have to make sure to choose a signature that will match all variants of the malware but wouldn't match anything else, since false positives are bad.


If your intent is to simply have fun and learn more about these techniques, then by all means, forge ahead! It will take a lot of work and research. I would recommend teaching your app to detect specific legit apps to start with, as collecting malware samples is not going to be easy initially. Only once you have started to demonstrate some expertise in the area and intent to help with "white hat" activities will anyone give you access to a malware database.


One starting point for learning the basic idea behind signatures would be the YARA project:


https://code.google.com/p/yara-project/


If, on the other hand, your intent is to actually create a working, usable and realistic malware scanner... don't. Not to be discouraging, but that just won't turn out well. Your efforts would be better spent contributing to a project like ClamXav, where you could learn the skills and the market better, and could start a project later on with more experience and expertise under your belt.

Oct 24, 2013 6:47 PM in response to thomas_r.

Thanks! I'll have to ceheck out all of those links. I think I will start with a few applications, like you said. Then I can expand my knowledge of this. To be honest, I am not an Applescript expert either. I can write virtual assistants, but nothing like a virus scanner. That would take some serious research, and a little trial and error. Thanks!

How do I create an applescript virus scanner?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.