Accelerate3g5 -- blobb » History » Version 124
blobb, 05/01/2017 08:34 PM
1 | 1 | blobb | h1. Accelerate3g5 -- blobb |
---|---|---|---|
2 | 2 | blobb | |
3 | h2. Summary |
||
4 | |||
5 | 3 | blobb | Trying to come up with a fuzzing interface. |
6 | |||
7 | 2 | blobb | h3. Participants |
8 | |||
9 | 85 | blobb | * André (email: dr.blobb@gmail.com) |
10 | 2 | blobb | |
11 | 122 | blobb | |
12 | |||
13 | 2 | blobb | h2. Details |
14 | 3 | blobb | |
15 | 115 | blobb | First setting up the femtocell and understand necessary basics of UMTS communication to do so. (done) |
16 | 36 | blobb | Collecting information e.g. slides, talks, docu about fuzzing of wireless protocols. (done) |
17 | 62 | blobb | Writing some code to craft requests and run fuzz tests against subscriber. (to be done) |
18 | 1 | blobb | |
19 | Note: first time fuzzing. |
||
20 | |||
21 | 121 | blobb | |
22 | |||
23 | 25 | blobb | h2. Test devices |
24 | |||
25 | TD1: Samsung Galaxy S5 Mini (G800F) |
||
26 | OS: Lineage OS (14.1/7.1.1) |
||
27 | BB: G800FXXU1BPC3 |
||
28 | SIM: MicroSIM |
||
29 | |||
30 | TD2: LG Nexus 5 (hammerhead) |
||
31 | OS: Android Marshmallow (6.0) |
||
32 | BB: M48974A-2.0.50.2.27 |
||
33 | SIM: MicroSIM |
||
34 | |||
35 | TD3: HTC One M9 |
||
36 | OS: Android Lollipop (5.1) |
||
37 | BB: 01.04_U11440601_71.02.50709G_F |
||
38 | SIM: NanoSIM (cutted MicroSIM) |
||
39 | |||
40 | 87 | blobb | TD4: Samsung S3 (GT-I9300) |
41 | OS: Android Jelly Bean (4.3) |
||
42 | BB: I9300XXUGNA8 |
||
43 | 88 | blobb | SIM: MicroSim |
44 | 87 | blobb | |
45 | 118 | blobb | |
46 | |
||
47 | |||
48 | 7 | blobb | h2. Journal |
49 | |||
50 | 39 | blobb | +_2017-03-07_+ |
51 | 42 | blobb | Pick up package at Sysmocom office. |
52 | Having an informative conversation with Neels about Jenkins, Docker and build artifacts. |
||
53 | 8 | blobb | |
54 | 39 | blobb | +_2017-03-12_+ |
55 | 10 | blobb | Set up wiki page. |
56 | 26 | blobb | Seeing femtocell on network interface. |
57 | 1 | blobb | Compiled source as described, but couldn't configure/launch CN successfully (yet). |
58 | 26 | blobb | Next time will try Neels' launch script and same IP range. |
59 | 1 | blobb | |
60 | 39 | blobb | +_2017-03-15_+ |
61 | 1 | blobb | Reading "data sheet [overview]":http://www.ipaccess.com/uploads/wysiwyg_editor/files/2017/S8_S16-Datasheet-v1.0.pdf "data sheet [details]":https://fccid.io/pdf.php?id=1462491 about ip.access nano3G S8. |
62 | Configuring femtocell via telnet (dry run). |
||
63 | Running in HLR issue mentioned in wiki when invoking run.sh. |
||
64 | 12 | blobb | |
65 | 39 | blobb | +_2017_04-02_+ |
66 | 33 | blobb | Collecting input about fuzzing: |
67 | 1 | blobb | |
68 | 50 | blobb | papers/theses: |
69 | 33 | blobb | >"SMS Fuzzing - SIM Toolkit Attack - B. Alecu, defcon21 2013":https://www.defcon.org/images/defcon-21/dc-21-presentations/Alecu/DEFCON-21-Bogdan-Alecu-Attacking-SIM-Toolkit-with-SMS-WP.pdf |
70 | 37 | blobb | >"SMS Vulnerability Analysis on Feature Phones - N. Golde, 2011":http://www.isti.tu-berlin.de/fileadmin/fg214/finished_theses/NicoGolde/diplom_golde.pdf |
71 | 49 | blobb | >"Fuzzing the GSM Protocol - B. Hond, master thesis 2011":http://www.ru.nl/publish/pages/769526/scriptie-brinio-final-brinio_hond.pdf |
72 | 26 | blobb | |
73 | 34 | blobb | talks: |
74 | 33 | blobb | >"SMS Fuzzing - Sim Toolkit Attack - B. Alecu, Deepsec 2011":http://www.securitytube.net/video/2518 |
75 | >"Using OpenBSC for fuzzing of GSM handsets - H. Welte, 26c3 2009":http://mirror.fem-net.de/CCC/26C3/mp4/26c3-3535-en-using_openbsc_for_fuzzing_of_gsm_handsets.mp4 |
||
76 | 26 | blobb | |
77 | 34 | blobb | slides: |
78 | 33 | blobb | >"MobiDeke: Fuzzing the GSM Protocol Stack - S. Dudek & G. Delugr, hack.lu 2012":http://archive.hack.lu/2012/Fuzzing_The_GSM_Protocol_Stack_-_Sebastien_Dudek_Guillaume_Delugre.pdf |
79 | >"Base Jumping - Attacking the GSM BB and BTS - grugq, 2010":http://conference.hackinthebox.org/hitbsecconf2010kul/materials/D2T1%20-%20The%20Grugq%20-%20Attacking%20GSM%20Basestations.pdf |
||
80 | >"Fuzzing your GSM phone - Harald Welte, 26c3 2009":https://events.ccc.de/congress/2009/Fahrplan/attachments/1503_openbsc_gsm_fuzzing.pdf |
||
81 | >"Fuzzing the Phone in your Phone - C. Miller & C. Mulliner, Blackhat 2009":https://engineering.purdue.edu/dcsl/reading/2011/jevin-fuzzing.pdf |
||
82 | >"Injecting SMS Messages into Smart Phones for Security Analysis - C. Mulliner, 2009":https://www.mulliner.org/security/sms/feed/injecting_sms_mulliner_miller.pdf |
||
83 | >"Security Testing esp. Fuzzing - E. Poll, ????":https://www.cs.ru.nl/E.Poll/ss/slides/12_Fuzzing.pdf |
||
84 | 26 | blobb | |
85 | 39 | blobb | +_2017-04-19_+ |
86 | 43 | blobb | Resolving HLR issue and set correct IPs in "*.cfg files":https://osmocom.org/attachments/download/2559/3G-config-example-v3.tar. |
87 | 58 | blobb | hNodeB connects to hnbgw, but no UE is connecting to it. |
88 | > [issue from wiki: ...unable to resolve DNS record look up of 0.ipaccess.pool.ntp.org... no trx]. |
||
89 | Connect femtocell to LAN with internet access to resolve DNS record look up issue, still no phones are connecting (yet). |
||
90 | 1 | blobb | Adding SIM cards to hlr.db, after creating db successfully [thanks to "andreas":https://osmocom.org/projects/cellular-infrastructure/wiki/Accelerate3g5_--_andreas] |
91 | |||
92 | 39 | blobb | +_2017-04-20_+ |
93 | 1 | blobb | Create and attach "build_3G.sh":https://osmocom.org/attachments/download/2602/build_3G.sh (adapted from "build_2G.sh":https://osmocom.org/attachments/download/2438/build_2G.sh). |
94 | 68 | blobb | Rebuild with correct branch/tag (openbsc:vlr_3G,libosmo-sccp:old_sua). |
95 | 38 | blobb | TD1 and TD2 *successfully connected* to femtocell!!! *\o/* |
96 | 67 | blobb | *Voice calls work* (TD1<->TD2). |
97 | 53 | blobb | |
98 | 1 | blobb | +_2017-04-22_+ |
99 | Create and attach "configure_nano3G.exp":https://projects.osmocom.org/attachments/download/2604/configure_nano3G.exp. |
||
100 | 71 | blobb | > Invoke expect script within "run.sh":https://projects.osmocom.org/attachments/download/2559/3G-config-example-v3.tar to automate initial nano3G configuration via telnet. |
101 | 69 | blobb | *SMS work* (TD1<->TD2), probably worked before but have been tested "today". |
102 | 62 | blobb | |
103 | 1 | blobb | +_2017-04-24_+ |
104 | Compile OpenBSC with --enable-mgcp-transcoding flag and create 127.0.0.2 on lo. :) |
||
105 | Attach refactored version of "build_3G.sh":https://projects.osmocom.org/attachments/download/2605/build_3G.sh. |
||
106 | 81 | blobb | *Data "works"* (TD1<->TD2, TDx<->tun0/192.168.42.1 |
107 | 75 | blobb | >Note: data "worked" before (UEs got IP 2017-4-20). But I didn't manage to forward packets from tun0->eth0->inet yet, although the following iptable rule has been applied: |
108 | 79 | blobb | >>sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward" |
109 | 75 | blobb | >>sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE |
110 | 73 | blobb | |
111 | 74 | blobb | +_2017-04-25_+ |
112 | 1 | blobb | Create and attach "find_nano3G.sh":https://osmocom.org/attachments/download/2609/find_nano3G.sh. |
113 | 102 | blobb | Picked up TD4 at a friend's place. Now I don't need to change the SIM/USIM card in TD1, which is my "normal" cell phone to test functionality. *Thanks* a lot buddy :) |
114 | 89 | blobb | |
115 | 90 | blobb | +_2017-04-26_+ |
116 | 92 | blobb | As it actually belongs to the accelerate3g5 project, I add the "hands-on repo":https://github.com/blobbsen/repo-handson this journal. |
117 | 99 | blobb | > It provides functionality to clone necessary git repos and build accerelate3g5 CN stack. |
118 | 7 | blobb | |
119 | 93 | blobb | +_2017-04-29_+ |
120 | 1 | blobb | Test MMS, *doesn't* work. |
121 | 113 | blobb | I'd changed MCC and MNC from the "wiki-default":http://osmocom.org/projects/cellular-infrastructure/wiki/Configuring_the_ipaccess_nano3G values (MCC=901, MNC=98) to MCC=809 and MNC=90 on the hNodeB (telnet) to align with SIM-cards' IMSIs and avoid roaming. The result was: |
122 | 1 | blobb | |
123 | 111 | blobb | >S3 -> shows: 809 90 roams: no   (expected) |
124 | >S5 mini -> shows: 809 90 roams: yes (confusing?!?!) |
||
125 | >Nexus 5 -> shows: 901 98 roams: yes (expected) |
||
126 | 1 | blobb | |
127 | 113 | blobb | |
128 | So it seemed that configurations of MCC and MNC within osmo-msc.cfg do apply for some BB, because osmo-msc.cfg is the only config holding MCC=809 and MNC=90. |
||
129 | After aligning MCC and MNC between hNodeB and Osmo-MSC all UEs shows the correct "network name", but were all roaming... (TODO: understand roaming) |
||
130 | 111 | blobb | |
131 | |||
132 | 101 | blobb | +_2017-04-30_+ |
133 | 96 | blobb | Set csgAccessMode to CSG_ACCESS_MODE_CLOSED_ACCESS to avoid interfering with UEs now owned by me. |
134 | 103 | blobb | Set correct ip table rule. UE's have finally internet connection. *\o/* (GGSN listens on *lo* not on eth*) |
135 | 96 | blobb | |
136 | 98 | blobb | >sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward" |
137 | >sudo iptables -t nat -A POSTROUTING -o lo -j MASQUERADE |
||
138 | 96 | blobb | |
139 | 114 | blobb | |
140 | +_2017-05-01_+ |
||
141 | 123 | blobb | UEs are not roaming anymore *\o/*. Actually the explanation of a friend how the MCC and MNC has to be set according to the IMSI (0-2 MCC, 3-4 MNC digits) was correct, |
142 | but I didn't read the IMSI correctly from the "sysmocom full-size SIM card". Such IMSIs on the full-size SIM card consist of 18 digits. |
||
143 | 124 | blobb | After using IMSIs from delivery e-mail (which are 15 digits long and not 18 as full-size-SIM-card-IMSI) it works. |
144 | 114 | blobb | Moreover, I now know that the IMSI can ONLY hold 15 digits and consists of MCC (3), MNC (2-3) and MSIN (9-10). |
145 | 123 | blobb | A poor/manual stability test for the entire UMTS network has been successful for 12 hours. |
146 | 114 | blobb | |
147 | 119 | blobb | |
148 | |
||
149 | |||
150 | 24 | blobb | h2. Conclusions |
151 | 1 | blobb | |
152 | 117 | blobb | - UE's are connecting. Voice calls + SMS + data are working and UEs are *not* roaming. =) |
153 | 100 | blobb | |
154 | 84 | blobb | |
155 | |