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

[L4D1] Prevent votekick exploit


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 04-14-2019 , 10:34   [L4D1] Prevent votekick exploit
Reply With Quote #1

Valve has update to L4D2, not backported to L4D1.

Some user can use exploit to force votekick without vote (auto-mark all the checkboxes).

Does someone have this exploit or fix?

Setting a listener to the callvote command with returning Plugin_Stop in a callback does not help.

The black window does not appear (in the usual voting, it is intercepted by my vote plugin via CreateMenu), but the exploit somehow bypasses this restriction and displays such a black window already with marked checkboxes (according to one of the player's explanation).

PHP Code:
public void OnAllPluginsLoaded()
{
    
AddCommandListener(CheckVote"callvote");
}

public 
Action CheckVote(int clientchar[] commandint args)
{
    
char s[MAX_NAME_LENGTH];
    if (
args >= 2) {
        
GetCmdArg(1ssizeof(s));
        if (
StrEqual(s"Kick"false)) {
            
GetCmdArg(2ssizeof(s));
            
int UserId StringToInt(s);
            if (
UserId != 0) {
                
int target GetClientOfUserId(UserId);
                if (
target != && IsClientInGame(target))
                    
StartVoteKickAccessCheck(clienttarget);
            }
            return 
Plugin_Stop;
        }
    }

__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
MasterMind420
BANNED
Join Date: Nov 2010
Old 04-14-2019 , 16:38   Re: [L4D1] Prevent votekick exploit
Reply With Quote #2

hmm im not sure but maybe try monitoring all kicks or disconnects pre....check the reason in player disconnect event. im sure theres a way to fix it.
MasterMind420 is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 04-14-2019 , 17:10   Re: [L4D1] Prevent votekick exploit
Reply With Quote #3

My understanding is that the exploit is that they're using callvote before their client finished connecting. As such, have you considered doing this instead?

PHP Code:
public Action CheckVote(int clientchar[] commandint args
{
    if (!
IsClientConnected(client))
        return 
Plugin_Stop;

Edit: IsClientInGame might work as well
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 04-14-2019 at 17:11.
Powerlord is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 04-30-2019 , 13:04   Re: [L4D1] Prevent votekick exploit
Reply With Quote #4

Sorry with my delay.

I resolved it using private extension "ProcessCmds" provided by my hoster, that blocks "status" cmd, preventing UserId from expose.

Quote:
Originally Posted by MasterMind420
hmm im not sure but maybe try monitoring all kicks or disconnects pre....check the reason in player disconnect event. im sure theres a way to fix it.
Reason?
https://wiki.alliedmods.net/Generic_...yer_disconnect
What should it give to me?
If it is possible to cancel disconnect by passing Plugin_Stop somewhere, so it may make sense. In such case I could cancel it because I surely can check whether kick is initiated by my plugin (in legal way).

Quote:
Originally Posted by Powerlord
My understanding is that the exploit is that they're using callvote before their client finished connecting.
I'm not sure it make sense. If client is even not connected does he have UserId?

Maybe:
Code:
if (!IsClientInGame(client))
        return Plugin_Stop;
?

Anyway thanks for suggestion. I'll add such protection too.
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
MasterMind420
BANNED
Join Date: Nov 2010
Old 04-30-2019 , 13:38   Re: [L4D1] Prevent votekick exploit
Reply With Quote #5

why not just block the callvote kick usermessage....check that players are connected before allowing any kick? assuming whats going on even calls callvote...or use votepass usermessage instead?
MasterMind420 is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 04-30-2019 , 15:44   Re: [L4D1] Prevent votekick exploit
Reply With Quote #6

block usermessage is good idea, thanks.
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
MasterMind420
BANNED
Join Date: Nov 2010
Old 04-30-2019 , 15:55   Re: [L4D1] Prevent votekick exploit
Reply With Quote #7

Quote:
Originally Posted by Dragokas View Post
block usermessage is good idea, thanks.
np...i just started messing with usermessages so...blocking votes that way works rather well.
MasterMind420 is offline
Lux
Veteran Member
Join Date: Jan 2015
Location: Cat
Old 05-02-2019 , 07:13   Re: [L4D1] Prevent votekick exploit
Reply With Quote #8

The "CVoteController" - "vote_controller" entity has some entprops maybe usefull usually where voteissues are stored and exec

Code:
 Member: m_activeIssueIndex (offset 1088) (type integer) (bits 32) ()
 Member: m_onlyTeamToVote (offset 1092) (type integer) (bits 32) ()
 Member: m_votesYes (offset 1096) (type integer) (bits 32) ()
 Member: m_votesNo (offset 1100) (type integer) (bits 32) ()
 Member: m_potentialVotes (offset 1104) (type integer) (bits 32) ()
__________________
Connect
My Plugins: KlickME
[My GitHub]

Commission me for L4D
Lux 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 10:01.


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