News for hackers. Stuff that matters.
Re:Making Unphishable 2FA Phishable by mdeeks on Wednesday November 30, 2022 @09:56PM (#33811755)

  The infuriating thing is that this isn't necessary for CLI tooling. The reason this approach is taken is that you need a way to get the token to a local process even if the user is doing authentication in a browser. This can be avoided by having the process listen on localhost, and then have the login flow redirect to localhost (including the token) on successful completion.
Unfortunately this doesn’t work for CLI tools on a remote machine (like say for vscode remote over ssh ). The browser redirect to localhost won’t work because the CLI tool isn’t on localhost.
Re:Making Unphishable 2FA Phishable by jadedtuna on Wednesday November 30, 2022 @10:16PM (#33811892)
If SSH is already being used, can't one just create an SSH tunnel to forward the login?
Re:Making Unphishable 2FA Phishable by minitoar on Wednesday November 30, 2022 @10:19PM (#33811916)
ssh -D ftw
Re:Making Unphishable 2FA Phishable by chupasaurus on Thursday December 01, 2022 @03:11AM (#33813639)
AllowTcpForwarding no ftl
Re:Making Unphishable 2FA Phishable by minitoar on Thursday December 01, 2022 @08:24AM (#33815878)
eh if you have shell access anyway this is easy to circumvent.
Re:Making Unphishable 2FA Phishable by chupasaurus on Thursday December 01, 2022 @07:59PM (#33825387)
"If" is a good word. The setting above is usually being used in environments where network security is a bit paranoid, so shell access won't help against lack of a hole through the firewall somewhere in-between, unless there's a way to use avian carriers.
Re:Making Unphishable 2FA Phishable by minitoar on Friday December 02, 2022 @12:57AM (#33827325)
The thread we are in is talking specifically about using cli tools on a remote machine, so that’s why I mentioned it. If you have that you don’t need a hole in the firewall.
Re:Making Unphishable 2FA Phishable by est on Wednesday November 30, 2022 @10:43PM (#33812062)
Some login requires Identity and access management (IAM) with a web interface only, if such gateway exists, a CLI tool would have to give user a link to open oneself I guess?
Re:Making Unphishable 2FA Phishable by theamk on Wednesday November 30, 2022 @11:05PM (#33812187)
My SSH usage has multiple servers (staging, dev, etc..) and multiple clients (laptop, desktop). Some of those connections are going through jumphosts.

Setting up SSH tunnel would be possible, but a major pain, as every source/dest combination will need to have its own port, and every signin should specify the port number.

Compared to the current system, which prints a URL in terminal which I just need to click, it would be a major usability regression.

Re:Making Unphishable 2FA Phishable by GreyStache on Thursday December 01, 2022 @01:36AM (#33813079)
Something akin to ssh agent-forwarding ("oauth-forwarding"?) is really needed. And it needs to be integrated similarly well like support for jumphosts.

Haven't seen anything like this, I'll try to bring this up with the openssh folks.

Re:Making Unphishable 2FA Phishable by dgoldstein0 on Thursday December 01, 2022 @03:34AM (#33813783)
Possibly redirect to localhost:<port> where the port is one forwarded over ssh could do the trick?
Re:Making Unphishable 2FA Phishable by _flux on Thursday December 01, 2022 @10:52AM (#33817890)
Curl can connect over unix domain sockets and ssh can forward them, I feel this would be a decent way to forward authentication as access control rules would apply to the sockets.
Re:Making Unphishable 2FA Phishable by dinosaurdynasty on Wednesday November 30, 2022 @10:55PM (#33812127)
I wonder if having the user copy-paste the token could work?
Re:Making Unphishable 2FA Phishable by seanhunter on Thursday December 01, 2022 @01:26AM (#33813019)
As long as noone compromised their clipboard using malware etc. Which is a vector that seems quite common in spearphishing at least anecdotally.
Re:Making Unphishable 2FA Phishable by dinosaurdynasty on Thursday December 01, 2022 @09:59AM (#33817046)
Wouldn't they already be pwned in that case?
Re:Making Unphishable 2FA Phishable by seanhunter on Thursday December 01, 2022 @11:42AM (#33818786)
Their machine would be pwned, but their 2nd factor would not be compromised if they used something like a yubikey, so the attacker couldn't use the compromised host to SSO to other systems and enlarge their compromise. That's why yubikey requires that you touch it - an attacker can't just remotely trigger it even if they totally own the host the yubikey is plugged into.

That's the point of TFA - unphishable second factors and ways to make them phishable. I'm saying that using the clipboard would be a bad idea in this case.

Re:Making Unphishable 2FA Phishable by dinosaurdynasty on Thursday December 01, 2022 @02:29PM (#33821412)
If the machine is pwned, it seems like it wouldn't be super hard to get the user to touch the yubikey.
Re:Making Unphishable 2FA Phishable by Thorrez on Thursday December 01, 2022 @01:43AM (#33813114)
Copy and paste means a user can be phished. The user can copy and paste it to an attacker.
Re:Making Unphishable 2FA Phishable by dinosaurdynasty on Thursday December 01, 2022 @10:02AM (#33817100)
The token could be made only usable by the cli process that asked for it (should be really).
Re:Making Unphishable 2FA Phishable by Thorrez on Friday December 02, 2022 @02:53AM (#33827986)
Yes, but that doesn't stop this attack.

1. Attacker runs the cli process to generate the URL

2. Attacker sends the URL to the victim saying "as a second factor verification, you need to copy this code into this form"

3. Victim does it

4. Attacker enters the code into the original cli process

Re:Making Unphishable 2FA Phishable by tomjen3 on Thursday December 01, 2022 @11:31AM (#33818565)
Doesn't VSCode forward connections made in its terminal? I worked remote on some webstuff and I could use my local browser just fine.