You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

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

How to remove rootkits and malware?

I have downloaded and ran the programme Rootkit Hunter and the results are worrying.

I don't know much about malware other than a malicious individual has persistently been installing it onto my machines via malicious emails - this time targeting my iPhone 4 (which I promptly got rid of upon discovering this individual's presence and replaced with a new Samsung S4, which is probably infected as well now) first; and from there using my house Wifi network to get onto my Macbook Pro 10.8.3 (which is the machine I am on now, and the machine the results refer to); and also my Samsung Galaxy Tab 10.1; and most likely the phones and computers belonging to other members of my family are compromised as well.

The following are the worrying results identified by Rootkit Hunter:

For "Checking LD_LIBRARY_PATH variable", it says in yellow "skipped".

For "Checking for hidden processes", it also says in yellow "skipped".

I also have red warning notices in relation to system configuration file checks and filesystem checks alerting me to the following:

"Checking if SSH protocol v1 in allowed The SSH configuration option 'Protocol' has not been set";

"Checking if syslog remote logging is allowed Syslog configuration file allows remote logging: install.* .0.1:32376"

"Checking /dev for suspicious file types Suspicious file types found in /dev: /dev/fd/6: MS Windows icon resource"

"Checking for hidden files and directories Hidden file found: /usr/share/man/man5/. rhosts.5: troff or preprocessor input text".

I do not know how to interpret these results other than of course realising they are alerting me to the fact that something is wrong and needs fixing.

I do not know exactly what Rootkit Hunter is telling me is wrong, and I do not know how to fix the problems it has identified.

I would greatly appreciate it if anybody could perhaps tell me how I can do these things. And any advice on which programmes to use for my Samsung machines and the best way to protect my devices in the future would also be greatly appreciated.

Posted on Aug 23, 2013 11:05 AM

Reply
Question marked as Top-ranking reply

Posted on Nov 13, 2017 6:00 AM

Hi mate, I know it’s been a few years since you posted about this issue and at the time I would not have believed that what you were experiencing was anything like what you were describing. I understand how frustrating it is to have people tell you that something isn’t possible, when it’s obvious to you that it is. I found your post because a similar Trojan has infected nearly all of the devices on my network also. It has similar functionalities to what you have described and I’m about ready to give up and just deal with it.

I have five macs, an iPad, two iPhones, an Apple TV and a technicolor gateway/router which are all infected. Two of the macs had boot camp installs of windows which were also infected and all the devices are compromised at the NVRAM / SMC / EFI and system partition levels. On the macs it works by changing the boot order of the drivers in the NVRAM parameters so that the Bluetooth driver loads first, it loads an infected blued.plist file which launches all the processes required to take control of your system before it even gets to load the USB drivers required to accept any input from your keyboard. So, no key combinations for SMC reset or NVRAM reset, or alternate boot device menu, or single user mode boot can intervene. Remove all the drives from the machine and make the blued.plist file inaccessible and instead it will attempt to NetBoot the infection from any attached devices, including a time capsule and even a thunderbolt adapter if it contains an option ROM, failing that it will got for a remote server and if there’s no internet connection it displays the ‘Internet Recovery’ screen and asks you to connect to a wifi network. Internet recovery appears to be running as normal, but actually the boot loader just redownloaded the infection from a remote server, created a ram drive with some bootable Linux based UEFI parent/controller and then runs the recovery mode below that, infecting the OS installer as it downloads from the secure apple server.


Back to square one.


I haven’t even begun to figure out how it works on iOS yet but I assure you it has infected those devices in a similar way.


I believe i was infected because of a JavaScript/sandbox vulnerability. I think I entered my Apple ID info into a malicious password prompt pop up which looked identical to what a real one did at the time (iOS 10.2). Now iOS and OS X both operate as if they have been sandboxed, with processes invisible to activity monitor but not to a root level terminal shell. It creates TCP connections to the remote control centre which aren’t easily detected because it compromises existing system processes like airplay, screen sharing, spotlight etc. It intercepts the dns requestes of all the antivirus software updaters that I’ve tried so far, and either downloads fake definitions files or modifies the applications to skip the infected files like you mentioned. Malware bytes, little snitch, blockblock, kaspersky, norton, Sophos, intego, the App Store updates and iTunes all get intercepted and redirected to alternate download servers. NetBarrier by intego is the only software that seems to actually still operate correctly and prompt when a connection attempt is made, it shows the address of the server that the app attempted to contact and they’re usually amazon hosted cloud storage or some real looking address like updserv.live.norton.com but with a .aksdns.net at the end of it. None of the addresses ever resolve to a server in safari because if you attempt to connect without presenting the software’s built in encryption key then it just silently drops your request and resolves to a 404 error.


I could give you another 2000 words on other behaviours I have discovered but I think you get the point. Basically the main ones are; keys are logged, passwords are captured, time machine backups are infected, any and all drives that are connected to an infected system are immediately repartitioned with a hidden 60mb EFI boot volume so as to infect any other devices it may be connected to during a reboot, RPCs for hidden screen sharing connections appear in Console and most deceiving and destructive of all, wifi and Bluetooth are both active even when OS X shows them as disabled and even when the network device is completely removed from the network pane of system config.


My next option is to attempt a physical hardware flash of the NVRAM to a clean factory state followed by an internet recovery from an alternate internet connection or with a new modem (the technicolor gateway is a SOC device running FreeBSD so it was infected also).


Anyways, my point is, I believe you, it’s possible now and the vault 7 leaks show that it was possible in 2013 as well. I’m sorry that you had to go through it, I feel your pain and I hope you’ve upgraded devices since then and managed to keep them from becoming infected also. Apple says that it’s beyond the scope of their engineering department and that I would need to consult a cyber security specialist in order to remove it. If I don’t figure it out soon I will be returning my six week old iMac and asking for a new one.


Wish me luck!

68 replies

Sep 7, 2013 5:13 AM in response to Minty18522

And would it be worth it abandoning compromised email accounts altogether and opening new ones or would just changing the passwords suffice?


I created a whole new Google Play account for my Android devices - as I know for sure she had pretty much unfettered access to my Galaxy Tab - but I am starting to think that was a little extreme and a mere password change on my Play acount would have done the job.


Although if she had already infected apps which I am currently using then surely a mere password change would not correct that.

Sep 7, 2013 5:28 AM in response to Minty18522

And could anyody please recommend the most effective software programme I can download onto my Macbook Pro (and Android devices too if anybody knows) which will detect and remove this kind of malware, and which will keep my machine fortified from attacks?


I have just installed Little Snitch as a poster here recommended, but I am reluctant to clutter up my machine with any more programmes if they aren't even going to do anything. I want the best one there is.

Sep 7, 2013 4:49 PM in response to Minty18522

Minty18522 wrote:


If the person is/was not accessing my machines via these email accounts, then could someone who knows what they are talking about please confirm to me that if they can't access my machines through these email accounts, then they can't access my computers and phones at all?

The usual way of using e-mail to access a PC is to include an attachment, usually disguised as something else such as an MS Word document, PDF, image or USPS/UPS/FEDEX delivery receipt, which either takes advantage of a vulnerability or tricks you into allowing it to install something capable of communicating over the Internet (a bot). That process would contact a command and control server which would tell it what to do, which could be the installation of additional malware (e.g. Flashback) or simply pass on userid/password credentials. Little Snitch would then alert you to that fact that a new process was trying to open an outbound connection from your computer. Again, there have been no instances of being able to do any of this by simply reading and e-mail.


At the present time, all such currently known attachment malware has had the vulnerabilities patched and/or the fully up-to-date OS X 1.6.8 and above Quarantine and XProtect system will warn you when you attempt to open them.

And I own an external hard drive with a lot of valuable stuff on it. Should I be worried that anything nasty could have wormed its way onto that? I had plugged it into my infected machine before I took it to the store.

There are no currently known "Worms" that could have worked their way to an external hard drive. It would have had to have been something you copied to it. As long as it's not a backup drive, you should scan it should you decide you need additional security software.

Sep 7, 2013 4:48 PM in response to Minty18522

Minty18522 wrote:


And would it be worth it abandoning compromised email accounts altogether and opening new ones or would just changing the passwords suffice?

That's normally appropriate when someone is using your e-mail address to send a lot of Spam. If you have changed your strong password and verified that your e-mail ISP doesn't allow proxy users to send mail from it (businesses do this so a Secretary can send e-mail in the name of their boss) then that should be sufficient. Of course if there is a communicating keylogger on your computer then it doesn't matter what you change, as all your new account names and passwords will still be sent out.

Sep 7, 2013 5:04 PM in response to Minty18522

Minty18522 wrote:


And could anyody please recommend the most effective software programme I can download onto my Macbook Pro (and Android devices too if anybody knows) which will detect and remove this kind of malware, and which will keep my machine fortified from attacks?

Are you looking for malware or spyware, as I explained before there is a difference. If it's spyware then I've already told you here the only solution currently available, but you will need something else if your looking for Malware.


I'd guess 99% of Forum users recommend Sophos or ClamXav as being able to adequately reveal any malware that has already slipped past you or OS X or would affect a Windows user if you sent it to them, without unnecessarily slowing down your computer.


Although testing was limited to some extent, Thomas has results for most available Mac A-V software at Mac anti-virus testing, part 2.


Full disclosure: I do uncompensated tech support for the ClamXav Forum.

Sep 19, 2013 10:00 AM in response to thomas_r.

But with a virtual keylogger it doesn't capture the actual characters - in the password fields there are just a series of dots typed in with an on-screen keyboard.


The only way the person operating the keylogger can find out what the dots are/were is if they were able to take control of and manipulate the Kaspersky anti-keylogger virtual keyboard with their malware.


Or else if their malware can successfully quess - along with themselves watching the characters being typed via screenshots (I type rather slowly, speeding my typing up and appearing to type erratically could perhaps work and leave them in confusion) - which keys are being typed; and thus the passwords.


If it was totally useless why would Kaspersky's much-vaunted anti-keylogger virtual keyboard be even marketed at a high price and be seemingly held in high regard?


Apparently though with a keyboard with jumbled letters, numbers, and characters, the chances of evading the keylogger is much higher.


That is why I am asking about one of these for the Mac and/or Android.


And again, any other advice about evading keyloggers would be much appreciated - I have given up trying to get rid of the Rootkit for now, as even a clean reinstall made by the clueless as of what to do staff at the Apple "Genius Bar" didn't work (the Samsung staff were even more clueless and devoid of any helpful sugestions).

I've resigned myself to just putting up with this parasite until I have changed my machines and have new clean ones, and can finally shake them off once and for all.


I really want to protect my most important passwords now however.


Once again, thanks to anyone who can offer helpful advice in advance.

Sep 19, 2013 10:11 AM in response to Minty18522

By the way the person is locking me out of my own accounts and changing my passwords; unsubscribing me from sites; and frustrating my efforts to subscribe to others by wiping me off databases before accounts are fully created etc.


So there is no doubt that a keylogger is actively in use. Please, nobody write in to suggest that I may be mistaken, as I am certain that I'm not.

Sep 19, 2013 10:41 AM in response to Minty18522

Minty18522 wrote:


if their malware can successfully quess - along with themselves watching the characters being typed via screenshots (I type rather slowly, speeding my typing up and appearing to type erratically could perhaps work and leave them in confusion) - which keys are being typed; and thus the passwords.

There are no currently known malware keyloggers that can impact OS X. Of course there are quite a few commercial or hack keyloggers, but they have legitimate uses and are thus not found by any Mac A-V software, unless identified as PUA (Potentially Unwanted Applications). They require physical access to your computer or local network (if you have sharing enabled) in order to install them.


Android is another story. There is all kinds of malware of every type and it continues to increase at an alaming rate see: “More trouble” brewing as mobile threats multiply “exponentially”, ex-ISACA chief warns.


Did you ever run MacScan on your Mac to see if anything showed up?

Sep 19, 2013 11:26 AM in response to MadMacs0

Not recently have I used MacScan - I tried it out before one of the countless wiping of the drive & reinstallation of the operating system combos I have went through and it took ages and didn't reveal anything remarkable. To be honest, at one point I had so many programmes like it all doing the same thing, nothing, that I was glad to get rid of them all after one of my regular formats.


At the minute I have Sophos, Little Snitch, Rootkithunter (which I don't have activated - it is known for its false positives I understand, so it just confuses the issues further for me; and Kasperky - specifically for its anti-kelogging virtual keyboard feature.


The person definitely didn't have physical access to any of my devices, so they definitely infected me remotely via my network.


As for the plethora of legitimate keyloggers which are used for illegatimate and illegal purposes, how does one set about identifying them as "Potentially Unwanted applications"?


I am most worried about my bank details: but if there was any dodgy activity going on with my online bank account the fraud department and police would on top of the person like a ton of bricks; so they would behaving seriously recklessly if they even thought about going near my online banking and would almost certainly land themselves in very very serious trouble.


Thanks Again!

Sep 19, 2013 12:09 PM in response to Minty18522

Minty18522 wrote:


As for the plethora of legitimate keyloggers which are used for illegatimate and illegal purposes, how does one set about identifying them as "Potentially Unwanted applications"?

That's up to the individual A-V signature folks to classify them that way.


With ClamXav the default is to not scan for them, but I won't bother to explain how to turn that feature on since none of the 5278 PUA definitions are also OSX. At least 3936 are Windows, only one is identified as Android but there are 147 RATs.

Rootkithunter (which I don't have activated - it is known for its false positives I understand

Not exactly false positive, IMHO, just that it's really designed to be a Unix tool to warn IT administrators that something has changed or is out of the norm with their setup. Since Apple makes a few changes to the way it's Darwin Unix code is configured, RKHunter will give warnings about such things. I have whitelisted several of those items, but I've also found minor changes with many new major OS X version.


They currently have specific checks of four OSX Rootkits (Boonana-A Trojan (aka Koobface.A), Inqtana w/3-variants, OSX Rootkit 0.2.1 (OSXRK) and Togroot Rootkit). None of these are considered to be "Darwin" rootkits as they don't reside in any of the Unix directories, only the System, Library and User directories (folders).


I used to be somewhat concerned that SSH root access was allowed by default, but that appears to have changed at some point and is no longer the case with Mountain Lion.

How to remove rootkits and malware?

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