跳转到内容
View in the app

A better way to browse. Learn more.

彼岸论坛

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
欢迎抵达彼岸 彼岸花开 此处谁在 -彼岸论坛

[程序员] 近期在 nginx 日志发现几个奇怪的 IP 访问记录,怎么往下查没思路了,也不想查了,交给有缘的大佬吧

发表于

我没有图床,简化了一下初始数据,大家看看这个表格凑合下吧

ip GET 请求时间 UA reference
用户 1 的 ip GET /page?code=1234&time=20240625223527 6 月 25 日 22:35:27 WeChat/arm64 Weixin example.com
106.55.200.233 腾讯云 GET /page?code=1234&time=20240625223527 6 月 26 日 03:16:37 Linux; U; Android 2.3.7 Nexus One Build null
用户 2 的 ip GET /page?code=5678&time=20240527104924 5 月 27 日 10:49:24 QQBrowser/12.5.5646.400 example.com
106.55.200.246 腾讯云 GET /page?code=5678&time=20240527104924 5 月 27 日 16:39:29 Linux; Android 4.4.2 Nexus 4 Build null

以上是挑了几条日志来说明情况,我发现的问题主要是以下几点:

  1. 腾讯云的 IP 持续 get 我网站上的某些资源;
  2. 这些 get 看起来像是对一段时间之前的请求( code 和时间戳)重放;
  3. 这些不正常请求的 UA 看起来都不对劲,早期 Android
  4. 这些不正常请求的 UA 没有明显的爬虫标识;
  5. 在这些不正常的请求之前,那些正常的请求包含一些腾讯的 UA 标识;
  6. 这些不正常的请求,没有 reference 值;
  7. 第 5 条提到的标识包含 wechat 或者 qqBroswer 或者 microMessage;
  8. 第 2 点提到的现象,在微信的开发者论坛里有相似的现象;
  9. 在 nginx 日志里找了几个没有腾讯 UA 的 get 请求,未发现腾讯 IP 使用这些 code 的访问记录

我在 nginx 里看到的类似日志非常多,我猜测事情是这样的:

  1. 使用微信或者 QQ 浏览器打开 example.com
  2. 做一些操作,发生了 GET example.com/page?code=code&time=time 请求
  3. 这些请求被记录在了某个地方
  4. hacker 获取到了这些记录
  5. hacker 用腾讯的 IP 重放了这些请求

但是问了腾讯云的客服,客服说这些 IP 不会被分配给虚拟机或者容器等用户,不会吧不会吧,难道 hacker 就是腾讯云吗?

话说大家还记得当时 QQ 和 Tim 访问 edge 浏览器历史记录的事情吗?

下一步我本来是想想办法帮腾讯排除嫌疑,但是我累了,不想再查了,看日志眼睛快瞎了,把这些 UA 封禁了得了。

我放弃了,我只能到此为止了,有兴趣的大佬请收下我最后的波纹~

Featured Replies

No posts to show

创建帐户或登录来提出意见

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.