某小程序游戏逆向分析

某小程序游戏逆向分析

小程序逆向代码百度都有方法

主要是通过代码逆向加密解密算法

我玩的这个小程序是aes加密

常见aes 无非就是需要找到key  和iv 看属于哪种加密方式

[wxshow]

<html>
<head>
<script src = "ase.js"></script>




<script>
//(需要先加载aes.min.js文件)
// 建议此文件需要混淆源代码
 
// AES 秘钥
var AesKey = "xxxxxx";
 
// AES-128-CBC偏移量
var CBCIV = "xxxx";
 
// 加密选项
var CBCOptions = {
	iv: CryptoJS.enc.Utf8.parse(CBCIV),
	mode:CryptoJS.mode.CBC,
	padding: CryptoJS.pad.Pkcs7
}
 
/**
 * AES加密(CBC模式,需要偏移量)
 * @param data
 * @returns {*}
 */
function encrypt(data){
    var key = CryptoJS.enc.Utf8.parse(AesKey);
    var secretData = CryptoJS.enc.Utf8.parse(data);
    var encrypted = CryptoJS.AES.encrypt(
		secretData, 
		key, 
		CBCOptions
	);
    return encrypted.toString();
}
 
/**
 * AES解密(CBC模式,需要偏移量)
 * @param data
 * @returns {*}
 */
function decrypt(data){
    var key = CryptoJS.enc.Utf8.parse(AesKey);
    var decrypt = CryptoJS.AES.decrypt(
		data, 
		key, 
		CBCOptions
	);
    return CryptoJS.enc.Utf8.stringify(decrypt).toString();
}

var mim = decrypt("sisreftqyjH9h2tE7CDs/LRT92MdoFDssVgAAIagfySFDvNoSR0IOgMp2gV1UpopKssYUccbjPFuL7sFsUq3acANbsJvXswZ+WOxMFQEKghC7Dq03/5WNlLZYWCFuYBpaVcgHd+RFAxuNpZ1Y7oWHtXv6QyEq8EwWM6tWvuGPgSNEJ6BI3lINW+umES212lOITM+osMk2Jsh1bLgEQ4s1SRdynYIqcdIr8W6+BZkJa+OEaHTP6XFRaMIW12Qz5dIjP+pRsEA97sBC71dhvJR5K3Qow9juqbkLo5s0hZWZGk4jisg7VgFTS+yrqbHBGkzjC3mcs0m9d1JPNww1g3IfVZnZnGrUUKc4dDtTfNcxr9ONgGk04odKKn9bx7wODdD1kk8XvFqQEOE7E0o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U00oSc38HRE3itAu2unjOtYLrkzxqZD6DO8AW9GVEjAGOCDkvEB3JPYNN1x+wDVzwEvSOrc2dZfqJa9wF709Do39AWGi0eHa6i0qaUwPmCsFJ+6yLYB5fp6Ksyw2A3y8nEpKPC5Ez/oyhYcv+W7wr3xabwizBOBw6LsKPO2kWWYZX1s5tU4sKVwSYPA6W6zWNtFapzlTzGFMrQmkBW4keT0S20A129El6HVWK1Yk11XUPSV6371fy3Z1zAUq9NdbfSzKys3hjibEM3zEYhP8k=")
console.log(mim)




mim = 
var mim = encrypt('{"code":"","userid":uid,"password":password,"clickid":"","aid":"","adchannel":"","channeldata":null,"platform":1}')
console.log(mim)






</script>
</head>
<body>
</body>
</html>

[/wxshow]

© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情代码图片

    暂无评论内容