r/sysadmin • u/stasinka • 29d 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?
0
Upvotes
7
u/Firefox005 29d ago
Qmxlc3MgeW91ciBoZWFydC4=
4
u/snebsnek Jack of All Trades 29d ago
oh bore off.
3
u/xargling_breau 29d 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:
Then inspect the contents:
Or, if it's being provided as a Base64 string:
Decoding 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.
2
u/SevaraB Sr. Engineer (N+, CCNA) 29d ago
Hold up. You were using AI to fix web hosting stuff, and you didn’t recognize what a TLS certificate looks like in the command line? Yikes.
Please tell me you’re not trying to deal with the emSign CA…
1
u/alwaysasillyplace 29d ago edited 28d 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
u/Lukage Sysadmin 29d ago
Yeah, scary AF that you're using that for development. Hire a developer.
1
u/lxtakc DataCore/StarWind 25d ago
Base64 is a normal way to wrap scripts, so decode it first with echo '...' | base64 -d and read it. Never pipe it straight into bash.
1
u/salmonlogger 29d ago
What?
0
u/derfy2 29d ago
If Grok told you to free space by running
Would you do it?