Please Help: Unexplained Terminal Commands Found on Machine, Nefarious Activity Suspected

Macbook Air/OS X Lion v.10.7.5/1.6 GHz Intel Core i5/


My wife recently found an open Terminal Window on her Macbook Air which is causing a lot of concern for us.

(Two things to note:)

1. She is a casual user and does not understand/use terminal.

2. The Laptop does not leave our apartment, we have no guests over typically.


I was savvy enough to get the command history from the open window and found the following commands had been executed:

1. "ipconfig"

2. "route -n get default"


Questions I am asking:

How can we investigate this further?

What type of nefarious activity might these commands point towards?

Why was this on an open terminal window; does this mean the user had physical access to her machine?

Is there anything I should be keeping an eye out for in her activity monitor, etc?

Any other thoughts or input you might be able to provide?


Steps I am Taking to Correct:

Running Malware and Antivirus scan

Changing PW for User profiles

Changing PW for Wifi Networks

MacBook Air, Mac OS X (10.7.5)

Posted on Nov 20, 2015 1:55 PM

Reply
1 reply

Nov 20, 2015 3:12 PM in response to ReptarBar

Running Malware and Antivirus scan

That's worse than doing nothing. If a Terminal window was open, someone opened it, either by sitting in front of the machine or by controlling it remotely. If you have no idea at all how that happened, see below.

If you know or suspect that a hostile intruder has either had physical access or has taken control of it remotely, then there are some steps you should take to make sure that the computer is safe to use.

First, depending on the circumstances, computer tampering may be a crime, a civil wrong, or both. If there's any chance that the matter will be the subject of legal action, then you should do nothing at all without consulting a lawyer or the police. The computer would be the principal evidence in such a case, and you don't want to destroy that evidence.

Running any kind of "anti-virus" or "anti-malware" software is pointless. If I broke into a system and wanted to leave a back door, I could do it in a way that would be undetectable by those means—and I don't pretend to any special skill as a hacker. You have to assume that any intruder can do the same. For example, commercial keylogging software—which has legitimate as well as illegitimate uses—won't be recognized as malware, because it's not malware.

The only way you can be sure that the computer is not compromised is to erase at least the startup volume and restore it to something like the state it was in before the attack. The easiest approach is to recover the entire system from a backup that predates the attack. Obviously, that's only practical if you know when the attack took place, and it was recent, and you have such a backup. You will lose all changes to data, such as email, that were made after the time of the snapshot. Some of those changes can be restored from a later backup.

If you don't know when the attack happened, or if it was too long ago for a complete rollback to be practical, then you should erase and install OS X. If you don't already have at least two complete, independent backups of all data, then you must make them first. One backup is not enough to be safe.

When you restart after the installation, you'll be prompted to go through the initial setup process for a new computer. That’s when you transfer the data from a backup in Setup Assistant.

Select only users in the Setup Assistant dialog—not Applications, Other files and folders, or Computer & Network Settings. Don't transfer the Guest account, if it was enabled.

Reinstall third-party software from original media or fresh downloads—not from a backup, which could be contaminated.

Unless you were the target of an improbably sophisticated attack, this procedure will leave you with a clean system. If you have reason to think that you were the target of a sophisticated attack, then you need expert help.

The above being done, change all Internet passwords and check all financial accounts for unauthorized transactions. Do this after the system has been secured, not before.

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.

Please Help: Unexplained Terminal Commands Found on Machine, Nefarious Activity Suspected

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