1 wireshark-1
可以看到在theanswerishere.php执行了sql注入,所以存在漏洞的PHP页面名称是theanswerishere.php
2 wireshark-2
从以上漏洞测试我们发现在一共有三列
3 wireshark-3
从这里我们可以看到注入的列名是th1sfI4g
4 wireshark-4
从这里回显包我们能看到回显了flag,所以攻击者试图最终试图获取的数据是flag{th1s_ls_tHe_sQI1_anSwer}
5 hash_append
sm3的哈希长度扩展攻击
使用以下项目修改:
https://github.com/LJY-21/Length_Extension_Attack_for_SM3.py/blob/master/extension_sm3.py
6 Strangesystem
https://1cepeak.cn/post/2024sjaq-writeup/
Wireshark打开之后可以看到传了一张png
把这张图片导出来之后在末尾处可以看到有一个压缩包和TLS握手的信息
将这些信息保存为文件导入Wireshark:
之后就可以看到明文信息了,直接追踪QUIC数据流。
可以得到username=admin&password=QUICAUTH-CCC123!@#和一个html页面
Secret
<p>
Congratulations, you loaded this page using HTTP/3!
Your files have been encrypted and saved,Enjoy it!
Pass is :
admin::SecretServer:d158262017948de9:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:010100000000000058b2da67cbe0d001c575cfa48d38bec50000000002001600450047004900540049004d002d00500043003100340001001600450047004900540049004d002d00500043003100340004001600650067006900740069006d002d00500043003100340003001600650067006900740069006d002d0050004300310034000700080058b2da67cbe0d0010600040002000000080030003000000000000000000000000030000065d85a4000a167cdbbf6eff657941f52bc9ee2745e11f10c61bb24db541165800a001000000000000000000000000000000000000900240063006900660073002f003100390032002e003100360038002e0031002e00310030003700000000000000000000000000
</p>
</body>
可以看到存在xxxx部分,我们先来了解一下NTLMv2的生成过程:
所以接下来,可以根据整个过程来计算未知的部分。
# -*- coding: utf-8 -*-
# @Author : 1cePeak
import hashlib
import hmac
_ntlm = hashlib.new("md4", "QUICAUTH-CCC123!@#".encode("utf-16-le")).digest()
ntlm = _ntlm.hex()
print("NTLM:", ntlm)
user_domain_name = 'ADMINSECRETSERVER'.encode("utf-16-le")
firstHMAC = hmac.new(bytes.fromhex(ntlm), user_domain_name, hashlib.md5).hexdigest()
print("First HMAC:", firstHMAC)
ntlm_secret = "d158262017948de9010100000000000058b2da67cbe0d001c575cfa48d38bec50000000002001600450047004900540049004d002d00500043003100340001001600450047004900540049004d002d00500043003100340004001600650067006900740069006d002d00500043003100340003001600650067006900740069006d002d0050004300310034000700080058b2da67cbe0d0010600040002000000080030003000000000000000000000000030000065d85a4000a167cdbbf6eff657941f52bc9ee2745e11f10c61bb24db541165800a001000000000000000000000000000000000000900240063006900660073002f003100390032002e003100360038002e0031002e00310030003700000000000000000000000000"
Bytes_ntlm_secret = bytes.fromhex(ntlm_secret)
ntlmv2 = hmac.new(bytes.fromhex(firstHMAC), Bytes_ntlm_secret, hashlib.md5).hexdigest()
print("NTLMv2 hash:", ntlmv2)
NTLM: 61a26d3fee855453bc125700bc8cf6f2
First HMAC: 7d3ce509093fb2b7bcbbe7939fa8ee74
NTLMv2 hash: efa243f442b9d683eb1b00a2b1a0c9fc
得到的NTLMv2 hash是efa243f442b9d683eb1b00a2b1a0c9fc,用这个来解密压缩包就可以拿到flag{8af4d019-98ae-4b4f-a4e9-97076d205fd2}了。