id: privesc-find info: name: find - Privilege Escalation author: daffainfo severity: high description: | The find command in Linux is used to search for files and directories in a directory hierarchy based on various criteria such as name, type, size, and permissions. It is a powerful tool for locating files and performing operations on them, such as executing commands or applying changes. reference: - https://gtfobins.github.io/gtfobins/find/ metadata: max-request: 3 verified: true tags: code,linux,find,privesc,local self-contained: true code: - engine: - sh - bash source: | whoami - engine: - sh - bash source: | find . -exec whoami \; -quit - engine: - sh - bash source: | sudo find . -exec whoami \; -quit 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: 4b0a0048304602210093227e768a659e1747e4dd5d82e25ade3f152549f159b967327082c90677fc5e022100ba7d7a12344d88ac9ec3c0832b25af9d1ef25fe4470e6963b2f3ae814c844e89:922c64590222798bb761d5b6d8e72950