Mac OS X Trojan Horse Infects MP3s
frequnkn writes "The Mac News Network reports that Intego has anounced an update to their anti-virus app for snagging the first Mac OS X Trojan horse, MP3Concept (MP3Virus.Gen), which exploits a weakness in Mac OS X where applications can appear to be other types of files."
So what?
Mac OS X can have trojans. Mac OS X can have viruses. Mac OS X can have security issues.
It's just a lot harder to exploit all of these things on Mac OS X for numerous logistical, technical, and statistical reasons.
It is a real concept. There is an example of the trojan, or "virus" (sic), here: http://www.scoop.se/~blgl/virus.mp3.sit
However, it seems that this may be at best questionable, as the "proof of concept" is nothing more than a standalone CFM application that has been given a creator type of 'APPL' (recognized by Mac OS X as a Carbon application), but with the file extension '.mp3', the standard mp3 icon, and the contents of an mp3 (which Mac OS X displays to the user an mp3). While the file does indeed appear at first glance to be an ordinary mp3, what can admittedly be potentially dangerous, it is in fact an application.
Additionally, as a CFM application, the file needs to be transported in such a way as to keep the resource fork intact, massively reducing its utility.
I predict a future security update with disallow this behavior...
This does not change the fact that Mac OS X is fundamentally and philosophically far more secure than alternatives.
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8 &oe=UTF-8&safe=off&frame=right&th=631707378ffe9292 &seekm=blgl-5D750C.02150821032004%40news.bahnhof.s e#link6
It appears that this is merely a proof of concept virus, hence, it is utterly benign. It was not made with any malicious intent, but to demonstrate one way that OS X could be exploited. The discussion group is concerned with making OS X more secure, not less.
Somehow, Intego got wind of it and blew it out of proportion, but I suppose it is theoretically possible that future viruses could be modeled on it. However I'm sure that Apple could, even more quickly, release a security update that fixes this.
Somebody on macnn.com pointed out this: http://groups.google.com/groups?hl=en&lr=&ie=UTF-8 &oe=UTF-8&safe=off&frame=right&th=631707378ffe9292 &seekm=blgl-5D750C.02150821032004%40news.bahnhof.s e#link6
This is nothing new... people have been doing this for years on Windows. OS X lets you hide file extensions too, so MyMusic.mp3.app can show up as MyMusic.mp3. The article seems a little misleading at first -- the ID3 tag isn't executed, its a full fledged application that contains an MP3 file.
.mp3 extension, rather than showing the file as an application, leading users to believe that they can double-click the file to listen to it. But double clicking the file launches the hidden code, which can damage or delete files on computers running Mac OS X, then iTunes to play the music contained in the file, to make users think that it is really an MP3 file . While the first versions of this Trojan horse that Intego has isolated are benign, this technique opens the door to more serious risks.
It would take me about 15 minutes to write my own "trojan horse" of this nature... Don't make a big fuss over nothing.
From the MacNN article:
The company says that Mac OS X displays the icon of the MP3 file, with an
Sanity is not statistical.
It can delete your personal files and such, but beyond that it would require a password.
No. The RIAA had a widely publicized program where they hired programers/crackers to create bots to find MP3s (and report them -- there was a slashdot story about a guy with a name similar to some artist who got an automatically generated cease and desist letter, asking him to stop distributing MP3s he made). The WSJ also had an article about "experiments" the RIAA was doing to break into users computers and delete MP3 files that were pirated. (Nevermind that pirated MP3 files would be indistinguishable from ones which were ripped for Fair Use).
To quote my girlfriends mother talking about John Ashcroft, "I hope their [Members of the RIAA] stomachs explode and the devil comes take them".
The resource fork is a remnant of the pre-OS X days. Pre-Mac OS X files, including applications, had two "forks": data and resource. When Mac OS X was created, it had the ability to run its own native applications, as well as two types of "Carbon" applications, Carbon being an API that allowed portability of applications using a subset of the old Mac OS programming APIs. One type of Carbon application, CFM, uses a resource fork for, among other things, file metadata. One of these pieces of metadata is something called Type and Creator. "Type", in this case, is set to APPL, and thus identifies itself as an application. While OS X decides to display the file as an MP3, the launching behavior is that of an application - just an oversight. The issue I was referring to was the resource fork must be kept intact in order for the file to still work - and any type of binary transfer WITHOUT special handling or compression (e.g. StuffIt, MacBinary, etc) will strip the resource fork and render this little "trojan" useless.
Also, if you knew the first thing about Mac OS X, you'd readily admit that the design philosophy and fundamentals of the OS do make it far, far more secure than, say, Windows.
assuming this is a serious question, try this for explanation.
It's not highly unlikely. There was a story about a similar exploit in .XM just this week on Slashdot, and a major MP3 exploit in WinAMP before. It's a major problem with software -- most of the time, developers do not validate stuff coming from data files to the degree that they do stuff coming in from the network, so it's a lot easier to manage to pull off a buffer overflow or similar. It used to be that a major malware transmission vector was disks. Next was worms, over the network (but that's pretty easy to secure). But in a day and age where P2P networks exist all over, a good attack is against any programs reading data files downloaded from someone else. Audio files, video files, compressed files, games...you name it.
May we never see th
Type/creator is no better than extensions, it's just that you can't see them. So while your APPL/VND type creator is there, it's no different than just naming your file:
.jpg.vba or whatever, since by default windows hides the extension (same thing as type/creator). And resource forks, being non-standard on most other OS's means that every time you move files around you lose meta-data that has to be rebuilt. Type/creator solves nothing, the only real solution would be using dynamic typing, but that won't work because there are so many files that are similar (look in your magic database, you'll see that stuff like Z machine files are not included because they cause too many false positives)
file.mp3.APPL.VND
And this is precisely how the exact same "information hiding" works in windows with
Extensions really have been the best solution, though there is room for improvement.
Free Online Woodworking Resources Directory
It's not executed when you open it in a music player, it's executed when you open it in Finder.
.mp3 extension; apparently the HFS+ filetype takes precedence over the file's extension on OS X.
.zip file with Mac metadata extensions, an xtar archive, a MacBinary file, etc., then decode it, then double-click the MP3 inside. Since there is basically no legitimate reason to encode an MP3 with one of those archivers when transmitting it over the internet, this trojan is extremely easy to avoid; don't double-click MP3s that were extracted from Stuffit archives and similar places.
.zip with a password supplied in the e-mail and then running the contents to enable a worm to spread, so it's not entirely implausible. I'd like to think that Mac users have a higher average intelligence when it comes to virus safety, but I'm not too confident.
I haven't looked at this trojan, but I participated in a theoretical discussion of the possibility on usenet a couple of weeks ago (interesting timing, that) and the theory isn't that strange anyway.
The way it works is that it's actually a full-blown application. It's a Carbon CFM application, which is stored as a single file. There's a resource in the resource fork of the file which tells the OS where the actual executable code can be found; this allows the application's code to be embedded inside a larger chunk of data. The whole thing is then typed APPL with the HFS+ metadata filetype, but given a
If you open the file from your music player, it's a real MP3 that just happens to have a bunch of junk (trojan code) in an ID3 tag. It plays, nothing else happens. If you double-click it in the Finder, though, the Finder sees that it's an application and launches it, and then you're doomed. The app can do whatever it wants at that point. Presumably one of the very first things it does is open itself with your MP3 player so as to give the appearance of functioning like a regular MP3 file, and then it can go around infecting or deleting files at will.
This isn't a particularly dangerous trojan. Because of the dependence on HFS+ metadata and resource forks, the app can't be transported raw, it has to be encoded. So you absolutely cannot be infected by double-clicking an MP3 you got from Kazaa. You have to download an archive file, like a Stuffit archive, a disk image, a
For a successful internet worm to result from this, the recipients have to do two steps. First they would have to decompress the file that was sent to them, then they'd have to find the results and open it. Of course, we know from the example of Windows worms that enough users will go through the trouble of opening an encrypted
Mod down posts with a "Free Mac Mini/iPod" sig, they're spam!
Utterly wrong. This is a CFM executable with no hidden extension. Double-clicking on it from the Finder will execute it, but dragging the file on to iTunes will only play the MP3 stream inside the file. Mail.app, however, correctly identifies it as an executable when you try to open it from inside an email.
Type and creator are not stored in the resource
fork nor the data fork. You could think of them
as a third, fixed-size fork. At least, that's what
Siracusa of Ars Technica wrote.
Ben "You have your mind on computers, it seems."
The file is a CFM application. As others have pointed out, this means that it has a resource fork which it needs in order to be able to run. Thus, it must be downloaded as a compressed file. If the resource fork is stripped, it is harmless, as the payload will never be executed.
Its name ends in ".mp3", and the included icon is copied from an iTunes MP3 file, but its type code is APPL, an application. The data fork is a valid MP3 with PowerPC executable code inside the ID3 tags. When given to iTunes or another MP3 player, it simply plays the included sounds without executing code. When double-clicked on from the Finder, the surrounding bits of MP3 file appear to be ignored and the code is executed. The payload for the proof-of-concept displays a dialog box, then tells iTunes to play the file itself, presumably via AppleScript.
When double-clicked, it shows up in the dock as an application, though this could be suppressed in an actual hostile trojan just like many utility programs do. In the Finder, if one is using column view, it is identified as an Application instead of an MP3 File, and its icon is shown instead of a QuickTime-style playback bar for previewing the contents.
In terms of an actual exploit, the only thing going on that is even possibly questionable at an OS level is the presence of other stuff in the data fork before the Joy!peffpwpc tag. I am not certain if this is allowed in the definition of what a PEF executable is supposed to look like. Aside from that, there is nothing else that is tricking the OS into doing something it shouldn't do, only legally included information that is deceptive to a user who is not looking carefully at things.
BeOS virus ? Something to keep you awake at night... BeOS could also set arbitrary icons for files to disguise their real types. This problem is nothing new.
--
I romp with joy in the bookish dark
NeXT did it for a good reason:
.app directory so all the resources, bitmaps, and supporting files are in that one directory. That is why I can reinstall OS X and have MS Office X and all my other applications still work without reinstalling everything. I suppose they could still do fat binaries as well if they ever decided to do so.
NeXTSTEP ran on four different hardware platforms and had fat binaries. Within the foo.app directory, there'd be foo-moto, foo-386, foo-sparc, and foo-hpux binaries. The OS would then attempt to execute the appropriate binary for the hardware platform the OS was running on.
OS X uses the
I tried every decent and legal way I could think of to resolve the issue w/the business before I rented the chicken suit
On Windows we had Trojans of this level of complexity -- really little more complex or interesting than distributing an AOL password phisher as porn and/or a game -- ten years ago. This can effect anything from Palm OS up to a mainframe. It'd be something to be scared about if a worm came out for OS X that can infect without any user action.
Safari just opens the archive in that case.
.sit archive. Neither of these exceptions poses any danger.
It only opens files once. It doesn't then open what the files produce. There are two exceptions to this; one is that anything that's gzipped is un-gzipped and then opened or not based on the contents, the other is that stuffit will automatically mount a disk image contained in a
One thing to keep in mind is that this trick only tricks the user. If the Finder knows it's an executable application, any other app on the system can find out too.
This is not an exploit of anything, it's just a cleverly designed application that looks like a music file to a human being. It can't be run without active participation by the user.
Mod down posts with a "Free Mac Mini/iPod" sig, they're spam!
In NeXTStep V1.0( and I think 2.0), the entire application was stored in a Mach-O format file. Ultimately, there were resource issues involved in trying to keep the entire application and it's resources in a single Mach-O file, which resulted in this being splitup into a diretcory containing the resources, and the Mach-O file retaining the executable data required by the system loader.
That's not all that different from how classic Mac OS apps were stored in different resource areas of a file.
The Intego Virus Barrier software just flags as "infected" any CFM executable whose name ends in a common file extension... which is why it STUPIDLY flagged as viruses the BMP, PCX and PNG plugins for Photoshop Elements. Which means it does not even check for a dot and something else before the file extension.
Proof (jpg)
Can you say "crappy" ? I'm sure you could.
Maybe we deserve this world ?
The linked article (and most coverage of this trojan) is very misleading. This trojan does not delete files, propagate itself, or infect other files. The press release from Intego just says that a trojan like this could do those things. Read the press release for yourself.
Intego Press Release
The important thing to realize here is that Mac OS X, while very secure, is not perfect. And no matter what OS you are using, you should be very careful what you double click! Let's hope Apple nails this quickly!
The resource fork is not CFM-specific, and is not where metadata goes. Metadata, like the type and creator, are stored along with info like the filename. A file can have this metadata without having a resource fork.
A resource fork is used for extra data. Pre-OS X applications store dialogs, sounds, pictures, icons, strings, and even program code in the resource fork. All files on Mac OS X are capable of having resource forks, this is used by programs like BBEdit which store cursor & window position in the resource fork of text files you create.
Mac OS X is only capable of running one type of application binary, the Mach-O executable. When you run a CFM (Code Fragment Manager) application, launch services will run the 'LaunchCFMApp' program transparently. Normal CFM programs require a 'cfrg' resource in order to function, as well as a 'carb' resource to launch outside the Classic environment. CFM applications aren't necessarily Carbon, but that's by far the most common case.
The program isn't all that special. It has a custom icon, like every other application, but the icon looks like an MP3. If you transfer it without archiving it with Stuffit or MacBinary, the type & creator get killed (can't launch) and the resource fork goes away (no custom icon, can't launch). Since the data fork is a valid MP3 file, when you launch the stripped version it will open iTunes and play. You can also strip the file by going to the command line, and running 'cp virus.mp3 virus2.mp3'.
The 'cfrg' (Code FRaGment) resource is usually created automatically by development tools. It specifies where in the data fork the application code resides. So it's trivial to create an application that is also valid as a different kind of file.
I suspect it will catch the kind of people who put '.' in their $PATH, browse slashdot as root, and open email attachments in Microsoft Outlook.
Oh, and don't think that Mac users haven't had *problems* with viruses, as any Hypercard programmer will tell you (I hated MerryXmas virus).
NS 3.3 ran on four platforms. That was the last version I used, and I distinctly remember it. There were even NeXTSTEP utilities that "thinned" out these fat applications and only left the thin executable you needed.
I tried every decent and legal way I could think of to resolve the issue w/the business before I rented the chicken suit
Someone should point out that the distinction that you're making is in name only. The actual codebase is the same, rebranded as "OPENSTEP" when they published their API for open implementation. For all non-marketroid intents and purposes, NeXTstep did run on four architectures. I had the pleasure of using it on i486, an HP "Gecko" PA-RISC workstation, and one of those noisy Tadpole SPARC laptops.
And although the code segments were not interleaved within the same file in the way that you're thinking, the actual term was "fat binary" both inside NeXT and within the user community. There was even a tool called "lipo" (as in liposuction) to strip out the architectures that you didn't need. It still lives in /usr/bin on MacOS X today.
The "cue the foo posts in 3, 2, 1..." posts will commence with no subsequent foo posts in 3, 2, 1...
Sorry to burst your bubble, but the whole 'app is really a directory' thing is a SOLUTION to the 'resource fork' storage problem. And it allows for cleanly implemented multi-platform 'fat' binaries. Apple's Classic fat binaries were kludgy, the CODE resource fork held the 68K binary and the data fork held the PowerPC binary, hardly extensible.
I've got an OSX install on purely UFS, and sure enough, it allows you to pack x86 and PPC binaries (or multiple PPC/X86 binaries, for optimization/bitness) into the same *.app so you can have one application file that executes on multiple architectures. It might not be Apple's hacked-up old kludgy way to get a 'fat binary' but it's effectively the same result but done MUCH cleaner and capable of living on many diverse file-systems.
Imagine how cool it would be to have ONE shared 'applications' folder mounted read-only on all your clients, the x86 clients execute the x86 code from camino.app and the PPC machines execute the PPC code from the same place. It would be an administrator's utopia!
"Sometimes, I think Trent just needs a cup of hot chocolate and a blankie." -Tori Amos on Nine Inch Nails