Lua Cheat Sheet

Posted : admin On 1/3/2022

Lua Cheat Sheet List: Lua 5.1 C API short reference (lists all the calls along with a short description of the parameters) Download pdf Lua 5.1 C API short reference (lists all the calls with even shorter descriptions but also includes the stack layout of the ingoing and outcoming Lua values Download pdf Read more about Lua on Wikipedia. Lua 5.1 C API short reference.pdf Lua 5.1 C API short reference backup Lua 5.1 C API short reference.pdf Lua 5.1 C API short reference backup. Lua only has floating point numbers and this is the max number bigNum = 854775807 + 1 io.write ('Big Number ', bigNum.

Shell Escapes Cheatsheet

Roblox lua cheat sheet

For when you forget or don't know how to take advantage of an eval() statement or spawn a shell in a specific language or escape some common programs.

Python

Simple inline execution of commands, without semicolons:

Alternatively, using subprocess:

Executing from shell, using complete import:

Roblox Lua Cheat Sheet

Perl

From repl:

From shell:

Ruby

Roblox lua cheat sheet

From repl:

From shell:

Lua

Roblox lua cheat sheet

From repl:

From shell:

Awk

Trying desperately to escape a restricted shell? Refer to the guide at https://fireshellsecurity.team/restricted-linux-shell-escaping-techniques/

Lua Cheat Sheet Pdf

Escaping more

This can be anywhere from some script being printed as an MOTD before disconnecting you during an SSH session, to something more subtle like a paged viewer being run with elevated privileges.

Forcing systemctl, man, etc, to display with more

If you set the $SYSTEMD_PAGER or $PAGER env variable to more, when paged data is printed in a terminal, you can shrink your terminal to force more to show you only a portion of text rather than all text, letting you escape to shell with :!sh.

List Of Lua Commands

Spawning a shell with Nmap

You might be thinking, “What?” But in restricted shells, this can come in handy.

Ran out of options? Maybe what you need isn't to escape a shell, but rather to escalate privileges. Try using Security Sift's LinuxPrivChecker.py tool, which does a lot of the tedious work for you and gives suggestions at the end of the script on what exploits might work.

Lua 5.3 Cheat Sheet

Still stuck? If all else fails, check out g0tmi1k's blog post on privilege escalation.