48 lines
1.1 KiB
YAML
48 lines
1.1 KiB
YAML
id: privesc-xargs
|
|
|
|
info:
|
|
name: Xargs - Privilege Escalation
|
|
author: daffainfo
|
|
severity: high
|
|
description: |
|
|
xargs is a command in Unix and Unix-like operating systems used to build and execute command lines from standard input.
|
|
reference:
|
|
- https://gtfobins.github.io/gtfobins/xargs/
|
|
metadata:
|
|
verified: true
|
|
tags: code,linux,xargs,privesc
|
|
|
|
self-contained: true
|
|
code:
|
|
- engine:
|
|
- sh
|
|
- bash
|
|
source: |
|
|
whoami
|
|
|
|
- engine:
|
|
- sh
|
|
- bash
|
|
source: |
|
|
xargs -a /dev/null whoami
|
|
|
|
- engine:
|
|
- sh
|
|
- bash
|
|
source: |
|
|
sudo xargs -a /dev/null 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: 4b0a00483046022100e502140967a7fd972baa3f8ddd98adbe4c99b0d34191364ec9a3ed55f9e3caa0022100ac2ab00f625df439fa051705ce700f21aee98f9218db1f2ae9ec6315b54195ad:922c64590222798bb761d5b6d8e72950 |