-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMoegirlpedia Avatar Magic Word IP Leak.html
More file actions
376 lines (375 loc) · 13.9 KB
/
Moegirlpedia Avatar Magic Word IP Leak.html
File metadata and controls
376 lines (375 loc) · 13.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
<!doctype html>
<html lang="zh-Hans-CN">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link
rel="preload"
fetchpriority="high"
as="style"
href="https://testingcf.jsdelivr.net/gh/gui-ying233/Nest@main/src/css/base.min.css"
/>
<link
rel="preload"
fetchpriority="high"
as="image"
type="image/webp"
href="https://testingcf.jsdelivr.net/gh/gui-ying233/Nest@main/src/asset/image/ip%20in%20avatar%20title%20in%20light.webp"
media="(prefers-color-scheme: light)"
/>
<link
rel="preload"
fetchpriority="high"
as="image"
type="image/webp"
href="https://testingcf.jsdelivr.net/gh/gui-ying233/Nest@main/src/asset/image/ip%20in%20avatar%20title%20in%20dark.webp"
media="(prefers-color-scheme: dark)"
/>
<meta name="color-scheme" content="light dark" />
<meta name="theme-color" content="hsl(0, 0%, 92%);" />
<meta
name="theme-color"
media="(prefers-color-scheme: dark)"
content="hsl(0, 0%, 4%);"
/>
<meta name="author" content="鬼影233" />
<meta name="description" content="萌娘百科头像魔术字 IP 泄露" />
<meta
name="keywords"
content="萌娘百科, 萌百, 头像, 魔术字, IP, 泄露"
/>
<meta property="og:title" content="萌娘百科头像魔术字 IP 泄露" />
<meta property="og:locale" content="zh_CN" />
<meta
property="og:url"
content="https://gui-ying233.github.io/Nest/Moegirlpedia%20Avatar%20Magic%20Word%20IP%20Leak"
/>
<meta property="og:site_name" content="鬼影的基地" />
<meta property="og:description" content="萌娘百科头像魔术字 IP 泄露" />
<meta property="og:type" content="article" />
<meta property="article:author" content="鬼影233" />
<meta name="twitter:card" content="summary" />
<meta property="twitter:title" content="萌娘百科头像魔术字 IP 泄露" />
<meta property="twitter:creator" content="@guiying2333" />
<meta property="twitter:site" content="@guiying2333" />
<link
rel="alternate"
type="application/atom+xml"
href="https://gui-ying233.github.io/Nest/src/atom.xml"
/>
<link
rel="canonical"
href="https://gui-ying233.github.io/Nest/Moegirlpedia%20Avatar%20Magic%20Word%20IP%20Leak"
/>
<link
rel="icon"
type="image/x-icon"
href="https://testingcf.jsdelivr.net/gh/gui-ying233/Nest@main/src/asset/favicon.ico"
/>
<link
rel="apple-touch-icon"
href="https://testingcf.jsdelivr.net/gh/gui-ying233/Nest@main/src/asset/favicon.ico"
/>
<title>萌娘百科头像魔术字 IP 泄露 - 鬼影的基地</title>
<script type="application/ld+json">
{
"@context": "https://schema.org/",
"@graph": [
{
"@type": "BlogPosting",
"@id": "https://gui-ying233.github.io/Nest/Moegirlpedia%20Avatar%20Magic%20Word%20IP%20Leak#BlogPosting",
"mainEntityOfPage": "https://gui-ying233.github.io/Nest/Moegirlpedia%20Avatar%20Magic%20Word%20IP%20Leak",
"headline": "萌娘百科头像魔术字 IP 泄露",
"name": "萌娘百科头像魔术字 IP 泄露",
"description": "萌娘百科头像魔术字 IP 泄露",
"author": {
"@id": "https://gui-ying233.github.io/Nest/#Person"
},
"url": "https://gui-ying233.github.io/Nest/Moegirlpedia%20Avatar%20Magic%20Word%20IP%20Leak",
"isPartOf": {
"@id": "https://gui-ying233.github.io/Nest/#Blog"
},
"keywords": [
"萌娘百科",
"萌百",
"头像",
"魔术字",
"IP",
"泄露"
],
"image": [
{
"@type": "ImageObject",
"contentUrl": "https://testingcf.jsdelivr.net/gh/gui-ying233/Nest@main/src/asset/image/ip%20in%20avatar%20title%20in%20light.webp",
"caption": "头像的 alt 属性会记录提交者的 IP 地址",
"width": 664,
"height": 500,
"author": {
"@id": "https://gui-ying233.github.io/Nest/#Person"
},
"sameAs": "https://testingcf.jsdelivr.net/gh/gui-ying233/Nest@main/src/asset/image/ip%20in%20avatar%20title%20in%20dark.webp"
}
]
},
{
"@type": "BreadcrumbList",
"itemListElement": [
{
"@type": "ListItem",
"position": 1,
"item": {
"@id": "https://gui-ying233.github.io/Nest/#Blog"
}
},
{
"@type": "ListItem",
"position": 2,
"item": {
"@id": "https://gui-ying233.github.io/Nest/Moegirlpedia%20Avatar%20Magic%20Word%20IP%20Leak#BlogPosting"
}
}
]
}
]
}
</script>
<script
defer
src="https://www.googletagmanager.com/gtag/js?id=G-ZMHY61ZCQE"
></script>
<script
defer
src="https://static.cloudflareinsights.com/beacon.min.js"
data-cf-beacon='{"token": "b293bc8b0a614b42abf757d0eb6fe419"}'
></script>
<script
defer
src="https://testingcf.jsdelivr.net/gh/gui-ying233/Nest@main/src/js/analytics.min.js"
></script>
<script
src="https://app.rybbit.io/api/script.js"
data-site-id="1309"
data-track-errors="true"
data-session-replay="true"
data-web-vitals="true"
data-tracking-errors="true"
data-debounce="0"
defer
></script>
<link
rel="stylesheet"
fetchpriority="high"
href="https://testingcf.jsdelivr.net/gh/gui-ying233/Nest@main/src/css/base.min.css"
/>
<script type="speculationrules">
{
"prerender": [
{ "urls": ["."] },
{
"urls": [
"Moegirlpedia%20Comment%20List%20IP%20Leak",
"Moegirlpedia%20Horizontal%20Privilege%20Escalation%20Bug"
],
"eagerness": "eager"
}
],
"prefetch": [
{
"urls": [
"Moegirlpedia%20Comment%20List%20IP%20Leak",
"Moegirlpedia%20Horizontal%20Privilege%20Escalation%20Bug"
]
},
{
"where": { "selector_matches": "a[target='_blank']" },
"eagerness": "moderate"
}
]
}
</script>
</head>
<body
role="article"
itemscope
itemtype="http://schema.org/BlogPosting"
itemid="https://gui-ying233.github.io/Nest/Moegirlpedia%20Avatar%20Magic%20Word%20IP%20Leak#BlogPosting"
>
<a
href="https://wisadel.gui-ying233.workers.dev/?utm_medium=referral&utm_source=gui-ying233.github.io/Nest/"
rel="noindex nofollow"
style="position: absolute; left: -9999px"
aria-hidden="true"
></a>
<noscript>
<img
src="https://mc.yandex.ru/watch/103373011"
style="position: absolute; left: -9999px"
alt=""
/></noscript>
<h1>萌娘百科头像魔术字 IP 泄露</h1>
<section itemprop="articleBody">
<h2>前言</h2>
<p>
于
<time datetime="2025-07-29T22:28:17+0800"
>2025年7月29日 22:28:17</time
>,星海子在 Help:沙盒留下了<a
href="https://mzh.moegirl.org.cn/_?oldid=8088684&utm_medium=referral&utm_source=鬼影的基地&utm_content=https://gui-ying233.github.io/Nest/Moegirlpedia%20Avatar%20Magic%20Word%20IP%20Leak"
target="_blank"
>一笔编辑</a
>,<time datetime="2025-07-30T12:29:16+0800">约 14 小时后</time
>我对此魔术字进行了一次<a
href="https://mzh.moegirl.org.cn/_?oldid=8089498&utm_medium=referral&utm_source=鬼影的基地&utm_content=https://gui-ying233.github.io/Nest/Moegirlpedia%20Avatar%20Magic%20Word%20IP%20Leak"
target="_blank"
>测试</a
>(已经过申请后被监督),并在萌娘百科官方限水编辑讨论群发布了初步的调查报告。
</p>
<h2>漏洞详情</h2>
<h3>初步调查</h3>
<blockquote>
<p>
<code>{{#avatar:萌百娘}}</code>、<code
>{{#avatar:萌百娘|res=128}}</code
>
--> <code>width=128</code>,图源
<code>256px</code> 支持小数
</p>
<p>
<code>64 <= res < 128</code> -->
<code>width=res</code>,图源 <code>64px</code
><a
href="https://storage.moegirl.org.cn/moegirl/avatars/30749/latest.png!/sq/64?utm_medium=referral&utm_source=鬼影的基地&utm_content=https://gui-ying233.github.io/Nest/Moegirlpedia%20Avatar%20Magic%20Word%20IP%20Leak"
target="_blank"
>(https://storage.moegirl.org.cn/moegirl/avatars/30749/latest.png!/sq/64)</a
>
</p>
<p>
<code>{{#avatar:萌百娘|res=}}</code>(或<code><0</code>)
--> <code>width=""</code>(自动同图源大小),图源
<code>256px</code>
</p>
<br />
<p>
不能 <code>subst</code>,且如果
<code>subst</code> 不存在用户,会暴露你的 IP
</p>
<br />
<p>—— <cite>初步调查报告</cite></p>
</blockquote>
<pre data-lang="wikitext">
{{#avatar:}}
{{subst:#avatar:}}
</pre
>
<figure>
<picture
style="
--light-base64: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAMCAYAAABr5z2BAAAAAXNSR0IArs4c6QAAAidJREFUOE99kltIk2Ecxn/fDi1dOZmH2ERjmBXYaEIIKullKBQVYXRTBkGFUkZdFN0UHSy6KYsiqeuIwou6qt0o1o1WHsZQ1OZmpLgtdYfmt8/vEN8mmhG+N//3/b/P/+F9nucVRFHUADRNLwKKomIyGZAkGUUT9CtyLMZMldMixk0WBCHb15egEyiygj6uqPDVN8vUopHgTILjDdsIDQ6xs8hAoaeaZGAMe8VukvEEBmmJrSWlWYJkLMGXznu4TrYTF2FLnhUVgQKrQP9nH3feJzndWMKBfUV0dIeRUimuHXPwLSRnCfSntD4L8Picizd9UR52T3PhSCknGoqRFRVv+xmq266A3Ym0rOJw2tdLWD2tbIbHf9EzlubiISe/U2lyc3Td/6JWPIhOh7Te29epu3SVfNeO/6M26GYk9H3qx2rNocrjZmEhwd2OB+ytquFgYy1DIyHq9+/h++QPysqcGI0GTOZsKqspjI6OMxdOUFvjZmDAz+DQMG2tLQQCwUy85eUufD4/bnclKV1SrmU9QTye4ONbL0dbDjPzM8rlFxO8vlmXAUUjMQoK81hKpXnunWd4Ms7L9gpkWcWy2ZxN4VVvhAqbSEmxNeNwLCnRfH+CD7cq6Xw3w/kmB8gS6rLE2adBbpwqx5FvXiOI+EcY6HpC06MuliUZ/9Qinl2F66yLzYWRFufpmbWhGUw01xeteZCOxxAX5rFtd6GqWiayv7/rRtH8AXXYAEOUpY/aAAAAAElFTkSuQmCC");
--dark-base64: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAMCAYAAABr5z2BAAAAAXNSR0IArs4c6QAAAiVJREFUOE+Vkl1Ik2EUx3/P3nd+LOdC50czbIYTTbb8SmsbJUbCyCTUaxPtouuECrKLrrroQ2+iQEIQoovYhSUZYlARZIRlVDTRMhdTXM2PNNe2197YazKCvOhcned/zvPn+T3nCFuZUwUQQhBPZElCURTSZBURLwArykaml2Vi6+ugale0EPqjZ7WTpNORpFM5krcNs/KVfcYwt4JZVBbZeLOsMvphgvysHOYWQliMycSkZGZDCxsGOQY9je5a+kZGsG43IKI/0P2KsahLp76iinpnFUOjrxmbnMJTXUGOyUj/o6eUZxsSL+hsOU63d4C6cgcnD1Zy9+EgXl8QScCVUx3cuD/EajhKcGkRJY6xiZDrak4A/RE95p/sMUS46jdhkAVhRdX+518hqp11qru5kxeDN1kKzmzRtrUsSksdakm5i0h4jU++cbJ27KKl4xz+wDzPBq5TXNPAy+F+iuw1+KfeocSiRCPhBELcIL/QjslswffqCfYDHgqKHHh7L5K7c7c23rkvH7Ha7HyefIvRlMnKcuhvA0Oaib3uRkaHb5Nf6KDpxGm6z7dqTXkFJczOTJCWnsH+2mMUFJfRd+0M+qQU1laX0RCqDzXwfSlEJBJl2jdGerJEe1cvPRfaOdzYyuMHd5D1SQghccmVyeXnAWZXoxuLtInQ1NZJT1ebJpaaU3n/LcEZ17ItVpBTqUoJIasx7k0uJgziCEZTBvOB6f+ewm9uwcDaDwQzuAAAAABJRU5ErkJggg==");
"
>
<source
srcset="
https://testingcf.jsdelivr.net/gh/gui-ying233/Nest@main/src/asset/image/ip%20in%20avatar%20title%20in%20light.webp
"
type="image/webp"
media="(prefers-color-scheme: light)"
/>
<source
srcset="
https://testingcf.jsdelivr.net/gh/gui-ying233/Nest@main/src/asset/image/ip%20in%20avatar%20title%20in%20dark.webp
"
type="image/webp"
media="(prefers-color-scheme: dark)"
/>
<img
fetchpriority="high"
src="https://testingcf.jsdelivr.net/gh/gui-ying233/Nest@main/src/asset/image/ip%20in%20avatar%20title%20in%20light.webp"
alt="头像的 alt 属性会记录提交者的 IP 地址"
width="664"
height="500"
/>
</picture>
<figcaption aria-hidden="true">
头像的 alt 属性会记录提交者的 IP 地址
</figcaption>
</figure>
<p>
好吧,似乎只有
<a
href="https://www.mediawiki.org/wiki/Help:Substitution/zh"
target="_blank"
><abbr>subst(替换引用)</abbr></a
>
未注册用户的头像才会暴露,前者会只返回每位访问者的
IP,一般人但凡预览了都会察觉。
</p>
<p>但,真的只是这样吗?</p>
<h3>Web 缓存欺骗攻击</h3>
<p>前情提要:萌百在此前上线了页面缓存。</p>
<p>
是的,不出意外,其第一个,“只返回每位访问者的
IP”,变成了只返回第一位访问者的 IP。 而其缓存是对
<a
href="https://developer.mozilla.org/zh-CN/docs/Web/API/URL/search"
target="_blank"
>URL 查询字符串</a
>敏感的。
</p>
<p>
也就是说,我可以发送一个包含此头像的页面链接,并在链接中增加例如
<code>uuid=077860A0-4976-4999-9F08-DB0A651D3A56</code
>,然后发送给目标,在例如确定对方查看页面后,我再次以类似方式访问此页面,就能命中缓存,获取对方的
IP。
</p>
<h3>怎么还有?</h3>
<p>
<time datetime="2025-08-26T08:31:14+0800">8月26日</time
>,我发现例如
<a
target="_blank"
href="https://mzh.moegirl.org.cn/api.php?format=json&utf8=true&formatversion=2&action=query&meta=myavatar&maxage=114514&smaxage=114514"
>https://mzh.moegirl.org.cn/api.php?format=json&utf8=true&formatversion=2&action=query&meta=myavatar&maxage=114514&smaxage=114514</a
>
在匿名用户访问的时候也会共享 IP 缓存。
</p>
<p>
<time datetime="2025-08-27T12:29:18+0800">8月27日</time
>,我发现例如
<a
target="_blank"
href="https://mzh.moegirl.org.cn/api.php?action=query&format=json&list=avatars&utf8=1&formatversion=2&avuserids=0&maxage=114514&smaxage=114514"
>https://mzh.moegirl.org.cn/api.php?action=query&format=json&list=avatars&utf8=1&formatversion=2&avuserids=0&maxage=114514&smaxage=114514</a
>
在匿名用户访问的时候也会共享 IP 缓存。
</p>
<p>最终都被修复。</p>
<h2>题外话</h2>
<p>即使版本被监督了,缓存也不会因此失效。</p>
</section>
<footer>
<h2>相关链接</h2>
<ol>
<li>
<time datetime="2024-07-18T18:51:15+0800"
>2024年7月26日</time
>的:<a href="Moegirlpedia%20Comment%20List%20IP%20Leak"
>萌娘百科评论区 IP 泄露</a
>
</li>
<li>
2025年9月16日的:<a
href="Moegirlpedia%20Horizontal%20Privilege%20Escalation%20Bug"
>萌娘百科水平越权漏洞</a
>
</li>
</ol>
<a href=".">鬼影的基地</a>
</footer>
<link
rel="stylesheet"
media="print"
href="https://testingcf.jsdelivr.net/gh/gui-ying233/Nest@main/src/css/print.min.css"
/>
</body>
</html>