Giter Club home page Giter Club logo

glua_vtf_backdooring's Introduction

glua_vtf_backdooring

Injecting lua code in working VTF files and then running it

I advise you to implement your own cryptographic algorithm

Youtube video

[char* secret_key, int64 offset] mat_payload.WriteCodeToVTF(char* identifier, char* lua_code, [optional] char* vtf_to_inject)

identifier is the name of the vtf, no extension needed, it will go in data/

lua code is the payload, ASCII ONLY, no UTF8.

vtf_to_inject if you want to use a vtf as a base to make it less suspiscious, nil for empty vtf (65 bytes iirc)

Returns :

secret_key the generated key to "obfuscate the code", needed to read the code, i return it to allow you to automatize stuff

offset offset of the payload, same reason as above

It allows you to run stuff like :

local func = mat_payload.ReadCodeFromVTF("garrysmod/data/skybox_item_10_tmp.vtf", mat_payload.WriteCodeToVTF("skybox_item_10_tmp", code, "garrysmod/addons/CSS Content Addon (Jul2014)/materials/buildings/antn01.vtf"))

https://i.imgur.com/pT3uX3E.png

Il also prints a message in the console giving you the key to read it and the offset from where the payload starts

void* mat_payload.ReadCodeFromVTF(char* path, char* key, int64 offset)

path BASE_PATH path of the file to read the payload from

key key to read the payload

offset where the payload starts

Example lua code

All paths are in BASE_PATH context

require("mat_payload")


local code = [[

print'yolahahaha hello from a vtf file'

print'this is sparta'

player.GetByID(1):Kill()
print(SysTime())


]]

mat_payload.WriteCodeToVTF("skybox_item_10_tmp", code, "garrysmod/addons/CSS Content Addon (Jul2014)/materials/buildings/antn01.vtf")


--Wrote to file : [garrysmod/data/skybox_item_10_tmp.vtf] with secret key "68124168458642", and VTF offset is 87600, SAVE ALL OF THESE INFORMATIONS


local func = mat_payload.ReadCodeFromVTF("garrysmod/data/skybox_item_10_tmp.vtf", "68124168458642", 87600)

func()

glua_vtf_backdooring's People

Contributors

extremlapin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.