Practical /dev/tcp in the HTTPS Era

10 points by azathothas


Since /dev/tcp doesn’t work with https, complex redirect chains or even dns sometimes, almost all mentions of it in the hacking articles online are not that useful

We had to make soar’s install script be able to work anywhere, In the article you get to know about http://http.pkgforge.dev & how you can use it to make /dev/tcp finally practical & useful in the modern https age

xfbs

Downloading binaries over HTTP is no issue, as long as you checksum them. So after download, you can just run sha256sum or use GPG to validate signatures. But what if the system doesn’t have either of those? Is there a SHA2 implementation in bash somewhere? 😄

Also: if you can get the install.sh script onto the machine, why not just copy the soar binary onto it?

d33

…I was kind of hoping for a minimal TLS implementation in pure Bash.

@edit: of course it exists! https://github.com/gh2o/bash_tls

jmtd

Every system with bash has /dev/tcp - a built-in feature for raw TCP connections. ⚠ Bash must be compiled with–enable-net-redirections,but this is by default always enabled.

TIL it’s enabled on Debian. That’s changed since I last looked.