Telnyx 包在 PyPI 上被入侵。
Telnyx package compromised on PyPI

原始链接: https://github.com/team-telnyx/telnyx-python/issues/235

## Telnyx PyPI 包被攻破 - 2026年3月27日 `telnyx` Python 包的 PyPI 版本 4.87.1 和 4.87.2 已经被恶意代码入侵,恶意代码注入到 `telnyx/_client.py` 文件中。这些版本发布时没有对应的 GitHub 发布,表明可能存在凭证泄露。已知最后一个安全版本是 4.87.0。 恶意代码使用隐写术从 **83.142.209.203:8080** 下载伪装成 WAV 音频文件的有效载荷。在 **Windows** 上,它会将一个二进制文件作为 `msbuild.exe` 放到启动文件夹中以实现持久化。在 **Linux/macOS** 上,它会提取一个凭证收集器,加密收集到的数据,并将其作为 `tpcp.tar.gz` 泄露出去。 此次攻击归因于 **TeamPCP**,因为与最近的 `litellm` PyPI 漏洞相似,包括共享的加密方法和归档命名约定。 **受影响版本:** `telnyx==4.87.1` 和 `telnyx==4.87.2`。建议用户回退到版本 4.87.0 或更早版本。

相关文章

原文

Updates

2026-03-27 10:13 UTC

Summary

PyPI versions 4.87.1 and 4.87.2 of telnyx contain malicious code injected into telnyx/_client.py. These versions were published to PyPI on March 27, 2026 without corresponding GitHub releases or tags, indicating the PyPI publishing credentials were compromised. Both versions are currently live on PyPI as the latest releases.

The last known clean version is 4.87.0 (GitHub release v4.87.0, published March 26).

The only file modified is telnyx/_client.py — 74 lines of malicious code were injected:

  • Lines 4-10: Malicious imports added (subprocess, tempfile, base64, wave, etc.)
  • Line 41-42: Base64 decoder helper function _d()
  • Line 459: 4,436-character base64-encoded payload variable _p
  • Lines 7761-7804: Windows attack function setup() — downloads a binary disguised in a WAV file from 83.142.209.203:8080, drops it as msbuild.exe in the Windows Startup folder
  • Lines 7806-7817: Linux/macOS attack function FetchAudio() — spawns a detached subprocess to decode and execute the _p payload
  • Lines 7823-7825: Both functions called at module scope (execute on import telnyx)

Malicious behavior:

  • Downloads payloads hidden inside WAV audio files from http://83.142.209.203:8080/ (steganography)
  • On Windows: Extracts a native binary from WAV, drops to %APPDATA%\...\Startup\msbuild.exe (persistence across reboots)
  • On Linux/macOS: Extracts a credential harvester from WAV, collects credentials, encrypts with AES-256-CBC + RSA-4096, exfiltrates as tpcp.tar.gz via HTTP POST

GitHub source (v4.87.0) is clean — the malicious code exists only in the PyPI artifacts.

Attribution

This attack is attributed to TeamPCP with high confidence based on:

  • Identical RSA-4096 public key as the litellm PyPI compromise (March 2026)
  • tpcp.tar.gz archive name and X-Filename: tpcp.tar.gz HTTP header (TeamPCP signature)
  • Identical AES-256-CBC + RSA OAEP encryption scheme via openssl CLI

Indicators of Compromise

IoC Type
telnyx==4.87.1 Malicious package version
telnyx==4.87.2 Malicious package version
83.142.209.203 C2 IP address
http://83.142.209.203:8080/ringtone.wav Payload endpoint (Linux/macOS)
http://83.142.209.203:8080/hangup.wav Payload endpoint (Windows)
%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup\msbuild.exe Windows persistence

SHA-256 Hashes (Malicious Artifacts)

File SHA-256
telnyx-4.87.1-py3-none-any.whl 7321caa303fe96ded0492c747d2f353c4f7d17185656fe292ab0a59e2bd0b8d9
telnyx-4.87.2-py3-none-any.whl cd08115806662469bbedec4b03f8427b97c8a4b3bc1442dc18b72b4e19395fe3
联系我们 contact @ memedata.com