Thursday, April 26, 2012

more sshttp trickery





sshttp is now able to multiplex SSH and SMTP traffic,
due to protocol leetness (see above screenshot).


As SMTP requires the end of the line to be CRLF, but
SSH (at least OpenSSH) accepts a bare LF, the above
example is actually one valid line for SMTP, and one
valid line for OpenSSH (the "220 ..." is skipped by
OpenSSH since it does not start with SSH-).


This trickery allows sshttp to display one banner in two
and decide on the next incoming packet where to actually
connect to. I tested the setup with Postfix and OpenSSH
and it obviously wont work with SMTP multi-line banners.


The README and Makefile contains the few simple steps that
are necessary to run smtpd and sshd on the same port.


Notice, that its usually not possible to mux protocols
that both start with a server banner.











3 comments:

John Doe said...

pretty cool, thanks!

Anonymous said...

what about openvpn and https ?

Sebastian said...

would you pay for it?