back to the future - black hat briefings

60
Back to the future Cross-protocol attacks in the era of 5G Sergey Puzankov

Upload: others

Post on 01-Oct-2021

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Back to the future - Black Hat Briefings

Back to the

future

Cross-protocol attacks in the era of 5G

Sergey Puzankov

Page 2: Back to the future - Black Hat Briefings

About the team

Sergey Mashukov Alexander Onegov Sergey [email protected]@positive-tech.com [email protected]

The main point of interest is the security

of the Diameter protocol. Sergey

performs Diameter security audits for

international MNOs and conducts

research on the protocol weaknesses.

Sergey is also the general developer of

the Telecom Vulnerability Scanner tool

and member of the Telecom Attack

Discovery development team.

Alexander researched both SS7

and Diameter signaling protocols

from security point of view and

developed algorithms for an

intrusion detection system. He

also performs security

assessments for mobile

operators and conducts research

on the network vulnerabilities.

Sergey conducted research

of by-design vulnerabilities

in SS7 networks, discovered

a number of critical

vulnerabilities in mobile

network equipment, and

showed how an intruder

is able to bypass mobile

operators' protection means.

Pavel Novikov

[email protected]

Pavel researches GTP and

Diameter protocols, security

issues on radio part of mobile

networks, and everything that is

connected with IoT devices.

Pavel is also active contributor to

the GSMA Fraud and Security

Group.

Page 3: Back to the future - Black Hat Briefings

Signaling basics

SS7 (Signaling System No. 7) is a set of

telephony protocols used to set up and tear

down telephone calls, send and receive SMS

messages, provide subscriber mobility, and

more.

The basic unit in signaling is a message.

Diameter is an authentication, authorization, and

accounting protocol for computer networks. RFC 5516

defines a set of IANA Diameter Command Codes to be

used in new vendor-specific Diameter applications

defined for the 3GPP Evolved Packet System (EPS).

GTP (GPRS Tunneling Protocol) is a group of IP-

based communications protocols used to carry general

packet radio service (GPRS) within GSM, UMTS and

LTE networks.

Page 4: Back to the future - Black Hat Briefings

Now what can a hacker do?

Easily

From

anywhere

Any mobile

operator

No special

skills needed

Get access to your

email and social media

Track location of VIPsand public figures

Perform massive denial

of service attacks

Intercept private data,

calls, and SMS messages

Steal money

Take control of your

digital identity

Page 5: Back to the future - Black Hat Briefings

History of signaling security

SS7 development Scope grows Not trusted anymore

Trusted environment. No security

mechanisms in the protocol stack.

SIGTRAN (SS7 over IP) introduced.

Security is still missing

Growing number of SS7

connections, increasing

amount of SS7 traffic.

No security policies

or restrictions

Huge number of MNOs,

MVNOs, and VAS providers.

SS7 widely used, Diameter

added and spreading.

Still not enough security

Page 6: Back to the future - Black Hat Briefings

Mobile operators and signaling security

Security assessment

Signaling IDSSMS Home Routing

Security

configuration

Signaling firewall

Page 7: Back to the future - Black Hat Briefings

Nodes and identifiers in GSM/UMTS

HLR — Home Location Register

SGSN — Serving GPRS Support Node

STP — Signaling Transfer Point

MSC/VLR — Mobile Switching

Center and Visited Location Register

SMS-C — SMS Center

MSISDN — Mobile Subscriber Integrated

Services Digital Number

GT — Global Title, address of a core node

element

IMSI — International Mobile Subscriber

Identity

Page 8: Back to the future - Black Hat Briefings

SS7 protocol stack

TCAP

MAP

SCCPSignaling Connection Control Part is responsible for the routing of a signaling message by Global Titles.

Transaction Capabilities Application Part is responsible for transactions and dialogues processing.

Mobile Application Part is payload that contains an operation code and appropriate parameters

such as IMSI, profile information, and location data.

Page 9: Back to the future - Black Hat Briefings

Nodes in LTE

HSS — Home Subscriber Server

SGW — Serving Gateway

DEA — Diameter Edge Agent

MME — Mobile Management Entity

IMS — IP Multimedia System

Page 10: Back to the future - Black Hat Briefings

Diameter protocol stack

SCTP

Diameter

IPInternet Protocolis responsible for the node Internetworking at the Internet layer.

Stream Control Transmission Protocolis a transport protocol that provides some of the features of both

UDP and TCP.

Diameteris payload that contains a command code, application ID, and

appropriate parameters within Attribute-Value Pairs (AVP) blocks.

Page 11: Back to the future - Black Hat Briefings

Protocol types and nodes and GTP

PGW — Public Data Network Gateway

SGW — Serving Gateway

GGSN — Gateway GPRS Support Node

SGSN — Serving GPRS Support Node

GSM and UMTS

LTE and 5G non-SA

GTP-C is control section of the GTP standard

(signaling).

GTP-U is IP-based tunneling protocol which

permits many tunnels between each set of end

points.

GTP' transfers charging data.

Page 12: Back to the future - Black Hat Briefings

GTP-C protocol stack

UDP

GTP-C

IPInternet Protocolis responsible for the node internetworking at the Internet layer.

User Datagram Protocolis a transport protocol for establishing low-latency and loss-

tolerating connections between applications on the Internet.

GPRS Tunneling Protocol Control Planeis used within the GPRS core and EPC networks for signaling

between gateway and serving packet data nodes.

Page 13: Back to the future - Black Hat Briefings

Mixed-generation network

MSC/VLR

SGSN

HLR STP

2G

3G

4G

5G

HSS

MME/SGW

DEAIMS

2G

4G

3G

5G non SA

SS7

IWF

Diameter

SS7

GGSN

GTP

PGW

GTP

Page 14: Back to the future - Black Hat Briefings

SS7 and Diameter firewall penetration*

SS7 firewall penetration growth Diameter firewall penetration

0%

0%

0%

* Statistics based on Positive Technologies' SS7 and Diameter security assessment projects

This is the main reason why the

intruders start using Diameter

protocol along with SS7

Page 15: Back to the future - Black Hat Briefings

Cross-protocol attacks

Voice call

interception (MITM)

Voice call

interception (MITM)

Subscription

fraud

Attack via VoLTE suppression

and SS7 firewall bypassing

Attack via packet data

service disruption

Attack on SS7 and

GTP-C protocols

Page 16: Back to the future - Black Hat Briefings

Voice call interception (MITM)

on 2G/4G network with VoLTE

Attack via VoLTE

suppression and

SS7 firewall

bypassing

Page 17: Back to the future - Black Hat Briefings

Voice call interception (MITM)

1. InsertSubscriberData Request: IMSI

Spoofed billing platform address1. InsertSubscriberData Request: IMSI

Spoofed billing platform addressSTP MSC/VLR

Page 18: Back to the future - Black Hat Briefings

Voice call interception (MITM)

1. InsertSubscriberData Request: IMSI

Spoofed billing platform address1. InsertSubscriberData Request: IMSI

Spoofed billing platform addressSTP

2. InsertSubscriberData Response 2. InsertSubscriberData Response

MSC/VLR

3. TCAP End 3. TCAP End

Page 19: Back to the future - Black Hat Briefings

Voice call interception (MITM)

1. InitialDP: IMSI, A-Num, B-Num 1. InitialDP: IMSI, A-Num, B-NumSTP MSC/VLR

Page 20: Back to the future - Black Hat Briefings

Voice call interception (MITM)

1. InitialDP: IMSI, A-Num, B-Num 1. InitialDP: IMSI, A-Num, B-NumSTP

2. Connect: PBX-Num 2. Connect: PBX-Num

MSC/VLR

Page 21: Back to the future - Black Hat Briefings

MSC/VLR

Voice call interception (MITM)

1. InitialDP: IMSI, A-Num, B-Num 1. InitialDP: IMSI, A-Num, B-NumSTP

2. Connect: PBX-Num 2. Connect: PBX-Num

3. IAM: A-Num, B-Num 3. IAM: A-Num, B-Num

Page 22: Back to the future - Black Hat Briefings

SS7 FW against MITM attack

1. InsertSubscriberData Request:

IMSI, Spoofed billing platform address

2. InsertSubscriberData

Request: IMSI, Spoofed

billing platform address

The SS7 FW correlates the IMSI and source address and blocks the InsertSubscriberData message

Switzerland ≠ Taiwan

STP MSC/VLR

Page 23: Back to the future - Black Hat Briefings

VoLTE against MITM attack

1. InsertSubscriberData Request: IMSI

Spoofed billing platform addressSTP

2. InsertSubscriberData Response

MSC/VLR

3. TCAP End

DEA MME IMS

Page 24: Back to the future - Black Hat Briefings

SS7

VoLTE service suppression

STP

SS7 FW

MSC/VLR

PBX

DEA MME IMSCLR

CLR – Cancel-Location Request

Diameter

Page 25: Back to the future - Black Hat Briefings

VoLTE service suppression

DEA MME IMS

STP MSC/VLR

PBX

SS7 FW

CLR

CLA – Cancel-Location Answer

CLA

SS7

Diameter

Page 26: Back to the future - Black Hat Briefings

VoLTE service suppression

PBX

CLR

CLR – Cancel-Location Answer

CLA

STP MSC/VLR

DEA MME IMS

SS7 FW

SS7

Diameter

Page 27: Back to the future - Black Hat Briefings

TCAP protocol

TCAP Message Type — mandatory

Transaction IDs — mandatory

Dialogue Portion — optional

Component Portion — optional

Page 28: Back to the future - Black Hat Briefings

Double MAP component

TCAP Message Type — mandatory

Transaction IDs — mandatory

Dialogue Portion — optional

Component Portion — optional

Component 1

Component 2

The SS7 FW

checks a

subscriber's ID in

the first component

considering the

other data as a

long payload not

meant to be

inspected

Page 29: Back to the future - Black Hat Briefings

STP

SS7 FW

MSC/VLR

PBX

DEA MME IMS

Double MAP in MITM attack

TCAP Begin

DeleteSubscriberData_REQ

InsertSubscriberData_REQ

Inspect the first

component only and

forward the

message to the

network

Send the message to

the SS7 FW for

inspection

SS7

Page 30: Back to the future - Black Hat Briefings

STP MSC/VLR

DEA MME IMS

Double MAP in MITM attack

TCAP Continue

ReturnError

PBX

SS7 FW

SS7

Diameter

TCAP Begin

DeleteSubscriberData_REQ

InsertSubscriberData_REQ

Page 31: Back to the future - Black Hat Briefings

STP MSC/VLR

DEA MME IMS

Double MAP in MITM attack

TCAP Continue

InsertSubscriberData_REQ

InsertSubscriberData_REQ

TCAP Begin

DeleteSubscriberData_REQ

InsertSubscriberData_REQ

Inspect the first

component only and

forward the

message to the

network.TCAP Continue

ReturnError

PBX

SS7 FW

SS7

Page 32: Back to the future - Black Hat Briefings

STP MSC/VLR

DEA MME IMS

Double MAP in MITM attack

TCAP Continue

InsertSubscriberData_REQ

InsertSubscriberData_REQ

TCAP Begin

DeleteSubscriberData_REQ

InsertSubscriberData_REQ

TCAP Continue

ReturnError

PBX

SS7 FWTCAP Continue

ReturnResultLast

SS7

Page 33: Back to the future - Black Hat Briefings

STP MSC/VLR

DEA MME IMS

Double MAP in MITM attack

TCAP Continue

InsertSubscriberData_REQ

InsertSubscriberData_REQ

TCAP Begin

DeleteSubscriberData_REQ

InsertSubscriberData_REQ

TCAP Continue

ReturnError

PBX

SS7 FWTCAP Continue

ReturnResultLast

SS7

Page 34: Back to the future - Black Hat Briefings

STP MSC/VLR

DEA MME IMS

Double MAP in MITM attack

TCAP Continue

ReturnError

TCAP EndTCAP Continue

InsertSubscriberData_REQ

InsertSubscriberData_REQ

TCAP Begin

DeleteSubscriberData_REQ

InsertSubscriberData_REQ

PBX

SS7 FWTCAP Continue

ReturnResultLast

SS7

Page 35: Back to the future - Black Hat Briefings

STP MSC/VLR

DEA MME IMS

Double MAP in MITM attack

TCAP EndTCAP Continue

InsertSubscriberData_REQ

InsertSubscriberData_REQ

TCAP Begin

DeleteSubscriberData_REQ

InsertSubscriberData_REQ

TCAP Continue

ReturnError

PBX

SS7 FWTCAP Continue

ReturnResultLast

SS7

Page 36: Back to the future - Black Hat Briefings

STP MSC/VLR

MME IMS

Double MAP in MITM attack

TCAP EndTCAP Continue

InsertSubscriberData_REQ

InsertSubscriberData_REQ

TCAP Begin

DeleteSubscriberData_REQ

InsertSubscriberData_REQ

TCAP Continue

ReturnError

PBX

SS7 FWTCAP Continue

ReturnResultLast

SS7

Page 37: Back to the future - Black Hat Briefings

STP MSC/VLR

MME IMS

Double MAP in MITM attack

TCAP EndTCAP Continue

InsertSubscriberData_REQ

InsertSubscriberData_REQ

TCAP Begin

DeleteSubscriberData_REQ

InsertSubscriberData_REQ

TCAP Continue

ReturnError

PBX

SS7 FWTCAP Continue

ReturnResultLast

SS7

Page 38: Back to the future - Black Hat Briefings

Voice call interception (MITM)

on 4G/5G network

Attack via packet data

service disruption

Page 39: Back to the future - Black Hat Briefings

Fake registration on 2G/3G

MME/SGW DEA

IMS4G/5G

IWF

UpdateLocation

PBX

Voice

Data

A

B

HSS/HLR

SS7

Diameter

Page 40: Back to the future - Black Hat Briefings

Fake registration on 2G/3G

DEA

4G/5G

IWF

PBX

Voice

Data

UpdateLocation

MME/SGW

A

B

IMSHSS/HLR

SS7

Diameter

Page 41: Back to the future - Black Hat Briefings

Originating traffic redirection

DEA

4G/5G

IWF

PBX

Voice

Data

LIR

ProvideRoamingNumber (IMSI)

MME/SGW

A

B

IMSHSS/HLR

LIR – Location Information Request

SS7

Diameter

Page 42: Back to the future - Black Hat Briefings

Originating traffic redirection

DEA

4G/5G

IWF

PBX

Voice

Data

MME/SGW

A

B

IMSHSS/HLR

LIR

ProvideRoamingNumber (IMSI)

ProvideRoamingNumber (PBX)

LIA (PBX) INVITE (A, PBX)

LIR – Location Information RequestLIA – Location Information Answer

SS7

Diameter

Page 43: Back to the future - Black Hat Briefings

What's the next?

DEA

4G/5G

IWF

PBX

Voice

Data

INVITE (A, B)

MME/SGW

A

B

IMSHSS/HLR

LIR

LIA (PBX) INVITE (A, PBX)

ProvideRoamingNumber (IMSI)

ProvideRoamingNumber (PBX)

LIR – Location Information RequestLIA – Location Information Answer

SS7

Diameter

Page 44: Back to the future - Black Hat Briefings

Case 1. Packet data disruption

DEA

4G/5G

IWF

PBX

UpdateGPRSLocationCLR

Voice

Data

On SS7 network

MME/SGW

A

B

IMSHSS/HLR

CLA

SS7

Diameter

Page 45: Back to the future - Black Hat Briefings

Service restoration

DEA

4G/5G

IWF

PBX

MME/SGW

Voice

Data

A

B

IMSHSS/HLR

ULA

ULR

ULR – Update Location RequestULA – Update Location Answer

SS7

Diameter

Page 46: Back to the future - Black Hat Briefings

Terminating traffic initiation

DEA

4G/5G

IWF

PBX

MME/SGW

Voice

Data

A

B

IMSHSS/HLR

LIR

LIA INVITE (A, B)

SS7

Diameter

Page 47: Back to the future - Black Hat Briefings

Case 2. Packet data disruption

DEA

4G/5G

IWF

PBX

CLR

Voice

Data

CLR

On Diameter network

MME/SGW

A

B

IMSHSS/HLR

CLA

CLA

SS7

Diameter

CLR – Cancel Location RequestCLA – Cancel Location Answer

Page 48: Back to the future - Black Hat Briefings

Service restoration

DEA

4G/5G

IWF

PBX

MME/SGW

Voice

Data

A

B

IMSHSS/HLR

ULA

ULR

SS7

Diameter

Page 49: Back to the future - Black Hat Briefings

Terminating traffic initiation

DEA

4G/5G

IWF

PBX

MME/SGW

Voice

Data

A

B

IMSHSS/HLR

LIR

LIA INVITE (A, B)

SS7

Diameter

Page 50: Back to the future - Black Hat Briefings

Subscription fraud

Attack on

SS7 and GTP

networks

Page 51: Back to the future - Black Hat Briefings

Subscription fraud via SS7/GTP

HLR

GGSN

UpdateLocation (IMSI)UpdateLocation (IMSI)

SS7

Web server

GTP

STP

Page 52: Back to the future - Black Hat Briefings

Subscription fraud via SS7/GTP

HLR

GGSN

UpdateLocation (IMSI)UpdateLocation (IMSI)

SS7

Web server

GTP

InsertSubscriberData (MSISDN)InsertSubscriberData (MSISDN)

STP

Page 53: Back to the future - Black Hat Briefings

Subscription fraud via SS7/GTP

HLR

GGSN

UpdateLocation (IMSI)UpdateLocation (IMSI)

SS7

Web server

GTP

InsertSubscriberData (MSISDN)InsertSubscriberData (MSISDN)

STP

Page 54: Back to the future - Black Hat Briefings

Subscription fraud via SS7/GTP

HLR

GGSN

UpdateLocation (IMSI)UpdateLocation (IMSI)

SS7

Web server

GTP

InsertSubscriberData (MSISDN)InsertSubscriberData (MSISDN)

STP

CreatePDPContext Request (IMSI, MSISDN)

Page 55: Back to the future - Black Hat Briefings

Subscription fraud via SS7/GTP

HLR

GGSN

UpdateLocation (IMSI)UpdateLocation (IMSI)

SS7

Web server

GTP

InsertSubscriberData (MSISDN)InsertSubscriberData (MSISDN)

STP

CreatePDPContext Request (IMSI, MSISDN)

CreatePDPContext Response (GSN IP)

Page 56: Back to the future - Black Hat Briefings

Subscription fraud via SS7/GTP

HLR

GGSN

UpdateLocation (IMSI)UpdateLocation (IMSI)

SS7

Web server

GTP

InsertSubscriberData (MSISDN)InsertSubscriberData (MSISDN)

STP

CreatePDPContext Request (IMSI, MSISDN)

CreatePDPContext Response (GSN IP)

HTTP request

Page 57: Back to the future - Black Hat Briefings

Contribution to GSMA

Information about discovered cross-protocol vulnerabilities has been reported

on the GSMA FASG meeting in February 2020.

SS7 firewall bypass techniques were reported to GSMA FASG* group in April

2019. This information is published in the "SS7 Interconnect Security

Monitoring and Firewall Guidelines."

GSMA Coordinated Vulnerability Programme registered this issue with the

number CVD-2018-0015.

* FASG is Fraud and Security Group

Page 58: Back to the future - Black Hat Briefings

Main issues in signaling security

Architecture flaws

Configuration errors

Software bugs

Page 59: Back to the future - Black Hat Briefings

Protection

measures

Check if your security tools are

effective against new vulnerabilities.

Use an intrusion detection solution along with an

SS7 and Diameter firewalls in order to detect

threats promptly and block a hostile source.

Configure your STP, DEA, and signaling firewall

carefully. Do not forget about reported

vulnerabilities such as malformed Application

Context Name and double MAP encapsulation.

1

2

3Assess

Monitor

Pro

te

ct

Auditing provides the essential

visibility to fully understand your

ever changing network risks

Continual real time monitoring

is essential to measure network

security efficiency and provide

rapid detection and mitigation

Completely secure

your network by

addressing both

generic

vulnerabilities

(GSMA) and the

threats that actually

effect you as an

ongoing process

Page 60: Back to the future - Black Hat Briefings

Thank

you

Sergey Puzankov

[email protected]