Raised This Month: $51 Target: $400
 12% 

[ANY] Fake VAC Ban


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Brrdy
Senior Member
Join Date: Feb 2015
Plugin ID:
4539
Plugin Version:
1.0.2
Plugin Category:
Fun Stuff
Plugin Game:
Counter-Strike: GO
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Makes the VAC message appear and kicks the player for being untrusted.
    Old 03-05-2015 , 16:34   [ANY] Fake VAC Ban
    Reply With Quote #1

    FakeVAC by Brrdy

    Features:
    Releases a fake VAC message acting as if the person got banned

    Commands:
    fv_kick
    Usage: fv_kick <player>
    fv_version

    Changelog:
    Quote:
    2015-03-05 (v0.0)

    * Initial Release

    2015-04-05 (v1.0.2)

    * Update plugin fixing bugs mentioned below Thanks Mitchell.
    *Fixed double letters I think.....
    Off-Topic: Thanks r3dw3r3w0lf for posting a fix while I was away ^_^ I haven't looked at your code but I have a feeling it works as you seem more experienced than me
    Attached Files
    File Type: sp Get Plugin or Get Source (fakevac1.0.2 (1).sp - 4075 views - 2.3 KB)

    Last edited by Brrdy; 03-07-2015 at 10:08. Reason: Updated plugin & Fixed injection
    Brrdy is offline
    Mitchell
    ~lick~
    Join Date: Mar 2010
    Old 03-05-2015 , 17:02   Re: Fake VAC Ban
    Reply With Quote #2

    Things wrong:
    No version cvar, in fact some may argue that version 0.0.0 isn't a valid version, as that means there was no release, but you are releasing it right now...
    For some reason you require an include for one print to chat message, which could just use the corresponding \x07 color.
    You include <cstrike> and dont use it.
    You include clientprefs and dont use that either.
    You include sdkhooks for no reason.
    You shouldn't even need sdktools either... especially including it twice, jesus.
    YES BY ALL MEANS KICK A CLIENT BY NAME. You should never need to use ServerCommand to fire a SM command. KickClient() would work just fine, and wouldnt fire the "[SM]" logged command.
    Why does the player have to be alive to target him?

    Last edited by Mitchell; 03-05-2015 at 17:03.
    Mitchell is offline
    WildCard65
    Veteran Member
    Join Date: Aug 2013
    Location: Canada
    Old 03-05-2015 , 20:15   Re: Fake VAC Ban
    Reply With Quote #3

    Read about SQL injection to learn why passing client names to ServerCommand IS A VERY BAD IDEA!
    __________________
    WildCard65 is offline
    Brrdy
    Senior Member
    Join Date: Feb 2015
    Old 03-05-2015 , 20:35   Re: Fake VAC Ban
    Reply With Quote #4

    Quote:
    Originally Posted by Mitchell View Post
    Things wrong:
    No version cvar, in fact some may argue that version 0.0.0 isn't a valid version, as that means there was no release, but you are releasing it right now...
    For some reason you require an include for one print to chat message, which could just use the corresponding \x07 color.
    You include <cstrike> and dont use it.
    You include clientprefs and dont use that either.
    You include sdkhooks for no reason.
    You shouldn't even need sdktools either... especially including it twice, jesus.
    YES BY ALL MEANS KICK A CLIENT BY NAME. You should never need to use ServerCommand to fire a SM command. KickClient() would work just fine, and wouldnt fire the "[SM]" logged command.
    Why does the player have to be alive to target him?
    Ill clean it up in a bit ^_^ this is just a beta
    Brrdy is offline
    WildCard65
    Veteran Member
    Join Date: Aug 2013
    Location: Canada
    Old 03-05-2015 , 20:38   Re: Fake VAC Ban
    Reply With Quote #5

    Quote:
    Originally Posted by Brrdy View Post
    Ill clean it up in a bit ^_^ this is just a beta
    ya, atm I would recommend pushing a hotfix to the whole servercommand thing as it put servers that decide to use this plugin at risk of command injection. I would recommend IMMEDIATELY change from using servercommand to kickclient as sm_kick uses that native.

    Edit: Example of command injection with your plugin: sm_fakevac lol;quit would turn into this: sm_kick lol;quit which in turn turns into these commands(as ; in source is a delimeter to serperate commands in console which is where servercommand executes things): sm_kick lol then it runs quit
    Quit in a server console shuts the server down.

    Edit2: Your using an indeterminate loop to do a what for can do(which for is determinate)
    __________________

    Last edited by WildCard65; 03-05-2015 at 20:53.
    WildCard65 is offline
    Darkness_
    Veteran Member
    Join Date: Nov 2014
    Old 03-05-2015 , 20:52   Re: Fake VAC Ban
    Reply With Quote #6

    PHP Code:
    ServerCommand("sm_kick %N"target_list[i]); 
    to
    PHP Code:
    KickClient(target_list[i], "kick reason); 
    Darkness_ is offline
    Brrdy
    Senior Member
    Join Date: Feb 2015
    Old 03-05-2015 , 21:23   Re: Fake VAC Ban
    Reply With Quote #7

    Quote:
    Originally Posted by WildCard65 View Post
    ya, atm I would recommend pushing a hotfix to the whole servercommand thing as it put servers that decide to use this plugin at risk of command injection. I would recommend IMMEDIATELY change from using servercommand to kickclient as sm_kick uses that native.

    Edit: Example of command injection with your plugin: sm_fakevac lol;quit would turn into this: sm_kick lol;quit which in turn turns into these commands(as ; in source is a delimeter to serperate commands in console which is where servercommand executes things): sm_kick lol then it runs quit
    Quit in a server console shuts the server down.

    Edit2: Your using an indeterminate loop to do a what for can do(which for is determinate)
    Only admins can run the cmd but anyways when I tried using KickClient it wouldn't work idk why but Ill try it again in a bit not on pc atm
    Brrdy is offline
    Mitchell
    ~lick~
    Join Date: Mar 2010
    Old 03-05-2015 , 22:03   Re: Fake VAC Ban
    Reply With Quote #8

    Quote:
    Originally Posted by Brrdy View Post
    Only admins can run the cmd but anyways when I tried using KickClient it wouldn't work idk why but Ill try it again in a bit not on pc atm
    It wouldnt matter if only an admin can run it, what if you did the command on a player with the name "baddie;rcon_password hi" the server command will do
    ServerCommand("sm_kick baddie;rcon_password hi"), setting the server's rcon_password to what ever he wants.
    Mitchell is offline
    Drixevel
    AlliedModders Donor
    Join Date: Sep 2009
    Location: Somewhere headbangin'
    Old 03-06-2015 , 02:50   Re: Fake VAC Ban
    Reply With Quote #9

    For those wanting a cleaned up version with the exploit fixed, download the following version:
    Attached Files
    File Type: sp Get Plugin or Get Source (fakevac.sp - 2959 views - 1.4 KB)

    Last edited by Drixevel; 03-06-2015 at 02:53.
    Drixevel is offline
    Pohearts
    AlliedModders Donor
    Join Date: Oct 2014
    Location: Hong Kong
    Old 03-06-2015 , 06:15   Re: Fake VAC Ban
    Reply With Quote #10

    looks like c+p code..

    also, shouldn't you use \x07 instead of {red} so it require less dependency for such a simple plugin?
    __________________
    HoursPlayed.net / Next Level Gaming network

    Last edited by Pohearts; 03-06-2015 at 06:19.
    Pohearts is offline
    Reply



    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 13:14.


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