< Return to Video

Shopshifting

  • 0:00 - 0:10
    preroll music
  • 0:10 - 0:12
    Herald: So, welcome everybody,
  • 0:12 - 0:14
    the next talk is under the topic
  • 0:14 - 0:19
    "shoplifting", uh, "shopshifting", sorry.
    laughter
  • 0:19 - 0:20
    Shoplifting is something completely different,
  • 0:20 - 0:23
    it has nothing to do with shopshifting,
  • 0:23 - 0:25
    the outcome is the same.
  • 0:25 - 0:27
    laughter
  • 0:27 - 0:29
    And I present to you Karsten Nohl,
  • 0:29 - 0:33
    Fabian Bräunlein, and Dexter from Berlin
  • 0:33 - 0:36
    Some of you may have already seen
  • 0:36 - 0:38
    the one only other face here,
  • 0:38 - 0:41
    and you may have heard of things like
  • 0:41 - 0:44
    the Mifare RFID problems that we had,
  • 0:44 - 0:48
    the gsm sim card hacks,
    and things like BadUSB
  • 0:48 - 0:50
    and these people and people around them
  • 0:50 - 0:53
    are all responsible for that.
  • 0:53 - 0:56
    So, give them a warm applause, and...
  • 0:56 - 1:05
    applause
    stage is yours!
  • 1:05 - 1:07
    Nohl: Thank you very much.
  • 1:07 - 1:10
    It's great to be back,
    looking at yet another technology
  • 1:10 - 1:14
    and searching for
    security vulnerabilities.
  • 1:14 - 1:16
    We focus our research on technologies
  • 1:16 - 1:19
    that most of us use on a daily basis,
  • 1:19 - 1:22
    that are typically outdated,
  • 1:22 - 1:25
    very widely deployed, and insecure.
  • 1:25 - 1:27
    Took us many years to finally come around
  • 1:27 - 1:29
    to look at payment protocols,
  • 1:29 - 1:32
    which we'll be discussing today.
  • 1:32 - 1:34
    In part, it took so long because
  • 1:34 - 1:37
    we just didn't think
    we would find anything.
  • 1:37 - 1:41
    After all, some of the best people
    in our industry work at banks,
  • 1:41 - 1:46
    and banks have among the most
    developed risk management.
  • 1:46 - 1:49
    So, at least in my experience,
  • 1:49 - 1:53
    banks are good at reacting
    to security evolution.
  • 1:53 - 1:56
    That's what I thought up until
    maybe the middle of this year,
  • 1:56 - 1:58
    when we started this research
  • 1:58 - 2:02
    and we're here now today to take
    this preconception away
  • 2:02 - 2:04
    from whoever may still be
  • 2:04 - 2:06
    suffering from this illusion that
  • 2:06 - 2:09
    banks actually do keep
    their systems very secure,
  • 2:09 - 2:11
    at least we found in two cases,
  • 2:11 - 2:14
    two very widely deployed protocols,
  • 2:14 - 2:18
    that there's gaping holes and have been
    for a couple of years.
  • 2:18 - 2:21
    Both of these protocols are
    involved in payment,
  • 2:21 - 2:22
    that is if you go into a store
  • 2:22 - 2:24
    and you pay with a card,
  • 2:24 - 2:25
    those protocols are invoked,
  • 2:25 - 2:27
    at least in Germany,
  • 2:27 - 2:31
    and protocols are called ZVT and Poseidon.
  • 2:31 - 2:33
    They're used for very different purposes,
  • 2:33 - 2:37
    but they both terminate at
    a payment terminal.
  • 2:37 - 2:39
    The one protocol ZVT is spoken between
  • 2:39 - 2:42
    a cashier station and
    this payment terminal,
  • 2:42 - 2:44
    so somebody would scan some items
  • 2:44 - 2:47
    or type in some amount
    into this cashier station,
  • 2:47 - 2:50
    and then say, "now please pay",
  • 2:50 - 2:52
    and a command is sent to
    the payment terminal,
  • 2:52 - 2:54
    which then requests a card,
  • 2:54 - 2:56
    and perhaps a pin number,
  • 2:56 - 2:58
    for most transactions in Germany,
  • 2:58 - 3:01
    and then in turns invokes another protocol
  • 3:01 - 3:05
    that this payment terminal speaks with
    a payment processor.
  • 3:05 - 3:07
    That's a service provider that connects
  • 3:07 - 3:09
    these terminals to banks,
  • 3:09 - 3:14
    and basically facilitates
    the actual payment.
  • 3:14 - 3:16
    And then the payment processor
    or the bank,
  • 3:16 - 3:19
    they validate the account details
    and so forth,
  • 3:19 - 3:20
    they send a confirmation,
  • 3:20 - 3:22
    and that confirmation again over ZVT
  • 3:22 - 3:26
    is sent back to the cashier station.
  • 3:26 - 3:29
    That is, in a nutshell, how
    a payment transaction works.
  • 3:29 - 3:32
    So it's based on two protocols,
  • 3:32 - 3:35
    both of them fairly old,
  • 3:35 - 3:39
    and probably by virtue of being so old,
  • 3:39 - 3:41
    very widely deployed.
  • 3:41 - 3:43
    In Germany, you will hardly find anything
  • 3:43 - 3:46
    other than these two protocols being used.
  • 3:46 - 3:48
    We'll look at an international angle
  • 3:48 - 3:50
    towards the end of the talk,
  • 3:50 - 3:52
    just a short summary,
  • 3:52 - 3:54
    most of these problems will probably exist
  • 3:54 - 3:58
    in most other countries as well.
  • 3:58 - 4:01
    So let's in turn look at ZVT
    and then Poseidon
  • 4:01 - 4:04
    to identify their security issues.
  • 4:04 - 4:05
    Starting with ZVT,
  • 4:05 - 4:07
    this is again the protocol that's spoken
  • 4:07 - 4:11
    in the shop, between a cashier station
    and a terminal,
  • 4:11 - 4:15
    but in almost all cases,
    over a network connection.
  • 4:15 - 4:17
    Very old systems would use
    a serial cable,
  • 4:17 - 4:20
    but today a network is used.
  • 4:20 - 4:22
    So assuming that a fraudster
  • 4:22 - 4:25
    somehow can get access to a local network,
  • 4:25 - 4:27
    by plugging into some open ports,
  • 4:27 - 4:29
    or by even being a customer at your hotel
  • 4:29 - 4:34
    and just being connected to the same wifi
    as your cashier system,
  • 4:34 - 4:36
    what can this attacker do?
  • 4:36 - 4:38
    Let's start with something simple
  • 4:38 - 4:43
    that doesn't even really
    require any hacking.
  • 4:43 - 4:44
    In this case, somebody wants to steal
  • 4:44 - 4:48
    the magnetic stripe details of the card.
  • 4:48 - 4:49
    So the way that it should work
  • 4:49 - 4:52
    is that the cashier station
    sends a command
  • 4:52 - 4:53
    to the payment terminal,
  • 4:53 - 4:54
    and then gets a confirmation back
  • 4:54 - 4:56
    after some processing.
  • 4:56 - 4:58
    Now what the attacker does in this case
  • 4:58 - 5:01
    is get in between those two,
  • 5:01 - 5:03
    in their connection.
  • 5:03 - 5:05
    Through, just traditional ARP spoofing.
  • 5:05 - 5:07
    So, you proxy the connection
  • 5:07 - 5:11
    between the cashier station
    and the payment terminal,
  • 5:11 - 5:14
    sitting in the local network again.
  • 5:14 - 5:16
    We'll look at Internet-wide attacks
  • 5:16 - 5:18
    in a few minutes, but for now
  • 5:18 - 5:20
    we're talking about inside the shop,
  • 5:20 - 5:23
    or in wifi range of that shop.
  • 5:23 - 5:24
    So you ARP spoof
  • 5:24 - 5:28
    and you receive that authorisation request
  • 5:28 - 5:30
    that's supposed to be sent to
    the payment terminal.
  • 5:30 - 5:32
    What the cashier station basically says,
  • 5:32 - 5:33
    "There's a customer here,
  • 5:33 - 5:35
    the customer wants to pay something,
  • 5:35 - 5:37
    please authorise the payment."
  • 5:37 - 5:40
    Right? We take that command
  • 5:40 - 5:41
    and do not forward it,
  • 5:41 - 5:42
    but instead send another command,
  • 5:42 - 5:46
    which basically says, "read a card".
  • 5:46 - 5:48
    So the terminal will then display
  • 5:48 - 5:49
    what the customer expects,
  • 5:49 - 5:51
    "please insert a card",
  • 5:51 - 5:55
    customer does so, and the
    magnetic stripe information is read,
  • 5:55 - 5:58
    and sent back over the network
    to the attacker.
  • 5:58 - 6:01
    No transaction has been done yet.
  • 6:01 - 6:05
    Immediately following
    these magnetic stripe details,
  • 6:05 - 6:06
    the attacker would then send
  • 6:06 - 6:10
    an actual authorisation request message
  • 6:10 - 6:13
    supplying the magnetic stripe info.
  • 6:13 - 6:15
    So, instead of asking for a card,
  • 6:15 - 6:17
    the payment terminal just takes
    this magstripe now,
  • 6:17 - 6:20
    and goes through the transaction.
  • 6:20 - 6:21
    So two things happen.
  • 6:21 - 6:25
    First, the attacker did receive
    a copy of the magstripe,
  • 6:25 - 6:27
    second, the actual transaction,
  • 6:27 - 6:29
    the intended transaction did go through.
  • 6:29 - 6:31
    So neither the customer nor the merchant
  • 6:31 - 6:33
    sees any different.
  • 6:33 - 6:36
    But the attacker does have
    a copy of the magstripe now.
  • 6:36 - 6:38
    And then, countries where
    magstripe is enough,
  • 6:38 - 6:41
    let's say US, prior to chip-and-pin,
  • 6:41 - 6:44
    this is enough to completely
    clone the card.
  • 6:44 - 6:47
    Fortunately, most other countries
  • 6:47 - 6:49
    do require pin numbers,
  • 6:49 - 6:53
    making this attack ineffective.
  • 6:53 - 6:55
    But perhaps motivating
    a slightly improved attack.
  • 6:55 - 6:58
    So, let's say the fraudster wanted
  • 6:58 - 7:00
    to also steal the pin number remotely.
  • 7:00 - 7:02
    Right? Magstripe and pin number,
  • 7:02 - 7:07
    that's really all you need
    to pay in Germany, say.
  • 7:07 - 7:10
    So the way pin transactions are
    supposed to work,
  • 7:10 - 7:12
    they are much more secure,
  • 7:12 - 7:14
    well, they're secured at all,
  • 7:14 - 7:16
    versus magstripe, which isn't secure,
  • 7:16 - 7:18
    so the top part of this slide
  • 7:18 - 7:24
    shows how a pin transaction is
    supposed to work.
  • 7:24 - 7:29
    Again, over ZVT, the cashier desk
  • 7:29 - 7:32
    or whatever's speaking
    to the terminal in the store,
  • 7:32 - 7:34
    sends an authorisation request
  • 7:34 - 7:35
    this time specifically saying
  • 7:35 - 7:38
    "do require pin number"
  • 7:38 - 7:40
    or perhaps that is even configured
    in the terminal,
  • 7:40 - 7:42
    to always require pin number.
  • 7:42 - 7:44
    Either way, inside the terminal,
  • 7:44 - 7:46
    all the security magic happens now.
  • 7:46 - 7:49
    There's different components
    of the terminal.
  • 7:49 - 7:53
    There's a main CPU that does
    all the network communication,
  • 7:53 - 7:55
    both ZVT and Poseidon,
  • 7:55 - 7:57
    which is supposed to be somewhat secure
  • 7:57 - 7:59
    but really isn't, as, by the way,
  • 7:59 - 8:01
    some research a couple of years has shown,
  • 8:01 - 8:03
    that specifically looked at the security
  • 8:03 - 8:04
    of one of these terminals,
  • 8:04 - 8:06
    but that's not the topic of today,
  • 8:06 - 8:09
    we're looking at the standard's security.
  • 8:09 - 8:10
    So inside this terminal,
  • 8:10 - 8:14
    there's also a hardware
    security module, an HSM,
  • 8:14 - 8:18
    and that HSM does all the heavy lifting
  • 8:18 - 8:21
    when it comes to
    cryptographic keys and so forth.
  • 8:21 - 8:23
    The HSM is also directly connected
  • 8:23 - 8:28
    to the display and the pin pad
    of the machine.
  • 8:28 - 8:31
    So you tell the HSM, inside the terminal,
  • 8:31 - 8:33
    "do a pin transaction",
  • 8:33 - 8:34
    it shows something on the display,
  • 8:34 - 8:37
    "enter pin", it receives the input,
  • 8:37 - 8:39
    and instead of giving out the pin number
  • 8:39 - 8:42
    to the less secure side of the terminal
  • 8:42 - 8:45
    it encrypts it with a key that only
    the payment processor
  • 8:45 - 8:47
    is supposed to have.
  • 8:47 - 8:49
    So, the main CPU,
  • 8:49 - 8:52
    or anybody really outside of the HSM,
  • 8:52 - 8:53
    does not see the pin number.
  • 8:53 - 8:57
    That's how things are supposed to work.
  • 8:57 - 8:59
    Now, the lower part of the slide
  • 8:59 - 9:01
    develops an attack idea with one catch,
  • 9:01 - 9:03
    we'll resolve that in a minute though.
  • 9:03 - 9:06
    This attack here would use
    a different message
  • 9:06 - 9:09
    to actually receive the pin number.
  • 9:09 - 9:12
    So instead of saying,
    "do a pin transaction",
  • 9:12 - 9:16
    it would just say "display some text
    and give me the input".
  • 9:16 - 9:18
    That would work beautifully, right,
  • 9:18 - 9:21
    so you display the text
    "give me the pin number"
  • 9:21 - 9:25
    and whatever's typed in,
    you get that input.
  • 9:25 - 9:27
    This very flexible functionality
  • 9:27 - 9:29
    we don't really know what it's
    ever used for,
  • 9:29 - 9:31
    we've never seen it,
  • 9:31 - 9:33
    but we're suspecting it's used
    for things like,
  • 9:33 - 9:36
    asking customers for their zip code
    or something, right?
  • 9:36 - 9:40
    Type something in and
    send it over the network.
  • 9:40 - 9:41
    And we've partly never seen this
  • 9:41 - 9:43
    because it really can't be used,
  • 9:43 - 9:45
    these messages need to be signed.
  • 9:45 - 9:46
    We don't know who's supposed
  • 9:46 - 9:47
    to sign these messages,
  • 9:47 - 9:49
    we've tried to find a person
  • 9:49 - 9:51
    but nobody feels responsible.
  • 9:51 - 9:53
    So there's some functionality
    in the standard here
  • 9:53 - 9:56
    that's never used and
    nobody knows how to use it.
  • 9:56 - 9:58
    The use of this cryptographic signature
  • 9:58 - 10:02
    on the slide called message
    authentication code, MAC,
  • 10:02 - 10:04
    that's required and it's actually
  • 10:04 - 10:05
    checked by the HSM.
  • 10:05 - 10:10
    So if you want to do your "please
    enter zip code" scheme
  • 10:10 - 10:11
    across all your stores,
  • 10:11 - 10:13
    you've got to get your message signed,
  • 10:13 - 10:15
    and that signed message then
    works across all terminals.
  • 10:15 - 10:20
    And if we want our "please enter
    pin number" message to be shown,
  • 10:20 - 10:21
    we've got to get to sign,
  • 10:21 - 10:24
    or find some way to sign this ourselves
  • 10:24 - 10:26
    and no entering the real hacking
  • 10:26 - 10:30
    so I'm handing over to Fabian
  • 10:30 - 10:32
    who did almost all this research,
  • 10:32 - 10:36
    so that was just my attempt to introduce
    these two guys here.
  • 10:36 - 10:38
    Bräunlein: Thank you.
  • 10:38 - 10:44
    applause
  • 10:44 - 10:46
    Alright, so, to find valid MACs
  • 10:46 - 10:47
    for arbitrary texts,
  • 10:47 - 10:51
    we exploited a time-based
    side-channel vulnerability
  • 10:51 - 10:54
    within one HSM implementation.
  • 10:54 - 10:56
    So, for those to work reliably,
  • 10:56 - 10:58
    we had to have the ability to
  • 10:58 - 11:01
    send messages directly to the HSM.
  • 11:01 - 11:03
    To accomplish that, we used
  • 11:03 - 11:08
    an active JTAG interface we found
    for the main CPU on the PCP,
  • 11:08 - 11:11
    and loaded our custom assembly program.
  • 11:11 - 11:15
    What this wanted was just sending messages
  • 11:15 - 11:19
    with our texts and some MACs to the HSM,
  • 11:19 - 11:23
    and stop the time that
    it needs to respond.
  • 11:23 - 11:27
    So, we are doing that and are trying
    every single possibility,
  • 11:27 - 11:31
    every single value for the first byte
    of this 8-byte MAC.
  • 11:31 - 11:33
    When you do that, you will see that...
  • 11:33 - 11:35
    so, that's a bit oversimplified,
  • 11:35 - 11:37
    but you will get the gist.
  • 11:37 - 11:40
    You will see that for
    one particular value,
  • 11:40 - 11:42
    the HSM needs a bit longer to respond,
  • 11:42 - 11:47
    so like, just 5 CPU cycles within the HSM.
  • 11:47 - 11:51
    Now you already have the first byte
    of this 8-byte MAC,
  • 11:51 - 11:55
    you can set this and do the same thing
    for the second one.
  • 11:55 - 11:58
    So, why does that work?
  • 11:58 - 12:02
    This works because they use
    a symmetric key
  • 12:02 - 12:04
    for the calculation of the MAC
  • 12:04 - 12:05
    within the HSM.
  • 12:05 - 12:07
    There is a key that the payment
    processor has,
  • 12:07 - 12:09
    and this is stored inside the HSM,
  • 12:09 - 12:15
    which is able to calculate
    the correct MAC for any text.
  • 12:15 - 12:16
    And what happens next,
  • 12:16 - 12:18
    so this is the first minor issue
  • 12:18 - 12:21
    because you should use
    asymmetric cryptography.
  • 12:21 - 12:22
    The next thing is,
  • 12:22 - 12:25
    that the comparison
    between the correct MAC
  • 12:25 - 12:29
    that has been calculated within the HSM,
  • 12:29 - 12:32
    and the MAC we have input through
    this display text message,
  • 12:32 - 12:35
    is compared byte by byte.
  • 12:35 - 12:37
    So it checks if the first byte
    of the input message
  • 12:37 - 12:40
    matches the first byte of the correct MAC
  • 12:40 - 12:40
    and if it doesn't match,
  • 12:40 - 12:42
    it will return immediately,
  • 12:42 - 12:46
    if it matches, it will try to compare
    the second byte,
  • 12:46 - 12:47
    and if that doesn't match
    it will return immediately,
  • 12:47 - 12:51
    so, this time it needs to check
    one more byte,
  • 12:51 - 12:53
    we can measure,
  • 12:53 - 12:55
    with some more work.
  • 12:55 - 12:58
    So, with this thing,
  • 12:58 - 13:02
    with the correct MAC for the
    "please enter pin" screen,
  • 13:02 - 13:04
    we can give you a quick demonstration
  • 13:04 - 13:06
    of how this works in real life.
  • 13:06 - 13:09
    And for that we would need the GoPro...
  • 13:09 - 13:16
    that you already have.
  • 13:16 - 13:17
    Ah, the GoPro, yeah.
  • 13:17 - 13:20
    laughter
  • 13:20 - 13:24
    So, this is the setup here.
  • 13:24 - 13:28
    Here we need the computer with
    the green text on the black terminal.
  • 13:28 - 13:31
    Alright. Here we have a normal
    cashier register,
  • 13:31 - 13:33
    it's some Windows XP software running,
  • 13:33 - 13:36
    here we have the actual payment terminal,
  • 13:36 - 13:41
    these two are connected through
    this Fritz box standing here,
  • 13:41 - 13:43
    just some normal internal home network.
  • 13:43 - 13:47
    Now, there's also another
    participant in the setup,
  • 13:47 - 13:50
    which is the attacker,
  • 13:50 - 13:52
    in this case I'm connected via LAN,
  • 13:52 - 13:53
    but you could also be connected
  • 13:53 - 13:56
    by wifi in the car outside
    in the street and so on,
  • 13:56 - 13:59
    so what we have running here
  • 13:59 - 14:01
    is the attacker software.
  • 14:01 - 14:03
    When we will introduce now,
  • 14:03 - 14:05
    initiate a payment,
  • 14:05 - 14:06
    through this cashier register,
  • 14:06 - 14:08
    the attacker as a man in the middle
  • 14:08 - 14:10
    between these two devices
  • 14:10 - 14:12
    will simply drop this message
  • 14:12 - 14:18
    and replace it with
    the first "read card" message.
  • 14:18 - 14:23
    We will pay with the card.
  • 14:23 - 14:25
    Yeah, alright.
  • 14:25 - 14:27
    Please insert the card.
  • 14:27 - 14:31
    Now, yeah, here we can also see,
  • 14:31 - 14:33
    we can already see the card data.
  • 14:33 - 14:35
    Partially censored for our own safety.
  • 14:35 - 14:37
    laughter
  • 14:37 - 14:39
    And, here's "enter the pin" already,
  • 14:39 - 14:41
    so what you have seen,
  • 14:41 - 14:43
    it was a bit fast, but what you have seen
  • 14:43 - 14:46
    was, the pin he has entered appeared here
  • 14:46 - 14:48
    as soon as he entered it,
  • 14:48 - 14:50
    because it wasn't
    the real pin entry screen,
  • 14:50 - 14:53
    it was just our fake pin entry screen.
  • 14:53 - 14:56
    I hope you have seen,
    that you saw that on the terminal.
  • 14:56 - 14:59
    That's the first demo, that's
    how we steal the pin number.
  • 14:59 - 15:11
    applause
  • 15:11 - 15:15
    Dexter: Alright. Zweite demo.
  • 15:15 - 15:18
    Nohl: The terminal printed out
    your receipt, though.
  • 15:18 - 15:20
    Gives out the attack a little bit, right?
  • 15:20 - 15:24
    Can we show this receipt?
  • 15:24 - 15:27
    GoPro, while you're here.
  • 15:27 - 15:30
    So, this line and then
    in the normal transaction,
  • 15:30 - 15:31
    when you enter pin number,
  • 15:31 - 15:32
    is supposed to say Girocard,
  • 15:32 - 15:36
    and instead does now say ELV offline,
  • 15:36 - 15:38
    so in some cases it's actually apparent,
  • 15:38 - 15:41
    but who actually pays attention
    to these details, right?
  • 15:41 - 15:43
    Bräunlein: RIght. In addition to this,
  • 15:43 - 15:45
    this means that the transaction
  • 15:45 - 15:48
    has gone through with "Lastschrift" without the pin,
  • 15:48 - 15:50
    however we can also choose our attack
  • 15:50 - 15:53
    to simply fail the first time,
  • 15:53 - 15:55
    so it says, like, "system failure"
  • 15:55 - 15:56
    or "pin incorrect",
  • 15:56 - 15:58
    and we'll do a second transaction,
  • 15:58 - 15:59
    again with pin authorisation,
  • 15:59 - 16:01
    that's fine, or in bigger setups,
  • 16:01 - 16:04
    it's not the terminal
    that prints the receipt,
  • 16:04 - 16:07
    but an external printer that's
    connected to the cashier register,
  • 16:07 - 16:11
    and for that to work, the terminal
    again has to send
  • 16:11 - 16:14
    the receipt line by line to
    the cashier register,
  • 16:14 - 16:17
    again without any encryption
    or authentication,
  • 16:17 - 16:20
    so we can simply replace the line
    with Girocard, or drop some lines,
  • 16:20 - 16:23
    and do whatever we want.
  • 16:23 - 16:24
    Nohl: Very cool.
  • 16:24 - 16:28
    So, that was an attack
    against the customer,
  • 16:28 - 16:30
    that is, pretty much everybody here,
  • 16:30 - 16:34
    unless you really only ever pay with cash.
  • 16:34 - 16:36
    There's some other attacks
  • 16:36 - 16:39
    that target merchants instead,
  • 16:39 - 16:41
    so everybody who operates
    one of these terminals,
  • 16:41 - 16:43
    and, according to the banks,
  • 16:43 - 16:47
    there's 770 thousand such
    terminals in operation
  • 16:47 - 16:48
    today in Germany,
  • 16:48 - 16:50
    so I guess at this point in time,
  • 16:50 - 16:52
    everybody, even the tiniest of shops,
  • 16:52 - 16:54
    will accept cashless payment,
  • 16:54 - 16:58
    so, let's look at that next.
  • 16:58 - 17:00
    Bräunlein: So, for the next attack,
  • 17:00 - 17:03
    we are trying to get all the money
  • 17:03 - 17:05
    that's been transferred on this terminal
  • 17:05 - 17:08
    to our own bank account.
  • 17:08 - 17:12
    Again, we assume we have local
    access to the network,
  • 17:12 - 17:14
    but this time we won't try to become
  • 17:14 - 17:17
    man in the middle between
    the cashier register and the terminal,
  • 17:17 - 17:20
    but between the terminal and the Internet,
  • 17:20 - 17:24
    in this case the payment processor.
  • 17:24 - 17:26
    By ARP spoofing again.
  • 17:26 - 17:29
    So ZVT includes a message,
  • 17:29 - 17:31
    and defines this message
    in the specification
  • 17:31 - 17:33
    to reset the terminal ID,
  • 17:33 - 17:36
    which is basically the identifier
  • 17:36 - 17:38
    that says to which bank account
  • 17:38 - 17:40
    the terminal is linked to.
  • 17:40 - 17:43
    We can reset and set this again
  • 17:43 - 17:48
    with password, more on
    that we will show later.
  • 17:48 - 17:52
    If we have set this, we will now
  • 17:52 - 17:56
    tell the terminal to initiate
    an extended diagnose to the backend again.
  • 17:56 - 18:00
    So we tell it via the ZVT protocol
  • 18:00 - 18:04
    to initiate a message on
    the Poseidon protocol.
  • 18:04 - 18:06
    We need that because,
  • 18:06 - 18:08
    when we reset the terminal ID,
  • 18:08 - 18:10
    the terminal will get reconfigured
  • 18:10 - 18:14
    for the attacker terminal ID,
    so for my one.
  • 18:14 - 18:16
    And this also means that
    the merchant banner,
  • 18:16 - 18:18
    so in German it's the Händler-Logo,
  • 18:18 - 18:21
    the thing that's printed on the top
    of every receipt,
  • 18:21 - 18:22
    this would also be my one,
  • 18:22 - 18:23
    the attacker's one,
  • 18:23 - 18:25
    but we don't want that.
  • 18:25 - 18:27
    So we tell the terminal to make
    another transaction,
  • 18:27 - 18:29
    another extended diagnose,
  • 18:29 - 18:31
    we will simply pass that
    through to the backend
  • 18:31 - 18:33
    as a man in the middle,
  • 18:33 - 18:38
    and the response includes some limits
    for offline electronic cash and so on,
  • 18:38 - 18:39
    and also the merchant banner.
  • 18:39 - 18:41
    And this, again, we can simply swap,
  • 18:41 - 18:44
    we can swap with the original one,
  • 18:44 - 18:50
    and so no one will get
    that this ID actually occurred,
  • 18:50 - 18:56
    and this is again possible because
    no authentication is implemented here.
  • 18:56 - 18:58
    Now for the actual transaction.
  • 18:58 - 19:01
    If the backend port is already
    the correct one,
  • 19:01 - 19:04
    we can simply pass all the messages through.
  • 19:04 - 19:07
    So, the backend port is,
  • 19:07 - 19:09
    each payment processor has
  • 19:09 - 19:11
    that one IP address responding
    for all the terminals.
  • 19:11 - 19:13
    However, for load-balancing reasons
  • 19:13 - 19:15
    or something like that,
  • 19:15 - 19:17
    they have like 100 different ports,
  • 19:17 - 19:21
    each port responsible
    for 50 thousand terminals,
  • 19:21 - 19:26
    but each terminal can only be managed
    by one specific port.
  • 19:26 - 19:27
    So if this port already matches,
  • 19:27 - 19:29
    we can simply pass through,
  • 19:29 - 19:31
    every payment done by this terminal
  • 19:31 - 19:35
    will now result in some more money
    in our bank account.
  • 19:35 - 19:37
    If this one doesn't match,
  • 19:37 - 19:38
    we as a man in the middle can simply
  • 19:38 - 19:42
    redirect the messages to
    the correct backend parameters.
  • 19:42 - 19:45
    And, again, let's see it in action.
  • 19:53 - 19:56
    So what we have here is a terminal,
  • 19:56 - 20:00
    we have configured it
    to be configured as another merchant,
  • 20:00 - 20:03
    you will see in the end which one it was.
  • 20:03 - 20:06
    Again we have the attacker's PC
  • 20:06 - 20:16
    that's running the malicious
    software, and...
  • 20:16 - 20:19
    now we will issue the registration,
  • 20:19 - 20:21
    just that we are able to send ZVT messages
  • 20:21 - 20:23
    to the terminal.
  • 20:23 - 20:25
    And now we will reset the terminal ID
  • 20:25 - 20:27
    from the one that's correctly set
  • 20:27 - 20:28
    to our own one,
  • 20:28 - 20:31
    the one we have got from our contract
  • 20:31 - 20:34
    with the payment processor.
  • 20:34 - 20:37
    We are setting this terminal ID.
  • 20:42 - 20:47
    And now the terminal already
    gets its new configuration,
  • 20:47 - 20:50
    encrypted, as you will see.
  • 20:50 - 20:54
    But it receives it.
  • 20:54 - 20:56
    Nohl: So this is all happening with
  • 20:56 - 20:59
    real terminals for real transactions,
  • 20:59 - 21:02
    so, whoever is watching this at the bank,
  • 21:02 - 21:05
    thank you for not blocking us yet.
  • 21:05 - 21:14
    laughter, applause
  • 21:14 - 21:17
    Bräunlein: But we use the 3G network,
  • 21:17 - 21:21
    so in case they block
    the IP address range here.
  • 21:21 - 21:25
    Alright, so, normally this thing,
  • 21:25 - 21:27
    you recognise that this would have been
  • 21:27 - 21:30
    printed on the terminal itself.
  • 21:30 - 21:32
    And we can see now,
  • 21:32 - 21:34
    this terminal now prints as
  • 21:34 - 21:36
    belonging to srlabs,
  • 21:36 - 21:39
    normally this would be
    the full terminal ID,
  • 21:39 - 21:41
    that we censored a bit,
  • 21:41 - 21:44
    and you can see this is
    the whole configuration,
  • 21:44 - 21:46
    and it's also configured to be able to
  • 21:46 - 21:50
    issue prepaid cards.
  • 21:50 - 21:52
    Normally this would be printed
    on the terminal,
  • 21:52 - 21:55
    but because that would be pretty uncool,
  • 21:55 - 21:57
    because then you would recognise it,
  • 21:57 - 22:02
    we transferred all the output
    to our own notebook.
  • 22:02 - 22:05
    Now we will start the man
    in the middle server
  • 22:05 - 22:09
    for this last part, exchanging
    the terminal banner.
  • 22:09 - 22:14
    We will change the logo.
  • 22:14 - 22:19
    And we will now issue a demo transaction,
  • 22:19 - 22:22
    so just like the cashier
    register software did,
  • 22:22 - 22:25
    we will now issue a transaction,
  • 22:25 - 22:31
    and, as you will see, this terminal
    now belongs to...
  • 22:31 - 22:34
    or still belongs to...
  • 22:34 - 22:38
    Can you see that?
  • 22:38 - 22:41
    Put it on the table, yeah.
  • 22:48 - 23:02
    laughter, applause
  • 23:02 - 23:06
    Nohl: Can we switch back to the slides?
  • 23:06 - 23:09
    Thank you.
  • 23:09 - 23:10
    So that's how we steal money
  • 23:10 - 23:12
    from an actual merchant,
  • 23:12 - 23:14
    while in the store.
  • 23:14 - 23:16
    That'd perhaps be the first catch,
  • 23:16 - 23:17
    that you have to be in the store,
  • 23:17 - 23:21
    the second catch, as probably the
    ones following along noted,
  • 23:21 - 23:24
    is, the attacker also needs
    to be merchant here,
  • 23:24 - 23:28
    you just change from money going
    to one merchant account,
  • 23:28 - 23:30
    from that to going to another
    merchant account,
  • 23:30 - 23:33
    but you need to be registered
    as a merchant somehow, right?
  • 23:33 - 23:34
    There may a catch,
  • 23:34 - 23:36
    I don't know how well
    set up criminals are,
  • 23:36 - 23:38
    with actual businesses,
  • 23:38 - 23:41
    but the next attack we're going to show
  • 23:41 - 23:43
    does not come with this catch,
  • 23:43 - 23:45
    it does not require you to be in the store
  • 23:45 - 23:49
    and does not require you to have
    anything preconfigured
  • 23:49 - 23:53
    and this is an attack on
    the Poseidon protocol.
  • 23:53 - 23:54
    Remember, that's the protocol
  • 23:54 - 23:56
    spoken between the terminal
  • 23:56 - 23:59
    and the payment processor, right?
  • 23:59 - 24:00
    Take it away.
  • 24:00 - 24:03
    Bräunlein: Alright! So, now
    for the third attack.
  • 24:03 - 24:06
    In that case, what we are
    taking a specific look at
  • 24:06 - 24:09
    is the initialisation routine of Poseidon.
  • 24:09 - 24:10
    This part is normally done
  • 24:10 - 24:12
    at the payment processor,
  • 24:12 - 24:15
    when you get your terminal preconfigured.
  • 24:15 - 24:16
    Here's done this configuration
  • 24:16 - 24:20
    to assign your terminal
    to your bank account,
  • 24:20 - 24:22
    to make this match.
  • 24:22 - 24:24
    And how is this done?
  • 24:24 - 24:28
    The terminal sends a Poseidon
    initialisation routine,
  • 24:28 - 24:29
    with the terminal ID,
  • 24:29 - 24:32
    to the backend.
  • 24:32 - 24:37
    The backend then will get
    the configuration for that terminal ID,
  • 24:37 - 24:40
    send it to the payment terminal,
  • 24:40 - 24:42
    in an encrypted way.
  • 24:42 - 24:44
    Symmetrically encrypted
  • 24:44 - 24:49
    with a key only within the HSM
    and the payment processor has.
  • 24:49 - 24:50
    So far, so good.
  • 24:50 - 24:54
    That's the normal pre-shared
    key thing that we know.
  • 24:54 - 24:57
    However, what we have found
    is that this key,
  • 24:57 - 24:58
    this exact same key,
  • 24:58 - 25:00
    is used not in only one terminal,
  • 25:00 - 25:03
    but in many, many terminals.
  • 25:03 - 25:05
    So what is left of this authentication?
  • 25:05 - 25:09
    It's just a username, the terminal ID.
  • 25:09 - 25:14
    And this username is public,
    as you will see.
  • 25:14 - 25:18
    So, the idea now is to have
    our own terminal,
  • 25:18 - 25:20
    that we got from eBay,
  • 25:20 - 25:23
    we got like 3 of them for 7 euros,
  • 25:23 - 25:25
    including shipping cost.
  • 25:25 - 25:28
    laughter
  • 25:28 - 25:29
    And configure our terminal
  • 25:29 - 25:33
    to act like just some random terminal,
  • 25:33 - 25:35
    somewhere for example in Bonn,
  • 25:35 - 25:39
    the mouse shop, as we have demonstrated.
  • 25:39 - 25:43
    At that point, I almost feel like
    apologising because,
  • 25:43 - 25:46
    for this hack, no actual
    hacking is involved,
  • 25:46 - 25:51
    it's just... it's just broken
    in that case.
  • 25:51 - 25:54
    You will see.
  • 25:54 - 25:56
    So, you just need a few parameters
  • 25:56 - 25:58
    to configure your terminal
    as another one.
  • 25:58 - 26:02
    And this is at first the server's
    management password
  • 26:02 - 26:04
    only server technicians should have.
  • 26:04 - 26:07
    The second one is the
    terminal ID of your victim,
  • 26:07 - 26:11
    and the last one is the backend port
  • 26:11 - 26:13
    that is responsible for managing
  • 26:13 - 26:16
    your victim's terminal ID.
  • 26:16 - 26:18
    So the first one. How do we get that?
  • 26:18 - 26:21
    You will simply google
    and find it on the Internet
  • 26:21 - 26:24
    in some internal documents.
  • 26:24 - 26:34
    laughter, applause, hooting
  • 26:34 - 26:37
    This one is the same across all terminals
  • 26:37 - 26:38
    of one payment processor,
  • 26:38 - 26:41
    so, completely independent of the model,
  • 26:41 - 26:44
    every terminal you got
    from the same payment processor,
  • 26:44 - 26:45
    the same password.
  • 26:45 - 26:47
    So the second one, the terminal ID.
  • 26:47 - 26:48
    As you have already seen,
  • 26:48 - 26:50
    you can find it on every receipt.
  • 26:50 - 26:54
    And you can guess them
    as they're assigned incrementally.
  • 26:54 - 26:54
    applause
  • 26:54 - 27:03
    Second one.
    applause
  • 27:03 - 27:05
    And, for the last one, there are like
  • 27:05 - 27:08
    100 different possibilities,
  • 27:08 - 27:09
    so just try them all,
  • 27:09 - 27:11
    and see which one of these 100 ports
  • 27:11 - 27:14
    doesn't answer with a message saying
    "I don't know you",
  • 27:14 - 27:15
    but with a merchant banner.
  • 27:15 - 27:19
    So have all three things set,
  • 27:19 - 27:24
    let's demonstrate it.
  • 27:24 - 27:26
    So, for this demonstration,
  • 27:26 - 27:29
    we've already told you we don't have to be
  • 27:29 - 27:30
    on the same network,
  • 27:30 - 27:34
    so this is the terminal here for CCC
  • 27:34 - 27:35
    that we have shown you,
  • 27:35 - 27:37
    we will simply disconnect that,
  • 27:37 - 27:39
    it's not on the same network.
  • 27:39 - 27:42
    What we have here is a terminal
  • 27:42 - 27:44
    without any terminal ID,
  • 27:44 - 27:48
    we just set that into factory reset.
  • 27:48 - 27:50
    This is how you would get it from eBay,
  • 27:50 - 27:52
    if the seller did a good job
  • 27:52 - 27:54
    and put it
    in factory reset.
  • 27:54 - 27:57
    laughter
  • 27:57 - 28:02
    Alright, the service password, hmm.
  • 28:10 - 28:19
    laughter
  • 28:19 - 28:25
    laughter, applause
  • 28:28 - 28:30
    Bräunlein shrieks
  • 28:37 - 28:40
    laughter
  • 28:44 - 28:47
    Good. Aha, no cameras, good.
  • 28:59 - 29:02
    Alright. We've entered the terminal ID,
  • 29:02 - 29:07
    the backend port is already correct.
  • 29:07 - 29:11
    And we will issue an extended diagnose
  • 29:11 - 29:14
    to get the new configuration.
  • 29:29 - 29:33
    Nohl: And once you're registered,
  • 29:33 - 29:35
    what can you actually do
  • 29:35 - 29:38
    to that victim merchant?
  • 29:38 - 29:42
    Bräunlein: We will show
    the prepaid top-up,
  • 29:42 - 29:45
    so if the victim merchant
  • 29:45 - 29:50
    has the prepaid feature activated,
  • 29:50 - 29:51
    we will have it activated as well,
  • 29:51 - 29:54
    because we are the victim's terminal.
  • 29:54 - 29:59
    So what we can do is simply
    print and print prepaid top-ups
  • 29:59 - 30:02
    and for example call
    our own premium number
  • 30:02 - 30:03
    to make it actual money,
  • 30:03 - 30:04
    or try to sell it.
  • 30:04 - 30:06
    So let's try that.
  • 30:06 - 30:11
    So... O2, maybe. 15 euros is enough.
  • 30:11 - 30:14
    Of course, we paid in cash.
  • 30:25 - 30:37
    applause
  • 30:37 - 30:40
    Nohl: Does anybody actually
    use O2 prepaid?
  • 30:40 - 30:41
    laughter
  • 30:41 - 30:53
    No? Well, I'm sure somebody
    will find this useful.
  • 30:53 - 31:07
    laughter
    applause
  • 31:07 - 31:09
    Bräunlein: We will also shortly
    demonstrate the second way
  • 31:09 - 31:12
    to get money, and this is simply
  • 31:12 - 31:15
    to transfer ourselves some money.
  • 31:15 - 31:17
    laughter
  • 31:17 - 31:19
    Nohl: So there's a feature called refund,
  • 31:19 - 31:21
    but it's completely independent
  • 31:21 - 31:22
    from previous transactions,
  • 31:22 - 31:26
    so a "refund" is a transaction
    with a negative value.
  • 31:26 - 31:27
    You can do this to any bank account.
  • 31:27 - 31:28
    Bräunlein: So...
  • 31:28 - 31:33
    laughter
  • 31:33 - 31:35
    100? Yeah, 100 sounds good.
  • 31:35 - 31:38
    laughter
  • 31:46 - 32:07
    applause
  • 32:07 - 32:07
    Ach!
  • 32:07 - 32:12
    laughter
  • 32:12 - 32:14
    Nohl: Can we go back to the slides?
  • 32:14 - 32:17
    laughter
  • 32:17 - 32:21
    Alright, that was pretty fast,
  • 32:21 - 32:24
    so let's summarise what just happened.
  • 32:24 - 32:26
    Somewhere in Germany there's a terminal
  • 32:26 - 32:28
    configured with a certain terminal ID,
  • 32:28 - 32:30
    and that terminal ID says,
  • 32:30 - 32:32
    this terminal belongs
    to a certain merchant.
  • 32:32 - 32:35
    So everything, every money
    that's put into that terminal
  • 32:35 - 32:36
    goes to that merchant's account,
  • 32:36 - 32:38
    and everything that's paid
    with that terminal
  • 32:38 - 32:40
    comes out from that account.
  • 32:40 - 32:41
    Now here's a second terminal,
  • 32:41 - 32:43
    and we configured that second terminal
  • 32:43 - 32:47
    to the same terminal ID.
  • 32:47 - 32:48
    And it goes through
    a cryptographic process
  • 32:48 - 32:52
    by which it registers itself
    with the backend.
  • 32:52 - 32:55
    This leaves the original terminal
    completely working,
  • 32:55 - 32:57
    so the merchant still do in the shop,
  • 32:57 - 32:58
    whatever he wants,
  • 32:58 - 32:59
    but there's a second terminal,
  • 32:59 - 33:02
    a complete clone of the first one,
  • 33:02 - 33:04
    that now can do the exact same things.
  • 33:04 - 33:06
    If we were to send money
    into that terminal,
  • 33:06 - 33:07
    the merchant would get the money,
  • 33:07 - 33:10
    but if we do refunds or sim card top-up
  • 33:10 - 33:11
    from that terminal,
  • 33:11 - 33:14
    the money comes out from
    that merchant's account.
  • 33:14 - 33:17
    Right? Very straightforward.
  • 33:17 - 33:18
    You saw what it took.
  • 33:18 - 33:22
    Three little numbers, all of which
    are easy to find, right?
  • 33:22 - 33:24
    Based on a terminal that
    we purchased on eBay.
  • 33:24 - 33:26
    Now what's the maximum scale of fraud
  • 33:26 - 33:29
    that somebody could take this towards?
  • 33:29 - 33:33
    First of all you don't have to
    do this manually on your terminal.
  • 33:33 - 33:36
    Everything we just did,
    you can do over ZVT,
  • 33:36 - 33:37
    so you can script this.
  • 33:37 - 33:39
    And it's attractive to script it
  • 33:39 - 33:43
    if you had a long list of
    valid terminal IDs.
  • 33:43 - 33:46
    Now we should note that these
    are assigned incrementally,
  • 33:46 - 33:48
    so if you know one terminal ID...
  • 33:48 - 33:49
    laughter
  • 33:49 - 33:51
    If you know one terminal ID,
  • 33:51 - 33:52
    you know hundreds of thousands
  • 33:52 - 33:54
    of valid terminal IDs.
  • 33:54 - 33:59
    Right? So, you register
    your terminal over ZVT,
  • 33:59 - 34:01
    with one merchant at a time,
  • 34:01 - 34:03
    go through a long succession,
  • 34:03 - 34:05
    thousands, tens of thousands,
  • 34:05 - 34:08
    and send refunds or print top-up money
  • 34:08 - 34:11
    from every single account.
  • 34:11 - 34:14
    In Germany, through
    this Poseidon protocol,
  • 34:14 - 34:16
    probably you take this to
    other countries too.
  • 34:16 - 34:21
    Poseidon is one dialect of a more
    internationally spoken ISO standard,
  • 34:21 - 34:25
    so, chances are this works
    in other countries as well.
  • 34:25 - 34:30
    So this could really be
    a pretty large fraud scheme
  • 34:30 - 34:33
    that fortunately hasn't occurred yet,
  • 34:33 - 34:35
    and there's still time to fix it.
  • 34:35 - 34:40
    laughter
    Again, those people at the banks, right?
  • 34:40 - 34:50
    applause
  • 34:50 - 34:53
    Summarising over the 3 attacks
    we've seen so far.
  • 34:53 - 34:56
    So there's two protocols in Germany
  • 34:56 - 34:57
    that are used for payments.
  • 34:57 - 35:00
    Both of them are severely broken,
  • 35:00 - 35:02
    and that affects customers,
  • 35:02 - 35:03
    mostly in the store,
  • 35:03 - 35:05
    by stealing their pin numbers
    and magstripes,
  • 35:05 - 35:07
    they affect merchants,
  • 35:07 - 35:09
    in the store or even over the Internet,
  • 35:09 - 35:11
    we've tried this Poseidon attack over tor,
  • 35:11 - 35:13
    works beautifully.
  • 35:13 - 35:21
    laughter, applause
  • 35:21 - 35:25
    And, coincidentally, these protocols
  • 35:25 - 35:27
    of course were designed
    completely independently
  • 35:27 - 35:28
    from one another,
  • 35:28 - 35:30
    they're both vulnerable because of
  • 35:30 - 35:31
    the same root cause.
  • 35:31 - 35:35
    They share secret keys across terminals.
  • 35:35 - 35:36
    You saw in the ZVT case
  • 35:36 - 35:39
    that we needed to sign a message,
  • 35:39 - 35:42
    that sign message was valid across
    all the different terminals
  • 35:42 - 35:44
    because they all have the same
    signing key in them.
  • 35:44 - 35:47
    We saw in Poseidon that we could just
  • 35:47 - 35:50
    register one terminal as another one
  • 35:50 - 35:52
    with all of them actually
    properly authenticated
  • 35:52 - 35:54
    to the backend cryptographically,
  • 35:54 - 35:56
    all of which with the same key, though,
  • 35:56 - 35:58
    so they're not distinguishable.
  • 35:58 - 36:02
    It's secure as long as every
    terminal is in good hands,
  • 36:02 - 36:05
    which of course is a silly assumption
  • 36:05 - 36:08
    in a scheme like that.
  • 36:08 - 36:12
    So, each of these protocols
    is severely broken,
  • 36:12 - 36:17
    and we should have just stopped
    our research here, but...
  • 36:17 - 36:18
    laughter
  • 36:18 - 36:20
    We wanted to get those keys,
  • 36:20 - 36:22
    and Dexter wouldn't be here with us today
  • 36:22 - 36:25
    if there weren't some hardware hacking involved.
  • 36:25 - 36:27
    So we snuck in a few weeks
  • 36:27 - 36:29
    of actual hardware hacking,
  • 36:29 - 36:33
    and Dex is going to tell you what he did.
  • 36:33 - 36:41
    applause
  • 36:41 - 36:45
    Dexter: Okay, well, you know,
  • 36:45 - 36:49
    yeah, let's go.
  • 36:49 - 36:55
    Yeah, let's talk about the HSM,
  • 36:55 - 36:58
    with the HSM module,
  • 36:58 - 37:01
    this is our research, so,
  • 37:01 - 37:03
    the HSM module is where the magic happens,
  • 37:03 - 37:08
    so let's see, the grey box
    you see on the picture above,
  • 37:08 - 37:11
    that's the HSM module,
  • 37:11 - 37:12
    and this is basically
    a smartcard on steroids,
  • 37:12 - 37:14
    so it has a display directly connected,
  • 37:14 - 37:17
    there's a keypad connected,
  • 37:17 - 37:21
    and it processes all the sensitive data.
  • 37:21 - 37:24
    Of course, you want to have this area
  • 37:24 - 37:25
    at least of the terminal write-protected,
  • 37:25 - 37:28
    so you want to have it separate
    from the application processor
  • 37:28 - 37:33
    where the insecure stuff happens.
  • 37:33 - 37:36
    There are a couple of protection measures,
  • 37:36 - 37:39
    for example, one important characteristic
  • 37:39 - 37:43
    is that the static RAM, the SRAM,
  • 37:43 - 37:46
    that holds the secret keys,
  • 37:46 - 37:47
    is battery backed-up,
  • 37:47 - 37:51
    so if the battery dies, you lose the keys,
  • 37:51 - 37:54
    and that's because it's simpler
  • 37:54 - 37:57
    to erase a battery backed-up SRAM,
  • 37:57 - 38:00
    you just shut down the power.
  • 38:00 - 38:10
    Around the module is a couple of switches,
  • 38:10 - 38:12
    and if an attacker unscrews the case
  • 38:12 - 38:13
    it will lift the switches
  • 38:13 - 38:15
    and then it trips the tamper protection
  • 38:15 - 38:18
    and... but that's no problem,
  • 38:18 - 38:20
    that's easy to defeat.
  • 38:20 - 38:25
    There's a more elaborate
    protection measure as well,
  • 38:25 - 38:29
    so there's a mesh underneath this cap,
  • 38:29 - 38:33
    there's a thin metallised mesh
  • 38:33 - 38:44
    that is printed to the
    inner surface of the HSM cap
  • 38:44 - 38:46
    and if an attacker would drill or cut
  • 38:46 - 38:48
    or even rip off the cap,
  • 38:48 - 38:53
    then you would trip the tamper
    protection of course.
  • 38:53 - 38:55
    We found an exploitable
    mechanical weakness
  • 38:55 - 38:56
    in this particular implementation,
  • 38:56 - 39:00
    we found it on these terminals there,
  • 39:00 - 39:01
    if you look carefully at the picture
  • 39:01 - 39:03
    you'll see on the right cap,
  • 39:03 - 39:04
    you'll see in the corners,
  • 39:04 - 39:06
    you'll see these little dents.
  • 39:06 - 39:13
    That's where the mesh is electrically
    connected to the underlying PCB,
  • 39:13 - 39:16
    so there it's connected
    to the secret insides
  • 39:16 - 39:21
    that measure, continually
    monitor the mesh,
  • 39:21 - 39:24
    continuous monitoring, unlike smartcards,
  • 39:24 - 39:26
    where you don't have
    a continuous monitoring,
  • 39:26 - 39:29
    if they're off, they're off,
    but this is always on.
  • 39:29 - 39:31
    And yeah, it's a problem,
  • 39:31 - 39:34
    the connection is only
    in the four corners,
  • 39:34 - 39:36
    not at the sides.
  • 39:36 - 39:39
    So at the sides, there is a possibility
  • 39:39 - 39:42
    to enter the edges in the confined space
  • 39:42 - 39:47
    with some metallic piece or something,
  • 39:47 - 39:49
    and furthermore, this cap,
  • 39:49 - 39:51
    during the manufacturing process,
  • 39:51 - 39:53
    this is glued on top of the PCB
  • 39:53 - 39:55
    with a slightly rubbery glue,
  • 39:55 - 39:57
    and this glue leaves a small slot,
  • 39:57 - 40:00
    and we thought of...
  • 40:00 - 40:04
    how can we try to push something under it?
  • 40:04 - 40:08
    And probably defeat the tamper protection.
  • 40:08 - 40:11
    And we found something
    from doctors, basically,
  • 40:11 - 40:14
    that's a syringe needle we flattened
    with a pair of pliers,
  • 40:14 - 40:17
    and indeed we managed to push that
  • 40:17 - 40:18
    underneath the cap,
  • 40:18 - 40:20
    underneath the mesh,
  • 40:20 - 40:22
    and right into the HSM.
  • 40:22 - 40:24
    And we made an experimentation,
  • 40:24 - 40:25
    we found a weak spot,
  • 40:25 - 40:29
    in our case it was just the power supply
    of the tamper protection
  • 40:29 - 40:31
    we need to short out to ground,
  • 40:31 - 40:33
    so then it's defeated, then it's off.
  • 40:33 - 40:36
    And then we can safely open the mesh,
  • 40:36 - 40:39
    you see the grounding clip
    on the left side.
  • 40:39 - 40:47
    That's the short-circuit of
    the tamper protection detection circuit.
  • 40:47 - 40:50
    And we used a soldering iron to cut it,
  • 40:50 - 40:54
    because we wanted to avoid
    any vibrations of course,
  • 40:54 - 40:56
    this is a delicate task,
  • 40:56 - 40:59
    and then you have...
  • 40:59 - 41:00
    then the fruits are exposed,
  • 41:00 - 41:02
    you have physical access to the flash,
  • 41:02 - 41:05
    to the SRAM, to the microcontroller,
  • 41:05 - 41:06
    even to the JTAG,
  • 41:06 - 41:08
    and in case JTAG doesn't work,
  • 41:08 - 41:10
    and you're only interested in the flash,
  • 41:10 - 41:13
    there are ways to do it.
  • 41:13 - 41:17
    That's how we did it the first time.
  • 41:17 - 41:23
    So, here we have attached
    the JTAG interface to the HSM,
  • 41:23 - 41:25
    and the HSM is still alive,
  • 41:25 - 41:26
    we have a terminal right there,
  • 41:26 - 41:28
    you can look, the HSM's, bleargh,
  • 41:28 - 41:30
    kind of working,
  • 41:30 - 41:36
    and you can do all sorts of things,
  • 41:36 - 41:37
    you can of course debug,
  • 41:37 - 41:38
    you can do experiments,
  • 41:38 - 41:40
    reverse-engineer stuff,
  • 41:40 - 41:42
    and you can also dump the RAM
  • 41:42 - 41:43
    and the RAM, the SRAM,
  • 41:43 - 41:44
    might contain some secrets,
  • 41:44 - 41:46
    in our case we did a little experiment,
  • 41:46 - 41:50
    we tried to use the HSM
    module as an oracle,
  • 41:50 - 41:51
    as you have seen before, you need
  • 41:51 - 41:54
    some MACs, the message
    authentication code
  • 41:54 - 41:58
    for the pin entry screen,
  • 41:58 - 41:59
    the fake screen you've probably seen
  • 41:59 - 42:03
    in the image that said that was
    protected with such a MAC.
  • 42:03 - 42:05
    What you just do,
  • 42:05 - 42:07
    the text string you want to have signed,
  • 42:07 - 42:09
    you send it to the HSM,
  • 42:09 - 42:10
    with an obviously wrong MAC,
  • 42:10 - 42:14
    that's the 41 41 here, you know that,
  • 42:14 - 42:15
    that's the wrong MAC,
  • 42:15 - 42:17
    doesn't matter which value that is,
  • 42:17 - 42:19
    you just send it in,
  • 42:19 - 42:21
    and then the blue stuff you see there
  • 42:21 - 42:24
    is the text we want to have signed,
  • 42:24 - 42:27
    and then, the HSM just happily
    compares the two
  • 42:27 - 42:30
    and says, error, doesn't match,
  • 42:30 - 42:32
    but no problem, we just hold CCPU
  • 42:32 - 42:34
    via JTAG dumps the RAM,
  • 42:34 - 42:35
    we just look up the correct MAC,
  • 42:35 - 42:37
    that's it then.
  • 42:37 - 42:38
    applause
  • 42:38 - 42:47
    Yeah, so much for the...
    applause
  • 42:47 - 42:51
    so much for the not-so-secure
    hardware security module,
  • 42:51 - 42:56
    and now let's go back to Karsten here.
  • 42:56 - 42:58
    Nohl: Thanks. Yeah, good job.
  • 42:58 - 43:06
    applause
  • 43:06 - 43:08
    Yeah, just a bit of hardware hacking fun.
  • 43:08 - 43:11
    This wasn't actually
    necessary for anything,
  • 43:11 - 43:16
    but I think it is important
  • 43:16 - 43:17
    to note that it is possible,
  • 43:17 - 43:20
    to drive one key point home.
  • 43:20 - 43:22
    So, in this next chapter,
  • 43:22 - 43:26
    we'll talk about what would
    actually need to change
  • 43:26 - 43:28
    for these protocols to be secure,
  • 43:28 - 43:29
    and one thing that can not happen
  • 43:29 - 43:32
    is for them to again bury some secret key
  • 43:32 - 43:34
    in some "security" module
  • 43:34 - 43:37
    that they give hundreds of
    thousands of copies out.
  • 43:37 - 43:38
    HSMs and generally the idea
  • 43:38 - 43:40
    of security by obscurity
  • 43:40 - 43:45
    is broken and we need
    a better approach here.
  • 43:45 - 43:47
    What exactly do we need, though?
  • 43:47 - 43:49
    Let's first revisit why
    these two protocols
  • 43:49 - 43:51
    are so severely broken.
  • 43:51 - 43:53
    As I said earlier, both of them
  • 43:53 - 43:56
    have the issues of keys that are spread
  • 43:56 - 43:59
    over a very large population of terminals,
  • 43:59 - 44:00
    some of which may be secure,
  • 44:00 - 44:02
    others are very insecure,
  • 44:02 - 44:06
    like this ancient model
    that we are looking at here.
  • 44:06 - 44:07
    The weakest link of the system
  • 44:07 - 44:09
    then obviously determines
  • 44:09 - 44:13
    the protection of these system-wide keys.
  • 44:13 - 44:14
    These system-wide keys,
  • 44:14 - 44:15
    they play out very differently
  • 44:15 - 44:18
    in these two protocols here, though.
  • 44:18 - 44:22
    Remember in ZVT, there's a MAC,
    a message signature,
  • 44:22 - 44:24
    which can actually be made very secure
  • 44:24 - 44:26
    even this system-wide key
  • 44:26 - 44:29
    as long as you're using pubic-key crypto.
  • 44:29 - 44:31
    If only one person can sign messages,
  • 44:31 - 44:32
    it's fine for everybody to have
  • 44:32 - 44:35
    the same public key
    to verify the messages.
  • 44:35 - 44:37
    Now, in this case, these terminals
  • 44:37 - 44:40
    I guess, when they were designed,
  • 44:40 - 44:41
    they didn't hear about
    this great invention
  • 44:41 - 44:44
    of asymmetric cryptography,
  • 44:44 - 44:47
    and they're using symmetric signatures,
  • 44:47 - 44:48
    so the signing key is distributed
  • 44:48 - 44:51
    in 700-some thousand copies,
  • 44:51 - 44:54
    throughout Germany.
  • 44:54 - 44:55
    Amplifying the problem
    and further of course
  • 44:55 - 45:00
    amplifying by putting them in shady HSMs
  • 45:00 - 45:03
    that are, well, not just vulnerable
    to Dexter-style hacking,
  • 45:03 - 45:07
    but to simple timing
    side-channel attacks.
  • 45:07 - 45:10
    Right? On the Poseidon side of things,
  • 45:10 - 45:11
    it's a little bit cleaner,
  • 45:11 - 45:14
    we're not talking about
    cryptographic signatures here,
  • 45:14 - 45:16
    but about authentication,
  • 45:16 - 45:19
    and look at these as
    online banking, right,
  • 45:19 - 45:20
    each of these terminals is kind of like
  • 45:20 - 45:23
    an online banking login
    to a merchant account,
  • 45:23 - 45:27
    and if they're all using
    similar usernames,
  • 45:27 - 45:29
    and everybody uses the exact
    same password,
  • 45:29 - 45:31
    cryptographic key in this case,
  • 45:31 - 45:33
    this cannot possibly be secure,
  • 45:33 - 45:35
    this cannot be fixed
    with public-key crypto,
  • 45:35 - 45:37
    as long as everybody uses the same,
  • 45:37 - 45:40
    in that case then, digital certificate,
  • 45:40 - 45:43
    this is not going to be secure either.
  • 45:43 - 45:44
    In both these cases though,
  • 45:44 - 45:48
    we need more individual keys.
  • 45:48 - 45:51
    As at least a mid-term goal, right?
  • 45:51 - 45:55
    Fortunately, these protocols
    do have a provision
  • 45:55 - 45:57
    to distribute a new key to a terminal
  • 45:57 - 45:59
    and this mechanism could be used
  • 45:59 - 46:00
    to give a different key
  • 46:00 - 46:02
    to every single terminal.
  • 46:02 - 46:05
    So, the road ahead should be clear,
  • 46:05 - 46:08
    some of the backend systems probably
    need to be adapted
  • 46:08 - 46:10
    to work with individual keys per terminal,
  • 46:10 - 46:14
    it's already clear how we would
    get out of this mess:
  • 46:14 - 46:17
    give a different key to
    every single terminal.
  • 46:17 - 46:18
    That not going to save us
    in the long run
  • 46:18 - 46:23
    when people start attacking
    the HSM chips again individually
  • 46:23 - 46:26
    and then defrauding
    these merchants individually,
  • 46:26 - 46:29
    but it would at least get rid
    of the possibility
  • 46:29 - 46:32
    of very scalable fraud
  • 46:32 - 46:35
    against tens of thousands,
    hundreds of thousands
  • 46:35 - 46:38
    of merchants or consumers, in this case.
  • 46:38 - 46:40
    So. The long-term goal is clear,
    better protocol,
  • 46:40 - 46:43
    the mid-term goal needs to be
  • 46:43 - 46:45
    individual keys for each
    of these terminals,
  • 46:45 - 46:48
    and the short-term goal
    could be things like,
  • 46:48 - 46:52
    switch off functionality
    that you don't actually need.
  • 46:52 - 46:54
    How many shops do need to
    print sim card top-ups?
  • 46:54 - 46:56
    Certainly not every hotel
  • 46:56 - 46:59
    and other establishments.
  • 46:59 - 47:02
    How many stores do really need
    to refund through a card?
  • 47:02 - 47:04
    Right, maybe you just do refund in cash
  • 47:04 - 47:07
    and switch off that functionality too.
  • 47:07 - 47:10
    Similarly, in ZVT, how many merchants
  • 47:10 - 47:11
    actually want a terminal
  • 47:11 - 47:14
    to be reconfigurable over a network,
  • 47:14 - 47:17
    with no confirmation whatsoever
    on the terminal?
  • 47:17 - 47:20
    Perhaps a little "is this okay?" message,
  • 47:20 - 47:21
    and somebody has to press a button
  • 47:21 - 47:24
    would already fix a lot of this.
  • 47:24 - 47:26
    So, switch off what's not necessary,
  • 47:26 - 47:29
    and detect suspicious behaviour,
  • 47:29 - 47:31
    you can read faster than I can speak,
  • 47:31 - 47:32
    you probably already
    went through this list,
  • 47:32 - 47:35
    so I'll save you that.
  • 47:35 - 47:36
    I promised a couple of times
  • 47:36 - 47:38
    a more international perspective on this,
  • 47:38 - 47:40
    everything we discussed so far
  • 47:40 - 47:44
    is focused on Germany and
    some neighbouring countries,
  • 47:44 - 47:47
    depending on which of
    these protocols it is,
  • 47:47 - 47:50
    but we suspect very similar issues
  • 47:50 - 47:53
    to exist in most other countries.
  • 47:53 - 47:56
    The ZVT alternative that's used
    more internationally
  • 47:56 - 48:00
    is called OPI, the open
    payment initiative,
  • 48:00 - 48:02
    and that is a much newer protocol,
  • 48:02 - 48:05
    that still does not have
    any encryption though.
  • 48:05 - 48:06
    Whoever thought, in 2003,
  • 48:06 - 48:08
    to specify a payment protocol
  • 48:08 - 48:11
    and not to add in encryption,
  • 48:11 - 48:12
    please send me an email,
  • 48:12 - 48:15
    I'm curious.
  • 48:15 - 48:19
    They did however do the,
    what would seem smart thing
  • 48:19 - 48:22
    of leaving out functionality
    that nobody needs anyway,
  • 48:22 - 48:25
    and in fact functionality
    that we're exploiting,
  • 48:25 - 48:28
    like remote manageability
    of these terminals.
  • 48:28 - 48:30
    Though the few instances of OPI
  • 48:30 - 48:32
    we have found in Germany, however,
  • 48:32 - 48:34
    they reintroduce that functionality
  • 48:34 - 48:35
    as custom extensions,
  • 48:35 - 48:38
    so apparently the terminal manufacturers,
  • 48:38 - 48:43
    they find it very useful to have
    remote manageability,
  • 48:43 - 48:46
    and if the protocol doesn't
    give it to them,
  • 48:46 - 48:48
    they will reintroduce it as an extension.
  • 48:48 - 48:51
    So, exact same level of vulnerability,
  • 48:51 - 48:54
    in those few instances that we looked at.
  • 48:54 - 48:57
    Of course, the research community at large
  • 48:57 - 49:01
    is needed to verify this
    in different countries
  • 49:01 - 49:05
    and just with a little of wireshark
    on the wire,
  • 49:05 - 49:09
    you typically can.
  • 49:09 - 49:10
    Similarly for Poseidon,
  • 49:10 - 49:12
    as I said earlier,
    this is just one dialect
  • 49:12 - 49:17
    of an ISO standard that originally
    came from MasterCard and Visa,
  • 49:17 - 49:21
    so this the suggested payment
    backend protocol
  • 49:21 - 49:24
    pretty much worldwide,
  • 49:24 - 49:27
    and we have seen
    encryption in some cases,
  • 49:27 - 49:28
    no encryption in others,
  • 49:28 - 49:30
    it doesn't matter though,
  • 49:30 - 49:31
    remember the attack actually goes through
  • 49:31 - 49:34
    a full cycle of authentication,
  • 49:34 - 49:35
    it establishes all keys well,
  • 49:35 - 49:37
    it does all of this correctly,
  • 49:37 - 49:40
    but everybody has the same key.
  • 49:40 - 49:42
    What we are yet to see is a protocol
  • 49:42 - 49:43
    by which you could exchange keys
  • 49:43 - 49:45
    with these individual terminals,
  • 49:45 - 49:48
    either put a key in or
    find which key it's using
  • 49:48 - 49:50
    to establish individual keys.
  • 49:50 - 49:52
    If anybody has more information on that,
  • 49:52 - 49:54
    definitely look us up,
  • 49:54 - 49:56
    but as far as we're informed,
  • 49:56 - 49:59
    there isn't a single instance where
    this ISO protocol
  • 49:59 - 50:04
    actually is used with a meaningful
    key management protocol
  • 50:04 - 50:07
    and where this would at least
  • 50:07 - 50:09
    have the foundation to be secure.
  • 50:09 - 50:13
    But again, you, the international
    research community,
  • 50:13 - 50:17
    over to you for looking at this
    in your countries.
  • 50:17 - 50:19
    That was that.
  • 50:19 - 50:24
    To quickly conclude, two protocols
  • 50:24 - 50:27
    used for payment in Germany,
  • 50:27 - 50:29
    both of them to be considered insecure,
  • 50:29 - 50:32
    and very outdated,
  • 50:32 - 50:33
    they both have the same root cause,
  • 50:33 - 50:35
    something that fortunately
    can quickly be fixed,
  • 50:35 - 50:38
    so there is time to improve the system
  • 50:38 - 50:40
    before actual fraud hits,
  • 50:40 - 50:42
    we as a research community
  • 50:42 - 50:43
    should keep up to pressure
  • 50:43 - 50:45
    for them to actually do that,
  • 50:45 - 50:47
    but we as customers,
  • 50:47 - 50:49
    we should not believe them anymore
  • 50:49 - 50:53
    when they say "you must have
    given your pin number to somebody,
  • 50:53 - 50:56
    hence this fraudulent transaction
    on your account".
  • 50:56 - 50:58
    There've been a number of cases like that
  • 50:58 - 51:00
    in Germany this year,
  • 51:00 - 51:02
    and I think it's time to show them
  • 51:02 - 51:06
    who's really responsible for
    the security vulnerabilities,
  • 51:06 - 51:09
    and for leaving them open
    for so many years.
  • 51:09 - 51:11
    Thank you very much.
  • 51:11 - 51:34
    applause
  • 51:34 - 51:36
    Herald: We have 7 minutes for Q&A.
  • 51:36 - 51:37
    Thanks to our speakers again
  • 51:37 - 51:41
    for a only theoretical threat
    on the payment systems, of course,
  • 51:41 - 51:45
    strictly lab environment,
    as the press wrote,
  • 51:45 - 51:48
    please leave quickly and quietly
    through the side doors now
  • 51:48 - 51:51
    so we have 5 minutes of Q&A.
  • 51:51 - 51:53
    And, mike 2 starts.
  • 51:53 - 51:55
    Q: How did you handle
    the question of disclosure,
  • 51:55 - 51:56
    so did you do full disclosure,
  • 51:56 - 51:57
    responsible disclosure,
  • 51:57 - 52:01
    how much time did you give them?
  • 52:01 - 52:05
    Nohl: We went through responsible
    disclosure I guess,
  • 52:05 - 52:07
    meaning that we in detail tried to explain
  • 52:07 - 52:09
    all of these attacks to an audience
  • 52:09 - 52:16
    that we thought could fix this,
    about a month ago. Right.
  • 52:16 - 52:18
    Q: And have you seen any reaction to that?
  • 52:18 - 52:20
    Like, have they tried fixing it?
  • 52:20 - 52:22
    Nohl: I'm sure somebody's working on a fix,
  • 52:22 - 52:26
    but nobody would tell me.
  • 52:26 - 52:30
    Herald: Okay, and we have one
    question from the Internet.
  • 52:30 - 52:32
    Signal angel: So, can you say if there's an easy fix
  • 52:32 - 52:38
    like just flashing a new firmware
    into all terminals?
  • 52:38 - 52:40
    Bräunlein: Like, flashing firmware
    to all terminals?
  • 52:40 - 52:42
    Nohl: It's an easy fix.
  • 52:42 - 52:45
    Bräunlein: Yeah, you have shown the fixes.
  • 52:45 - 52:48
    These are, the difference
    between this research
  • 52:48 - 52:50
    and the research done 3 years before
  • 52:50 - 52:54
    is that this are now
    flaws in the protocol,
  • 52:54 - 52:56
    so these need new protocols,
  • 52:56 - 53:00
    new versions and new... yeah. That's it.
  • 53:00 - 53:02
    So these are no implementation
    flaws right now.
  • 53:02 - 53:04
    Q: But would you have to
    scrap all terminals
  • 53:04 - 53:08
    and buy or construct new ones?
  • 53:08 - 53:11
    Nohl: I think the honest answer is
  • 53:11 - 53:14
    that criminals are slow too,
  • 53:14 - 53:18
    so this will have to be
    a somewhat longer journey
  • 53:18 - 53:21
    in which we first replace
    these system-wide keys
  • 53:21 - 53:22
    by individual keys,
  • 53:22 - 53:24
    that would already help tremendously
  • 53:24 - 53:26
    in making it less attractive
  • 53:26 - 53:29
    to do these types of attack,
  • 53:29 - 53:31
    but then in the meantime
    work on better protocols
  • 53:31 - 53:34
    so we don't keep finding ourselves
    in this situation
  • 53:34 - 53:37
    where it would take years
    to fix protocols,
  • 53:37 - 53:40
    well let's use those years
    ahead of us to do that.
  • 53:40 - 53:40
    Q: Thanks.
  • 53:40 - 53:43
    Herald: Okay. Microphone 8, please.
  • 53:43 - 53:45
    Q: How many tries did it take
  • 53:45 - 53:47
    to clone the keys of the terminal,
  • 53:47 - 53:48
    how many boxes did you have to blow?
  • 53:48 - 53:51
    Nohl laughs
  • 53:51 - 53:53
    Dexter: 3 or so.
  • 53:53 - 53:54
    Nohl: Yeah.
  • 53:54 - 53:58
    Dexter: I mean the first one was
    surprisingly an immediate success,
  • 53:58 - 54:02
    we managed to withdraw the SRAM
    without destroying it,
  • 54:02 - 54:04
    second one, we broke immediately,
  • 54:04 - 54:07
    and the third one had issues,
  • 54:07 - 54:09
    but we managed to fix it.
  • 54:09 - 54:14
    Q: So you didn't wipe any keys
    bypassing the mesh?
  • 54:14 - 54:16
    Dexter: I didn't understand
    acoustically, sorry.
  • 54:16 - 54:18
    Q: When you're bypassing the mesh,
  • 54:18 - 54:20
    you got that the first try?
  • 54:20 - 54:21
    Bräunlein: Yeah, I tried it the first time.
  • 54:21 - 54:21
    Q: Wow.
  • 54:21 - 54:23
    Bräunlein: So like, I think...
  • 54:23 - 54:23
    Dexter: Yeah.
  • 54:23 - 54:24
    Bräunlein: Bit of preparation,
  • 54:24 - 54:27
    and then one hour of actual work.
  • 54:27 - 54:28
    Nohl: Well, he destroyed
    the first terminal
  • 54:28 - 54:31
    but for just looking at
    how it's built, right?
  • 54:31 - 54:33
    Dexter: Yeah, he knew how it was made up
  • 54:33 - 54:36
    because we took a few apart before,
    of course.
  • 54:36 - 54:39
    But not with intention to do that,
  • 54:39 - 54:40
    just because they broke,
  • 54:40 - 54:41
    and then we took it apart
  • 54:41 - 54:44
    to look up, to read out the flash,
  • 54:44 - 54:45
    this bug bonded thingy
  • 54:45 - 54:47
    that was one of the very first ones,
  • 54:47 - 54:49
    that broke.
  • 54:49 - 54:52
    Herald: Okay, microphone 7, please.
  • 54:52 - 54:54
    Q: Would you please briefly describe
  • 54:54 - 54:57
    what will do the terminal in case,
  • 54:57 - 55:00
    if some transaction wasn't
    processed by the bank,
  • 55:00 - 55:03
    what kind of information it will store
  • 55:03 - 55:06
    in the memory and how long?
  • 55:06 - 55:08
    Bräunlein: It will store the error.
  • 55:08 - 55:10
    Nohl: I don't think the terminal
    stores anything,
  • 55:10 - 55:12
    it's pretty much stateless.
  • 55:12 - 55:15
    It receives a command,
  • 55:15 - 55:16
    looks up its configuration,
  • 55:16 - 55:17
    like terminal ID,
  • 55:17 - 55:20
    it pushes it down to HSM to get signed
  • 55:20 - 55:21
    or get a pin number,
  • 55:21 - 55:23
    pushes it over Poseidon,
  • 55:23 - 55:25
    and forgets all about that transaction.
  • 55:25 - 55:31
    Q: So it's not trying to resend
    the transaction again somehow later?
  • 55:31 - 55:34
    Nohl: Um, good question.
  • 55:34 - 55:37
    Bräunlein: So this is not part of
    the attacks we have demonstrated
  • 55:37 - 55:40
    but what happens is that,
  • 55:40 - 55:42
    normally you would do
    an end of day command,
  • 55:42 - 55:44
    or a Kassenschnitt in Germany,
  • 55:44 - 55:48
    where all the transactions that have been
    accumulated throughout the day
  • 55:48 - 55:50
    will be sent to the payment processor,
  • 55:50 - 55:52
    and this is the exact moment
  • 55:52 - 55:54
    where all these transactions are then sent
  • 55:54 - 55:57
    by the transaction processor to the bank.
  • 55:57 - 55:58
    So at this point for example,
  • 55:58 - 56:02
    no reversal is anymore possible,
  • 56:02 - 56:06
    reversal that'll reverse one
    purchase on the same day,
  • 56:06 - 56:09
    because then the bank has
    already the information,
  • 56:09 - 56:11
    and then no information
    is stored anymore
  • 56:11 - 56:13
    on the terminal,
  • 56:13 - 56:15
    if this one was successful.
  • 56:15 - 56:16
    Q: Okay, thank you.
  • 56:16 - 56:18
    Herald: One more remote question, please.
  • 56:18 - 56:22
    Signal angel: So is the communication that you use
  • 56:22 - 56:23
    in the man in the middle attacks
  • 56:23 - 56:26
    also susceptible to replay attacks?
  • 56:26 - 56:28
    Can you just do it without a terminal
  • 56:28 - 56:30
    if you recorded the conversation
  • 56:30 - 56:34
    between terminal and processing server?
  • 56:34 - 56:37
    Nohl: Sure, we can inject messages,
    ZVT messages,
  • 56:37 - 56:40
    most of them are not actually
    protected with a MAC,
  • 56:40 - 56:43
    for instance you can query a magstripe
  • 56:43 - 56:45
    with no protection,
  • 56:45 - 56:47
    however there needs to be
    somebody in the store
  • 56:47 - 56:50
    who expects you to do that, right?
  • 56:50 - 56:51
    So it's convenient to just be
    man in the middle
  • 56:51 - 56:53
    in an actual transaction
  • 56:53 - 56:56
    because you know there's somebody
    waiting for you to stick in a card,
  • 56:56 - 56:59
    there's a customer waiting
    to stick in that card,
  • 56:59 - 57:03
    so you wouldn't get that from just
    sending random messages,
  • 57:03 - 57:06
    there's just nobody there with a card.
  • 57:06 - 57:07
    Herald: Okay, one last question,
  • 57:07 - 57:09
    a quick question from microphone 1.
  • 57:09 - 57:11
    Q: Yes, you said there's a possibility
  • 57:11 - 57:15
    to give an individual key
    to each terminal.
  • 57:15 - 57:19
    So you have an identical terminal
    to another one,
  • 57:19 - 57:23
    so if the payment processor sends out
    individual keys to each terminal,
  • 57:23 - 57:26
    and there are two of one terminal,
  • 57:26 - 57:27
    what will happen?
  • 57:27 - 57:28
    Nohl: Yeah, good question.
  • 57:28 - 57:32
    So if the fraudsters first take over
    all the terminals,
  • 57:32 - 57:34
    and you then send individual keys,
  • 57:34 - 57:34
    it's not going to help,
  • 57:34 - 57:38
    you have to be ahead of the bad guys here.
  • 57:43 - 57:47
    Herald: Okay! Thanks again to
    Karsten, Fabian and Dexter.
  • 57:47 - 57:50
    applause
  • 57:50 - 57:53
    postroll music
  • 57:53 - 58:01
    subtitles created by c3subtitles.de
    Join, and help us!
Title:
Shopshifting
Description:

more » « less
Video Language:
English
Duration:
58:01
C3Subtitles edited English subtitles for Shopshifting
Bar Sch edited English subtitles for Shopshifting
Bar Sch edited English subtitles for Shopshifting
Bar Sch edited English subtitles for Shopshifting
Bar Sch edited English subtitles for Shopshifting
Bar Sch edited English subtitles for Shopshifting
Maximilian Marx edited English subtitles for Shopshifting
Leopold edited English subtitles for Shopshifting
Show all

English subtitles

Revisions