Categories > Coding > C++ >

How would I start learning about lua wrappers?

Posts: 152

Threads: 9

Joined: Feb, 2022

Reputation: -34

Posted

I'm a minecraft client developer and I've taken interest in roblox

 

I'm wondering how I would start learning about lua execution of some sort

Something basic maybe

 

Also for some details I've already learned how to dump roblox & get the print function

https://wearedevs.net/forum/t/13738

 

https://github.com/Laamy/XSerious-Client

 

Edit: From looking at open source executors its embedded into the dll

how would I find such addresses to setup the variables or whatever

  • 0

novaline ontop

 

Executors I own: Synapse X, Asshurt/Sirhurt, Scriptware, Novaline

WendoJ

WendoJ

vip

Posts: 318

Threads: 29

Joined: Mar, 2020

Reputation: 40

Replied

https://v3rmillion.net/showthread.php?tid=980733

 

A wrapper wraps the Lua API and ROBLOX's custom Lua API, basically transferring items from the vanilla stack to Roblox's stack. 

# Technical jargon

In Roblox exploiting, we use a lot of big and fancy words to represent things; I'll be explaining some of them here.

#### **Datamodel**

It's basically another word to represent  `game` from luau (if you've ever scripted in Roblox Studio before, you should know this, otherwise there are the official documentation available online regarding it).

#### Stack

The stack is a part in memory where you can store different things for later use. It's kind of like a pile of books in a chest where the last book you put in, is the first you grab out. The chest is the stack and the book is a memory address (indicated by the stack pointer) in that stack segment; it follows the FILO (first-in-last-out) principle. The command **push** saves the contents of a register onto the stack. The command **pop** grabs the latest saved contents of a register from the stack and puts it in the (addressed) register.

#### Inline

You might have heard about Roblox's inline update (they only inlined lua functions so not print / gettaskscheduler) and essentially, you can't call a function that's inlined, that specifier literally tells to compiler to not create a function but instead to just pull the code where it's called. Inline functions are a powerful concept that is commonly used with classes so if a function is inline, **the compiler places a copy of the code of that function at each point where the function is called at compile time**. This means you need to reconstruct the function, but if you have any IDA experience, that should be easy. 

 

When I call the function:

![[Pasted image 20220216124141.png]]

IDA pseudo code:

![[Pasted image 20220216124152.png]]

#### Opcodes

An opcode, in essence, is what tells the interpreter what the instruction does. For example, if the instruction's opcode was OP_ADD (iABC), it would tell the interpreter to put the sum of the values located at B and C in the A register.

#### Bytecode

To put it simply, bytecode is the compiled form of source code and is a set of instructions designed for efficient execution by a software interpreter. Unlike human-readable source code, bytecodes consist of compact numeric codes, constants, and references (normally numeric addresses), which is then read by the interpreter to execute what the code does. For example, when you create a C++ application in Visual Studios and build it, the compiler (MSVC) takes your source code and translates it into a set of simple instructions called assembly which is then optimized for speed and portability into an executable file (.exe). The executable code contains **bytecode** and other resources.

 

bruh i cant fit the entire thing here

https://www.lua.org/manual/5.1/

  • 2

Posts: 152

Threads: 9

Joined: Feb, 2022

Reputation: -34

Replied

@Astronemi Any good resources that explain it or any sources i can try learn from?

  • 0

novaline ontop

 

Executors I own: Synapse X, Asshurt/Sirhurt, Scriptware, Novaline

SeizureSalad

i love femboys

Posts: 1159

Threads: 79

Joined: Mar, 2021

Reputation: 40

Replied

@YeemiRouth you could look at immune's LBI source but it don't work anymore i think lol

 

https://github.com/Nihon-Development/Nihon-Lua-Bytecode-Interpreter

 

here's an actual working dll source i think but don't skid lol

https://github.com/Fish-Sticks/headhunter

  • 1

"Questionable intellegence, but I like the mystery" - CubeFaces

https://cdn.discordapp.com/attachments/1136067487847415848/1138948596679589898/sig.png

Posts: 152

Threads: 9

Joined: Feb, 2022

Reputation: -34

Replied

@Astronemi Wasn't my goal to skid, dw

  • 0

Added

@Astronemi Okay thanks this thread helped

  • 0

novaline ontop

 

Executors I own: Synapse X, Asshurt/Sirhurt, Scriptware, Novaline

Users viewing this thread:

( Members: 0, Guests: 1, Total: 1 )