r/sysadmin • • Oct 30 '26

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

11 comments sorted by

7

u/Firefox005 Oct 30 '26

Qmxlc3MgeW91ciBoZWFydC4=

6

u/40513786934 Oct 30 '26

I ran your code and now I have something called "Linux" on my PC. Please advise

1

u/ExtensionDecent9288 Oct 30 '26

that's just "Bless your heart." in base64. you're fine.

4

u/snebsnek Jack of All Trades Oct 30 '26

oh bore off.

3

u/xargling_breau Oct 30 '26

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.sh

Then inspect the contents:

less decoded.sh

Or, if it's being provided as a Base64 string:

echo 'BASE64_STRING_HERE' | base64 -d > decoded.sh

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) Oct 30 '26

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 Oct 30 '26 edited Oct 30 '26

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 Oct 30 '26

Yeah, scary AF that you're using that for development. Hire a developer.

1

u/lxtakc DataCore/StarWind Nov 03 '26

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.

0

u/derfy2 Oct 30 '26

If Grok told you to free space by running

fm -fr /

Would you do it?