dc - Privilege Escalation
ID: privesc-dc
Severity: high
Author: daffainfo
Tags: code,linux,dc,privesc,local
Description
Section titled “Description”dc is a command-line calculator in Unix and Unix-like operating systems. It uses reverse Polish notation (RPN) and provides a simple and efficient way to perform arithmetic operations from the command line. It can be used for basic and advanced mathematical calculations, making it a handy tool for scripting and quick calculations in the terminal.
YAML Source
Section titled “YAML Source”id: privesc-dc
info: name: dc - Privilege Escalation author: daffainfo severity: high description: | dc is a command-line calculator in Unix and Unix-like operating systems. It uses reverse Polish notation (RPN) and provides a simple and efficient way to perform arithmetic operations from the command line. It can be used for basic and advanced mathematical calculations, making it a handy tool for scripting and quick calculations in the terminal. reference: - https://gtfobins.github.io/gtfobins/dc/ metadata: verified: true max-request: 3 tags: code,linux,dc,privesc,local
self-contained: truecode: - engine: - sh - bash source: | whoami
- engine: - sh - bash source: | dc -e '!whoami'
- engine: - sh - bash source: | sudo dc -e '!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: 4a0a00473045022100c08d4a1bf6ba06b4e834c6dccf0490e89c4ca65b54428acc0da63f12e04c850a02205d2cd527e5ee8d808432a8d0eccb19a186ae19fa2be7debaf8823230367b9dc2: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-dc.yaml"