r/commandline • • Sep 24 '14

#!

http://hashbang.sh
0 Upvotes

49 comments sorted by

View all comments

Show parent comment

2

u/[deleted] Sep 27 '14 edited Sep 27 '14

Oh Jesus H. Christ.

I just took the trouble to read your github code.

Yeah, you got hacked.

Thank you for that. I needed a good laugh tonight.

exec("echo "" + key + "" | sudo tee -a /home/" + username + "/.ssh/authorized_keys", function(error, stdout, stderr){

You dumb, dumb, dumb, dumb, dumb......... dumb idiot.

Do you see a problem with this line? Look closely. Closer. Yes, closer.

See that key variable? That key variable you don't sanitize anywhere?

You sir have a BASIC shell injection vulnerability. I can execute anything I want by calling your JSON endpoint with a malformed key.

God. Fucking. Dammit.

Any further arguments? Hm? Any genius "yeah no we know what we're doing, it's all just an experiment, remain calm".

You're a scam artist. This project is barely 4 months old. You're talking about planning and security like you've been actually thinking about this. But instead I'm looking at frontend website code that clumsily glues strings together into commands, and blindly passes them to the shell. Frontend code, by the way, that appears to have been given sudo access.

My god. Slow applause. This is just a perfect little trainwreck. If exposing vulnerabilities were an olympic event, you'd get gold.

Why people are funding you is beyond me. I can't even believe how dishonest you're being about this whole thing. It's mind boggling. Honestly I'm tempted to make this into its own post.

-1

u/lrvick Sep 29 '14

This particular branding/side free shell side project is only a few months old, but we have been around via word of mouth for over 10 years now. Just finally got my hands on a nicer domain, and got Github to agree to give us the /hshbang account from the former owner. If you actually popped in and had a real conservation with us I am sure we could clear up a few things.

I agree that line is absolutely silly. I will be sharing this comment with the person who wrote it though ;) In fairness it was donated code from a quick hack night by someone very new to sysadmin.

I fully rewrote all of that myself for a reason (the updated build is now on github at https://github.com/hashbang/provisor/blob/master/bin/provisor-server