News for hackers. Stuff that matters.
Re:Sshtalk: An SSH-based chat made in assembler by ajross on Saturday December 02, 2017 @02:22PM (#15833501)
Seems cute. Might be a fun gadget to host on a Pi or whatnot.

> Hand-written in x86_64 assembly language

Oh.

Not sure if cross-internet capable communication tools constitutes the "worst" example of hand written assembly, exactly, but... yeah, it has to be up there. I'm sure it was fun to hack, though.

Re:Sshtalk: An SSH-based chat made in assembler by srett on Saturday December 02, 2017 @02:55PM (#15833684)
The only thing really worse there is that the number of people who could audit the code is much smaller. That guy wrote a whole SSL library in assember, so he probably didn't just finish some assembler tutorial and decided this was a good first lil project.

Assember is usually just considered bad/dangerous by people who have no clue about it and consider it something magical. It's not. At least not significantly more dangerous than C, which is still the language the most fundamental components of everyday computing are based on.

Re:Sshtalk: An SSH-based chat made in assembler by ajross on Saturday December 02, 2017 @03:42PM (#15833953)
No, I think portability is definitely the worst thing. It's a communication tool. It's perfectly reasonable to want to run this on your Pi or your phone or in your browser or your IoT device of the week. And you can't because of an implementation choice.

I'm certainly not afraid of machine code, I actually get paid to write it. But this just isn't a good choice technically. Though it's impressive and like I said was surely a lot of fun and worth showing off.

Re:Sshtalk: An SSH-based chat made in assembler by srett on Saturday December 02, 2017 @04:18PM (#15834130)
Ah yes, I'm probably too focused on just x86 desktop/server with my everyday work that this didn't even occur to me, so I assumed you were meaning to refer to maintainability/security.
Re:Sshtalk: An SSH-based chat made in assembler by qubex on Saturday December 02, 2017 @05:53PM (#15834684)
This is some bloke's project and he decided to code it in the tool he was either most comfortable with or wanted to glean exercise on. If you want to take inspiration from his work and write an analogous program in ARM assembler for the amusement of running it on whichever device most amuses you, you're free to read his code, learn from it, and then go off to re-implement it in a steam-powered balanced-ternary analytical engine, if you so please.
Re:Sshtalk: An SSH-based chat made in assembler by make3 on Saturday December 02, 2017 @07:07PM (#15835132)
Please. We are in a world where heartbleed happen, as well as an untold number of buffer over flow / memory management vulnerabilities through the years. Companies have spent millions developing languages like Rust and Go to replace C & C++ in more security sensitive applications. Assembly is definitely not just "just considered bad/dangerous by people who have no clue about it and consider it something magical".
Re:Sshtalk: An SSH-based chat made in assembler by make3 on Saturday December 02, 2017 @10:29PM (#15835804)
how the hell did I get three downvotes for this
Re:Sshtalk: An SSH-based chat made in assembler by megous on Saturday December 02, 2017 @07:09PM (#15835140)
Run it on qemu on Pi? Qemu can run individual binaries.
Re:Sshtalk: An SSH-based chat made in assembler by thethirdone on Saturday December 02, 2017 @10:42PM (#15835836)
Can qemu do system call passthrough though?
Re:Sshtalk: An SSH-based chat made in assembler by megous on Sunday December 03, 2017 @01:31AM (#15836293)
Sure.
Re:Sshtalk: An SSH-based chat made in assembler by rurban on Tuesday December 05, 2017 @03:19AM (#15850534)
Only the boilerplate. The crypto is using Crypto++ https://www.cryptopp.com, which is good, and was even FIPS 140–2 validated.
Re:Sshtalk: An SSH-based chat made in assembler by NickBusey on Saturday December 02, 2017 @11:40AM (#15832664)
I love how you can SSH to a server and be presented with a login / registration screen. I would love to adapt this for use with an open source project I'm making, but don't think I have the fortitude for assembly. Anyone have any tips on how something like this is achievable using a more modern/approachable tooling stack?
Re:Sshtalk: An SSH-based chat made in assembler by steventhedev on Saturday December 02, 2017 @11:51AM (#15832725)
If golang is your thing, take a look at this[0] or that[1]. You can probably find similar ones with some quick research.

The neat part is that you can easily pull down someone's github keys and automatically authenticate them against that identity. You can follow up with an email/password registration as a backup identity provider, if you really want to push the envelope (and save the public key for future automatic authentication).

Of course, if you're just looking to hack something together quickly, you can simply force a specific command to be run.

[0]: https://github.com/shazow/ssh-chat [1]: https://github.com/gliderlabs/ssh

Re:Sshtalk: An SSH-based chat made in assembler by NickBusey on Saturday December 02, 2017 @11:54AM (#15832737)
Perfect, golang definitely is my thing, I've been using that to build my cli tool. Thanks!
Re:Sshtalk: An SSH-based chat made in assembler by kpcyrd on Saturday December 02, 2017 @12:06PM (#15832797)
If you want to do this the traditional way, you would setup a user, then properly secure it (you might end up becoming a proxy) and then set a ForceCommand. After that, verify your config works, then set the password for that user to an empty password. After that, allow empty passwords on your ssh config so you can ssh to this user without any authentication.

This is how eg anoncvs works. After that point, it's just a matter of writing the application you want to run, with stdio being connected to your user.

Re:Sshtalk: An SSH-based chat made in assembler by c22 on Saturday December 02, 2017 @11:58AM (#15832762)
I built one in Python awhile ago on a lark: https://github.com/kryptographik/ShuSSH
Re:Sshtalk: An SSH-based chat made in assembler by warent on Saturday December 02, 2017 @02:59PM (#15833712)
Well I think I was banned from the server 2ton.com.au. Not sure why but it was fun while it lasted. sshtalk is a pretty cool utility!
Re:Sshtalk: An SSH-based chat made in assembler by oliv__ on Saturday December 02, 2017 @03:00PM (#15833717)
This whole conversation was getting a little out of hand, maybe the admin banned all users in the room?
Re:Sshtalk: An SSH-based chat made in assembler by kindfellow92 on Saturday December 02, 2017 @03:03PM (#15833742)
LOL eigenmachter here. Pouring one out for john2 and his gf
Re:Sshtalk: An SSH-based chat made in assembler by sourbloom on Saturday December 02, 2017 @03:08PM (#15833771)
I leave for 10 minutes to get lunch, and everything blows up? Too bad. This makes me want to host my own instance now.

EDIT: Don't think it was banning, I can't hit the server from anywhere now.

EDIT2: Why not. Give this a shot:

    ssh human.org.in -p 4001
Meet in the room "test".
Re:Sshtalk: An SSH-based chat made in assembler by warent on Saturday December 02, 2017 @03:09PM (#15833789)
If you make one, post it here! I'll join
Re:Sshtalk: An SSH-based chat made in assembler by oliv__ on Saturday December 02, 2017 @03:25PM (#15833861)
Same here
Re:Sshtalk: An SSH-based chat made in assembler by kindfellow92 on Saturday December 02, 2017 @03:12PM (#15833802)
Ditto, y’all were a good crowd
Re:Sshtalk: An SSH-based chat made in assembler by oliv__ on Saturday December 02, 2017 @05:15PM (#15834482)
It's down now... :(
Re:Sshtalk: An SSH-based chat made in assembler by pagnol on Saturday December 02, 2017 @05:16PM (#15834483)
What happened?
Re:Sshtalk: An SSH-based chat made in assembler by 2ton_jeff on Saturday December 02, 2017 @05:05PM (#15834417)
Definitely not banned, sshtalk kakked itself under the HN glow (that and I left it open in a terminal window here and had an insane number of tiled chats open, might have a bug in there too)
Re:Sshtalk: An SSH-based chat made in assembler by jasonjayr on Saturday December 02, 2017 @12:37PM (#15832970)
A growing number of users are showing up in the room named "hn", if you want to see it with multiple users ...
Re:Sshtalk: An SSH-based chat made in assembler by oliv__ on Saturday December 02, 2017 @02:58PM (#15833708)
Was fun while it lasted...

> ssh: connect to host 2ton.com.au port 22: Connection refused

Re:Sshtalk: An SSH-based chat made in assembler by gbacon on Saturday December 02, 2017 @02:44PM (#15833619)
Why implement it in assembly language?
Re:Sshtalk: An SSH-based chat made in assembler by ihattendorf on Saturday December 02, 2017 @03:02PM (#15833728)
Why not?
Re:Sshtalk: An SSH-based chat made in assembler by magnetic on Saturday December 02, 2017 @05:57PM (#15834719)
Because it limits the amount of people who can audit the code, contribute to it, or just use it?
Re:Sshtalk: An SSH-based chat made in assembler by Buttes on Sunday December 03, 2017 @02:38PM (#15839077)
For fun.
Re:Sshtalk: An SSH-based chat made in assembler by exabrial on Saturday December 02, 2017 @12:05PM (#15832793)
anyone have a server setup anywhere?

EDIT: RTFA "ssh 2ton.com.au" EDIT AGAIN: Anyone have a room name to join?

Re:Sshtalk: An SSH-based chat made in assembler by icebraining on Saturday December 02, 2017 @01:13PM (#15833149)
I had to run "ssh -oCiphers=+aes256-cbc 2ton.com.au", seems like it's disabled by default in my version (OpenSSH_7.6p1 Debian-2).
Re:Sshtalk: An SSH-based chat made in assembler by jstanley on Saturday December 02, 2017 @02:08PM (#15833425)
Try the "hn" room