Top Banner
Karol Więsek PwC Abusing APNs for profit
17

CONFidence 2015: Abusing apns for profit - Karol Wiesek

Jul 28, 2015

Download

Software

PROIDEA
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: CONFidence 2015: Abusing apns for profit - Karol Wiesek

Karol WięsekPwC

Abusing APNs for profit

Page 2: CONFidence 2015: Abusing apns for profit - Karol Wiesek

Historia: audyt sieci jednego z operatorów

Po powrocie: „czyste” karty SIM

Page 3: CONFidence 2015: Abusing apns for profit - Karol Wiesek

Wstęp

Źródło: http://www.juniper.net/

Page 4: CONFidence 2015: Abusing apns for profit - Karol Wiesek
Page 5: CONFidence 2015: Abusing apns for profit - Karol Wiesek
Page 6: CONFidence 2015: Abusing apns for profit - Karol Wiesek
Page 7: CONFidence 2015: Abusing apns for profit - Karol Wiesek

3.3.10. NULL RDATA format (EXPERIMENTAL)

+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+

/ <anything> /

/ /

+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+

Anything at all may be in the RDATA field so long as it is 65535 octets

or less. 3.3.14. TXT RDATA format

+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+

/ TXT-DATA /

+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+

where:

TXT-DATA One or more <character-string>s.

TXT RRs are used to hold descriptive text. The semantics of the text

depends on the domain where it is found.

Page 8: CONFidence 2015: Abusing apns for profit - Karol Wiesek

$ cat dns-query.bin arbitrary-data.bin | nc –u <ip> 53

Page 9: CONFidence 2015: Abusing apns for profit - Karol Wiesek

[MOBILE] ------------- [GGSN] --- SYN -----------> [INTERNET]

[MOBILE] <------------ [GGSN] --- SYN/ACK -------- [INTERNET]

[MOBILE] <-------- RST [GGSN] --- RST -----------> [INTERNET]

Komunikacja z otwartym portem tcp w Internecie

[MOBILE] ------------- [GGSN] --- SYN -----------> [INTERNET]

[MOBILE] <------------ [GGSN] --- RST ------------ [INTERNET]

Komunikacja z zamkniętym portem tcp w Internecie

Dlaczego, pomimo zdefiniowanych reguł IP/port przepuszczany jest fragment synchronizacji TCP ?

Page 10: CONFidence 2015: Abusing apns for profit - Karol Wiesek

[MOBILE] -------- [GGSN] --- [SYN + DATA] -------> [INTERNET]

[MOBILE] <------------ [GGSN] --- [RST + DATA] --- [INTERNET]

$ hping3 -S -d 30 -E payload.bin -p 80 <ip>

3.4. Establishing a connection

Several examples of connection initiation follow. Although these

examples do not show connection synchronization using data-carrying

segments, this is perfectly legitimate, so long as the receiving TCP

doesn't deliver the data to the user until it is clear the data is

valid (i.e., the data must be buffered at the receiver until the

connection reaches the ESTABLISHED state.

Nie znalazłem informacji o możliwości przesyłania danych w pakietach RST, ale doświadczenia pokazują, że jest to możliwe.

Page 11: CONFidence 2015: Abusing apns for profit - Karol Wiesek

Protokół HTTP

Reguły klasyfikujące ruch na podstawie nazwy hosta, lub URL wymagają konkretnych danych z warstwy siódmej :

• Nagłówek HTTP Host

• Request-URL

Do czasu pojawienia się oczekiwanych danych urządzenie albo musi buforować dane od użytkownika, albo przesyłać je dalej, do czasu, aż będzie mogło podjąć decyzję.

„Wait for name” attack

Jeżeli urządzenie doczeka się na dane, na podstawie których dokonuje klasyfikacji – czy weryfikuje zgodność nazwy z odpowiadającym adresem/adresami IP ?

„Trusted name to untrusted IP” attack

Page 12: CONFidence 2015: Abusing apns for profit - Karol Wiesek
Page 13: CONFidence 2015: Abusing apns for profit - Karol Wiesek

Protokół HTTP„Trusted name to untrusted IP” attack

•Urządzenie poszukuje nagłówka „Host”

•Na podstawie nagłówka „Host” realizowana jest akcja (gprs-free)

•Nie jest weryfikowane czy adres IP, do którego następuje połączenie odpowiada adresowi na który rozwiązuje się nazwa z nagłówka

Page 14: CONFidence 2015: Abusing apns for profit - Karol Wiesek

Protokół HTTP„Trusted name to untrusted URI” attack

W analogiczny sposób działają ACL’e na poziomie MMS-proxy w APN mmsowym

• Proxy zamiast decydować na podstawie request-URI, robi to wykorzystując nagłówek Host

Page 15: CONFidence 2015: Abusing apns for profit - Karol Wiesek

Peer2Peer

Mniej lub bardziej świadomie włączona komunikacja P2P wewnątrz APN

MMSy rozliczane są ilościowo, również w roamingu

W roamingu APN MMS „wygląda” jak lokalnie

•MMS-proxy

•P2P

Page 16: CONFidence 2015: Abusing apns for profit - Karol Wiesek
Page 17: CONFidence 2015: Abusing apns for profit - Karol Wiesek

Dziękuję[karol.wiesek-at-pl.pwc.com]