Androd设备信息生成规则
滥用设备信息恶意注册
当我们在开发某款APP时,为了防止用户恶意注册通常会通过IP,手机唯一编码进行过滤重复恶意注册。
通常最简单的方法我们是识别其IMEI码进行防止过滤,但是随着人们的逆向技术增长,很多逆向技术人员通过各类技术(如xposed,frida,重打包)将IMEI进行修改。
设备信息规则
但由于IMEI是由固定的规则组成的,如果咋们注册时校验它的IMEI生成规则,可以有效的过滤一部分没有进行生成规则所产生的IMEI用户。
但由于IMEI生成规则目前网上代码繁多,也没有办法很好的避免,因此我们需要更多的信息进行匹配。
如IMEI,IMSI,蓝牙MAC地址,WIFI网卡地址,ICCID,CPU信息等。
增强恶意注册防护方法
因为我们知道,IMEI是包含有手机型号的,那么同样的,我们在获取用户IMEI码同时,可以将它手机的其它设备属性进行获取,在进行比对。
例如用户的IMEI码是小米2手机,那么它的CPU信息则肯定是小米2的,他的网卡标识肯定是小米厂商的等等,通过多种信息进行核对来有效增加用户的伪造难度。
最后
提供一个免费的生成虚拟手机设备信息的接口,这里是根据真实手机的各类属性去随机生成它的IMEI,mac等信息,仅做技术参考。
接口地址:http://z-yd.cn/android/device.php?token=666666
返回数据:
{
"code": 200,
"data": {
"vbattery": {
"level": 32,
"health": 0,
"status": 0,
"plugged": 32,
"voltage": 0,
"temperature": 0
},
"vbluetooth": {
"mac": "f4:70:ab:81:96:3b",
"name": "wcble",
"state": 12,
"enabled": true,
"scan_mode": 23
},
"vhardware": {
"cpu_ft": "vivo\/PD1610\/PD1610:7.1.1\/NMF26F\/compil03051844:user\/release-keys",
"cpu_hw": "PD1610",
"cpu_pfbd": "qcom",
"cpu_core_num": 4,
"cpu_max_freq": 1593600,
"cpu_min_freq": 307200
},
"vlocation": {
"latitude": 0,
"cellinfos": [
],
"longtitude": 0
},
"vnetwork": {
"ip": "192.168.0.218",
"mac": "f4:70:ab:81:96:5d",
"dns1": "180.168.255.118",
"dns2": "202.96.209.5",
"ssid": "\"UWDZGvFMKFSQY\"",
"bssid": "0B:7C:E2:3D:2B:4B",
"gateway": "192.168.0.1",
"net_hostname": "android-54a5981b6c73a8c2",
"network_type": 1,
"network_type_name": "wifi"
},
"vscreen": {
"dpi": 640,
"x_px": 2560,
"y_px": 1440,
"x_dpi": 537.882,
"y_dpi": 537.388,
"scaled": 4,
"density": 4
},
"vsim": {
"tel": "\u4e0d\u53ef\u7528",
"imei": "864692036396165",
"imsi": "",
"meid": "",
"iccid": "",
"country": "",
"empty_sim": true,
"network_type": 0,
"operator_name": "",
"operator_numeric": ""
},
"vsystem": {
"id": "NMF26F",
"aaid": "7cc81b8-45b6-d6d4-ea77-ffc9c8fb4d2b",
"host": "compiler01104",
"tags": "release-keys",
"type": "user",
"user": "compiler",
"brand": "vivo",
"model": "vivo Xplay6",
"radio": "unknown",
"serial": "967ff10a",
"cpu_abi": "arm64-v8a",
"display": "NMF26F release-key",
"product": "PD1610",
"rom_sig": "aosp-user 501650752",
"cpu_abi2": "",
"openudid": "2dcf4068642e83fc",
"buildtime": -120245848,
"android_id": "54a5981b6c73a8c2",
"bootloader": "unknown",
"http_agent": "Linux; U; Android 7.1.1; zh_CN; vivo Xplay6; Build\/NMF26F;",
"kernel_sig": "Linux 3.10.73-anhlbw6f-00002-rboaxahi armv8llocaldomain localhost #5 SMP PREEMPT Thu Jul 23 03:23:36 CST 1964",
"user_agent": "Linux; U; Android 7.1.1; zh_CN; vivo Xplay6; Build\/NMF26F;",
"rom_md5hash": "ca138eeb5b542ba77a721a4312a7ab31",
"manufacturer": "vivo",
"total_memory": 5972922183,
"volume_count": 0,
"radio_version": "996FAAAANAZM-1.119120.1.121334.3",
"rom_type_name": "nougat",
"sd_total_size": 2054388567,
"rom_total_size": 29187257023,
"rom_description": "aosp_nougat 7.1.1 NMF26F user.508864129.374402 release-keys",
"rom_fingerprint": "vivo\/PD1610\/PD1610:7.1.1\/NMF26F1592322275:user\/release-keys",
"rom_incremental": "user.508864129.374402",
"version_release": "7.1.1",
"version_sdk_int": 25,
"version_codename": "REL",
"rom_build_description": "aosp_nougat-user 7.1.1 NMF26F user.508864129.374402 release-keys"
},
"createTime": "2021-01-10T21:03:30.823+0000"
}
}
版权声明:本文为qq85913323原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。