How roaming agreements enable 5G MitM Attacks

2024-12-27

These are notes taken during and after the 38C3 conference in Hambourg. Notes might be a bit sketchy at times

High value targets (politicians, journalists, activisits) can hardly hide right now.

TL; DR

5G Roaming is done to avoid/prevent billing fraud, not to enhance security.

Introduction of protocols

How roaming attacks work?

Legitimate roaming: when you travel, you can connect to the visited network, it then asks the home network to get the authentication. Between the two parts there is an agreement, and the home network can see the traffic only if it's routed there.

An attacker would: rogue base station a network looking like an extended network. The networks don't really check if the remote network is legitimate or not.

A state-sponsored attacker might force the operator to get access to the station.

Decrypted at the base station. So the good candidate for MiTM. It's encrypted by TLS. Basement exploits.

From the user perspective

AV = Authtentication Network

Client cannot observe who requested AV, only if we're billed for it.

Mitigations?

Turning off roaming?

If the base station says it's your home network, it's sent before the Authentication. No proof required. The phone has to accept. The connection doesn't differentiate from the real legit connection.

Firewalls?

There are firewalls, but they're not public, we don't know.

End to end encryption

Visible trust chain

Indicators of Roamnig Abuse

  1. Trace the routing path
  2. Detect rogute base station
  3. Measure the duration of authentication

Also rogue stations are very specialized. Measuring the time is not reliable, and not really possible to use right now.

Disable 2G

Lockdown mode in apple, disables 2G. Lockdown mode will change a bit the behaviour of your apps.

Turn off automatic network detection

Picking it yourself, but it means that you need to know what you're doing.

CellGuard (beta test)

It's a tool to collect information, the idea being to being able to notify you when it's needed.

Roaming intermediaries

It's not clear exactly how the contracts are defined between the oeprators.

Q & A

How much of it is by design?

Lawful interception is meant to be used. States and Law Enforcement agencies should be able to inspect the traffic in their countries.

What do we know about the intermediaries

We don't really know. These companies have a big impact, they collaborate with a lot of operators and are in the middle of the system. They are everywhere. Companies sitting in the middle, and they have political agency.

Did yoy look on using hardware to improve security?

We looked in the specification and looked for how the phones behave. CellGuard looks on a database where the base stations are supposed to be, and warns you if there is another one?

Is diabling roaming okay?

As shown, you can impersonate the home network, so no.

Nope, not looked.

What is the real risk? Is it only SMS? Did you do threat modeling?

We didn't do this, but I can say that SMS is unencrypted so yeah. The more TLS, the more secure it gets. it's used to target a single person, so it's really for speicifc people, and not for groups.

This is an expensible attack.

is this used in the wild?

In our reeasearch, we didn't look so much on compromise, Citizen Lab and Amnesty Tech are trying to document this.

How does the connection work between base and

You need to connect to the base operator (different from the "plain" internet). You have to contect the core network, I want to add more notes here as to how it works.

How can this be fixed without changing the infra?

You have to have E2EE? Is VPN fixing this? Right from the start of the connection. Having such a VPN would be good, BUT phone calls and SMS are not gong trough internet.

How much does it cost?

A rogue station is about 10k€ and then exploits are pretty costly.


@swantje@chaos.social

#38c3 , #telecoms - In Notes