Toward The HLR, Attacking The SS7 & SIGTRAN Applications.: Telecommunications Infrastructure Security
Toward The HLR, Attacking The SS7 & SIGTRAN Applications.: Telecommunications Infrastructure Security
• Thanks to hackers!
Steve Jobs and Steve Wozniak in 1975 with a bluebox
• CCITT#5 in-band signalling sends control messages
over the speech channel, allowing trunks to be
controlled
• Seize trunk (2600) / KP1 or KP2 / destination / ST
• Started in mid-60’s, became popular after Esquire 1971
• Sounds produced by whistles, electronics dialers,
computer programs, recorded tones
P1 Security Inc, http://www.p1security.com 3
SS7 basic architecture
Text
Scanning Vulnerability,
injection
RFC4960
SCTP: Stream Control Transmission
Protocol
Advantages
Multi-homing
DoS resilient (4-way handshake, cookie)
Multi-stream
Reliable datagram mode
Some of TCP & UDP, improved
P1 Security Inc, http://www.p1security.com 14
SCTP association
Client Server
socket(), connect() socket(), bind(), listen(),
accept()
INIT
INIT
INIT-ACK
INIT
Not TCP:
INIT-ACK
4 way
handshake
INIT
Not TCP:
INIT-ACK
4 way
handshake
COOKIE-ECHO
INIT
Not TCP:
INIT-ACK
4 way
handshake
COOKIE-ECHO
COOKIE-ACK
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Common Header |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Chunk #1 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Chunk #n |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
----- ----------
1 - Initiation (INIT)
6 - Abort (ABORT)
7 - Shutdown (SHUTDOWN)
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Verification Tag |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Checksum |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
SCTPscan
Linux, BSD, MacOS X, Solaris, ...
IP scan, portscan, fuzzing, dummy server,
bridge
Included in BackTrack
SCTP Tricks: port mirroring, instreams
connections
NMAP new SCTP support (-Y), lacks tricks
SIGTRAN usually requires peer config
This is not the average TCP/IP app
P1 Security Inc, http://www.p1security.com 19
From RFC...
Attacker Servers
INIT
INIT
Port 100
INIT
INIT
INIT
INIT
INIT-ACK
INIT
Port 102
INIT-ACK
INIT
Port 102
INIT-ACK
INIT
INIT
ABORT
INIT
INIT
INIT
INIT-ACK
INIT
Port 102
INIT-ACK
INIT
Port 102
INIT-ACK
+------------------------------------+
+------------------------------------+
+------------------------------------+
+------------------------------------+
| (SCTP) |
+------------------------------------+
+------------------------------------+
+------------------------------------+
+------------------------------------+
+------------------------------------+
+------------------------------------+
| (SCTP) |
+------------------------------------+
+------------------------------------+
+------------------------------------+
+------------------------------------+
+------------------------------------+
+------------------------------------+
| (SCTP) |
+------------------------------------+
+------------------------------------+
+------------------------------------+
Attacker
Port 1111
Attacker
Port 1111
Attacker
Port 1111
Attacker
Port 1111
Attacker
INIT
Port 1111
Attacker
INIT
Port 1111
ABORT
INIT
Attacker
INIT
Port 1111
ABORT
INIT
INIT
Attacker
INIT
Port 1111
ABORT
SSN
Scanning
GTT
Scanning
DPC Scanning
Topology discovery
(needed for IP-based
topologies)
Topology discovery
(needed for IP-based
topologies)
+--------------+
| |
+----------------------| ASP-ACTIVE |
| Other +-------| |
| ASP in AS | +--------------+
| Overrides | ^ |
| | ASP | | ASP
| | Active | | Inactive
| | | v
| | +--------------+
| | | |:ASP Inactive Ack
| +------>| ASP-INACTIVE |:ASP Up Ack
| +--------------+:Notify.param=status=2
| ^ |
ASP Down/ | ASP | | ASP Down /
SCTP CDI/ | Up | | SCTP CDI/
SCTP RI | | v SCTP RI
| +--------------+
| | |:Association loss/closed
+--------------------->| ASP-DOWN |
| |
+--------------+
+--------------+
M3UA test
| |
+----------------------| ASP-ACTIVE |
| Other +-------| |
| ASP in AS | +--------------+
| Overrides | ^ |
| | ASP | | ASP
| | Active | | Inactive
| | | v
| | +--------------+
| | | |:ASP Inactive Ack
| +------>| ASP-INACTIVE |:ASP Up Ack
| +--------------+:Notify.param=status=2
| ^ |
ASP Down/ | ASP | | ASP Down /
SCTP CDI/ | Up | | SCTP CDI/
SCTP RI | | v SCTP RI
| +--------------+
| | |:Association loss/closed
+--------------------->| ASP-DOWN |
| |
+--------------+
+--------------+
M3UA test
| |
+----------------------| ASP-ACTIVE |
| Other +-------| |
| ASP in AS | +--------------+
SCCP tests
| Overrides | ^ |
|
|
|
|
ASP
Active |
| | ASP
| Inactive
| | | v
| | +--------------+
| | | |:ASP Inactive Ack
| +------>| ASP-INACTIVE |:ASP Up Ack
| +--------------+:Notify.param=status=2
| ^ |
ASP Down/ | ASP | | ASP Down /
SCTP CDI/ | Up | | SCTP CDI/
SCTP RI | | v SCTP RI
| +--------------+
| | |:Association loss/closed
+--------------------->| ASP-DOWN |
| |
+--------------+
+--------------+
M3UA test
| |
+----------------------| ASP-ACTIVE |
| Other +-------| |
| ASP in AS | +--------------+
SCCP tests
| Overrides | ^ |
|
|
|
|
ASP
Active |
| | ASP
| Inactive
| | | v
MAP tests
| | +--------------+
| | | |:ASP Inactive Ack
| +------>| ASP-INACTIVE |:ASP Up Ack
| +--------------+:Notify.param=status=2
| ^ |
ASP Down/ | ASP | | ASP Down /
SCTP CDI/ | Up | | SCTP CDI/
SCTP RI | | v SCTP RI
| +--------------+
| | |:Association loss/closed
+--------------------->| ASP-DOWN |
| |
+--------------+
+--------------+
M3UA test
| |
+----------------------| ASP-ACTIVE |
| Other +-------| |
| ASP in AS | +--------------+
SCCP tests
| Overrides | ^ |
|
|
|
|
ASP
Active |
| | ASP
| Inactive
| | | v
MAP tests
| | +--------------+
| | | |:ASP Inactive Ack
| +------>| ASP-INACTIVE |:ASP Up Ack
| +--------------+:Notify.param=status=2
ASP Down/
SCTP CDI/
SCTP RI
|
|
|
|
ASP |
Up
^
|
|
|
| ASP Down /
| SCTP CDI/
v SCTP RI
INAP tests
| +--------------+
| | |:Association loss/closed
+--------------------->| ASP-DOWN |
| |
+--------------+
+--------------+
M3UA test
| |
+----------------------| ASP-ACTIVE |
| Other +-------| |
| ASP in AS | +--------------+
SCCP tests
| Overrides | ^ |
|
|
|
|
ASP
Active |
| | ASP
| Inactive
| | | v
MAP tests
| | +--------------+
| | | |:ASP Inactive Ack
| +------>| ASP-INACTIVE |:ASP Up Ack
| +--------------+:Notify.param=status=2
ASP Down/
SCTP CDI/
SCTP RI
|
|
|
|
ASP |
Up
^
|
|
|
| ASP Down /
| SCTP CDI/
v SCTP RI
INAP tests
| +--------------+
|
+--------------------->|
|
ASP-DOWN
|:Association loss/closed
|
Each depends
on configuration
| |
+--------------+
DPC
scan
SSN
scan
Insecure
Untested hw
Unprotected IPsec
No regular pentest Image Credit: Intomobile
ss7calc
Like ipcalc (FLOSS), to understand network topology
Complexity: ITU: 3-8-3, 5-4-5, ANSI: 8-8-8
SIGTRANalyzer
SS7 and message injection audit, information gathering,
leak analysis,
Commercial product
Questions welcome
More slides on
http://www.p1security.com