Thanks Deque... but, if I will start with static analysis, should I learn first assembly programming or reverse engineering in general and then go to static malware analysis, or I can start with some tutorials and books for malware analysis and learn in the way about RE and Prog?
I was looking at this book http://beginners.re and not sure if I should start in that way.
Does not matter. All roads lead to Rome.
See, malware analysis is a
very broad field. You can analyse a lot of samples without any assembly knowledge, even PE samples (because a whole lot are .NET assemblies or wrappers for AutoIt, Batch, INNO scripts, NSIS, Jar files, etc etc, in my estimation these exist in higher numbers than native samples).
But analysis via a debugger like OllyDbg or IDA is like the surpreme discipline. It is what most people associate with malware analysis and what people expect a malware analyst to be skilled with.
You should start with the thing that interests you the most.
RE and assembly is great, because being able to do almost everything with a native file, seeing the inner workings, patching it to your needs, is an empowering feeling. Especially if you like to crack hard nuts, because often you need patience and stubbornness to find the solution.
Basic static analysis is something that I consider a great time-saver. E.g. if you analyse a PE in OllyDbg without realizing that it is an SFX file, you will waste your time.
Same is true for any wrappers.
You need to be able to determine
first, what sample you have there and what tool is the best for analysis. That's why I think you should start with the basics in static analysis or you will get lost with unknown samples.
I read a bit through beginners.re. It is a good book, but maybe a bit too hard without assembly knowledge.
Lena's Tutorials are a great source in my opinion:
https://tuts4you.com/download.php?list.17-------------------------------
Thanks for the nice and informative article.
I would like to ask, what are your view of static vs dynamic analysis. Which you generally tend to prefer ?
My views are that today thousands of samples are generated each day. So static analysis is not always a viable option for mass analysis. We can use dynamic analysis to get a high level overview of the malware. On this information we can base our static analysis. For controlling execution, we can use PIN tool. Even running the sample in modifed Wine can be helpful.
Apologies if my question offend you in any way.
You mix up mass analysis by automated systems and analysis of individual samples by malware analysts.
Both are entirely different questions. Let me answer that related to individual sample analysis.
When I get a sample, I have often no information about it. A lot of them are sent to us without any comment.
I already addressed this in my previous post, but I need to find out what that sample is, I need to get an overview to answer the following questions:
What file format is it?
How was it compiled?
Is it packed? Can it be unpacked?
Is it signed?
Is it already detected by AV vendors?
Does it have info about the author or application name?
All of these are answered with static analysis, so static analysis is what I do first. Always.
And sometimes I can stop right there.
For certain samples I rarely use dynamic analysis. These are e.g. samples that are decompilable or wrappers I can unpack statically, samples that are already in a readable programming language (JavaScript, PHP, ...) or that have easily extractable code (Macro malware). For these cases I will not go through the struggle of transferring the sample to the dynamic analysis machine and waiting for the VM to start up. I just look at the code and decide.
I would estimate that about 50 percent of all samples don't need dynamic analysis.
An exception are PUPs, which I almost always analyse dynamically (unless I know them already). Often I need to check the look and feel of installation programs, whether they try to trick the user into accepting offers, see if some of their buttons or check-boxes are greyed out, if offers are opt-in or opt-out, and whether it is possible to decline third-party offers at all. PUPs are usually a PITA.