id: privesc-torsocks info: name: Torsocks - Privilege Escalation author: daffainfo severity: high description: | torsocks is a wrapper that enables the use of the Tor network for any program, including those that do not natively support proxy settings. It intercepts and redirects network calls from the target program through the Tor network, providing a way to anonymize the network traffic of various applications. reference: - https://gtfobins.github.io/gtfobins/torsocks/ metadata: verified: true tags: code,linux,torsocks,privesc self-contained: true code: - engine: - sh - bash source: | whoami - engine: - sh - bash source: | torsocks whoami - engine: - sh - bash source: | sudo torsocks 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