阅读94 返回首页    go iPhone_iPad_Mac_apple


Traveling Rootkit

II've been dealing with a Rootkit issue for almost six months now. The Apple Store even said nothing was wrong but did a "clean install" just in case while I waited. I'm not sure they touched the EFI partition or Recovery Drive though. Booting from the Recovery Drive gives a very subtley altered version of the real thing and functions in a way that seems normal, but reading the install logs shows webooks and additional packages in tow including Asian Language Support and an update for Gatekeeper. I also called a friend on an uninflected Mac and compared fingerprints for Apples root certificate and they didn't match.

 

Reading dmesg shows ACPI turning over half of my processors to use elsewhere, Bluetooth daemons run even though Bluetooth is disabled, Postfix is always installed along with other components and config files that are clearly not from Apple, and if I poke around too much I suddenly get removed from the admin group and lose connection control of my system. Sometimes it just shuts down and the entire /sys folder is gone meaning I have to reinstall from scratch.

 

iI've got a MacBook Pro 10,2 but the firmware shown doesn't match the one Apple says is the most recent. It's a higher version that doesn't exist and I somewhere found a config file or polish file that denies downgrading firmware. Same with the SMC file. Since there's no CD drive and no printed media for Yosemite or even Maverick, I have to use internet recovery which is worthless since my DNS is hijacked. And anything installed or downloaded is injected with self-protecting and/or self perpetuating code. Image files and text files have executable tags on them. Even icons and color profiles. So just loading the desktop opens who knows what code just by displaying the background image, folder icons, and colorsync settings.

 

I had to start using terminal commands for everything because the gui interface apps were altered to remove important settings, but then I realized aliases and symlinks were being used to alter everything I do. I even wiped the drive completely including EFI partition and Recovery Drive but it still comes back even if I'm offline and unplugged. I've seen some rogue code ,entitling handoff and like I said before Bluetooth is running without  being activated. I have a screenshot of the setting saying my Bluetooth interface is active next to the window showing it being turned off. And only half of my processors are being used. The other half are remapped during the boot process. By the way, resetting NVRAM and SMC did nothing.

 

It uses Migration Assistant to prevent a clean install. I can see the packages listed in the list file and they include EFI and SMC payloads. I just don't know how to edit the scripts without breaking the authentication. And installing XCode or Homebrew or anything that installs compilers and Python is like opening Pandoras Box. Not an option Since I'm not fast enough to keep up with the mess of new code files spewed forth that results.

 

Booting a Linux install CD from a USB drive will get me to a whole separate mess basically the same. i did manage to get into TAILS which slowed things down and downloaded SystemRescueCD and was able to zero out my drive. And Midnight Commander was able to parse some of the previously illegible code. But I still see a tftpboot folder that shows up on Mac or Linux even when the network is unplugged and offline. And no matter what there are always at least 60 entries in the /den folder for tty devices from tty1 all the way to ttyz89. And sometimes a list of pty devices too along with several loop devices, vcsa, vhost-net, etc. again this is on an offline computer. However, if I try to install Linux from the SystemRescueCD the initrd and kernel instructions point the installer to corrupted versions and APCI still runs even using the apci=off command in Grub. It then makes a copy of the CD somewhere so it can alter it and future boots are pointed there instead of to the actual disk. I verified this by unplugging the drive and it continued to function with new commands in directories I hadn't accessed..and it was not booted into RAM.

 

My favorite was when I tried to download Kali Linux and installed it. It had been modified to show every single app in every single category as ncat.  Cheeky b@$t@rd$. I managed to download some files at the library but as soon as I copy them over they get altered.. Which reminds me... I need to try mounting as read only and run from the drive directly. But another weird thing.... Even on other networks it will rear its ugly head if my phone is around. I downloaded. Apps at a friends house and got one spurned to disk but by the second one I saw the same language encoding files and a css file with the same evil code getting burned to the disk.

 

IM pretty sure Subversion is being used to keep the whole apparatus up and complete. Deleting files does nothing because on reboot everything is back in place. I just can't figure out where the source is that's deploying these files is. Assuming there's an option ROM installed that is making it possible to repurpose my PCI devices to run the installers and other processes, could a host drive with the master disk image be hosted in a device too? Like someone else mentioned elsewhere, the Apple folks are useless. The "Genius Bar" guy cut me off when I tried to show him blatant entries in the logs and said they aren't trained to read code. Only engineers can do that. And I've been through three senior AppleCare techs. The first two basically laughed and called me paranoid, and the third keeps getting disconnected when I try to call. Which reminds me of another point, my phone data usage has more than doubled since this all started and there are all sorts of scripts involving VT100 commands. But even with all phones off and batteries removed It finds a way. I'm about to turn my closet into a Faraday cage but then I can't download software from Apples "Secure" Server.

 

ONe thing that would be useful... Oooooohhhhhh so useful... Is a repository of the files that make up the OS so I can see what is right and wrong. There's the open source stuff on the developers site but it's not easy to figure out what's what and it's not the latest version. ive been trying to use the Linux From Scratch site for a Linux version but since my certificates are forged I don't know if anything I read online is accurate. For all I know this post may never see the light of day. But the bottom line is this thing is big and sneaky and if we don't figure out how to kill it easily it's going to bring this entire world to its knees. I know several people who have it and don't even realize it. It only gets nasty and fights back when you start poking it.



TMTR. Is there a question in there somewhere?



Yes. And if it's too much to read then don't.



I read it and was unable to find the question also.

 

Sarcastic answer are not going to help you get any answers. It is more likely it will scare users all.



My answer was not sarcastic. There is indeed a question complete with a question mark. And many implied questions including the obvious "What the **** do I do???" that should go without saying. But here are some bullet points since I'd rather have a productive discussion than fill up a thread with unhelpful ctiricism of forum etiquette.

 

  • Rootkit on a Macbook Pro 13" Retina Early 2013.
  • Persists through complete wipe of drive including EFI and Recovery Partition.
  • Uses version control to keep config files in place and invilves a tftpboot device.
  • Only 2 processors show up as online and running.
  • Booting from Internet Recovery is rerouted to spoofed recovery system
  • Downloads and file transfers are altered to include malicious code.
  • Apps include EFI Payload and SMC Payload installers.
  • Serial devices are in use even though I have none.
  • Bluetooth is active even though it's turned off.
  • PCI devices all have option ROMs installed and I didnt install them.
  • Keychain adds countless permissions for things I never authorized.
  • Netstat shows active connections when the modem and router are turned off and unplugged.
  • My 500GB hard drive has been wiped of all partitions and partition maps and verified with fsck, fdisk, and gparted using an external DVD boot of Linux and shows about 450GB free.
  • However, even booting from external sources routes through Grub and launches altered versions of the Linux kernel, apps, and bin/sbin commands.

 

Questions:

  • How do I boot without the option ROMs or disable them?
  • Is it possible to create network connections theough other protocols such as Handoff or AirPlay?
  • How do you reveal and access hidden areas of the hard drive?
  • How do I download files securely without the system altering them intransit or while being copied from a disk?


I see nothing here but a work of fiction. Especially phones with no power source of any kind (you removed the batteries) still magically continuing to be infected with - something.

 

Restart the Mac and hold down the Command+Option+R keys to boot into Internet Recovery Mode. The Mac boots to its firmware this way, bypassing anything on the drive completely. Launch Disk Utility and click on the physical drive name at the far left. Choose the Partition tab. Change the default of "Current" to something else. If the drive is one partition now, and that's all you want, choose 1 Partition. Click Apply.

 

This will entirely wipe out the drive, including the current hidden Recovery partition. When it's done, exit Disk Utility and choose to install OS X. The version your Mac shipped with will be installed and all will be squeaky clean.



First of all, I believe you!  Do you have any idea how the Mac became infected?  It sounds like you contracted one of the new extremely rare firmware attacks.  That means it's re-written your firmware to inject the rootkit every time you boot.  If that is what happened, unfortunately you cannot remove it.  You cannot overwrite the firmware.  You would have to ship it back to Apple and have the system board replaced. This isn't just an Apple problem, there are PC rootkits capable of similar attacks.  Another possible item is the root kit could be installed in the hard drive firmware. Attacks of this nature have been witnessed in the last 3-4 years and until recently were likely state sponsored groups behind them.  This is not a run of the mill infection, it's quite advanced. 

 

Final option to truly confirm the rootkit is in the firmware would be to do the following:

1. Buy a new thumb drive 8gb+ (preferably one with a write protect hardware switch or external forensics write blocker device)

2. Plug it ONLY into a known clean Mac and download Yosemite and burn to the thumb drive

3. Replace the internal Mac hard disk

4. Boot only from the write protected thumb drive and install Yosemite

5. If the rootkit shows up then it has to be coming from the Mac firmware

6. Sorry... You have a brick...

 

There really is no way around this, the firmware is used to boot and will always re-install the rootkit as you have noticed.  Apple may be able to overwrite the firmware or replace the chip at their factory. 

 

You might try to find a security researcher who would be willing to buy the Mac purely for the forensics and reverse engineering of this attack.

https://arstechnica.com/security/2013/10/meet-badbios-the-mysterious-mac-and-pc-m alware-that-jumps-airgaps/

https://arstechnica.com/security/2015/06/new-remote-exploit-leaves-most-macs-vuln erable-to-permanent-backdooring/

 

At some point malicious software was run as root or admin privileges that allowed the firmware to be overwritten.  As a precaution in future, set a firmware password and ensure root account remains disabled and that you do not run a primary account as admin.  Be extremely careful installing software. Avoid pirated software as many contain malicious payloads.  Avoid the dangerous underbelly of the Internet / darknet, etc.



Kurt, you have no idea what you're talking about and your solution sounds like a stock tech support answer. I didnt say the phones continued to work after removing the battery... I said it uses my phone to connect but still functions when the phones are off. So there is some other means besides phone or ethernet or wifi that it can use to transmit. Yeah, it still sounds like fiction, but you're in for a rude awakening if you think I'm making this all up. Anyone who doubts me feel free to send me your email abd I'll gladly pass along some files for you to test that squeaky clean method.

 

James, thank you for your helpful response. I thought it might be Thunderstrike and I know of several times someone would have had the opportunity to execute something like that. However, the same code is on another Macbook Pro 1,1 that I have which I thought was immune for some reason. It's also a 32 bit machine so I was hoping that might be a limitation too. It has also infected my mother's Macbook which I only plugged my iPhone into once. I read a proof of concept, I think written by the same guy that exposed Thunderstrike, explaining how it would be possible for malware to spread through trust settings, and it seems that that's what's happening here.

 

I hadn't thought about swapping out the hard drive altogether though. I don't have access to a clean Mac but I've got plenty of Linux distros I know are clean. I'll give that a try.

 

Incidentally, the senior AppleCare tech had never heard of Thunderstrike. Or even the possibility of rooting a Mac like that. And another side note... My mom ordered a Macbook from an organization that sells donated computers to non-profits. It showed up and had the same issue without ever being connected to their network. Someone else must have decided a tax write-off was easier than fighting this thing.



I just read the second link you listed... That sounds right on and also explains why my computers go to sleep randomly when I'm using then and a lot of unintelligible code involving sleep commands. I hadn't heard about that one... Thanks again for the info. And a huge thank you for including a link with a way to test for it. That's something I never could find for Thunderstrike.



Okay, I see why Apple's staff called you paranoid. There's just way too much crazy going on here to even attempt continuing to try and help. It's time to put the fishing gear away. You've already pulled in more red herrings than you could ever use in a lifetime.

 

And yes, I have read up on the things you mention. The odds of any of them ever happening is just short of zero. Thunderstrike requires physical access to your computer. The chances that someone would take your computer, just happen to have the means to infect it, and give it back to you is laughably slim. 99.99999999999999% of the people who would takes someone else's Mac have no intention of ever giving it back.

 

And who's the only other person in this topic you'll listen to? Well, the person who agrees with you, of course! Even Apple's response that nothing was wrong didn't phase you. Please go away and bother someone else.



Yes it's crazy. But it's possible.  Not sure what purpose I'd have making this up, and I've got screenshots and logs and if you wanna come iver for supper I'll give you a live demonstration. And you can also show me the credentials that make you all knowing. You dont know who I am or who I know or what I know so until you have more to offer than "Nuh uhhh!" your comments are only making this thread more active and more likely to be seen. So thanks at least for that. But even if my posts are exaggerated, which they're not, then you still haven't offered any helpful suggestion for solving the rootkit issue itself. I dont deny that it could just be a really clever scripting job and I'm not versed in Python and Ruby and Mac kernel lingo to figure it out. Considering that 99.9999999...% of search results I've found didnt work, MAYBE it's possible that this is one if those freaky ones that you do admit exist.



Then prove it by following the steps I outlined above, which will completely replace everything on your drive with a fresh install of the OS and nothing else. Then without connecting to the Internet or mounting any other drives, prove to me that any of these symptoms return. Until then, you're wasting your time, and everyone else's.

 

As I said, yes, I have read about these firmware threats before. But physical access is required by the very, VERY few people who even have a copy of Thunderstrike and have the knowledge to apply it. It also requires a Mac that was built before mid 2014. Any newer firmware cannot be infected. You haven't said how old your Mac is, so I will say there is an extremely thin possibility that what you say is true. But it would take an extraordinary set of circumstances to have been fulfilled.

 

Hold the shift key and click on the Apple at the upper left. Choose System Information. Post here what model Mac you have, which is the second line. It would be something like MacPro5,1. Also note the Boot ROM version here, which is your firmware release, which you say doesn't exist.



Here's a screen shot of the Hardware Info. Maybe you can also tell me why the spacing is bugged out too?

 

Screen Shot 2015-07-01 at 7.22.44 PM.png

 

Another anomaly: the Automator scripts in my System Folder. I haven't touched Automator on this installation, and that's one of those fishy updates that happens at the tail end of every fresh Apple Recovery Drive reinstalls. I can't open them to see what they do, but there are libraries installed in Script Editor that I know aren't standard.


Screen Shot 2015-07-01 at 8.10.21 PM.png


And an image from my root folder... I have added none of these files and have no access to /home or /net. And can't get rid of Remote Disc either.

 

Screen Shot 2015-07-01 at 7.51.36 PM.png

 

You'll notice some of the dates are 9/9/2014 which is the most frequently used date for things that are created. All I could find that seemed relevant-ish was that it's Talk Like A Pirate Day. Arrrrrr! And I noticed all of this began about the time that I had installed something involving the R programming language.

 

But back to the idea of removing the drive...

 

I completely removed the hard drive, reset NVRAM, and restarted. It still booted up. Somehow the logging disabler got zapped too, though, and I was able to figure out that my computer and all of its components are being used as part of a RAID server... I'm guessing across the local network here which I share with two other people, all Mac users, which would explain how it can keep itself alive if it's not a rootkit. Some sort of pass-the-hash scheme.

 

Using GParted on a DVD I was able to boot from, and with the drive back in, I could see an unallocated partition that I was unable to delete or reformat. And every time I tried to rewrite the partition table it was still there. But then I figured out that even though I booted from the DVD which I know is a clean image, Grub was ignoring my command to load the DVD image and was booting it's own modified version. It seems like every time I insert a new DVD it catalogs it and sends it to its database to scrub and insert its own Linux kernel and apps.

 

So at this point, I can't even gain control of my own computer because the boot process directs it to the remote site. I have done a hard reset and factory reinstall on the modem and router a million times, but it's been added to a Class A subnet I don't recognize and reconnects every time. But even if I boot with no internet access, it boots from a preserved master image on that untouchable partition. Even in Single User Mode as root it gives me permissions errors if I try to edit system files, but even if I could it would just restore back to the master image every time I rebooted.

 

Is that enough proof? I'll concede that it might not be a rootkit, but semantics are not really helpful in solving the problem. What I need to figure out now is how to get rid of that secret partition. Any ideas?



Besides the clipped text in System Information, all of those screen shots look like a completely normal system.

 

All of those Automator things are Actions. That's how automator works, but implementing a sequence of Actions. You can't open them because there is nothing to open. They may launch Automator, but they are not documents. You'll find them in the Library in Automator.

 

That shot of SystemAdditions Library looks exactly like it has for all versions of OS X that I can remember, except for the recent addition of support for Open Scripting Architecture (OSA) languages. Hence the change from Applescript Editor to ScriptEditor.

 

You have all the hidden files showing, but other than that, those are all normal.

net and home are standard mount points, I think for net booting, but I'm not sure.

My dates are the same, because thats when they were created for the install image.



There isn't a single thing you show that isn't a normal part of every installation of OS X. As far as the weird display of text in System Information's right hand pane, that's also nothing new. It's been like that since at least Mavericks. Pull the window out to the right and it will fix itself. Reduce the window size in to the left and text will go screwy again.

 

Basically, you're spending an awful lot of time looking for nothing out of the ordinary.



最后更新:2017-10-06 18:15:17

  上一篇:go new mail window too wide
  下一篇:go delete icloud