Skip to content

Lua FiveM Malware Guard: A powerful resources extension for FiveM servers owners to enhance server security by preventing unauthorized Lua functions, managing resource permissions, and receiving real-time alerts via Discord webhooks.

License

Notifications You must be signed in to change notification settings

abdalrhman-alajlouni/Lua-FiveM-Malware-Guard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation


Lua-FiveM-Malware-Guard

Lua FiveM Malware Guard: A powerful resources extension for FiveM servers owners to enhance server security by preventing unauthorized Lua functions, managing resource permissions, and receiving real-time alerts via Discord webhooks.

Downloads Contributors Issues License

About

Lua FiveM Malware Guard is a security-focused resources extension for FiveM servers owners. It is designed to prevent the usage of Lua functions such as os.execute, os.getenv, io.popen etc., and sensitive FiveM native functions in resources, and it allows the server owner to assign permissions to each resource to specify which functions are allowed. The resource also includes a Discord webhook system for alerting administrators of trigger attempts, with three levels of alerts: normal, high, and very high.

Table of Contents

πŸ”₯ Demo

Discord Webhook Alerts.


🌠 Features

  • Prevent the usage of sensitive Lua functions and sensitive FiveM native functions.
  • Control resource-level permissions for specific functions.
  • Discord webhook integration for real-time alerts.
  • Three levels of alerts (normal, high, very high).
  • Zero Dependencies.
  • Compatibility with All Frameworks, Whether you're using ESX, QBCore, vRP, or any other framework.
  • Cross-Platform Compatibility with both Windows and Linux.
  • Anti-Debugging and Override System.

πŸ”¨ Usage Steps

  1. Locate the citizen/scripting/resource_init.lua file within your FiveM server build files.

  2. Replace the existing resource_init.lua file with the one provided in this project. This ensures that the protection.lua file is loaded for all resources on your server.

  3. Navigate to the specific resource you want to protect.

  4. Add the protection.lua file to the resource folder you wish to secure.

  5. Open the protection.lua file and configure your settings, including Discord webhook URLs and the functions allowed for this script.

  6. Copy the configured protection.lua file and paste it into any resource you want to protect. Be sure to adjust the settings as needed for each resource.

⚑ ToDo List

If you're interested in contributing to FiveM SecurityGuard, here are some tasks that need attention. Feel free to pick an item from the list, work on it, and submit a pull request. If you have new ideas or find issues not listed here, please open an issue to discuss them.

Core Functionality and Security Features

  • Add more functions to enhance security coverage.
  • Create Client Side functions security system, By using the TriggerServerEvent native to check.
  • Explore the possibility of supporting other programming languages, such as JavaScript (JS) and C#.
  • Implement additional security checks for the functions.
  • Enhance the permission management system.
  • Address any identified security vulnerabilities or bugs.
  • Investigate and fix reported bugs or issues.

βš™ Functions Covered

Here is a list of functions covered by Lua FiveM Malware Guard with descriptions and links to relevant documentation:

Lua Functions

  1. io.popen

    • Description: Opens a pipe to execute a command and returns a file handle.
    • Lua Documentation
  2. os.execute

  3. os.clock

    • Description: Returns an approximation of the amount in seconds of CPU time used by the program.
    • Lua Documentation
  4. os.getenv

  5. os.remove

  6. os.rename

  7. io.read

  8. io.open

  9. io.close

  10. io.input

  11. io.write

  12. io.stdin

  13. io.stdout

  14. io.stderr

  15. debug.getinfo

  16. debug.getlocal

  17. debug.getupvalue

  18. debug.sethook

    • Description: Sets a new hook function for debugging. The hook function can be used to trace function calls, lines of code, or other events in Lua scripts.
    • Lua Documentation

...

FiveM Functions

  1. GetCurrentServerEndpoint

  2. StartResource

  3. StopResource

  4. SetResourceKvpFloat

  5. SetResourceKvpFloatNoSync

    • Description: Sets a floating-point key-value pair for a resource without synchronizing.
    • FiveM Documentation
  6. SetResourceKvpInt

    • Description: Sets an integer key-value pair for a resource. This function is commonly used to store integer data associated with a resource.
    • FiveM Documentation
  7. SetResourceKvpIntNoSync

    • Description: Sets an integer key-value pair for a resource without synchronizing it across the network. Use this function when you do not need to send the update to other clients.
    • FiveM Documentation
  8. SetResourceKvpNoSync

    • Description: Sets a key-value pair for a resource without synchronizing it across the network. Use this function when you do not need to send the update to other clients.
    • FiveM Documentation
  9. SetResourceKvp

    • Description: Sets a key-value pair for a resource. This function allows you to store various types of data associated with a resource.
    • FiveM Documentation
  10. SetHttpHandler

    • Description: Sets a custom HTTP handler for resource-specific HTTP requests. You can use this function to customize the behavior of HTTP requests made by your resource.
    • FiveM Documentation
  11. SetMapName

    • Description: Sets the map name for the server. This function is used to change the displayed map name in the server browser.
    • FiveM Documentation
  12. SetGameType

    • Description: Sets the game type for the server. This function is used to change the displayed game type in the server browser.
    • FiveM Documentation
  13. SetConvar

    • Description: Sets the value of a convar for the server. Convars are variables used for server configuration and settings.
    • FiveM Documentation
  14. GetConvar

    • Description: Retrieves the value of a convar for the server. Use this function to access the value of a convar.
    • FiveM Documentation
  15. SetConvarReplicated

    • Description: Sets the value of a convar for the server and replicates it to all connected clients.
    • FiveM Documentation
  16. SetConvarServerInfo

    • Description: Sets a convar as a server info convar. Server info convars are used to display additional information about the server in the server browser.
    • FiveM Documentation
  17. SaveResourceFile

    • Description: Saves a file within a resource. This function is used to create or update files within a resource's directory.
    • FiveM Documentation
  18. GetGameName

    • Description: Retrieves the name of the game currently being played on the server.
    • FiveM Documentation
  19. GetGameBuildNumber

    • Description: Retrieves the build number of the game currently being played on the server.
    • FiveM Documentation
  20. GetCurrentResourceName

  21. PerformHttpRequest

    • Description: Performs an HTTP request from the server to a specified URL. This function allows you to make HTTP requests and handle the response.
    • FiveM Documentation
  22. DeleteFunctionReference

    • Description: Deletes a reference to a specific function. This function is used to remove function references created with DuplicateFunctionReference.
    • FiveM Documentation
  23. DeleteResourceKvp

    • Description: Deletes a key-value pair associated with a resource. This function removes a KVP (Key-Value Pair) associated with the current resource.
    • FiveM Documentation
  24. DeleteResourceKvpNoSync

    • Description: Deletes a key-value pair associated with a resource without synchronizing it across the network.
    • FiveM Documentation
  25. DuplicateFunctionReference

    • Description: Creates a duplicate reference to a specified function. This function is used to duplicate function references and store them for later use.
    • FiveM Documentation
  26. EnableEnhancedHostSupport

    • Description: Enables enhanced host support for the server. This function allows for enhanced support for certain host features.
    • FiveM Documentation
  27. ExecuteCommand

    • Description: Executes a console command on the server. Use this function to execute server-side console commands.
    • FiveM Documentation
  28. FlushResourceKvp

    • Description: Flushes all key-value pairs associated with the current resource. This function removes all KVPs associated with the resource.
    • FiveM Documentation
  29. GetHashKey

    • Description: Retrieves the hash value for a string. This function calculates a hash value for the input string.
    • FiveM Documentation
  30. GetHostId

    • Description: Retrieves the host identifier of the server. This function returns the host ID of the server.
    • FiveM Documentation
  31. GetNumResources

    • Description: Retrieves the number of loaded resources on the server. This function returns the total number of loaded resources.
    • FiveM Documentation
  32. GetPasswordHash

    • Description: Retrieves the hashed password of a player using their server ID.
    • FiveM Documentation
  33. GetPlayerEndpoint

  34. GetPlayerIdentifier

    • Description: Retrieves a player's identifier (license, steam, ip, etc.) based on their server ID.
    • FiveM Documentation
  35. GetNumPlayerIdentifiers

    • Description: Retrieves the number of identifiers associated with a player.
    • FiveM Documentation
  36. GetNumPlayerIndices

  37. GetNumPlayerTokens

    • Description: Retrieves the number of player tokens (server ID) on the server.
    • FiveM Documentation
  38. GetNumResourceMetadata

  39. GetPlayerName

  40. GetPlayerToken

    • Description: Retrieves a player's token (server ID) based on their server ID.
    • FiveM Documentation
  41. GetResourcePath

  42. LoadPlayerCommerceData

  43. LoadPlayerCommerceDataExt

  44. LoadResourceFile

    • Description: Loads a file from a resource and returns its contents as a string.
    • FiveM Documentation
  45. NetworkGetEntityFromNetworkId

    • Description: Retrieves an entity (object or ped) based on its network ID.
    • FiveM Documentation
  46. NetworkGetEntityOwner

    • Description: Retrieves the owner (player) of a networked entity (object or ped).
    • FiveM Documentation
  47. NetworkGetFirstEntityOwner

    • Description: Retrieves the owner (player) of the first networked entity (object or ped) found.
    • FiveM Documentation
  48. NetworkGetNetworkIdFromEntity

    • Description: Retrieves the network ID of a networked entity (object or ped).
    • FiveM Documentation
  49. NetworkGetVoiceProximityOverride

  50. RegisterConsoleListener

  51. RegisterResourceAsset

❀ Contribute

Contributions to the Banks Data World Wide project are welcome! Follow these steps to contribute:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix.
  3. Make your changes and test thoroughly.
  4. Create a pull request with a clear description of your changes.

πŸ“ž Contact

  • Open an Issue: If you encounter a technical issue or have a specific request related to the project.
  • Compliance and Problem Reporting: For compliance-related matters or to report any problems contact via Email: [email protected].
  • Discord Community: Join M3LM Games vibrant Discord community for chatting with fellow contributors, planning and showcasing your achievements, and inquiring.

License

MIT

Disclaimer and Limitations

  • This project, Lua FiveM Malware Guard, is intended solely for educational and informational purposes. It is designed to provide a better understanding of potential security vulnerabilities within the FiveM platform and to help prevent the misuse of certain functions. The project's creators and contributors do not endorse or encourage any illegal or unethical activities, including but not limited to hacking, cheating, or any actions that violate the terms of service of the FiveM platform or the Laws.

  • Users of this project are responsible for their own actions and are expected to adhere to all applicable laws and regulations. The project's creators and contributors are not responsible for any misuse, harm, or legal consequences resulting from the use of this project.

  • It is essential to use this project responsibly and ethically, respecting the rules and policies of the FiveM platform and any relevant local, state, or federal laws. If you choose to use this project, you do so at your own risk, and the project's creators and contributors shall not be held liable for any actions or consequences arising from its use.

  • By using this project, you acknowledge and agree to the terms of this disclaimer. If you do not agree with these terms, you should refrain from using or contributing to this project.

About

Lua FiveM Malware Guard: A powerful resources extension for FiveM servers owners to enhance server security by preventing unauthorized Lua functions, managing resource permissions, and receiving real-time alerts via Discord webhooks.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages