惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
C
CERT Recently Published Vulnerability Notes
C
Cybersecurity and Infrastructure Security Agency CISA
P
Proofpoint News Feed
Security Latest
Security Latest
P
Privacy International News Feed
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
AI
AI
Cisco Talos Blog
Cisco Talos Blog
K
Kaspersky official blog
S
Secure Thoughts
PCI Perspectives
PCI Perspectives
Simon Willison's Weblog
Simon Willison's Weblog
D
DataBreaches.Net
GbyAI
GbyAI
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
大猫的无限游戏
大猫的无限游戏
T
Tailwind CSS Blog
The Cloudflare Blog
阮一峰的网络日志
阮一峰的网络日志
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
罗磊的独立博客
V
Visual Studio Blog
aimingoo的专栏
aimingoo的专栏
H
Hackread – Cybersecurity News, Data Breaches, AI and More
IT之家
IT之家
V
V2EX
Last Week in AI
Last Week in AI
有赞技术团队
有赞技术团队
月光博客
月光博客
酷 壳 – CoolShell
酷 壳 – CoolShell
T
Tenable Blog
T
Threat Research - Cisco Blogs
T
Troy Hunt's Blog
V2EX - 技术
V2EX - 技术
S
Security @ Cisco Blogs
Security Archives - TechRepublic
Security Archives - TechRepublic
Project Zero
Project Zero
The GitHub Blog
The GitHub Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
L
Lohrmann on Cybersecurity
F
Full Disclosure
H
Help Net Security
博客园 - Franky
Stack Overflow Blog
Stack Overflow Blog
N
Netflix TechBlog - Medium
Engineering at Meta
Engineering at Meta
A
Arctic Wolf
O
OpenAI News
S
Securelist

悅綺錄

发布了Typecho主题:Netsuko - 悅綺錄 软银版夏普手机解锁NFC - 悅綺錄 新兴“备案”就是一场韭菜骗局 - 悅綺錄 更新我的音频设备【水月雨MOCA】 - 悅綺錄 上海BW25游记 - 悅綺錄 [欧卡2成就获得]拉沃尔沃卡车 - 悅綺錄 HP 340 G4笔记本电脑拆机 - 悅綺錄 新的介绍页-3D动效,简中有复。 - 悅綺錄 [Linux] GNOME-删除root账户显示在登录页面上 - 悅綺錄
解决Typecho的评论XSS攻击 - 悅綺錄
DuckXu · 2026-02-04 · via 悅綺錄

许久没看博客,想着应该处理下评论,登录进后台点击“未审核”,就立刻被跳转到了一个奇怪的链接。
2026-02-04T12:11:55.png
2026-02-04T12:12:24.png
从“steal”“cookie”就不难看出,这把我的登录Cookie发送到了这个奇怪的IP地址里。接下来某人就可以通过这个Cookie登录我的后台了,不过还是阻止他最好。
复现了一下,只有点击“未审核”时才会被跳转,看来这个XSS注入肯定在某个未审核评论里。但未审核评论肯定不能随便全部扬了啊,于是我们打开phpMyAdmin管理博客的MySQL数据库,执行以下命令筛选有没有写了脚本“script”或者有特殊符号的评论。

DELETE FROM `typecho_comments` 
WHERE `text` LIKE '%<script%'
DELETE FROM `typecho_comments` 
WHERE `text` REGEXP '<[^>]+>';;

很遗憾,没有。看来这人没直接用script注入。会不会是篡改了插件设置或者博客源码?在博客根目录下执行

grep -rn "154.21.***.213" 

一无所获。还是得在数据库里搜索。
2026-02-04T12:18:15.png
直接在MySQL里搜索这个IP地址,找到了。删除他们,正好也看到这人用的是“"onfocus="location.href”办法来重定向。现在就把类似的评论全删了。不过我这里先把跳转的链接置空看看。

UPDATE `typecho_comments` 
SET `url` = '' 
WHERE `url` LIKE '%location.href%';

找到两条。回到Typecho后台,未审核评论可以正常打开了,刚刚被替换掉的应该就是这两条评论。
2026-02-04T12:20:33.png
很狡猾,应该是看了文章内容再手动下的评论,和文章强关联。这下要加强防护了。
以及,记得改掉Typecho的管理员密码。