当前位置:网站首页>【js逆向】md5加密参数破解
【js逆向】md5加密参数破解
2022-07-01 08:14:00 【フィロソフィー】
MD5
md5:消息摘要算法(英文:MD5 Message-Digest Algorithm ),一种被广泛使用的密码散列函数,可以产生一个128位(16字节)的散列值。该加密算法不可逆,通过暴力穷举法破解,以及网站接口实现解密。
js逆向中,可以通过搜索MD5关键字查找加密位置。
md5的js加密方法:
const CryptoJs = require ('crypto-js'); //导入加密库
let password = 'philosophy'; //加密字符串
let enPwd = CryptoJs.MD5(password).toString();
console.log(enPwd); //输出结果
python实现MD5加密:
方法一:
import hashlib
str = 'philosophy' #加密字符串
m = hashlib.md5()
m.update(str.encode('utf-8'))
print(m.hexdigest())
方法二:
from lxpy.encrypt import md5 #第三方库需要安装
print(md5.get_md5(str))
输出结果都为:
225ab6cdf797eae79495ff584a46dfd2
逆向案例
进入登录窗口,打开开发者工具,输入账号密码,点击登录进行抓包:
网站地址:https://www.zhaoxi.net/
在开发者工具中Network面板可以看到登录提交的数据有三个,前两个参数是固定,参数txtpassword明显通过加密生成,如图所示:
通过全局搜索参数名可以看到有多个结果,使用Initiator快速查看堆栈调用,进入send调用中设置断点,重新触发登录请求:

重新登录触发断点后,进行回溯堆栈调用,点击右侧Call Stack(调用堆栈),逐个点击查看,可以发现CheckForm里的Ajax请求前有个#txtpassword ,可以看出hex_md5明显是个加密函数,在控制台console中输入它,双击方法进入查看:

可以确认为md5加密,通过python实现加密,可以发现加密结果和提交的参数值一致。
边栏推荐
- 机动目标跟踪——当前统计模型(CS模型)扩展卡尔曼滤波/无迹卡尔曼滤波 matlab实现
- CPU design practice - Chapter 4 practical tasks - simple CPU reference design and debugging
- 軟鍵盤高度報錯
- 機動目標跟踪——當前統計模型(CS模型)擴展卡爾曼濾波/無迹卡爾曼濾波 matlab實現
- 2022 ordinary scaffolder (special type of construction work) examination question bank and the latest analysis of ordinary scaffolder (special type of construction work)
- 0 basic introduction to single chip microcomputer: how to use digital multimeter and precautions
- 【刷题】字符统计【0】
- [staff] high and low octave mark (the notes in the high octave mark | mark range are increased by one octave as a whole | low octave mark | mark range are decreased by one octave as a whole)
- Hijacking a user's browser with beef
- The Windows C disk is full
猜你喜欢

【入门】提取不重复的整数

Set up file server Minio for quick use

軟鍵盤高度報錯
![Thread safety analysis of [concurrent programming JUC] variables](/img/f9/a3604bec6f7e5317dd2c578da73018.jpg)
Thread safety analysis of [concurrent programming JUC] variables

SPL-安装与基本使用(二)

图扑软件通过 CMMI5 级认证!| 国际软件领域高权威高等级认证

毕业论文中word的使用1-代码域标公式

手工挖XSS漏洞

Koltin35, headline Android interview algorithm

PostgreSQL source code learning (26) -- windows vscode remote debugging PostgreSQL on Linux
随机推荐
Access report realizes subtotal function
Stack implementation calculator
图扑软件通过 CMMI5 级认证!| 国际软件领域高权威高等级认证
empirical study and case study
[getting started] input n integers and output the smallest K of them
[untitled]
Count number of rows per group and add result to original data frame
Conception et mise en service du processeur - chapitre 4 tâches pratiques
Erreur de hauteur du clavier souple
Leetcode T29: 两数相除
getInputStream() has already been called for this request
web254
Download jackson codehaus. org jar - downloading jackson. codehaus. org jar
[getting started] intercepting strings
Yolov5进阶之七目标追踪最新环境搭建
Precautions and skills in using regular expressions in golang
seaborn clustermap矩阵添加颜色块
2022 ordinary scaffolder (special type of construction work) examination question bank and the latest analysis of ordinary scaffolder (special type of construction work)
CPU設計實戰-第四章實踐任務一簡單CPU參考設計調試
Anddroid text to speech TTS implementation