I still miss sz and rz when I ssh from a computer with no ssh server like nearly every windows box. If I remember right, sz = send a file from the server I'm in back to the client server. rz = receive a file from the client server. You can accomplish the with a new scp session on the client server, but it's an extra step. I use this as a helper when for building the scp command. function scppath() { echo $USER@$(host…
Fun with Kermit and ZMODEM over SSH
31–40 of 110 posts
Re: Fun with Kermit and ZMODEM over SSH
#32At my last job, I worked in the PCI cardholder data environment, and we were very careful to limit egress from our systems in order to make it hard to exfiltrate data in the unlikely event of a breach. I remember thinking, if I were a wily hacker and I managed to pop a shell on one of these hosts, I would not be deterred by network egress roadblocks. I'd figure out a way to get `sz` on to a host and exfiltrate data t…
Probably as easy as `cat > sz` and then paste it over the wire? Maybe run through base64 first. Although actually depending on the situation you might be able to just do that directly and not bother with this? Like just as a super simple non-scientific test:
$ ssh someserver cat /bin/ls > ./test-ls
$ ssh someserver md5sum /bin/ls ; md5sum ./test-ls
b3535289b2932e25650074aa6d89bf3c /bin/ls
b3535289b2932e25650074aa6d89bf3c ./test-ls
That looks to work.Re: Fun with Kermit and ZMODEM over SSH
#33Earlier quoted context omitted.
Thanks for the laugh (but also kind of serious) - reminds me of https://xkcd.com/2221/ (what a fast floppy drive you have!)
Now I'm wondering if there's ever been emulated software that crashed because it tried to calculate a data transfer rate, but the emulator transferred the data faster than the delta in the time measuring in the emulated machine, so it divided by zero.
I also don't know about data transfer rates but if you want to emulate the really old stuff in DOSBox, you'll need to carefully examine pages like https://www.dosbox.com/wiki/Performance because there are plenty of games that do a divide-by-zero crash when they're trying to time the CPU for running at the desired speed.
Re: Fun with Kermit and ZMODEM over SSH
#34At my last job, I worked in the PCI cardholder data environment, and we were very careful to limit egress from our systems in order to make it hard to exfiltrate data in the unlikely event of a breach. I remember thinking, if I were a wily hacker and I managed to pop a shell on one of these hosts, I would not be deterred by network egress roadblocks. I'd figure out a way to get `sz` on to a host and exfiltrate data t…
> I'd figure out a way to get `sz` on to a host and exfiltrate data to my heart's content with ZMODEM like we did back in the day. Probably as easy as `cat > sz` and then paste it over the wire? Maybe run through base64 first. Although actually depending on the situation you might be able to just do that directly and not bother with this? Like just as a super simple non-scientific test: $ ssh someserver cat /bin/ls >…
scp is miserably slow on transferring lots of small files and this can be wildly faster, plus you get your choice of compression program based on what is on each side of the connection and what the bandwidth vs. CPU is.
Re: Fun with Kermit and ZMODEM over SSH
#35Re: Fun with Kermit and ZMODEM over SSH
#36Earlier quoted context omitted.
Thanks for the laugh (but also kind of serious) - reminds me of https://xkcd.com/2221/ (what a fast floppy drive you have!)
Now I'm wondering if there's ever been emulated software that crashed because it tried to calculate a data transfer rate, but the emulator transferred the data faster than the delta in the time measuring in the emulated machine, so it divided by zero.
Re: Fun with Kermit and ZMODEM over SSH
#37Last year we implemented "ymodem over BLE" for reasons that are complicated and possibly stupid. It felt familiar but strange and wrong to do such a thing. Worked great though.
Ymodem is simpler and smaller than Zmodem, but we've used both. I've used Zmodem at 921600 baud, but it needs fairly large buffers (for a UART) to work.
One of the big advantages is that TeraTerm for Windows exists, and supports xyzmodem. It means that I often don't have to write any host-side software for things like firmware update, and more important, don't have to touch Windows.
Re: Fun with Kermit and ZMODEM over SSH
#38Thankfully, ZModem existed. I’d never been able to use Kermit successfully back in the days, always had trouble with it. I even had more success with XModem.
Jumping from Kermit to ZModem was quite a revelation for this Muppets fan. I was so sad to find I'd been needlessly reducing my download speed just by going with the fuzzy green frog, when presented with all of the different download options.
When someone finally showed me how to set the options (which default to reliable-but-godawfully-slow) for much higher speed transmission (bigger segments, sliding windows for ACK, maybe a few other things?), it was entirely comparable to Zmodem.
Re: Fun with Kermit and ZMODEM over SSH
#39Earlier quoted context omitted.
Jumping from Kermit to ZModem was quite a revelation for this Muppets fan. I was so sad to find I'd been needlessly reducing my download speed just by going with the fuzzy green frog, when presented with all of the different download options.
What gets me is that ZModem-Resume had effective continuation of failed transfers _decades_ before HTTP got it right. The early days of the web drove me bonkers, having to start over with a long file that failed in the middle.
I want to say it was called WinGet, but now there's something else called that, so I can't confirm it.
EDIT: It was called GetRight.
Re: Fun with Kermit and ZMODEM over SSH
#40Earlier quoted context omitted.
Thanks for the laugh (but also kind of serious) - reminds me of https://xkcd.com/2221/ (what a fast floppy drive you have!)
Now I'm wondering if there's ever been emulated software that crashed because it tried to calculate a data transfer rate, but the emulator transferred the data faster than the delta in the time measuring in the emulated machine, so it divided by zero.