Contact us in messengers or by phone.

whatsapp telegram viber phone email
+79214188555

About how VKontakte collects information about us. Part 2

DronVR

Private access level
Joined
Jun 1, 2014
Messages
284
Reaction score
263
Points
63
About how VKontakte collects information about us. Part 2
(c) Vladislav Veljuga

Update 2
And let's go right away, that's what Andrei Rogozov answered (somewhere) about this information.
001.jpg

My article on collecting information about users of the official VKontakte application for Android has already gone too far on the Internet. I noticed that not so few people do not care about the confidentiality of their data and took the material quite "warmly".

Discussions in the comments under my post in VK also turned out to be quite interesting. The former developer of this application came there. Grigory Klyushnikov and the developer of its modification Eduard Bezmenov . Both of them told a lot of interesting things. Well, I also became interested in what else I could not encrypt on a real device and what exactly they were talking about.

Our tools for today
There is an installation APK-file of the application version 4.12.1. There are its sources (code) obtained by decompiling the application (roughly speaking, the installation file was parsed and the code in the program language was recreated from it, in our case, Java). Decompiler - Jadx .

Small educational program
In a Java project (and the Android application is such), all code is divided into classes; classes are grouped into folders - packages (package, package), the package may be in another package. Each application can have an unlimited number of packages that can "communicate", interact with each other.
By decompiling the application, we see the following
002.jpg

com.my.tracker - the same MailRu tracker that Edward and Gregory spoke about; com.my.target - package associated with the tracker; com.vkontakte.android - the application itself and ru.mail.libverify - another package from MailRu

Decompiled code will be more difficult, since not all variables and classes will be named by names that will be understandable to humans. Basically, these names are somewhat reminiscent of a hexadecimal number, for example, C1998a.java. I have one more assumption that the code could be specially obfuscated ( obfuscate - make non-obvious, confusing, confusing). But some "clues" remain, by which you can understand what kind of code it is, what it is responsible for and what exactly it does.

results
I will not torment, right to the point.

com.my.tracker
Let's start our journey with a class file com.my.tracker.builders.C1998a ..
003.jpg

On the left is the code, on the right is the previous article and the screen of Andrey, about which he said that the application merges Wi-Fi access points.

Now we follow the train of thought: in line 298 (just above the line with "around", litter, truncated the numbers in the screen), the variable c2002d2 is declared with the type C2022d obtained from the iterator (roughly speaking, collection / array / list). Class C2022d defined in package com.my.tracker.providers in the class C2023d . The definition is not interesting to us, because it does not contain human-readable field names. In the same class there is a declaration of this class and filling this class with data.
004.jpg

Gather information about the current access point.

Here, by the log after declaring and filling the class instance with values, we understand that C2022d - This is a class (and to be more correct, a structure) that stores data about a Wi-Fi access point. A little lower data is collected about all the surrounding points.
005.jpg

In the loop, the scan result is scanned (160), the class C2022d = Wi-Fi AP information (175-178) is created and populated and added to the list (179).

And even lower, we see how they are trying to collect data about CID and LAC.

<wikipedia>
Cell ID, CID - “cell identifier”. This parameter is assigned by the operator to each sector of each base station and serves to identify it.
LAC, Local Area Code - code of the local zone. A local zone is a collection of base stations that are served by a single BSC - a base station controller.
Base station - a set of equipment of one operator installed on one site (tower, building) and intended for direct communication of the network with mobile terminals of subscribers
</wikipedia>​
006.jpg

Coarse location - approximate location

Going back to C1998a.java ...
007.jpg

Also interesting ... apps (applications), first_install_time (time of first installation) ...

... Does it also send a list of installed applications? C2015a - another structure in com.my.tracker.providers.C2016b . Definition is not interested, use right there ...
008.jpg

Getting the list of applications (84), creating your own list of applications with your own structures (88), traversing the entire list with a loop (90), getting information about one application (91), if it is not system-wide ([DLMURL="http: // anonym. to? https://developer.android.com/reference/android/content/pm/ApplicationInfo.html#FLAG_SYSTEM "] proof [/ DLMURL]), it is added to the list.

Back to again C1998a.java .
009.jpg

Here, from somewhere, lists of email addresses, classmates ID, VK, ICQ (lol), and other IDs are going ...
010.jpg

... sim_loc (?), ID and name of the operator, information about the connection and its type (Wi-Fi / mobile connection), BlueTooth inclusion ...
011.jpg

..., information about the device, the name and version of the OS on the device, manufacturer, device MAC address, language, time zone, ... and a couple of little things.

And so we gathered it all ... And why? In the class com.my.tracker.async.commands.C1990f it is all sent.
012.jpg

73 - an instance of the collector is created, which collected everything that we looked above. 83 - (without a screen, believe me a word) a JSON string is generated with all the data, 85 - the data is sent ...

Method m1919a ... where is he? He is in the genitive class C1988c
013.jpg

Roughly speaking - a request is made on the Internet here at the address ... specified in the constructor of the C1988c class, but it was not created above!

Deeply rummaging through the search for the entire project (by field name f1295b , by inherited classes), came to a method C2013a.m2085a ..
014.jpg

And here is the address where the information was sent
That's enough with MyTracker ...

ru.mail.libverify
en.mail.ibverify.requests.C4109e
015.jpg

Class C4109e, at the very beginning of the line containing the mail.ru domain, where requests will be made.
016.jpg
Right in the same class (see Sublime heading), the C4109e contains data on IMEI, IMSI, phone, operator, latitude / longitude, and location accuracy.
017.jpg

In C4109e: the mo8472d method selects a host from f2386b (through one screen above) where to send data
018.jpg

In C4109e: in the m3158u method, the full URL for the request is generated using the mo8472d method, which is described above.

That's all for now.

Summary
The VKontakte Android application, in addition to its metrics and telemetries, sends the same, and even more, data volume for third parties: MyTracker and MailRu LibVerify.
In C4109e: in the m3158u method, the full URL for the request is generated using the mo8472d method, which is described above.
 
Original message
О том, как ВКонтакте собирает информацию о нас. Часть 2
(с) Владислав Велюга

Update 2
А еще давайте сразу, вот что ответил (где-то) Андрей Рогозов про данную информацию.
001.jpg

Моя статья о сборе информации о пользователях официального приложения ВКонтакте под Android уж слишком разошлась в Интернете. Я заметил, что не так уж и мало людей относится к конфиденциальности своих данных не наплевательски и приняли материал довольно "тепло".

Обсуждения в комментариях под моим постом в ВК тоже оказались довольно интересными. Туда пришел бывший разработчик этого самого приложения Григорий Клюшников и разработчик его модификации Эдуард Безменов. Оба они рассказали немало интересных вещей. Что ж, мне тоже стало интересно, что еще я не смог наснифить на реальном устройстве и о чем конкретно они говорили.

Наш инструментарий на сегодня
Имеется установочный APK-файл приложения версии 4.12.1. Имеются его исходники (код), полученные путем декомпилирования приложения (грубо говоря, установочный файл был разобран и по нему воссоздан код на программном языке, в нашем случае - Java). Декомпилятор - JADX.

Небольшой ликбез
В Java-проекте (а приложение под Android таковым и является) весь код поделен на классы; классы сгруппированы в папки -- пакеты (пэкедж, package), пакет может находится в другом пакете. Каждое приложение может иметь неограниченное число пакетов, которые могут "общаться", взаимодействовать друг с другом.
Декомпилировав приложение, мы видим следующее
002.jpg

com.my.tracker - тот самый трекер MailRu, о котором говорил Эдуард и Григорий; com.my.target - пакет, связанный с трекером; com.vkontakte.android - непосредственно само приложение и ru.mail.libverify - еще один пакет от MailRu

С декомпилированным кодом будет сложнее, поскольку не все переменные и классы будут названы именами, которые будут понятны человеку. В основном это названия чем-то напоминающие шестнадцатеричное число, например, C1998a.java. Есть у меня еще одно предположение, что код мог быть специально обфусцирован (obfuscate — делать неочевидным, запутанным, сбивать с толку). Но некоторые "зацепки" остаются, по которым можно понять что это за код, за что он отвечает и что именно что делает.

Результаты
Не буду томить, сразу к делу.

com.my.tracker
Начнем свое путешествие с файла класса com.my.tracker.builders.C1998a..
003.jpg

Слева - код, справа - предыдущая статья и скрин Андрея, про который он говорил, что приложение сливает точки доступа Wi-Fi.

Теперь следим за ходом мысли: в строке 298 (чуть выше строки с "around", сорян, урезал номера в скрине) объявляется переменная c2002d2 с типом C2022d, получаемая из итератора (грубо говоря, коллекция/массив/список). Класс C2022d определен в пакете com.my.tracker.providers в классе C2023d. Определение нам его не интересно, ибо оно не содержит понятных человеку названий полей. В этом же классе есть объявление этого класса и заполнение этого класса данными.
004.jpg

Сбор информации о текущей точке доступа.

Вот тут то, по логу после объявления и заполнения экземпляра класса значениями, мы и понимаем, что C2022d -- это класс (а если быть правильнее, то структура), хранящий в себе данные о точке доступа Wi-Fi. Чуть ниже собираются данные обо всех окружающих точках.
005.jpg

В цикле перебирается результат сканирования (160), создается и заполняется класс C2022d = информация о ТД Wi-Fi (175-178) и добавляется в список (179).

А еще ниже мы видим, как пытаются собрать данные о CID и LAC.

<wikipedia>
Cell ID, CID — «идентификатор соты». Это параметр, который присваивается оператором каждому сектору каждой базовой станции, и служит для его идентификации.
LAC, Local Area Code — код локальной зоны. Локальная зона — это совокупность базовых станций, которые обслуживаются одним BSC — контроллером базовых станций.
Базовая станция — совокупность оборудования одного оператора, установленного на одной площадке (вышке, здании) и предназначенного для непосредственной связи сети с мобильными терминалами абонентов
</wikipedia>​
006.jpg

Coarse location - примерное местоположение

Возвращаемся назад к C1998a.java...
007.jpg

Тоже интересно... apps (приложения), first_install_time (время первой установки)...

... Неужто тоже отправляет список установленных приложений? C2015a - еще одна структура в com.my.tracker.providers.C2016b. Определение не интересует, использование тут же...
008.jpg

Получение списка приложений (84), создание собственного списка приложений со своими структурами (88), обход всего списка циклом (90), получение информации об одном приложении (91), если оно не системное ([DLMURL="https://anonym.to?https://developer.android.com/reference/android/content/pm/ApplicationInfo.html#FLAG_SYSTEM"]пруф[/DLMURL]), то добавляется в список.

Снова возвращаемся в C1998a.java.
009.jpg

Здесь же, откуда-то собираются списки электронных адресов, ID одноклассников, ВК, ICQ (лол), и другие ID...
010.jpg

... sim_loc (?), ID и имя оператора, информация о соединении и его типе (Wi-Fi/мобильная связь), включенности BlueTooth...
011.jpg

..., информация об устройстве, названии и версии ОС на устройстве, производителе, MAC-адресе устройства, языке, часовом поясе, ... и еще пара мелочей.

И вот собрали мы это всё... А зачем? В классе com.my.tracker.async.commands.C1990f это всё отправляется.
012.jpg

73 - создается экземпляр сборщика, который собирал всё то, что мы выше просмотрели. 83 - (без скрина, поверьте наслово) генерируется JSON-строка со всеми данными, 85 - данные отправляются...

Метод m1919a ... где же он? Он в родительном классе C1988c
013.jpg

Грубо говоря - здесь делается запрос в интернет по адресу... указанному в конструкторе класса C1988c, но он же не создавался выше!

Глубоко порывшись в поиске по всему проекту (по названию поля f1295b, по унаследованным классам), пришел к методу C2013a.m2085a..
014.jpg

А вот и адрес, куда отправлялась информация
Всё, на этом хватит с MyTracker...

ru.mail.libverify
ru.mail.ibverify.requests.C4109e
015.jpg

Класс C4109e, в самом начале строка, содержащая домен mail.ru, куда будут делаться запросы.
016.jpg
Прямо в этом же классе (см. заголовок Sublime) C4109e содержатся данные о IMEI, IMSI, телефоне, операторе, широте/долготе и точности местоположения.
017.jpg

В C4109e: метод mo8472d выбирает хост из f2386b (через один скрин выше), куда отправлять данные
018.jpg

В C4109e: в методе m3158u формируется полный URL-адрес для запроса, используя метод mo8472d, который описан выше.

На этом пока всё.

Итог
Приложение ВКонтакте для Android помимо своих метрик и телеметрий отправляет такой же, и даже больший, объем данных для третьих лиц: MyTracker и MailRu LibVerify.
В C4109e: в методе m3158u формируется полный URL-адрес для запроса, используя метод mo8472d, который описан выше.