Computer was hacked through screensharing. Some questions...

Hello all,

So while I was out the other day I received a notification on my iphone that I had just purchased an iphone 5 on eBay. I called Paypal to let them know it wasn't me. When I got home I found someone remotely going through my computer using screensharing. He had gone to eBay where I had the password auto fill. He was then able to buy the phone because I had recently linked my paypal account to eBay. I shut the computer down and unplugged from the internet.


When I turned it back on I see he had deleted browser history so I couldn't verify where he had gone. Unfortunately I had also saved my passwords so he may have found those (I know, will delete that, have changed many passwords all day). Checked my console logs and see that for the past 4 days 10 different ip addresses had been constantly hitting my screensharingd.bundle trying to get in. One finally succeeded two days prior to my discovery. I see that on 5 different occasions over the past two days they had logged on from two different ip addresses. I'm afraid my wife's laptop may have also been compromised since we are on the same network.


So- what are the chances they were able to install key logging software or something similar? Any other viruses or back ends to be worried about?


I have wiped my wife's laptop and done a fresh install. I was going to use Migration Assistant to put back her apps, docs, and settings but is there a chance that the assistant puts back some malicious files if there are any? Concerned about this when I do it to the iMac also.


What can I do to make sure this never happens again? I realize I made some big mistakes and had become complacent with my macs security since in 20 years I've never had a problem. I will make sure the firewalls are on and in stealth mode. Will I be able to use screen share in the house still since I tend to use it a lot? What password protects the screenshare or was it even a password they hacked?


Should I call the police or the associated ISPs with the ip addresses?


Any info or insight is greatly appreciated.

iMac, OS X Mavericks (10.9.1), iBook 10.6.8

Posted on Dec 31, 2013 8:40 AM

Reply
28 replies

Dec 31, 2013 9:20 AM in response to chrmay

Ouch!


Courtesy of TReed for a similar, but not identical, question:


This means that the safest thing to do at this point might be to erase the hard drive completely, reinstall the system and any apps from scratch, and then restore your documents (and only documents, no settings files, applications or other such things!) from a backup. That is the only way that you can be 100% sure that there's nothing installed that is still giving these scammers access to your data.

Are you using WiFi? If so, is it set to use a long (I mean 40+ characters, all over the keyboard) WPA2/AES password? Almost any router you use will be an NAT router and will not expose your devices to the "outer" world, so that means the Mac firewall is unnecessary. Make sure the router is not set for remote login and turn its firewall on.


I don't know what sharing you use, but I would certainly turn off anything not absolutely necesary, especially anything "remote." If your local network is secure, behind an NAT router, and a really strong WPA2 password, I don't see anyone getting into that.


When your're back up you can check out this site.


https://www.grc.com/x/ne.dll?bh0bkyd2

Dec 31, 2013 11:23 AM in response to WZZZ

Off the top... After the wipe and restore from distribution (and only reload apps from distros or from pre-breach backups), also reset all your passwords, including at least the following:


  • AppleID accounts (main or iTunes or iCloud accounts (whatever you're using)
  • all email accounts configured on your system
  • revoke and regenerate any private keys, including any digital certificates you have stored locally. This includes the developer certificates for Apple Xcode, for ssh connections, and otherwise.
  • Facebook, eBay, Twitter, LinkedIn, Google including gmail, Adobe, etc.


Don't use the same or even similar passwords, as somebody running some website you've signed up for will almost inevitably store your password in cleartext or with a weak or with a fast cryptographic hash and then get breached, and if there's a theme used for your passwords or if there's any password reuse, then that can then be obvious to an attacker.


Confirm that all of the reset email addresses are still as expected with each of the major services you use, and particularly first with the services involving money. Ensure the reset addresses have not been reset to some other email address.


Contact the credit card companies for any credit card data you might have stored either in text files, or in Keychain.


For some cases such as Twitter, you might have to see whether there are unexpected or additional Twitter client applications registered to your account — this is less of a factor for most folks, but if you're a "higher-profile" target, definitely check this and definitely reset any clients you're not using. Same for stock trading applications or related services; services where specific clients might get authorized to automatically access some server.


Though others might disagree, I prefer to have the integrated firewall raised at all times, as it's easy to forget to raise that when you wander off your private network with your laptop. The less I have to remember here, the better.


If you're getting directly accessed from remote sites, then you don't have a firewall, or your firewall has been configured to be be fairly open. (Some folks will port-forward various services, and the attackers will then find and target those ports and services. If you do have a firewall, then it has been set up to port-forward at least RDP/ARD/VNC via TCP port 5900.)


If you want or need or use remote access, then consider a firewall with an integrated VPN server. If you are using a VPN server, change the VPN credentials.


You can certainly chat with the police, and simply having that case report documentation might be handy if there's something more that arises from this misadventure. Whether anything happens via the police, I don't know.

Dec 31, 2013 11:26 AM in response to chrmay

It seems that you've enabled some kind of remote access to the computer. However you did that, it's secured by a password. Almost certainly the password was guessed.

If you use the same password for anything else, change those passwords too, and make them all different. Internet passwords should be random strings of at least 10 characters. You most likely don't need to, and should not be able to, remember them. They should be saved in your keychain and backed up with the rest of your data.

One way to generate a secure password is the following. Triple-click anywhere the line below on this page to select it:

openssl rand -base64 10 | cut -c-14 | pbcopy

Copy the selected line to the clipboard by pressing the key combination command-C. Launch the Terminal application and paste into the window that opens (command-V). A string of 14 random characters will be copied to the Clipboard. Use that string, or a substring, as the password. To generate another random string, press the up-arrow key and then the return key with the Terminal window active. You can then quit Terminal.

Dec 31, 2013 2:10 PM in response to chrmay

Thank you all for your help. This has been a nightmare. I was wondering if the app Little Snitch would alert me to outbound attempts by a malicious file.


As far as reinstalling stuff- do I need to be concerned about putting back txt, doc or similar files? I didn't have a pre-attack backup so all the files were exposed to some extent.

Dec 31, 2013 3:19 PM in response to chrmay

So the only thing to do is beef up the passwords?


That's the main thing, but you also need to know what services you're exposing to the Internet. I wouldn't recommend running a public VNC server, even with a strong password. You should use "Back to My Mac" in iCloud if you need to access the computer remotely when it's unattended.


"Little Snitch" would have done nothing to protect you from this intrusion, or any intrusion. Mostly what it does is to bombard you with incessant and useless warnings of normal system activity.

Dec 31, 2013 3:58 PM in response to chrmay

I disagree: Little Snitch wouldn't have prevented this, but it may now detect suspicous outgoing activity. The thing is, you need to be able to know what would constitute suspicious or abnormal outgoing connections. And those it might pick up. If they installed a backdoor and it's connecting to some command and control somewhere, or who knows what, in order to receive your sensitive data, LS may pick that up. Post back with any LS alerts you want us to check out for you. You can also Google any of the URLs LS is flagging before you either allow or deny. If you click on top to "show details," you can get the IP as well. Here's what it will look like. It will run as a trial for 3 hours, but can be renewed before you decide to buy.


User uploaded file



MrHoffman wrote: (Some folks will port-forward various services, and the attackers will then find and target those ports and services. If you do have a firewall, then it has been set up to port-forward at least RDP/ARD/VNC via TCP port 5900.)


You can use the link I gave you at Shields up, above, to see which ports, including 5900, might be open. And go to Port Forwarding in your router and see which ports, if any, are open. But Shields up will not check any of the more "unusual" ports unless requested. So you have to know what those might be.

Dec 31, 2013 4:11 PM in response to chrmay

Something else needs to be clarified here. You are not interested in carrying out a forensic investigation to determine how your system has been compromised, if at all, by software that some intruder installed. Rather, you're interested in making sure that there is no compromise. The only way to do that is to erase the startup volume, reinstall OS X, restore only your user data and settings, and then reinstall all your other software from known-good sources. Any other measures you take are pointless and a complete waste of effort.


I can assure you of one thing: If I broke into your system and wanted to leave a back door, I could do it in a way that would be undetectable by "Little Snitch" or anything else — and I don't pretend to have any special skill as a "hacker." You have to assume that your intruder could do whatever I could do.

Dec 31, 2013 8:37 PM in response to Linc Davis

Ok so I went into my router settings and removed the two port forwarding options that had been turned on.


Both computers have been wiped and fresh OS's installed. I guess my concern now is exactly what files are safe to restore. Can I just grab my iPhoto library and iTunes folders and put them back in their respective places? What about what is in my Documents folder?


Is Migration Assistant of any use now?


Also since my last backup had been post-attack is it safe to even plug that USB drive in without fear of it somehow infecting the main computer? I hope so 'cause it's already plugged in...


Wow this is just terrible. Years and years of collected programs, tweaks, preferences, settings... ugh...


Well- HAPPY NEW YEARS!!! 😟


Again- thank you all for your help. I really do appreciate it.

Dec 31, 2013 9:06 PM in response to chrmay

It's safe to use your backup drive. You just have to restore selectively.


You could have used Setup Assistant to transfer your user data from the backup. If you've already set up an account, create a temporary administrator account and log into it after logging out of the existing account. You can then run Migration Assistant and do the same, replacing the original account. Don't transfer "Applications," "Other files and folders," or "Computer & Network Settings" — all that will have to be recreated. You can then delete the temporary account.


OS X: How to migrate data from another Mac using Mavericks


This is what I'd call a measured response. Unless you were the target of an improbably sophisticated attack, it will leave you with a clean system.


You still have to change all Internet passwords and check all financial accounts for unauthorized transactions.

Dec 31, 2013 9:55 PM in response to chrmay

Also get a different router, or modem/router. As installing a different router will most certainly change your public IP Address.


I'm sure there is a way to chage the IP Address on your current router or modem/router. But I have no idea how to do it.


Also, don't use a static public IP Address. Mine hasn't changed in a while and I too have two ports forwarding. I haven't kept my router long enough to see if it changes with in so many months. But I suppose if the IP Address is changed, then I can just simply change a setting on my iPhone.


KOT

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Computer was hacked through screensharing. Some questions...

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