lua - Privilege Escalation
ID: privesc-lua
Severity: high
Author: daffainfo
Tags: code,linux,lua,privesc,local
Description
Section titled “Description”Lua is a powerful, efficient, lightweight, embeddable scripting language. It is often used as a scripting language for game development and other applications that require a customizable and extensible scripting interface. Lua is known for its simplicity, speed, and ease of integration with other languages and systems.
YAML Source
Section titled “YAML Source”id: privesc-lua
info: name: lua - Privilege Escalation author: daffainfo severity: high description: | Lua is a powerful, efficient, lightweight, embeddable scripting language. It is often used as a scripting language for game development and other applications that require a customizable and extensible scripting interface. Lua is known for its simplicity, speed, and ease of integration with other languages and systems. reference: - https://gtfobins.github.io/gtfobins/lua/ metadata: verified: true max-request: 3 tags: code,linux,lua,privesc,local
self-contained: truecode: - engine: - sh - bash source: | whoami
- engine: - sh - bash source: | lua -e 'os.execute("whoami")'
- engine: - sh - bash source: | sudo lua -e 'os.execute("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: 490a00463044022068718653db39b936140228cfead61b3c7b0895e78857e03c997aa97ea3228702022004ce8817d7f5513e675645cde83c237e0f1d6de8348e012d0094a7865e584fd6: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-lua.yaml"