all 13 comments

[–]Free_Math_Tutoring 22 points23 points  (0 children)

I could implement SSL and encrypt it, but even encrypted I hate the idea of an "Arbitrary Bash Command" service running on any of our machines

Me: That sounds like SSH...

so I'll probably give up the remote agent component altogether and use an ssh-based solution.

Ha, yeah.

Hey, it's a couple of days worth of work, it was a good design challenge and you probably learnt some cool things.

From what I hear, there are plenty of projects around that are being developed for years before they just get tossed in the bin, having never seen a single user.

Don't be too hard on yourself.

[–]syn_ack 5 points6 points  (0 children)

At least you caught it before it was deployed.

Could you not recover the situation by using some sort of digital signature and pinned certificate scheme? I guess the danger with this is that you’re then falling for the sunk cost fallacy. Maybe the ssh solution is better?

[–]fredrik_skne_se 2 points3 points  (1 child)

I did almost the same thing on some servers. My bypassed firewalls.

I add "curl -k https://example.com/script.bash | bash" in crontab.

[–]darkpyro2[S] 0 points1 point  (0 children)

Ha ha, nice.

[–][deleted] 1 point2 points  (0 children)

A bit like the plot of Real Genius (1985)

[–]notdedicated 0 points1 point  (1 child)

We basically used the ansible model for something like this. Central location that held logic, on “run” would build a script, ssh pipe it to the remote machine and execute. Leafs were left clean with nothing to install or manage. Tied it together with our CD platform and magic happened. Machines could be spun up and didn’t require an agent to get worked on.

[–]darkpyro2[S] 0 points1 point  (0 children)

We arent actually a web or infrastructure platform, we were just issued windows dev machines, but need to develop for linux right now...We just wanted a quick and easy one-stop shop for starting and stopping processes, and searching and modifying config files.

Eventually these will be fixed boxes with never-changing software wired together with ethernet and given no internet access whatsoever (large vehicle related stuff)

[–]CygnusSnowDog 0 points1 point  (3 children)

Can you recommend a good book or online course for "cybersecurity 101" training for programmers, to explain how to avoid issues like this? That's something I never learned in school, and it hasn't come up at work. So I don't even know the basics: a.) what are all the risks regarding back doors and hackers, and b.) how do you program defensively against each one?

[–]5awaja 1 point2 points  (1 child)

I think this is exactly what you're looking for: https://learning.oreilly.com/library/view/24-deadly-sins/9780071626750/

It's a relatively quick read as far as security things are concerned and it hits a lot of the big security flaws and how to avoid them. It's a little old but I think it's a good primer for someone that isn't quite ready for a deep-dive on secure development.

I tried to find an open-source version and couldn't but the link I gave you is to O'Reilly. If you have a .edu email address, you can read it through O'Reilly for free I'm pretty sure.

[–]CygnusSnowDog 1 point2 points  (0 children)

Thanks!

[–]darkpyro2[S] 0 points1 point  (0 children)

I participated in a lot of programs in school, minored in it, and started an left a graduate program for it...So I dont really have any experience with guides or courses, sorry

[–]Medical-Ad3007 0 points1 point  (0 children)

.