Categories > Coding > C++ >

[ HELP ] How do i fix a crash when using luau_load?

Posts: 8

Threads: 1

Joined: Aug, 2022

Reputation: 0

Posted

Hey so basically i compiled my script to bytecode using Roblox's luau compiler from their GitHub then called luau_load on it and afterwards i spawned the thread using Roblox's spawn function but it crashes and i can't figure out why

 

extra notes: This is being done for Roblox android so it's 100% Sure it's not because of any checks or issues with the Luau VM

 

Edit: Thanks to GoudaGuy it's solved, results i didn't add Opcode Encryption

 

void Execute(std::uintptr_t State, std::string Script)
	{
		using namespace RBX::API::Funcs;
		
		std::uintptr_t nState = rlua_newthread(State);
		auto bc = Luau::compile(Script);

	    luau_load(nState, "=funniExplot", bc.c_str(), bc.size(), 0);
	    r_spawn(nState);
	}
  • 0

icedmilke222

Squidward

Posts: 53

Threads: 15

Joined: May, 2022

Reputation: 2

Replied

shouldn't you use roblox's luau_load or whatever it is?

  • 0

what sup

i lo re c++

Posts: 8

Threads: 1

Joined: Aug, 2022

Reputation: 0

Replied

@icedmilke222 That's what i am doing, i can even show you my function pointer ( since that's what I use for mobile ), i also got it with the string "bytecode version mismatch"

 

I actually did a test yesterday night and i found out it crashes when spawn gets called or pcall gets called 

 

Edit: my spawn address isn't wrong since i just checked in IDA 

 

 

 

 

  • 0

Entity

Usability >> modern

vip

Posts: 416

Threads: 40

Joined: May, 2022

Reputation: 51

Replied

rlua_newthread

The problem may be in

  • 0

heckerdude

heckerdude

Posts: 129

Threads: 16

Joined: Aug, 2022

Reputation: 6

Replied

@atari What Do you mean By that? his name is something else

  • 0

hecker dude ngl i hecked 5 ips in 1 second also luaU_loadbiglongjuicythingy(rL);

Posts: 8

Threads: 1

Joined: Aug, 2022

Reputation: 0

Replied

@Entity I doubt it but I'll see if there's anything wrong with it, thanks

 

 

Edit: Doesn't seem like there's anything wrong with it, address is correct, function pointer is correct, no crashes occur when calling it. Probably not the issue unless i didn't test it correctly 

  • 0

Entity

Usability >> modern

vip

Posts: 416

Threads: 40

Joined: May, 2022

Reputation: 51

Replied

@Catsun maybe  r_spawn(nState);

  • 0

Posts: 8

Threads: 1

Joined: Aug, 2022

Reputation: 0

Replied

@Entity I'm very sure that's where the problem is but the address is correct, the function pointer is correct, i have also tried to use pcall instead but it still crashed, newthread is not the problem since it works just fine.

 

Pretty clueless on what to try anymore

  • 0

Posts: 32

Threads: 5

Joined: Jun, 2022

Reputation: 4

Replied

when you just call the function without anything then is the cause retcheck dm me on discord i can explain more 

lemme guess you dont have any ac bypass? when you dont have a memcheck bypass you will get kicked after some minutes so you need to bypass memcheck and retcheck for a simple exploit ðŸ™ƒ

 

  • 0

Posts: 8

Threads: 1

Joined: Aug, 2022

Reputation: 0

Replied

@GoudaGuy Thing is that only happens with PC, in mobile those checks do not exist so there's no need to bypass them luckily which makes it a lot easier to make an exploit, one thing i did think about is the spawn mutation could have affected mobile too but I'm not 100% sure and i really doubt it.

  • 0

Posts: 32

Threads: 5

Joined: Jun, 2022

Reputation: 4

Replied

@Catsun

yeah would be pretty ez to create a android exploit the code looks good but i found something look you dont use the encrypted opcodes stuff here is the code with encrypted op codes that works on pc

 

class bytecode_encoder_t : public Luau::BytecodeEncoder

{

    std::uint8_t encodeOp(const std::uint8_t opcode)

    {

        return opcode * 227;

    }

};

bytecode_encoder_t bytecode_encoder{};

std::string bytecode = Luau::compile(script, {}, {}, &bytecode_encoder);

  • 0

Posts: 8

Threads: 1

Joined: Aug, 2022

Reputation: 0

Replied

@GoudaGuy Thanks I'll try it later

  • 0

Alternate

stop take my rice

vip

Posts: 712

Threads: 113

Joined: Mar, 2022

Reputation: 40

Replied

SKIDSTER???? IS THAT YOU????

  • 0

we are dead

Posts: 8

Threads: 1

Joined: Aug, 2022

Reputation: 0

Replied

@Alternate can someone actually explain who skidster is

  • 0

Added

@GoudaGuy Now execution works, thanks :)

  • 1

Next >>>

Users viewing this thread:

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