מדובר על מערכת שנועדה לתת חיווי ולהזהיר במקרה חירום, מפיצי המערכת בחרו לאסור את השימוש בה לאכלוסיה מסויימת (יש חיוב להשתמש בחנויות של אנדרוייד ו apple אבל f-droid אינה אופציה). במקרה שלנו מדובר על תוכנה בקוד סגור שחסומה לשימוש ע"י מי שלא מסכים לתנאי שימוש של חברה זרה. מקורות המידע לא מפורסמים.
משום מה לא מדובר על אפליקצייה שמדווחת שפותחה ע"י איזה שהוא גוף חירום אלא היא מגיעה תחת השם eviglo.com (דומיין לא קיים) - גם אם התוכנה פותחה עבור גוף חירום כל שהוא.
השם של האפליקציה (
Android ApplicationId) , המפתח הפנימי של האפליקציה וכתובות המייל בתוך האפקליציה אינן בדומיינים הרגילים של גופי חירום. כמובן שיכול להיות שהתוכנה העוברה או פותחה עבורם רק שבפועל אין אינדקציה ברורה לבעלות של גוף חירום על התוכן.
מצופה היה כי כל הדומיינים יהיו שייכים לגוף החירום, המפתחות בתוך האפליקציה יהיו של גוף החירום, כל השמות בתוך האפליקצייה צריכים להיות של גוף החירום. ואסור שיהיה איזה שהיא התנייה שאפילו רומזת שהאפליקציה לא בבעלות גוף החירום. ולמרות שאני לא יודע אם קיימת חובה להשתמש בשמות מתחם בבעלות מפעיל האפליקציה נהוג שלא להתחזות לשמות אחרים כאשר מפתחים תוכנה.
לידיידי הלא טכניים ניתן להתייחס לזה בדוגמא הבאה:
במקרה של אזעקה או מצב חירום רק בעלי רדיו של חברת אפל או של חברת גוגל יוכלו לקבל התראה כל מי שיש לו רדיו אחר לא יוכל לקבל את ההודעה (וזאת למרות שאת השידור ישדרו בתדר שאפשר לקלוט בכל רדיו אחר). הפעולה תתבצע ע"י מתן רישיון שימוש רק לחברות האלה ואי פרסום התדר בו נשמעת האזעקה.
מה שעשיתי היה להוריד את ה
apk באמצעות כלי שלישי (כי אין לי חשבון שם), ביצוע decompile ע"י jadx (אפשר
כאן ).
הנחתי בגלל שהושקעו כספים כה רבים במה שמכונה הענן הציבורי יתבצע שימוש במערכת, הנחתי גם שכל המערכות איתם התוכנה תעבוד יהיו בידי לכל הפחות תהיל"ה ואולי אף בידי כוחות הביטחון.
הדבר ראשון היה עם אילו כתובת פומביות המערכת עובדת ? בשביל הדוגמה שלנו נרצה לדעת איך משדרים את האזעקה.
בשביל ההתחלה רציתי לדעת מה הקשר של התוכנה לפיקוד העורף (וכך לאתר את הכתובת) :
hd Home%20Front%20Command_1.2_apk-dl.com.apk | grep oref
0031c110 62 6c 65 2f 69 6f 72 65 66 5f 6c 6f 67 6f 2e 70 |ble/ioref_logo.p|
0033d6a0 6f 72 65 66 5f 6c 6f 67 6f 2e 70 6e 67 00 17 17 |oref_logo.png...|
00436740 6f 72 65 66 5f 6c 6f 67 6f 2e 70 6e 67 50 4b 01 |oref_logo.pngPK.|
במילים אחרות מדובר רק על שמות קבצים בפנים (אבל זה כבר טוב), אם בודקים את הקובץ המפוענח אנו מקבלים מספר דברים נוספים :
grep -i "oref.org.il" -rn *
assets/www/js/controllers/contactUsController.js:41: window.plugins.inAppBrowswer.open('http://www.oref.org.il','_system');
assets/www/js/controllers/contactUsController.js:45: window.location = "http://www.oref.org.il";
אבל מעניין מה זה השרת הבא לא ?
grep -i "oref.co.il" -rn *
AndroidManifest.xml:21: <meta-data android:name="server_url" android:value="https://ioref.co.il">
AndroidManifest.xml:22: <meta-data android:name="dr_server_url" > android:value="https://dr.ioref.co.il">Binary file res/raw/smart_trust_store.bks matches</meta-data>
אז מי זה ה ioref.co.il שהם מדברים עליהם ?
...
query: ioref.co.il
reg-name: ioref
domain: ioref.co.il
descr: Taldor Communication LTD
descr: 26 Harokmim st. P.O.B 1888
descr: Holon
descr: 5811801
descr: Israel
phone: +972 52 2896789
fax-no: +972 52 2896789
e-mail: maorsh AT glasshouse.co.il
admin-c: GI-MS33291-IL
tech-c: GI-MS33291-IL
zone-c: GI-MS33291-IL
nserver: ns1.box.co.il
nserver: ns2.box.co.il
validity: 21-05-2016
status: Transfer Locked
changed: domain-registrar AT isoc.org.il 20140521 (Assigned)
changed: domain-registrar AT isoc.org.il 20150105 (Changed)
person: Maor Shirazi
address: 26 Harokmim st. P.O.B 1888
address: Holon
address: 5811801
address: Israel
phone: +972 52 2896789
e-mail: ioref AT taldor.co.il
nic-hdl: GI-MS33291-IL
changed: domain-registrar AT isoc.org.il 20140521
changed: Managing Registrar 20141214
changed: Managing Registrar 20150105
registrar name: Gorni Interactive Ltd
registrar info: http://www.box.co.il/
% Rights to the data above are restricted by copyright.
...
הלכתי לחפש אי אלו פרטים על המפתח של האפליקציה, בשביל לגלות מידע יותר טוב אז הסתקלתי על הפרטים שיש בתוך האפליקציה על המפתח הציבורי המצורף (מחקתי את שמו של המפתח בשביל לשמור על פרטיו) ושוב אין שום ציון של פיקוד העורף:
original/META-INF$ openssl x509 -in cert.pem -text
Certificate:
Data:
Version: 3 (0x2)
Serial Number: 1323855412 (0x4ee86e34)
Signature Algorithm: sha1WithRSAEncryption
Issuer: C = IL, ST = HaSharon, L = Netanya, O = eVigilo, OU = R&D, CN = REDACTED BY USER
Not Before: Dec 14 09:36:52 2011 GMT
Not After : Nov 20 09:36:52 2110 GMT
Subject: C = IL, ST = HaSharon, L = Netanya, O = eVigilo, OU = R&D, CN = REDACTED BY USER
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
RSA Public-Key: (1024 bit)
Modulus:
00:96:27:a8:0b:53:4a:ad:8a:17:c4:31:7e:61:04:
41:60:93:9a:21:d7:5a:ee:bb:6b:13:1c:3c:f5:4c:
e0:9a:4c:bd:0e:6a:55:5c:40:cc:12:64:63:6a:05:
64:26:0e:9b:3e:1f:54:fb:9f:7f:59:fc:14:51:42:
dd:33:cc:16:38:84:a1:5c:db:a5:6f:67:c2:c4:b0:
3a:3f:73:23:6f:70:d7:f6:1c:13:23:cd:04:a9:64:
0b:e5:ad:8b:cb:14:09:ee:7b:7a:2a:80:8e:e2:f7:
4a:a5:e1:e7:9c:4e:2a:a3:41:22:e2:24:93:75:be:
ef:db:dc:fc:e8:c0:c1:86:91
Exponent: 65537 (0x10001)
Signature Algorithm: sha1WithRSAEncryption
8a:8f:76:71:00:8e:cf:d5:7a:e3:dd:a9:50:cc:0a:8c:94:74:
4c:96:d8:8e:7a:b4:e2:df:7b:0e:2b:d9:13:c0:2b:3e:ff:41:
7b:99:b9:b3:f8:45:3d:0e:44:c6:99:a4:31:ec:97:81:63:5c:
fc:39:5a:31:e5:4e:23:62:11:dd:52:10:a7:fe:93:8c:77:c3:
02:e8:55:4f:4b:5c:3a:aa:39:a7:ec:59:ca:15:db:5b:fd:8a:
c9:2f:04:32:d6:a4:87:db:2b:73:9a:da:6f:dc:94:f4:26:5d:
4f:f3:ff:e1:ff:e5:04:11:a3:10:24:b3:fd:c9:71:a6:27:8d:
43:bd
-----BEGIN CERTIFICATE-----
MIICSzCCAbSgAwIBAgIETuhuNDANBgkqhkiG9w0BAQUFADBpMQswCQYDVQQGEwJJ
TDERMA8GA1UECBMISGFTaGFyb24xEDAOBgNVBAcTB05ldGFueWExEDAOBgNVBAoT
B2VWaWdpbG8xDDAKBgNVBAsMA1ImRDEVMBMGA1UEAxMMT3BoaXIgUm9tYW5vMCAX
DTExMTIxNDA5MzY1MloYDzIxMTAxMTIwMDkzNjUyWjBpMQswCQYDVQQGEwJJTDER
MA8GA1UECBMISGFTaGFyb24xEDAOBgNVBAcTB05ldGFueWExEDAOBgNVBAoTB2VW
aWdpbG8xDDAKBgNVBAsMA1ImRDEVMBMGA1UEAxMMT3BoaXIgUm9tYW5vMIGfMA0G
CSqGSIb3DQEBAQUAA4GNADCBiQKBgQCWJ6gLU0qtihfEMX5hBEFgk5oh11ruu2sT
HDz1TOCaTL0OalVcQMwSZGNqBWQmDps+H1T7n39Z/BRRQt0zzBY4hKFc26VvZ8LE
sDo/cyNvcNf2HBMjzQSpZAvlrYvLFAnue3oqgI7i90ql4eecTiqjQSLiJJN1vu/b
3PzowMGGkQIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAIqPdnEAjs/VeuPdqVDMCoyU
dEyW2I56tOLfew4r2RPAKz7/QXuZubP4RT0ORMaZpDHsl4FjXPw5WjHlTiNiEd1S
EKf+k4x3wwLoVU9LXDqqOafsWcoV21v9iskvBDLWpIfbK3Oa2m/clPQmXU/z/+H/
5QQRoxAks/3JcaYnjUO9
-----END CERTIFICATE-----
טוב כנראה המצב יהיה קשה, אזאי ממשיך לחטט בקובץ :
ההנחה
הראשונית שלי (שיהיה איזה כתובת ממנה אשלוף התבדתה) לכן הנחתי שיהיה אולי
שימוש ב topic עליו נרשם ? חיפשתי משהוא שיזכיר GoogleCloudMessaging
(בשביל להרשם לtopics) -
מדוע הלכתי על חיפוש GCM ?
בגלל שהרשאת com.google.android.c2dm.permission.SEND הופעלה בקובץ AndroidManifest.xml.
וכן אם בגלל שאנחנו רואים שיש שם דרישה ל com.google.android.c2dm.intent.REGISTRATION זה אומר שחלק מההרשמות ייכשלו אבל מצפים לתמיכה באנדרויד 4.4.
טוב ממשיכים, אם הם לא עובדים עם Topics אולי הם עובדים עם push notifications ? מחפשים GCMPushReceiver והוף יש משהוא -
AndroidManifest.xml:38:
smali/com/evigilo/smart/mobile/android/gcm/a.smali:9:.field final synthetic a:Lcom/evigilo/smart/mobile/android/gcm/GCMPushReceiver;
smali/com/evigilo/smart/mobile/android/gcm/a.smali:13:.method public constructor (Lcom/evigilo/smart/mobile/android/gcm/GCMPushReceiver;)V
smali/com/evigilo/smart/mobile/android/gcm/a.smali:16: iput-object p1, p0, Lcom/evigilo/smart/mobile/android/gcm/a;->a:Lcom/evigilo/smart/mobile/android/gcm/GCMPushReceiver;
smali/com/evigilo/smart/mobile/android/gcm/a.smali:40: sget v1, Lcom/evigilo/smart/mobile/android/gcm/GCMPushReceiver;->a:I
smali/com/evigilo/smart/mobile/android/gcm/a.smali:48: sget v2, Lcom/evigilo/smart/mobile/android/gcm/GCMPushReceiver;->a:I
smali/com/evigilo/smart/mobile/android/gcm/GCMPushReceiver.smali:1:.class public Lcom/evigilo/smart/mobile/android/gcm/GCMPushReceiver;
smali/com/evigilo/smart/mobile/android/gcm/GCMPushReceiver.smali:23: sput v0, Lcom/evigilo/smart/mobile/android/gcm/GCMPushReceiver;->a:I
smali/com/evigilo/smart/mobile/android/gcm/GCMPushReceiver.smali:78: iget-object v0, p0, Lcom/evigilo/smart/mobile/android/gcm/GCMPushReceiver;->b:Landroid/content/Context;
smali/com/evigilo/smart/mobile/android/gcm/GCMPushReceiver.smali:88: iput-object v0, p0, Lcom/evigilo/smart/mobile/android/gcm/GCMPushReceiver;->d:Landroid/app/NotificationManager;
smali/com/evigilo/smart/mobile/android/gcm/GCMPushReceiver.smali:92: iget-object v1, p0, Lcom/evigilo/smart/mobile/android/gcm/GCMPushReceiver;->b:Landroid/content/Context;
smali/com/evigilo/smart/mobile/android/gcm/GCMPushReceiver.smali:106: iget-object v1, p0, Lcom/evigilo/smart/mobile/android/gcm/GCMPushReceiver;->b:Landroid/content/Context;
smali/com/evigilo/smart/mobile/android/gcm/GCMPushReceiver.smali:116: iget-object v2, p0, Lcom/evigilo/smart/mobile/android/gcm/GCMPushReceiver;->b:Landroid/content/Context;
smali/com/evigilo/smart/mobile/android/gcm/GCMPushReceiver.smali:124: iget-object v2, p0, Lcom/evigilo/smart/mobile/android/gcm/GCMPushReceiver;->b:Landroid/content/Context;
smali/com/evigilo/smart/mobile/android/gcm/GCMPushReceiver.smali:154: iget-object v0, p0, Lcom/evigilo/smart/mobile/android/gcm/GCMPushReceiver;->d:Landroid/app/NotificationManager;
smali/com/evigilo/smart/mobile/android/gcm/GCMPushReceiver.smali:164: iget-object v0, p0, Lcom/evigilo/smart/mobile/android/gcm/GCMPushReceiver;->b:Landroid/content/Context;
smali/com/evigilo/smart/mobile/android/gcm/GCMPushReceiver.smali:216: const-string v2, "GCMPushReceiver"
smali/com/evigilo/smart/mobile/android/gcm/GCMPushReceiver.smali:256: iget-object v1, p0, Lcom/evigilo/smart/mobile/android/gcm/GCMPushReceiver;->b:Landroid/content/Context;
smali/com/evigilo/smart/mobile/android/gcm/GCMPushReceiver.smali:293: const-string v1, "GCMPushReceiver"
smali/com/evigilo/smart/mobile/android/gcm/GCMPushReceiver.smali:315: iget-object v1, p0, Lcom/evigilo/smart/mobile/android/gcm/GCMPushReceiver;->b:Landroid/content/Context;
smali/com/evigilo/smart/mobile/android/gcm/GCMPushReceiver.smali:345: iput-object p1, p0, Lcom/evigilo/smart/mobile/android/gcm/GCMPushReceiver;->b:Landroid/content/Context;
smali/com/evigilo/smart/mobile/android/gcm/GCMPushReceiver.smali:436: invoke-direct {p0, p1, v0}, Lcom/evigilo/smart/mobile/android/gcm/GCMPushReceiver;->a(Landroid/content/Context;Ljava/lang/String;)V
smali/com/evigilo/smart/mobile/android/gcm/GCMPushReceiver.smali:461: const-string v0, "GCMPushReceiver"
smali/com/evigilo/smart/mobile/android/gcm/GCMPushReceiver.smali:631: iput-object v0, p0, Lcom/evigilo/smart/mobile/android/gcm/GCMPushReceiver;->c:Landroid/media/AudioManager;
smali/com/evigilo/smart/mobile/android/gcm/GCMPushReceiver.smali:633: iget-object v0, p0, Lcom/evigilo/smart/mobile/android/gcm/GCMPushReceiver;->c:Landroid/media/AudioManager;
smali/com/evigilo/smart/mobile/android/gcm/GCMPushReceiver.smali:641: sput v0, Lcom/evigilo/smart/mobile/android/gcm/GCMPushReceiver;->a:I
smali/com/evigilo/smart/mobile/android/gcm/GCMPushReceiver.smali:643: iget-object v0, p0, Lcom/evigilo/smart/mobile/android/gcm/GCMPushReceiver;->c:Landroid/media/AudioManager;
smali/com/evigilo/smart/mobile/android/gcm/GCMPushReceiver.smali:647: iget-object v8, p0, Lcom/evigilo/smart/mobile/android/gcm/GCMPushReceiver;->c:Landroid/media/AudioManager;
smali/com/evigilo/smart/mobile/android/gcm/GCMPushReceiver.smali:678: invoke-direct {v2, p0}, Lcom/evigilo/smart/mobile/android/gcm/a;->(Lcom/evigilo/smart/mobile/android/gcm/GCMPushReceiver;)V
smali/com/evigilo/smart/mobile/android/gcm/GCMPushReceiver.smali:761: invoke-direct/range {v2 .. v8}, Lcom/evigilo/smart/mobile/android/gcm/GCMPushReceiver;->a(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZZLjava/lang/String;)V
smali/com/evigilo/smart/mobile/android/gcm/GCMPushReceiver.smali:765: invoke-virtual {p0, v0}, Lcom/evigilo/smart/mobile/android/gcm/GCMPushReceiver;->setResultCode(I)V
smali/com/evigilo/smart/mobile/android/gcm/GCMPushReceiver.smali:920: const-string v2, "GCMPushReceiver"
smali/com/evigilo/smart/mobile/android/gcm/GCMPushReceiver.smali:956: invoke-virtual {p0, v0}, Lcom/evigilo/smart/mobile/android/gcm/GCMPushReceiver;->setResultCode(I)V
smali/com/evigilo/smart/mobile/android/gcm/GCMPushReceiver.smali:963: invoke-virtual {p0, v0}, Lcom/evigilo/smart/mobile/android/gcm/GCMPushReceiver;->setResultCode(I)V
אם ממשיכים לחטט (למשל לגבי יצירת קשר) נשים לב ל :
grep -i "mailto" -rn *
assets/www/js/appObjs/globalMethods.js:60:
window.location = "mailto:itayg@elad.co.il?subject=Ioref%20Bug%20Report&body="+mailBoady;
assets/www/js/controllers/contactUsController.js:51: window.plugins.inAppBrowswer.open('mailto:info-oref@idf.gov.il?subject=Something to share with you...','_system');
assets/www/js/lib/jquery.mobile-1.4.2.js:2563: //could be mailto, etc
assets/www/js/lib/rtl.jquery.mobile-1.4.0.js:2565: //could be mailto, etc
com/evigilo/smart/mobile/plugins/inAppBrowser/C0188k.java:58: } else if (str.startsWith("geo:") || str.startsWith("mailto:") || str.startsWith("market:")) {
שמתם לב שדיווח הבאגים עובר לחברה שלישית ולא פיקוד העורף ? ניחא חברת גוגל שמקבלת מידע רב אבל למה לכל השדים והרוחות זה עובר לחברה נוספת ? למה המיילים הולכים ל
itayg@elad.co.il מי אלו elad.co.il ו eviglo.com לכל השדים ולמה לא מדובר על דומיין gov או idf ?
ניסיתי לבדוק אם יש שימוש במערכות שיכלו ל
הבטיח שהודעה תגיע מהר (לדוגמה שימוש ב CB או לפחות ב USSD).
יכול להיות שאני טועה, אבל לא הצלחתי לאתר שום קוד שמטפל ב CB , ב SMS או USSD.
מה שאומר שאם תהיה תקלת מתג, פגיעה בצוואר בקבוק של רשת תקשורת ה GSM (אם חשבתם ש IIX עקום אז תשתית התקשורת במצב עוד יותר גרוע). כדאי לכם להיות רחוק מאזור אסון אם יש לכם בעיות גלישה או קליטה באזור.
מה שכן הצלחתי למצוא היא שהמערכת משתמשתש בשירותים הבאים :
GCM , שימוש ב
Geofence ושימוש בפלטפורמת Cordova אז לפחות יש קצת נחמה שיש שימוש בקוד פתוח.
אז מי שייספר לכם על אפליקציה "רשמית" חשוב שיזכיר שלא מדובר על אפליקציה שרשומה ככזאת שפותחה בתוך האירגון או שכל המשאבים בשימוש היא של האירגון עצמו. אני אישית לא רואה איך אני מקבל את המידע.