News for hackers. Stuff that matters.
Re:JavaScript is now required to sign in to Google by tinus_hn on Thursday November 01, 2018 @03:30AM (#18351942)
If by ‘cred stuffing’ you mean brute forcing accounts, that’s what short lockouts and 2 factor authentication are for. JavaScript is just a layer of obfuscation and doesn’t fundamentally help.
Re:JavaScript is now required to sign in to Google by raesene9 on Thursday November 01, 2018 @05:56AM (#18352413)
Credential stuffing more commonly refers to the practice of getting valid sets of creds from various password database dumps and retrying them across common/popular systems.

2FA is a good defence against it, but lockouts are less as they attacker will be going broad and not deep (could be a single request per user account)

Re:JavaScript is now required to sign in to Google by rocqua on Thursday November 01, 2018 @07:36AM (#18352943)
Ip based lockouts as opposed to account based lockouts do better against cred stuffing. Because there is a cost to getting more IP adresses. Maybe carrier grade NAT would lead to too many false positives?
Re:JavaScript is now required to sign in to Google by delroth on Thursday November 01, 2018 @07:47AM (#18353020)
Most bad actors doing abuse at scale have access to large networks of proxies on residential or mobile IPs, usually backed by malware on workstations, laptops and mobile phones.

Even as a newcomer without the right contacts on the black market you can get started with very little upfront investment, using services like https://luminati.io/ (they pay software developers to bundle their proxy endpoints within their apps).

Re:JavaScript is now required to sign in to Google by tinus_hn on Thursday November 01, 2018 @08:03AM (#18353117)
IPv6 addresses aren’t really scarce.
Re:JavaScript is now required to sign in to Google by delroth on Thursday November 01, 2018 @09:45AM (#18353790)
/64 and /48 are pretty much on the same order of magnitude as IPv4s in terms of difficulty of acquisition, and I don't know why you would ever look at more than /64 when most major operating systems randomize the last 64 bits anyway (RFC4941).
Re:JavaScript is now required to sign in to Google by astura on Thursday November 01, 2018 @09:54AM (#18353860)
Cred stuffing is using botnets, you aren't going to have more than a couple login attempts per IP.
Re:JavaScript is now required to sign in to Google by tinus_hn on Thursday November 01, 2018 @07:29AM (#18352890)
I don’t see how JavaScript is anything more than a bandaid for that. The assumption is the attacker has the usercode and password combination and then you want to prevent him from logging in.
Re:JavaScript is now required to sign in to Google by roenxi on Thursday November 01, 2018 @03:35AM (#18351962)
I'm not up to speed with the latest and greatest of what java-script can do, but isn't the source code fundamentally user-visible?

We always used to laugh at people who did website security with javascript, the whole idea was that security processing had to be done server-side.

Re:JavaScript is now required to sign in to Google by aequitas on Thursday November 01, 2018 @03:54AM (#18352023)
Javascript can be served dynamic as well, per user/connection specific even. So an attacker would have to investigate and counter each new version of the scripts. Even if this could be done automatic it greatly increases the cat/mouse factor for Google.
Re:JavaScript is now required to sign in to Google by dorgo on Thursday November 01, 2018 @04:57AM (#18352221)
So, basically javascript is used for security through obscurity?
Re:JavaScript is now required to sign in to Google by aequitas on Thursday November 01, 2018 @06:54AM (#18352661)
Obscurity is just another layer you add onto your security. As with all security methods, no one is perfect and its always a balance with usability.

But with security at this level nowadays every added layer helps. Even if it is not even used in the initial authentication step. Think of classifying certain patterns in the attacks and retroactive de-authorizing after login, increasing the time-cost for the attacker.

Re:JavaScript is now required to sign in to Google by bryanrasmussen on Thursday November 01, 2018 @06:13AM (#18352471)
security through obscurity may be no security at all, but security without obscurity is probably not as good as security with obscurity for many security scenarios that one can imagine.
Re:JavaScript is now required to sign in to Google by Borealid on Thursday November 01, 2018 @05:15AM (#18352284)
Can't you use Javascript to implement challenge-response authentication, which meaningfully improves security by:

1. Preventing interception of passwords on the wire

2. Allowing a tunable "difficulty" parameter which makes brute-force attacks cost ineffective

3. Requiring that brute-force attackers either run a Javascript interpreter (dangerous, because the web site chooses what they do and could make them mine Bitcoins) or rewrite their brute-forcer each time the JS-driven network communication channel is altered

It seems to me that having a client-and-server protocol beyond just "POST this data here" can be more secure than sending a password to the server for verification...

Re:JavaScript is now required to sign in to Google by dorgo on Thursday November 01, 2018 @06:08AM (#18352458)
>1. Preventing interception of passwords on the wire

Isn't this solved by https? I have no idea, but I hope at least that https protects my passwords.

>2. Allowing a tunable "difficulty" parameter which makes brute-force attacks cost ineffective

I don't want to wait for a login more than a second. Actually, I don't want to wait at all.

>3. ... or rewrite their brute-forcer each time the JS-driven network communication channel is altered

How is this different from altered HTML/CSS? An attacker has to adapt to the altered login page. It is not an argument for javascript.

>It seems to me that having a client-and-server protocol beyond just "POST this data here" can be more secure than sending a password to the server for verification...

You say it: a protocol! not a piece of javascript.

Re:JavaScript is now required to sign in to Google by zbentley on Thursday November 01, 2018 @08:12AM (#18353171)
> Actually, I don't want to wait at all.

Neither do I. But I also accept that, given the sheer volume of stolen creds and bots out there, sites that damage their bang/buck performance, even at the cost of very minor inconvenience to users, are likely to be targeted less frequently and in lower volume. Even if I wasn't begrudgingly willing to pay that price, I'd at least admit to the logic of making the process more time-consuming as a deterrent.

Re:JavaScript is now required to sign in to Google by floatboth on Thursday November 01, 2018 @05:56PM (#18358850)
> I don't want to wait for a login more than a second.

Do you log in that often?

Re:JavaScript is now required to sign in to Google by mathw on Thursday November 01, 2018 @06:21AM (#18352504)
I find the idea of detecting someone's trying to bust your login page with some kind of automated system and deciding to serve them a ridiculously aggressive Bitcoin miner rather amusing.
Re:JavaScript is now required to sign in to Google by dspillett on Thursday November 01, 2018 @06:54AM (#18352665)
You risk setting up a little cold war that you probably don't have time for though...

"Think you are clever, eh, try this for size..." -- some attackers in response to being affected by your counter measures.

Re:JavaScript is now required to sign in to Google by aequitas on Thursday November 01, 2018 @07:50AM (#18353043)
Whats stopping that war from happening at any other time? If a attacker has the resources and carelessness to mount such an attack at a whim you should be prepared for it?
Re:JavaScript is now required to sign in to Google by dspillett on Thursday November 01, 2018 @12:45PM (#18355857)
Nothing, but trying to hack them back seems like a way to invite more personal attention than your services might otherwise get.
Re:JavaScript is now required to sign in to Google by therealx on Thursday November 01, 2018 @06:12AM (#18352467)
I believe some US banks have been doing this for a while.
Re:JavaScript is now required to sign in to Google by dspillett on Thursday November 01, 2018 @06:52AM (#18352643)
> Can't you use Javascript to implement challenge-response authentication

> 1. Preventing interception of passwords on the wire

It can, but challenge-response that isn't PKI based requires the remote side to have the secret stored or the local side to know how to generate the value that is stored instead, which goes against other recommended practise (with PKI the remote side can store the public key and ask for something to be signed with the private key).

Protecting passwords on the wire is better done with good encryption and key exchange protocols - in the case of web-based systems that is provided by HTTPS assuming it is well configured.

> 2. Allowing a tunable "difficulty" parameter which makes brute-force attacks cost ineffective

Could you give an example of that? If you are tuning difficulty based on the computation power of the other side, surely the other side could lie about being low powered and get an easier challenge?

> 3. Requiring that brute-force attackers either run a Javascript interpreter (dangerous, because...)

A knowledgable attacker doing this would be safe: they'd make sure the interpreter was properly sandboxed (to avoid reverse hacking) and given execution resource limits (to avoid resource waste). Then if the site/app is important enough that they really want in, they modify their approach if the resource limits are hit.

> or rewrite their brute-forcer each time the JS-driven network communication channel is altered

If your method is only used by you (and you aren't a Google or similar so you are big enough to be a juicy target on your own) and you enter into this arms race you might find it takes so much resource that it gets in the way of your other work. You are only you, the attackers are legion: put one off and another will come along later. Also there is the danger in rolling your own scheme that you make a naive mistake rendering it far less useful (potentially negatively useful: helpful to the attacker!) than your intention.

If the method is more globally used then it is worth the attackers being more persistent.

> It seems to me that having a client-and-server protocol beyond just "POST this data here" can be more secure than sending a password to the server for verification.

It can, though often only against simple fully automated attacks. Cleverer automated attacks may still succeed, as may more manual ones, and targetted manual attacks will win by inspection & replication.

Or they get in through an XSS, injection, or session hijacking bug elsewhere (bypassing the authentication mechanisms completely) that you missed because you spent so much time writing an evolving custom authentication mechanism.

Re:JavaScript is now required to sign in to Google by rocqua on Thursday November 01, 2018 @07:58AM (#18353085)
Regarding point 1, you can combine 'challenge response' with diffie helman to

Have the server side not know the password

And be secure against replay attacks given attacker access to plain text.

The scheme is something like:

Setup

Server generates key (x, xG) where G is some elliptic curve base point. It stores x and sends xG to the client.

The client computes y = H(password) and sends yG to the server.

The server stores the shared secret. x (yG)

Authentication:

Server generates nonce r and sends r xG.

Client computes y = H(password) and responds with y r xG

Server verifies that the response equals r (x yG).

End

In this protocol, an attacker with access to plain text, even during setup, still can't do anything.

This method is weak against MitM, but that can be solved on auth by doing a fully ephemeral diffie helman there.

I concocted this scheme on like 10 minutes, so there might be mistakes, and it os probably suboptimal.

Re:JavaScript is now required to sign in to Google by httpsterio on Thursday November 01, 2018 @05:17AM (#18352294)
No not necessarily, and if it is, it's bad practice.

Client-side js will always be readable, even if you obfuscate it, you can't trust it to never being decompiled.

But server-side js never has to reach the client, it can be used to dynamically generate basically anything.