<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Sam King on Medium]]></title>
        <description><![CDATA[Stories by Sam King on Medium]]></description>
        <link>https://medium.com/@stk_60410?source=rss-6bacedfbb66e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*1tNR3GEhj963BDUS.jpeg</url>
            <title>Stories by Sam King on Medium</title>
            <link>https://medium.com/@stk_60410?source=rss-6bacedfbb66e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 18:23:57 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@stk_60410/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Boxer: Preventing fraud by scanning credit cards]]></title>
            <link>https://medium.com/bouncer-technologies/boxer-preventing-fraud-by-scanning-credit-cards-b7512b73c464?source=rss-6bacedfbb66e------2</link>
            <guid isPermaLink="false">https://medium.com/p/b7512b73c464</guid>
            <category><![CDATA[security]]></category>
            <category><![CDATA[user-experience]]></category>
            <category><![CDATA[fraud]]></category>
            <dc:creator><![CDATA[Sam King]]></dc:creator>
            <pubDate>Wed, 23 Sep 2020 12:25:54 GMT</pubDate>
            <atom:updated>2020-09-23T17:41:45.555Z</atom:updated>
            <content:encoded><![CDATA[<p>Most apps and merchants don’t want to deal with financial fraud, but if they accept payments, then eventually they’ll have to.</p><p>Traditional thinking in anti-fraud technology casts this problem as a tradeoff between false positives and false negatives: you can tune your system to block fraud or block good users. We challenge this traditional thinking and ask the following question: can you block attacks <em>without</em> also blocking good users?</p><p>This work was published at the 2020 Usenix Security Symposium. For full technical details please see our <a href="https://www.usenix.org/system/files/sec20-din.pdf">paper</a> or <a href="https://youtu.be/ZwwKDvHZU_4">Zain’s talk</a> at the conference. Interested in learning more or using the production version of Boxer? Check out <a href="https://getbouncer.com/scan">Bouncer Scan</a>.</p><h3>Goals</h3><p>Card-not-present credit card fraud costs businesses billions of dollars a year. In this post, we present Boxer, a mobile SDK and server that enables apps to combat card-not-present fraud by scanning cards and verifying that they are genuine. Boxer analyzes the images from these scans, looking for telltale signs of attacks, and introduces a novel abstraction on top of modern security hardware for complementary protection.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MhiiKmDVowplFHhOSP_Pgg.png" /><figcaption>Figure 1. This figure shows how a food delivery app can use Boxer to verify a credit card for a suspicious transaction.</figcaption></figure><p>Our overall goal is to enable apps to stop fraud by verifying that a user physically possesses a card while making it easy for legitimate users to prove possession. Our system has started to have an impact with 323 apps integrating Boxer, resulting in over 10 million scans of real cards from real users in the field.</p><h3>Motivating example: Mallory the fraudster</h3><p>This section walks through an autobiographical motivating example of card-not-present fraud and how Boxer can help defend against it.</p><p>Mallory is a fraudster. She buys stolen credit card numbers from other attackers, which they send to her in a text file. At first, she uses these stolen card numbers to buy food from a food delivery app, called <em>Foodie</em>, for herself and her friends. Then, she sees an opportunity to go into business monetizing her stolen credit card numbers.</p><p>To monetize stolen credit cards, Mallory acts as an agent service selling food delivery at a heavy discount. In this scheme she collects money from the person who wants food and “pays” Foodie using stolen credit cards, leaving Foodie stuck with the bill. Given the profits from this attack, Mallory recruits a team to help and as they scale their enterprise, Foodie is now losing nearly 5% of their revenue to card-not-present credit card fraud.</p><p>Foodie first becomes aware of their fraud problem when Visa reaches out to Foodie due to their chargeback ratio going above 1%. At a chargeback ratio above 1%, Foodie is at risk of having Visa remove them from the payment network, effectively killing Foodie’s growing business.</p><p>Foodie acts by hiring a data scientist, Ari, to help detect fraud. Ari crafts some business rules to identify the most egregious transactions, and then trains a machine learning model to generalize to other transactions. As Ari’s model hits production, fraud plummets and order is restored at Foodie.</p><p>However, this calm is short lived as Ari only measures his model’s impact on chargebacks and not on the users that his model flags incorrectly. It is not until Ari’s model disables one of Foodie’s investors that Foodie starts to look at the impact of incorrect model decisions. Upon further investigation, they realize that they are losing more money due to lost business from blocking legitimate transactions that Ari’s model flags than they would have lost from chargebacks.</p><p>To help with their false positive problem, Foodie hires Brie, who had been working on stopping fake accounts at a large social network. Brie knows that by providing users with a way to verify themselves automatically she can recover almost all the false positives while still preventing most of the fraud. Brie uses the Boxer “scan your card” challenge that asks suspicious users to scan their credit card on their phone to proceed (Figure 1). She knows that most legitimate users have their card in their wallet, whereas attackers like Mallory just have a text file with card numbers, making it easy for good users to pass but hard for attackers. After Brie launched this challenge, Foodie recovers over 80% of their false positives, while keeping general fraud rates low.</p><h3>Boxer design principles and overview</h3><p>This section discusses the design principles that underlay our design and gives a brief overview of our technology.</p><p>Our first general defensive philosophy is to compose complementary defenses. Financial fraud is diverse, ranging from groups of humans carrying out attacks manually using real iPhones to full-blown automation, bots, and machine learning. Rather than try to devise a single defense to stop them all, we compose several complementary pieces to make an overall defensive system. We strive to have one component cover the weaknesses or blind spots of another.</p><p>Our second general defensive philosophy is to strive to never block good users. While the constraints imposed by Boxer inconveniences fraudulent users, we design them such that they do not hamper the experience of good users</p><h4>Boxer design principles</h4><p>In this section we describe our general design for scanning credit cards to verify that they are genuine. Although our focus is on scanning credit cards, we expect these general principles to apply to similar problems, such as scanning IDs, selfie checks, or verifying utility bills. Our design has five general principles that guide our implementation.</p><p><strong>Principle 1: Scan the card to extract relevant details and check them against what the app has on record.</strong> In Boxer, we scan the credit card number using optical character recognition (OCR) and check that against the card number that the app has on record for that user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eYctHBhS5J_QfcuyLlzsPA.jpeg" /><figcaption>Output of the object detector of the BIN consistency and expectation check. The model correctly identifies, issuing bank, the card network (Visa), card type, chip, name, and card number. These extracted features are correlated with our data of the card BIN to identify any inconsistencies.</figcaption></figure><p><strong>Principle 2: Inspect the card image for telltale signs of tampering.</strong> Boxer uses a visual consistency check of the card image against the card’s Bank Identification Number (BIN), which is the first six digits of the card number and identifies the issuing bank of the card (e.g., Chase). For example, if a scanned card has a BIN from Chase but the model does not detect the Chase logo, then the scan is likely to be an attack.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EStDZdWrv5VN9zxxstwRjw.jpeg" /><figcaption>Moiré patterns observed on capturing a laptop screen on a mobile phone. These patterns are an inherent aliasing effect that arise from differences in spatial frequency of the laptop screen and the mobile camera.</figcaption></figure><p><strong>Principle 3: Detect cards rendered on false media.</strong> Although modern machine learning and computer vision algorithms empower attackers to tamper images that are difficult to detect, the attacker still needs to render these altered images to scan them. Boxer detects the presence of a screen when it scans a card. By detecting a screen, we can prevent one simple avenue for producing and scanning fake card images.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/889/1*QVaRb0VzKPNV4fPkK7bd6w.png" /><figcaption>To track attacker activities, we count events and divide the counts into hardware-backed strata, which we can use to recover the counts after a device reset.</figcaption></figure><p><strong>Principle 4: Associate attacker activities with items that are expensive.</strong> In Boxer, we track activities and increment a secure counter when they occur on the same device. This counting mechanism is important because it cuts to the core of a broad range of attack behavior: attackers will use a small set of real phones over and over to carry out attacks. By providing apps with the ability to count key events, like adding a credit card to an account, on a per device basis it allows them to limit the damage done by large scale attacks.</p><p><strong>Principle 5: Respect end-user privacy.</strong> In Boxer, we put a premium on end-user privacy by only using device identifiers that users can reset and by running our machine learning models on the client.</p><h4>Overview</h4><p>Together, the card scanning system and secure counting abstraction make up Boxer, where both mechanisms complement each other to prevent damage from card-not-present fraud. The image analysis techniques behind card scanning (OCR, BIN consistency, and screen detection) detect common ways that attackers could create fake cards with stolen card numbers. The advantage of these techniques is that when they work, they stop the attack completely. The disadvantage is that attackers who create sophisticated fake cards (e.g., physically prints cards) can evade them. On the other hand, the secure counting abstraction can effectively deter even technologically sophisticated attackers. However, it will let through a limited number of fraudulent transactions. Thus, we use both card scanning and secure counting together to help make up for the shortcomings of the other.</p><h3>Conclusion</h3><p>Our goal was to have our cake and eat it too. We wanted to block fraud <em>and </em>allow good users to still use an app, even if their anti-fraud systems flag them accidentally. Through providing a world-class user experience, novel machine learning, and new security abstractions on top of modern mobile phone hardware, we take a first step towards that ideal security experience in apps.</p><p>This blog post is joint work by Zainul Abi Din, Hari Venugopalan, Jaime Park, Andy Li, Weisu Yin, Haohui Mai, Yong Jae Lee, Steven Liu, and Samuel T. King (me!)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b7512b73c464" width="1" height="1" alt=""><hr><p><a href="https://medium.com/bouncer-technologies/boxer-preventing-fraud-by-scanning-credit-cards-b7512b73c464">Boxer: Preventing fraud by scanning credit cards</a> was originally published in <a href="https://medium.com/bouncer-technologies">Bouncer Technologies</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Stopping fraudsters by changing products]]></title>
            <link>https://eng.lyft.com/stopping-fraudsters-by-changing-products-452240f2d2cc?source=rss-6bacedfbb66e------2</link>
            <guid isPermaLink="false">https://medium.com/p/452240f2d2cc</guid>
            <category><![CDATA[fraud]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[product-security]]></category>
            <category><![CDATA[infrastructure]]></category>
            <category><![CDATA[identity]]></category>
            <dc:creator><![CDATA[Sam King]]></dc:creator>
            <pubDate>Thu, 14 Dec 2017 19:10:41 GMT</pubDate>
            <atom:updated>2017-12-14T19:11:47.448Z</atom:updated>
            <content:encoded><![CDATA[<p>Lyft’s whole app experience is geared towards getting new users from the App Store or the Play Store to their first ride as quickly as possible.</p><p>This streamlined process is great for our users, but presents an ever-present problem — how do we prevent bad actors from abusing our lightweight onboarding process?</p><p>This medium post is on joint work from the Fraud and Identity teams @<a href="https://medium.com/u/54708edc644b">Lyft</a>. Key contributors include <a href="https://twitter.com/stk">Sam King</a>, Will Megson, <a href="https://twitter.com/steven">Steven Liu</a>, Mike Ross, <a href="https://twitter.com/rchoi">Ryan Choi</a>, <a href="https://twitter.com/Ryan_VM">Ryan McGowan</a>, <a href="https://twitter.com/gx">Glen Robertson</a>, <a href="https://twitter.com/adamwu">Adam Wushensky</a>, <a href="https://twitter.com/donaldchen8">Donald Chen</a>, Helen Lau, and <a href="https://twitter.com/SiweiShen">Siwei Shen</a>.</p><h3>Goals</h3><p>Our overall goal is to prevent account takeover, stop scripts and automated apps from accessing our servers, and minimize financial loss due to fraud. We focused our efforts on identifying three fundamental properties:</p><ul><li>Identifying automation or non-human traffic.</li><li>Identifying a returning human — that is, detecting the same human we have seen on our app previously.</li><li>Establishing individual ownership over payment instruments.</li></ul><p>All signals that we collect are an approximation of one of these fundamental properties, and when we’re looking for new signals, we cross-reference them against this list.</p><h3>Architecture</h3><p>In our architecture, there are three key components: client instrumentation to collect more data silently, a server-side algorithm that decides if an action in the product is suspicious, and a user challenge to collect more information in cases where the algorithm decides that the action (signup, login, or ride request) is suspicious.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*rZV-OGwp_sj0zEdd." /></figure><p>This figure shows how we collect additional information to decide if a login attempt is suspicious. In the client, before the user logs in, we pass back to the server a number of signals to try to confirm that the login attempt is coming from the same human that we encountered previously. If our detection algorithm determines that this login attempt is suspicious, we put the user through a login challenge to allow them to prove their identity. Examples of identity challenges include retyping their email address or by entering their driver’s license number. If we can confirm that this person is who we think they are, then we log them in. If we can’t, then we give them an escape hatch where as a last resort they have the option to create a new account.</p><p>In this type of architecture, the detection algorithm and user challenge are complementary. An idealized, perfect detection algorithm detects all of the bad actors every time. An idealized, perfect user challenge identifies humans precisely, without adding friction to the flow. <strong>If you have the perfect detection algorithm or the perfect user challenge, you don’t need both. But in practice, neither is perfect, so we use both to correct for mistakes in the other.</strong></p><p>A low friction challenge enables security engineers to be more aggressive in their detection algorithm because they know that it will adversely affect fewer good users. Conversely, with high precision detection algorithms, security engineers can use challenges that add more friction but more cleanly stop malicious users.</p><h3>Principles of user challenges</h3><p>Over the last two years, we have shipped user challenges on login, signup, ride requests, passengers calls, driver calls, updating payment methods, and driver pay outs. Based on our experiences, we have developed five principles that we follow when designing new challenges. Specifically, in priority order:</p><ol><li>Never lock out good users.</li><li>Craft the entire user experience around your false positives.</li><li>Mobile-first design.</li><li>Challenges should be hard for fraudsters.</li><li>Numbers always trump philosophies.</li></ol><p>The first tenet of designing good user challenges is to never lock out good users. Under no circumstance should you design a user challenge that results in a legitimate user not being able to make progress.</p><p>The second tenet is to create the entire user experience with a focus on the good users who we accidentally catch, not on the bad actors. This principle is most relevant when thinking about the overall presentation — don’t accuse your good users of doing something wrong. Be clear about the fact that you made a mistake and apologetic about asking them for more information.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/349/1*Vjr5EnmiquYfEVZbxaoi2w.png" /></figure><p>This figure shows a message from Facebook when they block a Messenger message. It is descriptive and gives users a clear path to let Facebook know if it was a mistake.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*JYiZdT0ijR_do705." /></figure><p>The third tenet is that Lyft a mobile-first company and should design challenges with the assumption that all of the challenges will be served on a mobile phone or tablet. Pragmatically, this means avoid asking users to enter anything on a keyboard, but scanning something with their camera or clicking on a button are good because they minimize awkward and painful interactions.</p><p>Our fourth tenet is obvious: make challenges difficult / impossible for fraudsters — but the point is that it’s the fourth principle; all things good user-centric priorities supercede it.</p><p>Our fifth tenet might be the most important one: numbers trump philosophies and principles. If you have an idea, just ship it and see if it works.</p><p>Overall when we issue a challenge, some of our false positives will stop using the app. Fortunately, only a small percentage of our users will ever see a user challenge, and we will do everything in our power to maximize the likelihood of good users to pass. However, fundamentally, when you add friction you lose users.</p><h3>Exploiting asymmetric advantages with user challenges</h3><p>Challenges are difficult to design because they are highly specific to the product. Designers of challenges need to be able to come up with asymmetric information that is easy to share with good users but hard for the fraudsters to learn.</p><p>This section discusses challenges from Facebook, Google, and Lyft to explain the asymmetric information or idiosyncratic feature of the product that the challenge exploits. We speculate on the asymmetric information that the designers of these challenges used, but we describe the asymmetric advantage we exploited when designing and implementing Lyft’s login user challenges.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/220/1*fCmWKqUfMbgsEuKwOMHvvQ.png" /></figure><p>This figure shows ReCaptcha v2 from Google where they ask users to find all of the pictures of turkeys out of a set of nine pictures. We believe that the reason this challenge works for Google is that they have a massive tagged data set via Google Image Search — something that would be nearly impossible for bad actors to reproduce.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/347/1*za0qsu_Wy6u8YM9F4lyW3w.png" /></figure><p>This figure shows how Facebook can ask you to identify your friends in a picture to verify your identity if they detect a suspicious login attempt. We believe that the reason this challenge works is that Facebook has a huge team of PhDs who work on scalable facial recognition algorithms, and they know who your friends are. This technical sophistication and social information would be difficult for an attacker to apply broadly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/218/1*QSoRLVpDTlW7PJK44OMoBw.png" /></figure><p>This figure shows a Lyft login challenge, where we ask people if they are an existing user. The key to this challenge is that we have an escape hatch: we always let people create new accounts. Lyft has a Growth team dedicated to making it easy to create a new account and take a ride, so we use this smooth onboarding experience as a way to maximize the number of good users who pass our challenge. <strong>From an account security perspective, creating a new account is acceptable because it prevents the wrong person from gaining access to someone else’s account, but this escape hatch is something that would never work for Google or Facebook because there is so much data tied to one’s email or social network account.</strong></p><p>In general, Lyft has a number of asymmetric advantages that we exploit when designing user challenges. These advantages include:</p><ul><li>Lyft is a mobile-first and primarily mobile company.</li><li>Lyft is a consumer app.</li><li>Creating new accounts is low cost for users.</li><li>The Lyft product uses location data first class.</li><li>Passengers register payment methods with Lyft to take rides.</li><li>Drivers have a detailed on boarding process that includes interacting with humans.</li><li>We know who our good users are after they have used the service for a few months.</li><li>The Lyft use case is constrained by physics (users take rides in a car).</li></ul><p>Whenever we think about adding security to the Lyft platform, we consider these advantages and look for opportunities to exploit them — like in the challenge above, where we exploit the fact that creating new accounts is easy and that we’re a mobile first company.</p><h3>Case study: Login challenges</h3><p>Login challenges are product flows that we show after the user authenticates successfully. If we see a successful login that our algorithms flag as suspicious, the Lyft app redirects the user to an extended version of our login flow that asks them for more information. Conceptually, you can view login challenges as a form of opportunistic two-factor authentication, where we only use the second factor when our algorithms detect something suspicious. Our challenge flow is based on information that the user should possess or know without setting up two-factor authentication explicitly.</p><p>We designed and implemented two login challenges: a “enter the last four digits of one of the credit cards associated with your account” challenge and a “retype your email address” challenge. We designed the four digit challenge to prove that the person who is attempting to login owns one of the credit cards associated with the account. We designed the email retype challenge to use the email address we have associated with the account as a shared secret.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WROdNxt3c6dyRmjX5qtOIQ.png" /></figure><p>In this system, we use the same detection algorithms for both populations, but challenge some of the users with the “CC last 4” challenge and others with the “retype email” challenge. This table shows our overall results, where the main metric we use to evaluate our challenges is churn — defined as the percent of users who fail to take a ride within two weeks after seeing a login challenge.</p><p>The first surprising result was that such a low percentage of users who saw a login challenge churned. Although we are unaware of any published numbers around user churn and login challenges, based on our experience with social networking and internet companies, we were expecting 20% — 30% of the users who saw a challenge to churn.</p><p>There are a number of plausible reasons for this difference, including the fact that ride sharing apps are quite different than email providers or social networks, but we believe that the difference is in the two escape hatches we provide for users based on our asymmetric advantages: login with Facebook and create a new account. For login with Facebook, as a consumer company we can assume that people are comfortable with social networks, and we can use this as an additional signal to identify the same human we saw previously. For creating a new account, Lyft’s overall on boarding flow is lightweight and highly optimized, so we can enable one to simply create a new account and unlock their ability to take rides without risking the security of any existing accounts.</p><p>The second surprising result was that the retype email challenge performed better than the CC last 4 challenge. Before we deployed these systems, we had assumed that the numeric keypad was a more mobile-first experience and that users would be able to pass the challenge with less friction. However, we discovered that credit card companies will sometimes update credit card numbers — while still honoring existing tokens — so Lyft would have stale data. Also, for people who don’t have the last four digits of their credit card memorized, the CC last 4 challenge ended up being a possession authentication factor where they needed to have their credit card on them when they try to login. In contrast, people are likely to have their email address memorized, so despite the more onerous alpha numeric keypad, people were able to get through the retype email challenge at a higher percentage.</p><p>The end result is that Lyft uses the retype email challenge exclusively for this class of login challenges, adhering to our principles. Although the CC last 4 is a mobile-first flow (Principle 3), due to complications around knowing credit card numbers we were effectively locking out some users (Principle 1).</p><h3>Conclusion</h3><p>The biggest gains Lyft has made in fighting fraud and improving our account security is through our work on building sound distributed security systems, enabling quick and precise responses to active attacks, manufacturing clever signals, and understanding and changing the product to fend off the bad actors. This foundation serves as the base to enable humans to more effectively identify and stop bad actors, and provides the crucial signals needed to power machine learning algorithms and business rules that predict malicious behavior. Some people believe that machine learning is all one needs to fight fraud, but in our experience, without these basics in place first, the fraudsters have a fundamental advantage.</p><p>Interested in having big impact by reducing fraud and improving security at a massive scale? Lyft is <a href="https://www.lyft.com/jobs/software-engineer-fraud">hiring</a>!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=452240f2d2cc" width="1" height="1" alt=""><hr><p><a href="https://eng.lyft.com/stopping-fraudsters-by-changing-products-452240f2d2cc">Stopping fraudsters by changing products</a> was originally published in <a href="https://eng.lyft.com/">Lyft Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>