Security: executable archives downloaded over plain HTTP with hash verification disabled (nohash) - MITM code execution

已关闭
#4,954 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
52/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
bash, shell
领域
cli, devops, security

调研方向

先从 lgsm/modules/core_steamcmd.sh、update_mta.sh 和 command_install_resources_mta.sh 中受影响的调用点开始,然后阅读 core_dl.sh 第 217 行和第 445 行附近的内容。比较 install_server_files.sh 中的校验和处理方式。完成的标准是:这些可执行归档在解压前使用 HTTPS 并进行校验和验证,同时 SteamCMD 和 MTA 的安装或更新路径仍能正常工作。

由索引模型根据 Issue 内容生成。

描述

engine: renderware game: Multi Theft Auto info: steamcmd

Security report (responsible disclosure)

Executable archives fetched over plain HTTP with hash verification disabled (nohash) — MITM code execution

Affected files:

  • lgsm/modules/core_steamcmd.sh:17-19
  • lgsm/modules/update_mta.sh:12-13
  • lgsm/modules/command_install_resources_mta.sh:17-18
fn_fetch_file "http://media.steampowered.com/client/steamcmd_linux.tar.gz" "" "" "" "${tmpdir}" "steamcmd_linux.tar.gz" "nochmodx" "norun" "noforce" "nohash"
fn_dl_extract "${tmpdir}" "steamcmd_linux.tar.gz" "${steamcmddir}"
chmod +x "${steamcmddir}/steamcmd.sh"
fn_fetch_file "http://linux.mtasa.com/dl/multitheftauto_linux_x64.tar.gz" ... "force" "nohash"
Chain

curl -L over plain HTTP (core_dl.sh:445) on first steamcmd install and on MTA updates → nohash bypasses fn_dl_hash entirely (core_dl.sh:217) → archive extracted into ${steamcmddir} / ${serverfiles} → steamcmd.sh is chmod +x'd and executed by every subsequent update/start; MTA binaries run at server start, and MTA resources execute as Lua inside the game server.

Any network attacker on path (or DNS hijack — no TLS involved) replaces the payload and gets shell execution as the LinuxGSM user, re-triggered automatically by update crons.

Severity

High — unauthenticated network position → persistent code execution.

Suggested fix

Serve both URLs over HTTPS (both hosts support it), and pin sha256 checksums the way install_server_files.sh already does for its tarballs. The existing MD5 pinning there is better than nothing but sha256 would be the modern baseline.

主要语言
Shell
星标
4.9k
派生
870
平均合并
22 小时 45 分钟
30 天内合并 PR
128

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

GameServerManagers/LinuxGSM 的其他 Issue

查看 GameServerManagers/LinuxGSM 的全部 Issue

相似的 Issue

更多 Shell/Bash Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。