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

SM Addadmin


Post New Thread Reply   
 
Thread Tools Display Modes
el hippo
Member
Join Date: Jan 2006
Location: Texas
Old 07-30-2007 , 01:09   Re: SM Addadmin - SERIOUS SECURITY FLAW
Reply With Quote #11

There is a serious security flaw in this plugin where any player can use sm_addadmin to add anyone as an admin. The 4-ish servers running this server need to fix or remove the plugin from their server.

The line:
Code:
RegConsoleCmd("sm_addadmin", Command_AddAdmin, "Adds an admin to admins_simple.ini", ADMFLAG_RCON);
Does not actually check for admin access. The flag in the RegConsoleCmd is a command creation flag, not an access flag.

Therefore you will need to switch to RegAdminCmd or implement flag checking within your function.

Fix (I have actually never used SourceMod before so this may be flawed):
Code:
RegAdminCmd("sm_addadmin", Command_AddAdmin, ADMFLAG_RCON, "Adds an admin to admins_simple.ini");
Hippo
__________________

Last edited by el hippo; 07-30-2007 at 01:14.
el hippo is offline
imported_Anth0ny
Senior Member
Join Date: Jan 2005
Location: Saturn
Old 07-30-2007 , 04:33   Re: SM Addadmin
Reply With Quote #12

useful plugin, thanks! =)
question: how can we use an admins.cfg instead admins_simple.ini?
__________________
aka Mad.Eagle
Creator\Owner\Admin of
www.megatron.ws
imported_Anth0ny is offline
Send a message via ICQ to imported_Anth0ny
mateo10
Veteran Member
Join Date: Jan 2006
Old 08-16-2007 , 11:53   Re: SM Addadmin
Reply With Quote #13

Updated and I think the security risk is removed with the update.
mateo10 is offline
Pietje
Member
Join Date: Oct 2007
Old 10-13-2007 , 04:15   Re: SM Addadmin
Reply With Quote #14

Is it possible to instead of using the admins_simple.txt u can set it so the admins with root acces can add a guy to a group so u would get admins with the same flags??
Pietje is offline
genipalla
Member
Join Date: Feb 2007
Location: Albania
Old 04-26-2008 , 15:55   Re: SM Addadmin
Reply With Quote #15

Quote:
Originally Posted by pRED* View Post
You can't remove lines from a file..

Best thing to do is open the file for reading, open another file for writing (say called admins_simple2.txt) then read a line from one and write it into the other. Once you get to the line you want to delete, skip the writing step.

Once your finished close both files, delete admins_simple.txt and rename admins_simple2.txt to admins_simple.txt
instead of removing the files why not just re-edit the admin_simple.txt and put // in front of the admin that you want to remove?

also to reduce the security issue of the plugin i think that it should be run on a username and password.
For example:
the only way to access this plugin you must enter a given username and password.

these are just ideas that im throwin out here. ill try and script it.
__________________

CS SOURCE
genipalla is offline
SixSicSix
Senior Member
Join Date: Jan 2008
Old 04-29-2008 , 19:03   Re: SM Addadmin
Reply With Quote #16

This plugin doesn't really work, sadly :\

It would be nice to integrate it into the admin menu with nested menus and flag on/off switches, as well as add by steam ID

Last edited by SixSicSix; 04-29-2008 at 19:14.
SixSicSix is offline
<SK> LittleD
New Member
Join Date: Jun 2008
Old 06-15-2008 , 19:52   Re: SM Addadmin
Reply With Quote #17

i am having a problem with my admins i did all this and restarted the server
and i told them to bind a key and they all are saying that is says unable to run command
help
<SK> LittleD is offline
chief2493
Member
Join Date: Apr 2008
Location: Mitchell, Indiana (USA)
Old 10-24-2008 , 14:44   Re: SM Addadmin
Reply With Quote #18

Is there any way you could modify this to write to other admin files not just sourcemod admin files?? as in I run sourceop on my server and i have to go into the server files to add a new admin, and it can be a real hassle, you would probably have to make it so that it adds like 1 line at a time and the person using it would have to do like sm_edit <file name> <line # (could put in last to make a new line after the last line)> <text to add>
chief2493 is offline
Send a message via MSN to chief2493 Send a message via Skype™ to chief2493
ChillyWI
Senior Member
Join Date: Aug 2008
Old 10-24-2008 , 17:01   Re: SM Addadmin
Reply With Quote #19

If someone does work on this, I'd like to see the ability to add the player to a group instead of just setting flags. We have immunity levels and flags set for each group, so it would simplify things a bit.
ChillyWI is offline
mikkelmaj
Member
Join Date: Apr 2008
Old 12-04-2008 , 03:24   Re: SM Addadmin
Reply With Quote #20

Hmm i may change a little befor i can use it
mikkelmaj 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 19:16.


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