Raised This Month: $ Target: $400
 0% 

[TF2/Any?] UGC Blocker


Post New Thread Reply   
 
Thread Tools Display Modes
Author
reBane
Senior Member
Join Date: May 2020
Plugin ID:
8002
Plugin Version:
22w38a
Plugin Category:
Server Management
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    10 
    Plugin Description:
    Block sprays and other ugc until players are trusted
    Old 03-12-2022 , 07:39   [TF2/Any?] UGC Blocker
    Reply With Quote #1

    UGC Blocker

    User Generated Content (UGC) can become a concern for server owners if bad actors decide to show up.

    This can include bad language in chat, on items names and item descriptions as well has NSFW / illegal imagery for custom decals and sprays.

    While this plugin was originally written for TF2, I hope I changed it enough so it should work for other games as well.

    Features
    • Restrict usage of sprays, jingles (TF2: decals, item names and descriptions) based on TrustFactor
    • Log files uploaded from clients
    • Scan uploaded files for fake AV triggers (and ban on detection)
    • Ingame commands to forward and backwards look-up of filenames for a players spray/jingle
    • Late download sprays if initially blocked due to permission granted later
    Config

    This plugin allows you to control when players are able to use custom decals, item names, descriptions and sprays through the following convars.

    sm_ugc_disable_decal "0"
    Always block items with custom decals

    sm_ugc_disable_description "0"
    Always block items with custom descriptions

    sm_ugc_disable_name "0"
    Always block items with custom names

    sm_ugc_disable_spray "0"
    Always block players from using sprays

    sm_ugc_disable_jingle "0"
    Always block players from using jingles ('sound sprays')

    sm_ugc_trust_decal "*3"
    TrustFlags required to allow items with custom decals, empty to always allow

    sm_ugc_trust_description "*3"
    TrustFlags required to allow items with custom descriptions, empty to always allow

    sm_ugc_trust_name "*3"
    TrustFlags required to allow items with custom names, empty to always allow

    sm_ugc_trust_spray "*3"
    TrustFlags required to allow sprays, empty to always allow

    sm_ugc_trust_jingle "*3"
    TrustFlags required to allow jingles, empty to always allow

    sm_ugc_log_uploads "*3"
    Log all client file uploads to user_custom_received.log

    Some malicious spray files were used to trip false positives in client anti-virus
    Spray Exploit Fixer catches this and I recommend you use that plugin.

    Items that do not pass the filters will currently just be removed from the player.
    In case of weapons i might look into using TF2 Gimme or TF2 Items to generate and re-equip "clean" versions.

    User custom files will still upload to the server, but the download is limited:
    If a client connects while a spray or jingle is blocked, that file should no longer download to other clients.
    In case sprays or jingles get blocked after they join, no new clients will receive the files, and the action should
    be blocked from being executed.
    Getting permission to use sprays or jingles after being in the server for some seconds will not send the files
    to other clients. The player should reconnect in this case to trigger the download.

    Commands

    The logs can also be checked directly from the server with the command sm_ugclookup or sm_ugclookuplogs.
    Both commands require the Kick flag by default and the former tried to check online players first.

    Arguments is a player name, SteamID or a filename. If an online player is found, it will return their current
    spray and jingle file as well as the types of UGC they can currently use. Otherwise the log will be scanned through
    and the last up to 50 entries will be dumped to your console, including the timestamp.

    The command sm_ugcscanusercustom requires the root admin flag and will scan all files in /download/user_custom
    for suspicious content, as if just uploaded. Depending on how often you clean that directory, this might take some
    time. This command will not ban players, but it will still report any files it found.

    Dependencies

    Dependencies that do not apply to your game should only be required for compilation.
    • This plugin requires TF2 Attributes to check if an items has a custom name/description/decal.
      I'm using nosoops fork, but FlamingSarges original might work as well. In any case Version 1.3.2 or above is required.
    • TrustFactor is required to check players trustworthiness.
    • For late downloading / invisible spray fix install one of these (optional). While FNM is more geared towards single player transfers, both
      plugins seem fit for the job, and should work. Without this, it might take a map change after another player joins before they receive that
      players spray/jingle file.

    __________________
    Plugins & LibrariesListing GitHubDosMike Tools ▶ ToDo

    Last edited by reBane; 09-22-2022 at 11:41. Reason: Update to 22w38a
    reBane is offline
    Sreaper
    髪を用心
    Join Date: Nov 2009
    Old 03-12-2022 , 14:41   Re: [TF2/Any?] UGC Blocker
    Reply With Quote #2

    Hi reBane. Thanks for the plugin! Would you mind going over the differences between yours and silvers release?

    https://forums.alliedmods.net/showthread.php?t=323447

    Are there any benefits to using yours over his? Are there more or less false positives?

    Last edited by Sreaper; 03-12-2022 at 14:41.
    Sreaper is offline
    reBane
    Senior Member
    Join Date: May 2020
    Old 03-12-2022 , 16:50   Re: [TF2/Any?] UGC Blocker
    Reply With Quote #3

    The main purpose of my plugin is not to (crash)fix sprays.
    On our server we had malicious actors spray illegal nsfw material over multiple alts. The main purpose of this plugin is to slow that down by requiring certain trust factors before permitting user generated content; but still allow sprays for most players like regulars, donors, etc.

    The file scan was just a bonus after someone joined with one of those av scare sprays (Triggering AV detection, not crashing the client).
    I can't really speak for the failure rate of my scan, but for my test the triggering spray was detected, all other sprays on the server were correctly maked clean.
    __________________
    Plugins & LibrariesListing GitHubDosMike Tools ▶ ToDo

    Last edited by reBane; 03-12-2022 at 16:51.
    reBane is offline
    Sreaper
    髪を用心
    Join Date: Nov 2009
    Old 03-13-2022 , 03:17   Re: [TF2/Any?] UGC Blocker
    Reply With Quote #4

    I'd like to try this out and see how the results differ from Silver's plugin. Would you be able to make the trust factor plugin and it's features optional using #tryinclude?

    While your trust system seems neat, it's a bit outside the scope of my specific needs.

    Last edited by Sreaper; 03-13-2022 at 18:49.
    Sreaper is offline
    reBane
    Senior Member
    Join Date: May 2020
    Old 03-17-2022 , 09:25   Re: [TF2/Any?] UGC Blocker
    Reply With Quote #5

    Update to 22w11a
    - The plugin will now also compile without TrustFactos, in case someone just wants the blocking / other functionallity.
    Pick the normal smx if you want to use TrustFactos, or the _notrustfactors.smx version if you don't.
    __________________
    Plugins & LibrariesListing GitHubDosMike Tools ▶ ToDo
    reBane is offline
    reBane
    Senior Member
    Join Date: May 2020
    Old 09-14-2022 , 13:39   Re: [TF2/Any?] UGC Blocker
    Reply With Quote #6

    Update to 22w37a
    - Reworked file logging to be less verbose
    - Fixed ugc lookup command not working quite right
    - Added SourceBans flags support
    - Improved chat handling by reaction to "disabled"
    - Please build the Non-TrustFactors version yourself if you need it
    __________________
    Plugins & LibrariesListing GitHubDosMike Tools ▶ ToDo
    reBane is offline
    reBane
    Senior Member
    Join Date: May 2020
    Old 09-22-2022 , 11:41   Re: [TF2/Any?] UGC Blocker
    Reply With Quote #7

    Update to 22w38a
    - Sprays and jingles are no longer logged for bots
    __________________
    Plugins & LibrariesListing GitHubDosMike Tools ▶ ToDo
    reBane is offline
    Reply


    Thread Tools
    Display Modes

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 03:11.


    Powered by vBulletin®
    Copyright ©2000 - 2024, vBulletin Solutions, Inc.
    Theme made by Freecode