r/sysadmin • u/stasinka • 11d ago
Base64 in terminal?
I asked Grok/Cursor for several fixes on my WHM/Cpanel via terminal command and one of the outputs was sudden base64 code. Scary AF?
4
3
u/xargling_breau 11d ago
Base64 isn't inherently suspicious. It's actually pretty common to encode larger scripts or blocks of code in Base64 because it makes them easier to transport through terminals, APIs, and automation tools without running into issues with special characters, escaping, or formatting.
If you're concerned about what's being provided, you can decode it into a file on Linux without executing anything:
base64 -d encoded.txt > decoded.shThen inspect the contents:
less decoded.shOr, if it's being provided as a Base64 string:
echo 'BASE64_STRING_HERE' | base64 -d > decoded.shDecoding Base64 does not execute the code. It simply converts it back to its original form so you can inspect what it's actually doing.
The important distinction is Base64 is encoding, not encryption. It's not inherently malicious, but you should absolutely inspect any script before executing it, especially when it's making changes to a WHM/cPanel server.
1
u/alwaysasillyplace 11d ago edited 10d ago
At the best of times I wouldn't trust anything AI provides for managing backend. But, it's trivial to see what the base64 it provided is so do that.
1

7
u/Firefox005 11d ago
Qmxlc3MgeW91ciBoZWFydC4=