DontDuo: Bypass 2FA with DTMF Tones(dontduo.com) |
DontDuo: Bypass 2FA with DTMF Tones(dontduo.com) |
1) Duo is a commercial service that offers multi-factor authentication through a variety of means, one of which is the Phone Call.
2) This site lets you register them as your Duo phone number, when demanded to do so by someone who's trying to protect your high-value access from being hijacked (such as your employer).
3) This site provides you a phone number that auto-accepts all Duo authentication requests, even if you're asleep, offline, or otherwise not authorizing the hacking activity.
4) This site has zero contact information and accountability, and could very well be backed by a black market site that offers hackers lookup access for any Duo phone number for $50/number.
NOTE: I, personally, would absolutely push to fire anyone I found using this, no matter where I worked.
I dabbled at reversing their Android app, but I saw some references to key rotation and got disheartened -- I don't want to spend man-weeks on this. I was hoping to see some URL I could hit and just get a TOTP secret.
To my uni's credit, they offer support for hardware tokens, and maybe someday I'll get sick enough of the phone calls to start carrying one of those around.
Edit: Thanks to commenters in sibling threads with possible solutions to extracting the secret.
I can get that the phone part is annoying but DuoPosh/TOTP and now the TouchID are probably the smoothest FMA solution for the enterprise I ever used.
(Incidentally, Duo does support OATH-TOTP and Yubikeys in native mode.)
Some Yubikey models also store the secrets that generate the frustrating 6 character TOTP codes. A pairing a Yubikey with a desktop app, you can copy/paste the codes instead of the error-prone process of manually re-typing them.
Using this sounds like a good way to take liability when your account gets hacked. It will not look good to be fired for intentionally defeating corporate security systems.
By the way, I gotta say this project is pretty hilarious, and you're a true baller for trying to sell this to people.
Duo as in Google's Duo video calling? There's 2FA on that? I've never seen any.
Or is there some other Duo it's referring to?
...assuming the service in question accepts yubikeys, or even TOTPs. I've seen plenty of services (mostly financial) that only allow sms or voice calls.
On the computer I have ~/.totp/ which contains files like `github` with the secret key as the file content. In my bashrc I made a function which runs oathtool on the contents of the given filename to generate the 6 digit code and then copies it to the clipboard with xclip (run it like `$ totp github`).
For the duo thing, I had to make the same `name` file with the secret key as the content, and a `name-counter` file with an integer. I put a hotp function in bashrc, so running `hotp name` generates the 6 digit code, copies it to the clipboard, and increments the counter.
I had to tell Duo I was adding a tablet (since the emulator had no phone number), it gives a QR code with a URL as a backup; I opened the URL in the emulator which opened the Duo app in the emulator and finished the setup. Then on the host computer run adb shell and cat out /data/data/com.duosecurity.duomobile/files/duokit/accounts.json from the emulator shell (or the shell on your rooted Android)
Get the 'otpSecret' and counter, at the end of otpSecret replace the \u003d with its actual character: '=', then put the secret into the file ~/.otp/name and the counter into ~/.otp/name-counter
Turns out I actually put a tiny script in my PATH instead of adding a function to bashrc:
#!/bin/sh
typeset -i counter=$(<~/.otp/name-counter)
oathtool --hotp -b $(<~/.otp/name) -c $counter | xclip -selection clipboard
echo $((counter + 1)) >~/.otp/name-counter
On macOS there's a `clip` command which you will have to use instead of xclip to copy to clipboard.I have saved a very old (2 years?) version of the Duo APK which works great for this (or at least was working great the last time I tried, 2 months ago). The newer app versions refuse to run without Google Play Services, but you can still make a throwaway andorid emulator with GPS. I'd like to share the APK I have, but no way to do so without linking this pseudonym to my real identity...
The most idiotic thing is that basically the entire 2FA ecosystem fucked up into turning 2FA into phoneFA. Your password is a secret, it can be guessed by some hacker on the other side of the world, so let's have two secrets, with the second one being unguessably long and only known to your hardware, so that it can make a human-sized login code. There are standards for this like TOTP and HOTP, but instead of having basically password managers for these secret keys, we get SMS auth and Duo and Authy, with no way for a normal person to generate otp codes on their actual computer. Google Authenticator and even the Duo app actually allow you to scan QR codes with TOTP secret keys and get the 6 digit OTPs from their app, but Duo itself won't let you use the standards to login, or to do it on your computer.
For completeness, here's the TOTP function in my bashrc:
function totp() {
oathtool --totp -b $(<~/".totp/${1}") | xclip -selection clipboard;
}
So if you have a file ~/.totp/github with the secret key as the content, you would open a terminal (or something like Guake/Yakuake) and run the command `totp github` and the 6-digit OTP would be in your clipboard.I have never used "duo" and it has taken me a few reads of this to understand exactly what this is, but I think it's worth pointing out that your own personal 'dontduo' service would be trivially simple to set up in a simple twiml bin, at twilio.
I think it would look something like this:
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<play digits="1w2w3w4"></play>
<Hangup />
</Response>
"Include w to introduce a 0.5s pause between DTMF tones. For example, 1w2 will tell Twilio to pause 0.5s before playing DTMF tone 2. To include 1s of pause, simply add ww."https://www.twilio.com/docs/voice/twiml/play#attributes-digi...
2FA is one of those things that is nice when you want it but a huge PITA when it’s forced on you.
How do you give a person secret knowledge that they need to provide you to authenticate but can’t provide to something else?
Pretty sure a dev made this for themself and decided to share
Services like Duo and Okta are enabling your least favorite IT admin to put users in ‘S’SO hell.
Your "incidentally" comment is actually important: organizations have to enable these additional auth methods; mine does not support TOTP. If it was the case that people weren't forced to either answer the phone or use a crappy app to log in (and own a smartphone), there would be much less impetus to bypass it. The point is not bypassing 2FA. The point is bypassing Duo.
There should be a URL that gives you a QR code for the TOTP/DuoPush enrollment.
any 2-factor system based on the phone system is no more secure than your phone company's willingness to give away your phone number, and they're usually pretty willing. I actually had this happen to me, in a benign way: my employer started paying my phone bill, they transfered my phone number from my personal plan on one carrier to the company plan with a different carrier. Somebody at the office just handed me a new sim card and told me my old SIM didn't work anymore - it required no interaction on my part to transfer my number to a new plan with a new company. that's apparently just normal procedure.
POTS telephones are a mess and should just be deprecated.
For those suffering, this helps: https://github.com/puddly/android-otp-extractor
Edit: Responding to your edit
>with the second one being very long and only known to your hardware. There are standards for this like totp and HOTP,
TOTP/HOTP don't provide phishing protection. Neither does Duo (which is largely HOTP), but that's a different issue.
>but instead of having basically password managers for these secret keys, we get SMS auth and duo and authy, with no way for a normal person to generate otp codes on their actual computer
SMS auth is terrible, but TOTP/HOTP are also hard to secure. There isn't a meaningful way of securing the secret, and computers are far more insecure than phones. You don't want your 2nd factor on the computer if that's your first factor too. So the right way forward is hardware based keys. However, it should all still be open standards based. Not some hacked up garbage that needs google play services.
It's like the classic HN argument of "Why don't you just use rsync/sftp vs dropbox" - because it's easier. For users, for admins, for the business.
The biggest problem with rolling out 2FA is onboarding and adoption.
Onboarding people is a massive pain in the arse. Issuing hardware tokens to people is even more of a giant pain in the arse, particularly if you have more than a handful of people in more than one city or country.
We deployed Duo because it allowed us to add 2FA reasonably easy to a wide range of services. It allowed us to require our contractors in countries like India and the Philippines to use it. They all have phones, even basic android devices can run it.
Rolling out physical tokens requires us to mail them out to people. Everything we sent to our offices in Spain larger than a letter got caught in customs for three months and/or "lost". Even USB thumb drives.
I've worked with people who are continually losing or destroying phones, keys, wallets, etc. Making them carry a hardware token, which will also get lost/destroyed means you're now constantly issuing them a new one.
On the systems side of things - it allowed us to add 2FA to devices that don't support it, or don't support the same 2FA you've chosen for everything else.
On the support side of things, it was dead easy to have automatic enrolment/signup based on existing processes (eg read LDAP/AD group membership), and it has a UI that actually allows us to properly delegate access to support staff.
Could we have rolled our own? Absolutely. But we'd have had to spend a lot more time, and a lot more money setting it up and maintaining it, and it gives good enough security.
Our biggest threat isn't a nation state or directed attack where someone can steal your phone and pull the token secrets.
Our biggest threat is Jim from Marketing who used the same damn password for his corporate email as he used when signing up for MarketingCon, and then having that registrant database leak.
That's not the sales pitch, _at all_, and you belie your inexperience in this understanding. Perhaps if you tried working for a big company or a university and began to understand the scale of the things they deal with in regards to identity and access management, you'd understand better. Let me expand on this.
What a company like Duo, OneLogin, Okta, IDaptive, etc. offers is not "textbook standard stuff". Sure, under the hood their system no doubt uses a ton of open source components, like anyone's does, glued together with their own secret sauce. That's the product. It's part of what they're selling you, but it's not all. You need to consider:
* Service operations and maintenance
* Security, scaling and capacity issues, upgrades, etc
* Ongoing development to keep the product current with the market (not much use to offer an authentication solution if it doesn't have the protocols and capabilities the other apps in the market that it is going to be interfacing with will require)
* Support and documentation
* Privacy and compliance
* Implementation and onboarding services, integration consultation and other professional services
The product itself is a turnkey solution, virtually guaranteed by the terms of service to be be fit for purpose, which means your overworked team has some hope of actually implementing it to the point of onboarding users within a quarter / semester or two rather than waiting for a slow project to even set up and get a proof of concept working with a home-built solution.
I'm not saying there isn't a place for home built solutions - I myself have authored extensive home-brewed configuration management software and workflow automation code in an academic environment. Still, there are certain critical pieces of infrastructure that are absolutely best left to purchasing solutions from teams of professionals that have invested their life's work into one particular concern or other.
That said:
> TOTP/HOTP don't provide phishing protection
This is not quite true. You can get a user's password, but the whole point of 2FA is that the password on its own should be useless. Of course, if you're re-using that password somewhere else where there is no 2FA, there is a vulnerability; however, almost all external services run by a competent IT org should be fronted by the same IDP at this point, and if you're not there yet you have to spend the cash to do it if you want meaningful security. Stealing the password should be pretty close to a non-impactful event at this point.
It is true that it is far better to have push-based authentication set up - something Duo pioneered, and most vendors have also implemented. For my current set of users, I've made it a mandatory policy; we don't allow SMS or DTMF auth at all. However, one could still be fooled by a phishing page that mimicks our login screen; it would be the absence of a working push that would have to tip the user off that something has happened. Some say "user education" is the key here, and I have had some mixed luck with that.
> However, it should all still be open standards based. Not some hacked up garbage that needs google play services.
If we want the convenience of push auth (which is actually better thought of as fingerprint auth, if you have MDM on your end-user's phones and push a policy that incentivizes the use of Touch ID by virtue of making the password too long for thenm to want to type it), then we need to deal with app stores. It's not like any IT-supported end user is going to have a phone that isn't either a well-supported Android or iPhone model; getting push services working basically requires going with what the Big Two want on that front. What choice do we really have?
> So the right way forward is hardware based keys.
I've maintained an RSA infrastructure, and have dabbled in Yubikeys, but the fact is: these things are expensive, they need to be replaced more often than we'd like, there are license costs for many of them, users lose them or leave them at home, you might un out of stock of them and have difficulties onboarding people, auditing their rollout and usage is more difficult, support for using them with a mobile phone is shit, etc. so many of the advantages over a phone app are moot.
They also aren't as physically secure as a phone, obviously. One can imagine a situation where a high value target is spearphished for their password and mugged for their RSA key in the building's parking lot one day. I'd far rather a physically secure, GPS-trackable, remote-wipeable iPhone get lost with their software token on it than a push-button RSA token.
Cryptocards that require a password are a solution some government agencies use, in my understanding; this is also obviously going to be a turnkey proprietary solution that costs even more than anything discussed above.
>Perhaps if you tried working for a big company or a university and began to understand the scale of the things they deal with in regards to identity and access management
I manage my lab's freeipa setup. It lets you manage TOTP tokens. I think it also allows yubikeys, but I haven't checked. It may not be as full-fledged as other offerings, but you can manage. The university pays several vendors for different sets of services (MS for AD, RedHat for servers, Duo for 2FA etc.) Right now, Duo may be preferred, but there is nothing stopping you from paying RH for a freeipa+totp solution. Vote with your wallet and all that.
>This is not quite true.
It is. The threat model is different. It's about replaying the 2FA token. That's the whole argument against TOTP/HOTP.
> it would be the absence of a working push
The phishing site can generate a working push. It just logs in to the real site at the same time with your first factor, which generates the push.
> The newer app versions refuse to run without Google Play Services, but you can still make a throwaway andorid emulator with GPS.
Can't you run GPS on a rooted phone, or am I mistaken? (If not, what about with magisk?) I suppose if it will run on a phone with an unlocked bootloader, you could always keep it unrooted until you need to copy the hotp, then root it.
Amazing that they've managed to rent-seek on top of a freely available open standard.
Duo does provide a very valuable service to organizations that pay for it - it's just frustrating for a user to be stuck with them.
Clearly, being able to access company resources without having two devices isn't the problem that 2FA is being used to solve. I just want to have the same ease of access on my computer that I have on my phone.
Rude. Go ahead and run your small computer lab and pretend you're dealing with issues on the scale that companies with thousands or tens of thousands of employees do. They're absolutely choosing the cheaper option when going with a managed provider vs. your hacked-together TOTP solution.
Few people are lucky (?) enough to support a purely unix environment. AD is not expensive when it comes to enterprise-scale projects and plenty of things simply require it for proper support, so I've never seen an enterprise that doesn't have it. I have seen enterprises with classic non-AD pre-Windows-2000 LDAP integrated alongside AD, but usually just as a legacy thing that's too hard to remove.
Considering the amount of resources available to help with AD vs. the amount you'd need to be able to support a 3rd party solution, it should be no surprise MS still has a stranglehold on this. What's more surprising is how badly they've fumbled the use of Azure AD, SSO, ADFS, etc. as real solutions compared to the cloud-first vendors like OneLogin, Duo, Centrify, etc.