Twilio’s toll fraud problem
billychasen.medium.com
billychasen.medium.com
If a threshold of Twilio customers dispute charges, Twilio loses the ability to process credit cards at a lower risk rate, then with all but high risk processors, then may lose the ability to process them at all.
If enough of their customers are getting burned, and enough dispute, Twilio would no longer be able to accept credit cards. They are terrified of that, so begging you not to dispute charges for their lack of fraud prevention.
You accepting anything less than full refund of all fraudulent use they're cascading back on you is a gift to them. You accepting less than a full refund, while not dinging them at all with a chargeback is also a gift to them. If they don't want to give you the full refund for misuse they should be preventing, dispute it, as is your right.
The correct course for Twilio is for Twilio to refund these charges no questions asked while fixing the problem.
I'd check their TOS to see if they offer some kind of arbitration option. As noted in other threads, triggering that process can be a surprisingly effective way to make someone from the company actually engage with the issue. Disputing the charges is always a nuclear option. They may never do business with you after that.
This is something that I think needs to be regulated. I'm not saying that this should be the case for a company the size of Twilio, but I definitely think that a company the size of Apple/Google/Samsung should not be able to ruin your life because you had temerity to stand up to them and dispute a charge.
The last generation of big tech monopoly never had that kind of power. Microsoft couldn't even do much to block someone from using its products as most of them were sold through third parties and didn't require network services to operate.
The west still prospered when consumer rights were given priority over business.
No.
> DRM-free books on sites like gumroad
I like specific authors.
> or just pirate
I like specific authors and want them to get paid.
Rent the book on Amazon as you already are. But then download a DRM-free copy from somewhere, uhhh, free.
Providing PCAPs and reproducing routing issues doesn't result in support addressing these issues. Many other IPES and CLECs will actually fix these issues when documented.
The arbitration is painful because of the costs (financial and staffing/handling) of the process, not the outcome.
The customer has the right to dispute credit card charges thanks to the agreements between customer and card provider and between card provider and merchant.
Twilio will get in trouble with Visa/Mastercard if customers say Twilio is dropping them for disputes the card provider finds in the customers' favor.
This is why you always pay for sketchy merchants with a card, it's one of the few consumer powers you have.
If it's a sufficiently large amount, Twilio will collect the money from you via other channels. Them losing a credit card dispute does not release you from liability.
>Twilio will get in trouble with Visa/Mastercard if customers say Twilio is dropping them for disputes the card provider finds in the customers' favor.
This is simply not true. Chargeback blacklists are standard and not prohibited by merchant agreements.
If you pay someone to mow your lawn, then they mow your lawn and charge you. You can't just chargeback after the fact to get that service for free.
It might be in the terms and conditions, but it’s bad faith to not give any warnings or controls before the services are rendered.
Absolutely, dispute the charge.
I strongly encourage Twilio customers to pursue this route if Twilio is charging them for fraudulent charges.
Twilio will get in trouble with Visa/Mastercard if customers say Twilio is dropping them for disputes the card provider finds in the customers' favor.
This isn't true. Visa/Mastercard care about your chargeback rate. You can block a customer who's done a chargeback. I'm sure the card networks have rules around what you cannot do as a result of a chargeback but you can stop providing services to a customer who has done a chargeback.
To be clear, my views on this are not legal counsel, they are simply from having worked in this area for a decade before becoming CTO at a global bank.
That’s like nuclear meltdown.
You chose to require an SMS OTP for your customers. It is not straightforward at all that the burden of filtering your customers would fall on your provider and not on you -- actually, if the provider you chose does explicitly not provide that filtering, it's effectively on you.
(I have to say that if I were Twilio, I would not have added the "fraud prevention" toggle, because now they can be deemed to be providing that service.)
How it works:
1. Attacker leases 1 or more premium rate numbers in an international country.
- Attacker can lease a premium rate number for as little as $10/month
- Typically, the attacker gets to keep 70% of the money generated by the premium rate number.
2. Attacker then finds companies with OTP (One-Time Passcodes) or 2FA (Two-Factor Authentication) endpoints that require no validation and writes a script to automate the webpage or call the API endpoint
- Attacker will typically obtain a new IP address per API call using a VPN or a rented botnet from the dark web.
3. If the premium rate number costs 10 cents, then each successful text message they can send to the number generates 7 cents for them.
4. The attacker then just needs to send 150 SMS to the premium rate number to break-even on their $10 investment, not counting the cost of the VPN or rented botnet.
There is a lot of money to be made here by an attacker unfortunately. :(If they can identify the premium numbers for billing, they should be able to identify them for blocking.
https://www.twilio.com/blog/2015/08/introducing-max-price.ht...
Apparently a lot of people could really use that info.
I agree with other comments here. $0 is the minimum amount people should be willing to pay if they're not disputing charges or reporting fraud to the credit card networks / regulators.
Time is money, after all.
Some of the criminals behind these attacks will have access to the phone network. They'll pick an expensive route, like a range of phone numbers in Georgia (the country) from the USA, and offer a cheaper route to it. The system will start using their route for those calls. They'll accept all calls to that route, get paid, and never actually connect any calls.
That gives them a range of "normal" phone numbers which helps them avoid throttling on just one number. But they can be just as expensive as premium numbers to call.
At least, this is how it was explained to me as my team fought these attacks a couple years ago. We'd see calls to a large range of a few thousand numbers. Couldn't throttle on a single number.
Edit: Oh, you're talking about number hijacking. I think they usually aren't offering termination services though, usually it goes hand in hand with the kind of fraud described in the OP.
Is this really fraud? Is it fraud to offer any VOIP service, or only when it can connect to the phone network, like Skype?
I guess I could see how it might be against the T&C's of the telecom company, to offer a service that undercuts them, but hardly a criminal act of deception.
Telecom companies don’t necessarily care about this, it’s often the governments who want to tax incoming international calls as an easy revenue source.
Anyone with enough determination can execute a sybil attack on any service that doesn't require in-person verification.
I am curious if the Twilio 'lookup' API call will identify it as such:
/usr/local/bin/curl -s -X GET "https://lookups.twilio.com/v1/PhoneNumbers/$number?Type=carrier&Type=caller-name" -u $accountsid:$authtoken | /usr/local/bin/jq '.'
... which would be a very fast and simple way to validate a number before you (or your process) use it ...In particular, email (smtp) to sms gateways exist. Why doesn't twilio just use one of those (and maybe pre-arrange a flat monthly payment to avoid being blocked for going over quota).
Everyone has the idea "just don't pay for fraud" but in practice it is difficult because there are many different carriers in the typical international call chain, which means to dispute charges you need everyone to agree. Also carriers have long term agreements with eachother about billing and it is not as easy to just dispute the charges like you can with a credit card.
wut, the absolutely most ordinary (in the realm of single telecom) text costs me ~6.5 cents
I'm in the US and any of the big carriers offer unlimited texting as a baseline, and we have pretty crappy carriers compared to a lot of the world.
That said, I don't care, since I literally can not remember the last time I sent an SMS. It must have been years ago.
Hmmmm... haven't encountered that phrase before.
1. Your balance is running low at -65 USD
2. (30 seconds later) your account is suspended, I checked the account an hour later when I saw this email and the balance was -4,000 USD
I asked support why they continued charging our account even with auto recharge disabled, but they just ignore the question.
Support says it's our fault, asks us not to dispute the charge (although there has been no charge yet as we disabled auto recharge), and said it will take 10 days for finance to issue a partial refund (that was 24 days ago).
Of course I will.
At the least, there should be a list of phone numbers known to not result in surprise charges so you can block all others.
If you want to read the tweet on how it works.
For comparison, imagine if each domain in the world could set its own rates for much doing a DNS query would cost you, and governments regulated this only by designating a few second level domains as "premium". That's pretty much the scale of the problem.
Edit: To be clear, this is a very well known problem and Twilio should be doing much better at it. But it's by no means an easy problem, and all the other side needs is one (1) number to exploit.
They know how to charge you for these numbers so apparently they do have that data, no?
They know how much to bill the customer, so they must know how much it costs to send to a number.
I don't mean to do Twilio's work of defending them, but in my experience it's possible they actually don't know how much to bill the customer. What they may know is the generalized per-minute or per-session rate they've agreed with another operator alongside a general "premium rate numbers will be settled at a later date" kind of clause.
My employer got bit by this several years ago, purely on calls within the +1 country code. Before this practice was largely banned, some small carriers were allowed to designate certain rate centers as higher cost. So our VoIP carrier would say that a call to a given area code was $0.003/minute but the calls would later settle out at $0.25/minute because of a 1,000s block of numbers being (unknowing to us our our carrier) as higher cost and being settlement billed back at the higher rate.
Twilio could agree to carry some or all of this risk for its customers as part of their value-add and fees. That way, Twilio has the incentive to make the proper changes for its customers and would have the experience of looking at all of the return billed rates for all of the calls or messages across its entire customer base to help prevent toll fraud.
There have been people who got printed bills from their cell phone provider for every single kilobyte of data, each individually indexed and billed: https://en.wikipedia.org/wiki/300-page_iPhone_bill
The company had made a change of some sort where whatever EDI connection between the telco and the company stopped working. I learned this when and angry facilities guy came up looking for my boss’s boss to sign for a delivery. I was the only person there, so I did. 15 minutes later, two pallets of bankers boxes came up - thousands of single sided pages of itemized call details.
Really sucks when you carefully load 10 EUR of credit to buy a 10 EUR prepaid plan for the month and see 0,05 deducted despite being incredibly careful to not do anything that would incur a charge before buying the plan.
There is a pop up that says "Your carrier may charge for the messages used to activate iMessage and Facetime" You can choose to not activate and do it later.
There’s a field in there that configured whether that warning should be shown.
My memory, which may be wrong, is telling me that the first major version of iOS which included iMessage did not include the warning at all, and that it was added for non-whitelisted carriers (aka those which did not sell the iPhone) to prepare the user for the possibility that they will be billed, based on user feedback precisely like the comment to which I was replying.
Ugh.
If Twilio cops an unexpectedly high settlement for sending an SMS to +1234567890 in January, can they assume that a separate customer sending an SMS to that number in February will end up in the same boat?
I'd be very surprised if the toll fraudsters weren't using the same numbers to hit multiple Twilio accounts.
(FreeConferenceCall and similar companies lobbied heavily against this rule, but AT&T and Verizon were able to lobby it through.)
Twilio knows which numbers will charge customers, THEY HAVE THE DATA. They can make a list of numbers that charge customers, and then have a flag that disallows SMSes to those numbers.
They also have relationships with phone providers in every market that they are in, and those providers can provide that same information and then allow a blacklist to those numbers or whatever format the premium numbers occur in.
It's not hard at all. It's a nice value-add feature and I'm sure if a competitor like MessageBird implemented something like this, it would be an easy differentiator if Twilio doesn't want to provide this.
[1] https://github.com/google/libphonenumber/tree/master/metadat...
Here’s a story from 2005:
https://www.forbes.com/forbes/2005/0919/058.html?sh=5531184c...
They retain the right to any/all the upside of any risk/scale, and you retain the obligation in any downside. No questions.
It's despicable.
I did as well.
In fact, I built my own little personal telco around their services and API.
It is all slowly falling apart, however, as their failure to build out their infrastructure offerings (as opposed to their "customer engagement" offerings) and the regulatory SNAFUs[1][2] that are emerging as a result of their behavior erode all of my use-cases ...
All I wanted was more, and more useful, twiml verbs ... instead I got "customer engagement workflows".
[1] https://twitter.com/rsyncnet/status/1593384850073214976
[2] 10DLC A2P makes personal/hobbyist Twilio usage basically impossible (although mine continue to work ...)
I was a HUGE Twilio booster back in the day. I encouraged its use heavily in my very large org because it was so much better than our entrenched phone provider. I was (maybe still am) featured on their website. But things have just gotten more..business-y, less developer focused, just..generally worse.
I don't know what to do with these guys anymore. I understand they're trying to grapple with the mess of regulations that got dumped on them, but their messaging and support around all this is BAD. There's no answers, just walls of canned text.
I work with Twilio a lot and kind of agree with your last sentence but what do you mean? Are these normal business practices?
There's a very obvious pattern on the spectrum of | Asset -> Liability |, and sadly, time proves they're much closer to a liability than an asset.
Over time, tech becomes a tax.
Or, more accurately, that they have become normal, rather than being objectively normal.
We have a full messaging + voice + video APIs, including a Twilio-compatible API just for people who need to switch. We're backed by companies like Deutsche Telekom, T-Mobile, and Samsung so we know how to make telecom infra!
https://signalwire.com/products/cloud-messaging
We're also the folks behind the open-source FreeSWITCH framework that powers companies like Bandwidth, Five9, Dialpad, Zoom Voice... maybe even your own company's PBX!
Thanks
Do you have a god-damned email verb for twiml ?
I mean, seriously. Twilio could allow (verified-ownership emails only) for the simplest possible email integration into twiml for the sole purpose of alerting and paging, etc.
No spam possible since it's only verified account-controlled emails. Basically sending email to yourself from within twiml.
But no. Instead they bought sendgrid and email integration is a complete abomination of a two-company, two platform, two accounts workflow that is fragile and fails all the time.
So ... do you ?
Most "alternative" SMS services a simply a façade built on top of Twilio, with the markup to prove it.
While they are mostly known in Asia but they offer service in Europe/North America as well.
Just FYI SendGrid is a Twilio product LOL, so I guess you are right.
In our case, Twilio reached out to us to tell us they were detecting toll fraud. Before that, we actually had no idea what toll fraud was.
We quickly tried to address it with distributed rate limiting and that worked, for all of a couple of hours. The fraudsters quickly figured out the rate limit and worked around it by spacing out the calls and using more IPs.
Eventually, we had to disable a set of countries known for toll fraud and change our product to not connect calls in a variety of scenarios.
It's absolutely critical that the companies we support vastly improve their security, but there's no way to get there from here with their staff, lack of any established processes, and zero training infrastructure.
At the time I wondered if I was overengineering or gold plating but apparently not.
I do seem to recall that Twilio writes about this issue quite alot and includes strategies in its best practices for avoiding the issue.
We tried to mitigate as cleanly as possible for our users, adding one-time nounces to signup requests, adding rate-limiting rules, locking down regions, but we still faced an onslaught of tens of thousands of fraudulent signups per day. On our tier we don't have the ability to set block rules ourselves - it requires a support request that takes 2-3 days to get a response on. Our choices are to eat thousands of dollars per day in toll fraud, or disable sign-ups until we can add more fraud prevention on top of what Twilio enables. The problem is the fraudsters are using real browsers across thousands of IPs located in dozens of different countries.
Similar to the OP, Twilio tries to say this is our fault and leaves it up to us to both pay for the issue and to try and fix it.
It would be valuable if they let you avoid texting premium numbers, but that's just a feature on top of the service they provide.
Maybe a class action possibility here?
1) Scammer leases a "premium phone number" from a provider. From doing some reading, premium numbers are where the caller/texter pays extra for interacting with the service at this number. So like a 1-900-phone-sex line from back in the day, where if you call, you get charged like $5.00 a minute. The provider leased the number to the phone sex operator for $1 per minute. The phone sex operator runs the service and charges access via your telco at $5 a minute, and ends up netting $4. The telco bills you $5 for your 1 minute call.
2) In Twilio's case, they get a request to send a text to a premium phone number leased by the scammer. This text is actually initiated by the scammer, via something like requesting a new one-time password. Twilio sends the text.
3) Twilio then determines that the destination number is a premium phone number. Twilio charges you extra for sending the text because of this. Twilio then remits a payment to someone, either the scammer or the premium phone number provider.
4) Scammer repeats step 3 a very large amount of times and collects. Twilio bills you for all of those texts they sent, on your behalf, to the scammer's premium number.
Step 3 is where I am confused. How do the payment flows work. Is Twilio remitting the money to the scammer, who then needs to pay for the leased number? Or are they remitting the payment to the premium phone number provider, who then pays some portion of that to the scammer?
And come to think of it, how does the phone sex line example work? Which entity actually contracts with the telco to set the cost/toll?
So, rent one of their numbers with a fee attached, get a bunch of CAPTCHA texts sent to your number. Your carrier charges Twilio some amount for each call, then sends you a check for some percentage of that.
My impression at the time was the fraud detection heuristics helped, but the root cause was scammers working with telcos overseas. Many of these companies have extremely high rates in the first place, and turn a blind eye to the practice because it makes them much of their money.
Some VoIP providers like Twilio may be the same. As a middleman / carrier, they will always profit from traffic on their network, even if they disavow it as fraudulent and wag their finger at you about it.
Not a telco but loosely related... I will never forget the day I was working for MediaFire (~2013) and complained directly to the CFO about advertisements on the website that directly violated the advertisement policy. CFO stated that "they paid us a lot of money" and that he's late for a ping pong match then walked out of my office. Well, they might have paid the company a lot of money but I was directly not paid a lot of money and was very much burned from friends for working with scum.
Suffice to say that people in positions to do things about it should be much less forgiving about it.
Email works fine, is more reliable, latency is fine, and it works across devices and on desktops.
Deduplicate your accounts some other way. Owning a bunch of phone numbers is (clearly, from the article) not a hurdle for attackers.
1. Rate limited SMS by number/ip: bypassed by large number of proxies/vpn.
2. Added captcha: bypassed by attacker manually signing up thousands of accounts (mechanical turks?) over months and then iterating over them for login OTP.
3. Identifying what carriers/operators are involved and blocking them asap (usually obscure ones).
4. Careful monitoring of SMS send rates and alerting of anomalies to investigate.
I will say though this isn’t a great look and hopefully Twilio addresses it. Perhaps there are significant trade-offs to enabling this option by default, but it does _seem_ (from an admittedly naive perspective) like perhaps it’s better to start folks with the training wheels on and make sure they know how to ride the bike before you let them go in the street.
We're in the same cat-and-mouse game with the attackers as everyone else, but since we're an auth company, we have full-time folks monitoring for issues and resolving when they come up.
It's worth mentioning that Twilio is in an understandably tough position here. They only receive API requests from your server, and real requests look the same as attack requests except for the phone number.
Clerk is in a better position to help because our API accepts traffic directly from the attacker (e.g. POST /verify-phone-number). We know their IP, user agent, whether they're connecting from AWS, etc, etc. We very much rely on this data to help stop them.
With the rise of AI APIs, I expect we'll see similar attack vectors for apps that integrate APIs from OpenAI or Stability. There won't be a colluding telecomm, but the API output (a completed task) is relatively fungible and far more valuable in itself than a SMS API response. Something to keep in mind if you're building an AI application: https://stytch.com/blog/securing-ai-against-bot-attacks/
Consider installing a device fingerprinting system -- this has be the single most effective solution we've seen our customers integrate for more sophisticated bot problems: https://stytch.com/docs/fraud#device-fingerprinting. I'd recommend against the off-the-shelf solutions (e.g. open source ones) because many of them are easily reverse engineered, so they work well for low-level threats but not for persistent ones. In addition to our solution, Arkose and Fingerprint Pro are a couple ones I'm aware of
E.g. why don't they have KYC controls during account opening? Because it would reduce the # of people who open an account.
My main suggestion would be to avoid any sort of flow, like SMS OTP login, that allows triggering SMS messages without being logged in. Just do a more traditional login, SMS OTP isn’t worth the headaches.
Haven’t tried Twilio Verify, didn’t exist when we were solving these problems ourselves. But like most fraud prevention, it’s probably far from perfect, better to just avoid fraud-prone workflows if you can.
The Tweets he mentioned, that they lost 200.000 Dollars. Unbelievable. And this „please don’t dispute the charge“ is the icing on the cake.
Your service got hit with a ddos-style attack that translated into you using twilio to send lots of texts. This cost you a lot of money.
I don't see how this is categorically different than your kid "accidentally" buying movies on Amazon prime or something like that. No way a credit card company would accept a chargeback in that scenario.
Ultimately, you used their product in the intended way. Of course you're on the hook for the bill.
The issue isn't the scale or volume, per se, it's that a bad actor has set up premium numbers (that cost $$$ to message) and is systematically wracking up fraudulent charges via websites sending 2FA codes. Twilio is seemingly aware of the fraud campaign targeting its users, but is not doing a great job protecting them and forcing them to bear the costs.
A better analogy, I think, would be a crime ring skimming credit cards at a gas station and wracking up charges that should be obvious fraud (different country, large amounts, etc.); and when a victim contacts their CC company they go "oh yeah that Shell station is notorious for fraud we've had lots of complaints recently" but refuse to chargeback.
Where do you find this? I've spent 10 minutes on our Twilio account and couldn't find the toggle.
It is sort of amusing that these companies hitched their wagon to the now scam laden telephone network to track users and ended up getting scammed themselves.
Spam phone calls... the global phone system is a network of relays. No telecom provider connects everyone on the planet together. To call our grandmother in Russia, we may have to go through Verizon, Deutsche Telecom, MTS, and ~five different smaller, regional telecom providers. The first telecom provider will request the second to complete the call, will trust they do this, and will accept the price they charge upon which they'll add their own costs. This occurs recursively until the phone call has been connected and completed. This implicit trust enables fraudulent actors to get into the circle of trust. Verizon may trust Deutsche, Deutsche may trust MTS, and MTS may trust a smaller telecom provider who in turn trusts a spam caller. This enables you to get spam calls. Telecom providers themselves don't know all the callers on the global telecom network and don't really know how much people will be charged. There is no global government to legislate across all telecoms.
Bots on the internet... the internet as a whole doesn't have a firm sense of identity. It's just a network protocol routing packets to ip addresses. In the past, these ip addresses were mostly human beings. In the current time, the majority of the participants on the internet are bots/computer programs. A website like "Big Tech Retailer" has >90% of all traffic from computer programs. Elon Musk was probably right that Twitter is full of bots, because the entire internet is swimming with bots. They can be incredibly difficult to detect because AI blurs humans with bots.
This toll fraud problem is that bots we struggle to detect place phone messages to phone numbers we struggle to identify. This ends up costing a huge and growing amount of money. You cannot truly solve the problem without solving the two underlying problems of bots on the internet and spam calls. Solutions to those problems may require rethinking and rebuilding the entire communication system we've built our lives around.
Nonetheless, we can greatly reduce the effect of this problem. At "Big Tech Retailer", myself and two others we were able to reduce the cost to a small percentage of what it was. After that point, the business sort of stopped caring because the fraud cost less than the staff. There were perhaps five techniques that were most helpful, all of which were contemporary fraud fighting/bot fighting/security techniques.
If you're a startup facing this problem, I can help give you some guidance. Twilio will probably see this post and start working on a solution, but that may take a long time. There are easy things you can do to mitigate the problem right now. You can contact me at manrajt@gmail.com.