Skip to content

Shell quoting inside the command word defeats PIPE_TO_SHELL, so a download cradle goes undetected #391

Done

Description

@blitzcrieg1

Shell quoting inside a command word stops PIPE_TO_SHELL from matching, while the shell still runs the same command. So a download piped into a shell can avoid encoded-command-download.

An outside audit reported this on 2026-11-07.

Reproduction

Checked against PIPE_TO_SHELL in core/audit/detection/traits.py on master, fingerprint 15846a0915769d4a, without changing anything or running the commands. Each form pipes the same download into a shell:

Downloader as written PIPE_TO_SHELL matches
curl Yes
CURL Yes
"curl" (whole word quoted) Yes
c''url No
c""url No
c\url No

The audit also ran c''url through a throwaway recorder and got no detection. That end-to-end result was not rerun here.

Separate report, not rechecked

The audit also reported that splitting the cradle across two calls, a download to a file and then running that file, stays silent when the host is not a known staging host. remote-staging-then-execute looks like the closest rule. This has not been confirmed.

What this means

These rules match patterns in command strings, so an agent or attacker trying to hide can get past them. Blocking is opt-in and off by default, but this is still worth stating plainly wherever blocking is described.

Fix, when it can land

Parked with the detection-noise work until the feature stop lifts.

Activity

  1. added
    bug
    detection-rule
    on Nov 7, 2026
  2. added
    bounty
    on Nov 24, 2026
  3. blitzcrieg1 commented on Nov 25, 2026

    @blitzcrieg1
    OwnerAuthor

    Fixed by #469 (from #458): quote-stripped command text is matched against PIPE_TO_SHELL, so c'u'rl ... | sh is caught.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bountybugdetection-rule

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions