what is Bash_history that says Echo Hacked!

clean my mac installed recommended clearing bash_ history with the message saying ECHO HACKED! what does this mean?

MacBook Pro 13″, macOS 12.6

Posted on Sep 4, 2023 3:53 AM

Reply
8 replies

Sep 4, 2023 10:03 AM in response to stuckonios

stuckonios wrote:

clean my mac installed recommended clearing bash_ history with the message saying ECHO HACKED! what does this mean?


The shell history files are normal and expected, and I’d certainly not want mine cleared.


And replacing the history file with that is just… hilarious.


Add-on cleaners, add-on anti-malware apps, add-on first-few-hops VPNs unfortunately tend to add problems and issues (such as the case here), and add concerns and fears and noise (such as the case here), and while not providing solutions over the existing tooling (such as the case here).


One of the well-known add-on anti-malware apps was directly caught selling their users’ personally-identified web browsing and web purchasing history, and others selling that data would not surprise. Other anti-malware was merrily mis-detecting and trying to delete part of macOS itself, and (amusingly) the built-in anti-malware was preventing the add-on anti-malware from corrupting macOS itself.


The built-in cleaning and the built-in anti-malware tools, and features such as iCloud+ Private Relay for privacy, work fine. Add-ons, well, not so much. And again, what do the add-on apps actually add?

Sep 4, 2023 12:13 PM in response to stuckonios

bash ("Bourne Again Shell") is a command line interpreter. It keeps a record (.bash_history) of recent commands.


echo is a command to print text or environment variables. E.g.,


bash-3.2$ echo The cat meowed loudly for dinner
The cat meowed loudly for dinner
bash-3.2$ echo $PATH
/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin


After I issued these commands in a bash shell,


echo The cat meowed loudly for dinner
echo $PATH

showed up in .bash_history.  If your .bash_history contains

echo HACKED!


It means that some program ran a shell command to print the message HACKED! What program that would be, I don't know. The "echo" command itself would not be dangerous – but if printing that message was one part of a "phishing" scam designed to frighten you into contacting criminals for "help" in fixing a supposed problem, falling for that would not be a good idea.

Sep 5, 2023 7:59 AM in response to stuckonios

In most cases, I’d initially doubt Spectrum or any other specific ISP was an issue, as weak passwords, re-used passwords, and phishing and spearphishing all tend to be more common.


If you don’t trust the Spectrum configurations to not be compromised arising from Spectrum support, then switch those devices into bridged mode and install your own network gear. Gear-level exploits leading to Mac or iPhone exploits are difficult, absent physical access, and absent badly down-revision gear.


And stalkers and injunctions are a civil or criminal matter, not something that can be easily addressed around here through technical means. Particularly given your direct discussions with Apple Support about your security—Apple will almost certainly have provided appropriate suggestions and feedback.


And I’d avoid add-on security apps and add-on cleaners and add-on first-few-hops VPNs and such, as those can introduce issues and even vulnerabilities, and far too often noise. In the case of the bash history file, you’re already massively compromised if an adversary is in a position to even view that file. They’re effectively logged in and able to execute code or commands of their choosing. That’s Bad.

Sep 5, 2023 12:45 AM in response to etresoft

Thank you I am so computer illiterate I was hacked thru my spectrum IP in June of2022 and I just know My MacBook Pro and my iPhone are compromised Apple privacy techs have been able to help somewhat all I can say is thank you for your help. Believe it or not spectrum is a major problem you probably wouldn’t believe me if I told you what is happening we have a stalker and he has been attacking us and is my wife &I we have permanent stalking injunctions but it isn’t helping much we have moved at least 7 times and it just keeps getting worse thank you for your support everyone who responded.

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.

what is Bash_history that says Echo Hacked!

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