2024-01-22 13:29:57 +00:00
id : privesc-perl
info :
name : Perl - Privilege Escalation
author : daffainfo
severity : high
description : |
Perl is a high-level, general-purpose programming language known for its powerful text processing capabilities. It is often used for system administration, web development, and network programming. Perl's syntax and features make it well-suited for tasks such as parsing and manipulating text, making it a popular choice for various scripting and automation tasks.
reference :
- https://gtfobins.github.io/gtfobins/perl/
metadata :
verified : true
2024-01-29 11:58:34 +00:00
max-request : 4
2024-01-31 17:41:31 +00:00
tags : code,linux,perl,privesc,local
2024-01-22 13:29:57 +00:00
self-contained : true
code :
- engine :
- sh
- bash
source : |
whoami
- engine :
- sh
- bash
source : |
perl -e 'exec "whoami";'
- engine :
- sh
- bash
source : |
sudo perl -e 'exec "whoami";'
- engine :
- sh
- bash
source : |
perl -e 'use POSIX qw(setuid); POSIX::setuid(0); exec "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")'
- 'contains(code_4_response, "root")'
2024-01-22 16:20:01 +00:00
condition : or
2024-01-31 17:43:39 +00:00
# digest: 4b0a00483046022100dee9666c916f48b5deeb7004464798e74b6e1c3246e25d6131aa863fc6371435022100bf2eb4cbde6f6caacd93dfe536844a03f99b5984d8dcfeba78f5b8623dadaf58:922c64590222798bb761d5b6d8e72950