首页
社区
课程
招聘
[求助]电卡IC数据分析
发表于: 2015-12-26 01:34 11875

[求助]电卡IC数据分析

2015-12-26 01:34
11875
发现一个规律,每次插入电表会吧已用度数,和未用度数写进卡中。但是每次充钱后只有第5行改变,把电表写的数据清空。第5行应该是加密后的总电量。
每次加钱下面几行都会清空,只有第5行会变。。求大神分析第5行怎么加密的。。
求帮忙分析下!
第一次读:明文未知

    A2 13 10 91 FF FF 81 15 C1 6B 38 3F 44 3D 3A 41
    4C 59 11 11 11 D2 76 00 00 04 00 FF FF FF FF FF
    68 01 2B 02 31 31 31 31 31 31 31 31 57 07 00 00
    00 00 99 99 99 00 00 00 10 00 00 00 00 00 00 00
    00 66 08 00 07 00 C0 EF 6D 3E 50 B5 1B 1B CD 16
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    68 11 08 00 00 00 00 00 00 00 00 00 16 FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    68 81 1E 57 07 00 00 00 00 72 97 46 00 00 29 55
    00 45 27 09 00 00 00 00 00 07 00 00 32 00 09 F0
    00 D2 16 FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF

插电表,第二次读:已用5342.2 剩余281.9

    A2 13 10 91 FF FF 81 15 C1 6B 38 3F 44 3D 3A 41
    4C 59 11 11 11 D2 76 00 00 04 00 FF FF FF FF FF
    68 01 2B 02 31 31 31 31 31 31 31 31 57 07 00 00
    00 00 99 99 99 00 00 00 10 00 00 00 00 00 00 00
    00 66 08 00 07 00 C0 EF 6D 3E 50 B5 1B 1B CD 16
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    68 11 08 00 00 00 00 00 00 00 00 00 16 FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    68 81 1E 57 07 00 00 00 00 26 43 53 00 00 29 55
    00 91 81 02 00 00 00 00 00 07 00 00 32 00 0A F0
    00 DF 16 FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF

插电表,第三次读:
剩余度数:272.7  已用:5352.4
A2 13 10 91 FF FF 81 15 C1 6B 38 3F 44 3D 3A 41
    4C 59 11 11 11 D2 76 00 00 04 00 FF FF FF FF FF
    68 01 2B 02 31 31 31 31 31 31 31 31 57 07 00 00
    00 00 99 99 99 00 00 00 10 00 00 00 00 00 00 00
    00 66 08 00 07 00 C0 EF 6D 3E 50 B5 1B 1B CD 16
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    68 11 08 00 00 00 00 00 00 00 00 00 16 FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    68 81 1E 57 07 00 00 00 00 41 52 53 00 00 29 55
    00 76 72 02 00 00 00 00 00 07 00 00 32 00 0A F0
    FF DE 16 FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF

插卡到电表,第四次读:
剩余 :272.5   已用:5352.6

A2 13 10 91 FF FF 81 15 C1 6B 38 3F 44 3D 3A 41
    4C 59 11 11 11 D2 76 00 00 04 00 FF FF FF FF FF
    68 01 2B 02 31 31 31 31 31 31 31 31 57 07 00 00
    00 00 99 99 99 00 00 00 10 00 00 00 00 00 00 00
    00 66 08 00 07 00 C0 EF 6D 3E 50 B5 1B 1B CD 16
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    68 11 08 00 00 00 00 00 00 00 00 00 16 FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    68 81 1E 57 07 00 00 00 00 57 52 53 00 00 29 55
    00 60 72 02 00 00 00 00 00 07 00 00 32 00 0A F0
    FF DE 16 FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
过一段时间后充值200元后读卡

    A2 13 10 91 FF FF 81 15 C1 6B 38 3F 44 3D 3A 41
    4C 59 11 11 11 D2 76 00 00 04 00 FF FF FF FF FF
    68 01 2B 02 31 31 31 31 31 31 31 31 57 07 00 00
    00 00 99 99 99 00 00 00 10 00 00 00 00 00 00 00
    00 92 01 00 08 00 40 01 63 A2 B0 9B 95 95 19 16
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    68 11 08 00 00 00 00 00 00 00 00 00 16 FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF

插入电表后已用5563.1  剩余  254
然后读卡
    A2 13 10 91 FF FF 81 15 C1 6B 38 3F 44 3D 3A 41
    4C 59 11 11 11 D2 76 00 00 04 00 FF FF FF FF FF
    68 01 2B 02 31 31 31 31 31 31 31 31 57 07 00 00
    00 00 99 99 99 00 00 00 10 00 00 00 00 00 00 00
    00 92 01 00 08 00 40 01 63 A2 B0 9B 95 95 19 16
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    68 11 08 00 00 00 00 00 00 00 00 00 16 FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    68 81 1E 57 07 00 00 00 00 17 63 55 00 00 21 57
    00 00 54 02 00 00 00 00 00 08 00 00 32 00 0A F0
    FF 2E 16 FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
过一段时间后,又充值200元后读卡
A2 13 10 91 FF FF 81 15 C1 6B 38 3F 44 3D 3A 41
    4C 59 11 11 11 D2 76 00 00 04 00 FF FF FF FF FF
    68 01 2B 02 31 31 31 31 31 31 31 31 57 07 00 00
    00 00 99 99 99 00 00 00 10 00 00 00 00 00 00 00
    00 92 01 00 09 00 40 55 DF CA 70 77 79 79 76 16
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    68 11 08 00 00 00 00 00 00 00 00 00 16 FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
插入电表后显示已用5774.4 剩余234.7
读卡
     A2 13 10 91 FF FF 81 15 C1 6B 38 3F 44 3D 3A 41
    4C 59 11 11 11 D2 76 00 00 04 00 FF FF FF FF FF
    68 01 2B 02 31 31 31 31 31 31 31 31 57 07 00 00
    00 00 99 99 99 00 00 00 10 00 00 00 00 00 00 00
    00 92 01 00 09 00 40 55 DF CA 70 77 79 79 76 16
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    68 11 08 00 00 00 00 00 00 00 00 00 16 FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    68 81 1E 57 07 00 00 00 00 43 74 57 00 00 13 59
    00 74 34 02 00 00 00 00 00 09 00 00 32 00 0B F0
    00 B8 16 FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
2016,1月24日。加钱200元,读卡,还没插入电表。

    A2 13 10 91 FF FF 81 15 C1 6B 38 3F 44 3D 3A 41
    4C 59 11 11 11 D2 76 00 00 04 00 FF FF FF FF FF
    68 01 2B 02 31 31 31 31 31 31 31 31 57 07 00 00
    00 00 99 99 99 00 00 00 10 00 00 00 00 00 00 00
    00 93 01 00 0A 00 40 B1 73 02 B0 2B 05 05 AC 16
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    68 11 08 00 00 00 00 00 00 00 00 00 16 FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF

总结:
第一次读卡 已用电+未用电=5625.1
卡第五行数据:00 66 08 00 07 00 C0 EF 6D 3E 50 B5 1B 1B CD 16

充值200后  已用电+未用电=5817.1
卡第五行数据:00 92 01 00 08 00 40 01 63 A2 B0 9B 95 95 19 16

充值200后 已用电+未用电=6009.1
卡的第五行数据:00 92 01 00 08 00 40 01 63 A2 B0 9B 95 95 19 16

scxc 大神帮忙分析了下。第五个数据是次数每次充值+1。。目前还未搞懂。。

[招生]科锐逆向工程师培训(2024年11月15日实地,远程教学同时开班, 第51期)

收藏
免费 0
支持
分享
最新回复 (8)
雪    币: 689
活跃值: (422)
能力值: ( LV11,RANK:190 )
在线值:
发帖
回帖
粉丝
2
我下边说的行数都是去掉最下边的3行FF

我已经看到已用数据和剩余数据了,是用BCD码存放的,这么明显啊
倒数第四行,你从右往左看(以第四个数据为例),
你会发现00607202,这是文件序,按照内存序就是027260->272.60
往上一行575253->535257->5352.57
说明程序使用定点小数BCD来表示数据的
因此我怀疑你的第二次读已用那里的数据写错了

后边应该还有校验码,就是最后边变化的那一块,我猜是奇偶校验(因为不太像其他的校验方式),就是最后一行开始2个字节,这两个字节应该是整个数据块的校验

数据后边还有变化的地方应该是对数据本身的校验,看起来像CRC32,因为是4个字节
根据最上边出现的999999推测电卡能存储的最大值就是9999.99,但是三个字节明显不太好处理在程序中,因此,度数那里应该是4个字节00 57 52 53和00 60 72 02 这样的吧
2015-12-26 18:38
0
雪    币: 4
活跃值: (168)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
3
谢谢热心回答!第四次插卡剩余是272.5 你说的“按照内存序就是027260->272.60”不对啊!
这个是预付费电卡,知道修改哪个字段可以把余额增加吗?
不知道有没有用过acr38我测试了写卡貌似没有用也没有提示我输入口令。。

ACI Write
< FF D0 00 00 FF 00
< 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 99
> 9000

ACI Read
< FF B0 00 00 00 FF
> A2 13 10 91 FF FF 81 15 C1 6B 38 3F 44 3D 3A 41
    4C 59 11 11 11 D2 76 00 00 04 00 FF FF FF FF FF
    68 01 2B 02 31 31 31 31 31 31 31 31 57 07 00 00
    00 00 99 99 99 00 00 00 10 00 00 00 00 00 00 00
    00 66 08 00 07 00 C0 EF 6D 3E 50 B5 1B 1B CD 16
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    68 11 08 00 00 00 00 00 00 00 00 00 16 FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    68 81 1E 57 07 00 00 00 00 57 52 53 00 00 29 55
    00 60 72 02 00 00 00 00 00 07 00 00 32 00 0A F0
    FF DE 16 FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
> 9000
2015-12-27 13:06
0
雪    币: 4
活跃值: (168)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
4
在线等。。。。。
2015-12-31 16:09
0
雪    币: 211
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
5
4442卡,无密码可以读,要写卡必须先验证密码,密码错误3次,卡就废了

卡数据看上去的确是明码,多备份几次购电后插表前、后的数据,可以找出写卡方法,
没密码,就要偷物业数据库了
2016-1-15 16:59
0
雪    币: 4
活跃值: (168)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
6
谢谢了!
2016-1-18 11:52
0
雪    币: 201
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
7
能过对数据的观察感觉zplusplus大神分析的很正确
如果无写密码,但是还有一个问题没有分析出来,就是你冲值200后,的数据在卡上未体现出来!
2016-1-23 00:55
0
雪    币: 4
活跃值: (168)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
8
有密码,还没破解出来,但是数据规律没搞懂。第六行应该是关键。每次充钱第六行都会变,其他的都清空了。。
2016-1-26 01:20
0
雪    币: 2907
活跃值: (1301)
能力值: ( LV12,RANK:215 )
在线值:
发帖
回帖
粉丝
9
A2 13 10 91 FF FF 81 15 C1 6B 38 3F 44 3D 3A 41
    4C 59 11 11 11 D2 76 00 00 04 00 FF FF FF FF FF
    68 01 2B 02 31 31 31 31 31 31 31 31 57 07 00 00
    00 00 99 99 99 00 00 00 10 00 00 00 00 00 00 00
    00 66 08 00 07 00 C0 EF 6D 3E 50 B5 1B 1B CD 16
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    68 11 08 00 00 00 00 00 00 00 00 00 16 FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    68 81 1E 57 07 00 00 00 00 26 43 53 00 00 29 55
    00 91 81 02 00 00 00 00 00 07 00 00 32 00 0A F0
    00 DF 16 FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
    FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
此处对应余额281.91 已用5343.26,0A位置应该是个计数位
2016-1-26 11:03
0
游客
登录 | 注册 方可回帖
返回
//