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

推荐订阅源

I
Intezer
V
Vulnerabilities – Threatpost
Google Online Security Blog
Google Online Security Blog
T
The Exploit Database - CXSecurity.com
C
CXSECURITY Database RSS Feed - CXSecurity.com
AWS News Blog
AWS News Blog
G
GRAHAM CLULEY
P
Privacy & Cybersecurity Law Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
C
Cybersecurity and Infrastructure Security Agency CISA
N
News | PayPal Newsroom
T
Tenable Blog
Spread Privacy
Spread Privacy
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
S
Secure Thoughts
P
Privacy International News Feed
IT之家
IT之家
Project Zero
Project Zero
T
The Blog of Author Tim Ferriss
Engineering at Meta
Engineering at Meta
大猫的无限游戏
大猫的无限游戏
博客园_首页
GbyAI
GbyAI
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
量子位
雷峰网
雷峰网
Apple Machine Learning Research
Apple Machine Learning Research
Hacker News: Ask HN
Hacker News: Ask HN
Google DeepMind News
Google DeepMind News
MongoDB | Blog
MongoDB | Blog
N
Netflix TechBlog - Medium
Martin Fowler
Martin Fowler
NISL@THU
NISL@THU
I
InfoQ
D
DataBreaches.Net
有赞技术团队
有赞技术团队
K
Kaspersky official blog
Security Latest
Security Latest
The Register - Security
The Register - Security
Hugging Face - Blog
Hugging Face - Blog
S
Security @ Cisco Blogs
P
Proofpoint News Feed
M
MIT News - Artificial intelligence
H
Hackread – Cybersecurity News, Data Breaches, AI and More
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
AI
AI
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
P
Proofpoint News Feed
Security Archives - TechRepublic
Security Archives - TechRepublic
N
News and Events Feed by Topic

悅綺錄

发布了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的管理员密码。