Bash - Privilege Escalation
ID: privesc-bash
Severity: high
Author: daffainfo
Tags: code,linux,bash,privesc,local
Description
Section titled “Description”Bash is a Unix shell and command language written by Brian Fox for the GNU Project as a free software replacement for the Bourne shell. The shell’s name is an acronym for Bourne Again Shell, a pun on the name of the Bourne shell that it replaces and the notion of being born again.
YAML Source
Section titled “YAML Source”id: privesc-bash
info: name: Bash - Privilege Escalation author: daffainfo severity: high description: | Bash is a Unix shell and command language written by Brian Fox for the GNU Project as a free software replacement for the Bourne shell. The shell's name is an acronym for Bourne Again Shell, a pun on the name of the Bourne shell that it replaces and the notion of being born again. reference: - https://gtfobins.github.io/gtfobins/bash/ metadata: verified: true max-request: 3 tags: code,linux,bash,privesc,local
self-contained: truecode: - engine: - sh - bash source: | whoami
- engine: - sh - bash source: | bash -c 'whoami'
- engine: - sh - bash source: | sudo bash -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: 490a0046304402203a44708a03e25f2e08a676db45844be884224bf30910c57e1e236ad0bb93469202200eaf50837ac2d6dc23bc15b505fdfb7009286edabf66067d95e8865dfaa06a08:922c64590222798bb761d5b6d8e72950Guide to check the vulnerabilities
Section titled “Guide to check the vulnerabilities”This template is used to detect vulnerabilities in web applications. It can be used with the Nuclei tool to scan for specific patterns or behaviors.
$ nuclei -u "URL" -t "code/privilege-escalation/linux/binary/privesc-bash.yaml"