当前位置:网站首页>JS reverse | four libraries and one platform response data encryption
JS reverse | four libraries and one platform response data encryption
2022-06-26 10:22:00 【One room】
Statement : This article is for study only , It is forbidden to be used for illegal purposes , Otherwise, we will be responsible for the consequences . If your rights and interests are infringed , Please contact me immediately to delete !
Preface
The target site :aHR0cDovL2p6c2MubW9odXJkLmdvdi5jbi9kYXRhL2NvbXBhbnk=
Grab the bag
Bag grabbing discovery , The response data is a string of characters , Description is encrypted .
Find the encrypted location
next xhr The breakpoint , Turn the page to break the breakpoint , Then go back to the stack , Come here .
Although the response data is encrypted , But the whole process must first request data normally , Then decrypt the response data , And then render it to the page . Here we need to focus on onreadystatechange This method , Because there is response and respnseText The word .
But this onreadystatechange What is? , The definition of a rookie is :
The logic here should be when readyState by 4 The callback function is executed to decrypt the response data .
Here's the next breakpoint , Then step through the debugging , Come to this place ,

This h Is the method of decryption , Enter h Look inside .
function h(t) {
var e = d.a.enc.Hex.parse(t)
, n = d.a.enc.Base64.stringify(e)
, a = d.a.AES.decrypt(n, f, {
iv: m,
mode: d.a.mode.CBC,
padding: d.a.pad.Pkcs7
})
, r = a.toString(d.a.enc.Utf8);
return r.toString()
}
Encryption logic
h It's just one. AES encryption ( laugh ), The encryption mode is CBC,key and iv It is also defined in the previous section .
f = d.a.enc.Utf8.parse("jo8j9wGw%6HbxfFn")
m = d.a.enc.Utf8.parse("0123456789ABCDEF");
Although this view is original AES, But for insurance , Or first take the online website to verify .
It's really native AES, That's easy , Direct use python The library adjustment is finished .
python Code :
from Crypto.Cipher import AES
from Crypto.Util.Padding import pad, unpad
import binascii
def decrypt(data):
cipher = AES.new(key=KEY, mode=AES.MODE_CBC, iv=IV)
decrypted_data = cipher.decrypt(binascii.a2b_hex(data))
return unpad(decrypted_data, block_size=AES.block_size).decode('utf8')
KEY = 'jo8j9wGw%6HbxfFn'.encode()
IV = '0123456789ABCDEF'.encode()
raw_data = 'xxx' # Too long , I will not post it
result = decrypt(raw_data)
print(result)
Running effect :
Another piece of water (bushi), I'll see you next time .
边栏推荐
- Blog article index Summary - wechat games
- Leetcode intermediate node of linked list
- MySQL第十四次作业--电子商城项目
- MySQL learning summary
- Record the handling of oom problems caused by too many threads at one time
- When will JVM garbage collection enter the older generation
- MySQL Chapter 6 Summary
- 方法区里面有什么——class文件、class文件常量池、运行时常量池
- Redis master-slave replication in win10 system
- Develop current learning objectives and methods
猜你喜欢

Develop current learning objectives and methods

Differences between JVM, Dalvik and art

Full introduction to flexboxlayout (Google official flexible implementation of flow layout control)

利用foreach循环二维数组

【LeetCode】59. 螺旋矩阵 II

118. 杨辉三角

Cloud native essay using Hana expression database service on Google kubernetes cluster

How to start the learning journey of webrtc native cross platform development?

Allocation of heap memory when creating objects

MySQL第十四次作业--电子商城项目
随机推荐
[sans titre]
JSP file syntax
About multi table query of MySQL
Under the double reduction, the amount of online education has plummeted. Share 12 interesting uses of webrtc
美国总统签署社区安全法案以应对枪支问题
How to find and install the dependent libraries of Debian system
MySQL project 8 summary
Servlet learning notes II
Reshape a two-dimensional array with 3 rows and 3 columns to find the sum of the diagonals
904. 水果成篮
String constant pool, class constant pool, and runtime constant pool
The IE mode tab of Microsoft edge browser is stuck, which has been fixed by rolling back the update
MySQL项目7总结
The fourteenth MySQL operation - e-mall project
Blog article index Summary - wechat games
echo $?
118. 杨辉三角
【Leetcode】76. 最小覆盖子串
MySQL第十一作业-视图的应用
What is LSP