News for hackers. Stuff that matters.
Re:Asciinema by joefreeman on Sunday June 21, 2015 @03:34PM (#9754651)
Would this be better if the pasted command included some checksum which was checked before piping into the `sh`? Can anyone who's better at bash than me give an example of how this could work in a relatively cross-platform way?
Re:Asciinema by nitrogen on Sunday June 21, 2015 @04:13PM (#9754817)
You would need to have a GPG signature with a well-known public key that is verified before executing the code.
Re:Asciinema by joefreeman on Sunday June 21, 2015 @05:10PM (#9754997)
Sorry, can you explain why? If the checksum is provided (as part of the sh snippet) by the website with the SSL certificate, isn't that enough reassurance?
Re:Asciinema by myhf on Sunday June 21, 2015 @06:27PM (#9755248)
If the snippet and the download are on the same site, then whoever controls that site at the moment can provide an accurate checksum of whatever malware they want to host. A signature is an improvement because it can give you some confidence that the current controller is the same as the original controller.
Re:Asciinema by itistoday2 on Sunday June 21, 2015 @06:57PM (#9755347)
> Would this be better if the pasted command included some checksum which was checked before piping into the `sh`?

hashpipe does exactly that:

https://github.com/jbenet/hashpipe