id: privesc-elvish info: name: elvish - Privilege Escalation author: daffainfo severity: high description: | elvish is a Unix shell that emphasizes expressiveness and extensibility. It aims to provide a more user-friendly and programmable shell experience, with features such as a powerful scripting language, a rich set of data types, and a clean and consistent syntax. reference: - https://gtfobins.github.io/gtfobins/elvish/ metadata: verified: true tags: code,linux,elvish,privesc self-contained: true code: - engine: - sh - bash source: | whoami - engine: - sh - bash source: | elvish -c 'whoami' - engine: - sh - bash source: | sudo elvish -c 'whoami' matchers-condition: and matchers: - type: word part: code_1_response words: - "root" negative: true - type: dsl dsl: - 'contains(code_2_response, "root")' - 'contains(code_3_response, "root")' condition: or # digest: 4a0a00473045022006ef5df54c4af5c94d5a8116e6729d5f02092d18272e0679ab271be1237406ae022100dede2ce3e800f4da16d6b7495bc2ce6f6b1aaf30870ec0900b1c4f0fcff8e3e2:922c64590222798bb761d5b6d8e72950