Jump to content

Help
Latest News Article

To All: Malicious Mods


9 replies to this topic

#1

  • Location: Texas

Posted 15 July 2011 - 03:47 PM

In light of comments more aptly described as threats by some mod creators to include malware in their mods. Malware being defined following the industry standard as malicious software, virus, trojan, etc. It’s immature and childish to make such statements but I’m not going to point fingers or take sides. It does bring up the issue of the safety of the mods posted on the forum.

What makes me such and expert on malware?

I reverse engineer malware for a living and while that may sound cool it’s mostly staring at x86 assembly code in IDA Pro for 40 hours a week and writing reports, but hey it's in high demand and the pay is great.

There is something I see often on this forum that makes me shake my head each time I read it. Time and time again I see people submitting some new mod to Virustotal or a similar service and then declaring that it’s safe based on the results.

The flaw in this is that even if the mod has malicious routines Virustotal won’t detect it.
You’re probably thinking that it has to be safe when it get scanned by all those engines right?

Wrong!

They key to that answer being that antivirus engines aside from a few that also do behavioral based detection rely on signatures to do their detection. That signature, a fingerprint for a piece of code, is based on a unique pattern found within a file. If no one has created a signature for a piece of malware then outside of behavioral detection which looks for anomalous behavior such as a program trying to inject it’s code into Internet Explorer, a driver, or trying to monitor the keyboard when it’s window isn’t focused.

The problem is a good coder can find ways around behavioral detection, and it’s trivial to rearrange a binary to alter it’s fingerprint with polymorphic substitutions. Think of a deck of cards as a representation of a file. When you copy that file the deck is always in the same order. If you create a signature for this file it’s going to rely on the order the cards are in. In simplified terms polymorphic code means the deck is reshuffled each time. It still does the same thing but the signature has changed. Antivirus is only going to detect malware that’s wide spread enough to have been detected and had signatures created.

So how does this apply to mods?

The mods are Java and outside of an exploit to affect the system outside of the Java virtual machine (which happens from time to time so keep your Java updated) they’re contained to the running program, Minecraft. This creates problems when you rely on antivirus which can see Java running but can’t look inside of the Java virtual machine, so unless there’s a piece of code that’s had a fingerprint created (very rare for Java) and is caught when the file is checked when it’s opened there isn’t going to be an antivirus alert.

The biggest threat as to malicious mods is account theft. If someone can code a mod then the class handling the login authentication can be modified too and unless you’ve got some quality Java reverse engineering tools with their hooks in the running code it’s rather hard to detect. There are other malicious things that can be done too such as deleting your saves, but I’ll focus on account theft for the moment.

The simplest way to determine if a mod has malicious routines is to audit the source. If it’s creating it’s own network connections it’s fairly suspect to begin with as there is no good reason any legitimate mod should be doing so unless the mod is specifically designed to do so and openly states that it does. A mod should never interact with login authentication no matter what justification the author tries to give.

If you don’t know how to read code then you step past static analysis and go into the world of dynamic analysis, aka running it and seeing what it does. The only network connections Java should create when Minecraft is running is one to authenticate with minecraft.net and one to the server you’re playing on if you’re doing SMP. There’s a number of tools to do this but the one I’ll mention is Process Monitor from Sysinternals. It’s a Microsoft tool you can get from Technet and while it has a learning curve you can filter it down to the Java instance Minecraft is running in and to network connections only.

Sysinternals Process Tools page

If you ever come across a windows executable in a mod download just delete it even if it doesn’t pop on Virustotal.

The big question is how to maintain the safety of people downloading mods from the forums.

The biggest safety net will always be a system of peer review by trusted individuals. This is assisted by authors posting their source code. I know some will be hostile to that request but minecraft can be decompiled, modified, and recompiled rather easily and so can your mod. Is it really that painful to add another bit.ly link and get extra clicks? That’s not to say that someone doing a review should only look at the source. They need to focus on the decompiled code but having the original as a reference for comparison is helpful.

You found a malicious mod!?! OMG flame the thread!

Uh... no

If you discover something that makes you think a mod is malicious the proper response is a well documented one so others can review what you’ve found and confirm or disprove it. Starting a flame war on the mod thread isn’t going to do anything constructive. It’s the administrators and moderators’ jobs to police the forum, not yours.

In a post describing what you found you should include a brief summary at the top followed by your findings with references to what tools you used, code snippets referenced to the file and line numbers, and other supporting information including hash values of all the files referenced including hash of the original files you downloaded and the source link.

At the end of this include a link to your analysis material in a zip archive that should contain:
  • A text file containing your analysis steps and tools used so others can follow your process.
  • The original files you downloaded in their own directory
  • The decompiled source you examined in it’s own directory if any
  • A text file with file names and MD5 hashes of all included files.
  • Screenshots of the post you downloaded the mod from will help if the author changes the links.
.txt files only please so a false report can’t be used to spread malware.

This may seem like a lot but it’s purpose is to support the integrity of the contained items. You’re essentially documenting evidence for a case to ban someone or possibly the start of legal action by someone against the author.

Register or log in to remove.

#2

  • Minecraft: Mackenso

Posted 15 July 2011 - 03:48 PM

Where is the download link?
Posted Image

#3

  • Location: Pittsburgh
  • Minecraft: TDWP_FTW

Posted 15 July 2011 - 03:54 PM

Hah...A whole big lecture on something of importance (I read the whole thing, nice post BTW), and you don't even post it in the right section. It belongs in Modding Discussion, although more people would see it here. Maybe the topic should be stickied here.

Posted Image


#4

    gpp

    Redstone Miner

  • Members
  • 519 posts
  • Location: Why you want to know forum? Its pointless to say. Realy. Unless i want to be robbed i wont tell. For now on i live in a whale. You dont know wich whale or what type of whale.
  • Minecraft: zXMegaSnailXz

Posted 15 July 2011 - 03:58 PM

View PostLeetCrafter, on 15 July 2011 - 03:48 PM, said:

Where is the download link?
this should stay here it helps with keeping alot of people safe...so this should stay here!!!
im the only man who can put M&M's in alphabetical order.

#5

  • Location: In a cave under Madagascar.
  • Minecraft: The_Webster

Posted 15 July 2011 - 04:12 PM

Awesome text, but this isn't the right place for it.
Posted Image Posted Image
Posted Image

Posted Image

Posted Image

#6

  • Location: Texas

Posted 15 July 2011 - 04:15 PM

View PostTDWP_FTW, on 15 July 2011 - 03:54 PM, said:

Hah...A whole big lecture on something of importance (I read the whole thing, nice post BTW), and you don't even post it in the right section. It belongs in Modding Discussion, although more people would see it here. Maybe the topic should be stickied here.

I placed it here because like the copyright, tips and tricks, and the bit.ly post it's relevant to the topic. The people downloading mods are the ones most at risk.

#7

    makermod1

    Lapis Lazuli Collector

  • Members
  • 977 posts

Posted 15 July 2011 - 04:18 PM

yea, i read most of it, its a great post... why the heck someone would go out of there way to hide a footprint though....
anyways this should be stickied :D
Posted Image

#8

  • Minecraft: Organum

Posted 15 July 2011 - 04:19 PM

hmm. I feel like this should be stickied. This forum has had a lot of trouble recently, and that'd only be compounded by an influx of Evil Mods that no one will admit are poisoned because they check out.
If English is your first language, please have at least a basic understanding of how it works.

#9

Posted 15 July 2011 - 04:33 PM

But, as i am naturally paranoid, start to think, "If you know this stuff, couldn't you make an alternate page as a png and some buttons to download a virus?" I mean, you just explained to us that you could O.o

#10

  • Location: Texas

Posted 15 July 2011 - 04:44 PM

View Postkasraspider, on 15 July 2011 - 04:33 PM, said:

But, as i am naturally paranoid, start to think, "If you know this stuff, couldn't you make an alternate page as a png and some buttons to download a virus?" I mean, you just explained to us that you could O.o

It's possible, but I purposely didn't use a short URL for that very reason. I'm not hiding where the link takes you.