type
status
date
slug
summary
tags
category
icon
password
简单APP的安卓逆向记录
一个App的算法分析
抓包
工具:Charels+Postern

这个就是我们抓到的

我们发现他经过了某种加密

我们可以通过字符串"Encrypt”定位到加密的位置,我们可以关注我们这个包名所在的位置

我们定位到函数之后,先看看是否可以hook到这个函数

fridahook辅助算法分析
看看能不能hook到这个函数

我们发现并没有什么用,那我们往上面找查找他的用例


我们尝试hook一下这个函数

我们发现hook到了

这个时候我们可以主动调用这个加密函数,看是否跟我们抓包得到的内容相等


我们记录下来之后发现跟抓包内容大体一样但是缺少了sign值

直接搜索sign值

直接调用md5函数


发现是一模一样的,到这里我们算是了解了它所有的算法加密过程


我们发现它把我们hook到的key的md5值作为DES的密钥,而我们的明文为之前我们获取的结构,接下来就是复现算法
算法复现
首先我们要获得sign的值
利用CryptoJS这个包
从我们记录下的sign的值的结构如下:

因此我们需要构造一个函数去实现它

经过比较发现是正确的

构造加密函数

构造解密函数

协议复现
笔者选用的是python实现协议的复现
实现成功

🤗 总结归纳
本篇文章只是笔者在学习安卓逆向中的第一个实战,意在了解app逆向的基本流程和对hook的初步了解
📎 参考文章
有关学习或者复现上的问题,欢迎您在底部评论区留言,一起交流~
- Author:5m10v3
- URL:https://5m10v3.top/article/11f533f9-4e40-8085-a905-d30c6afc0291
- Copyright:All articles in this blog, except for special statements, adopt BY-NC-SA agreement. Please indicate the source!
Relate Posts