当前位置:网站首页>xctf攻防世界 Web高手进阶区 webshell
xctf攻防世界 Web高手进阶区 webshell
2022-08-01 21:59:00 【l8947943】
0x01. 进入环境,查看内容
提示使用webshell
0x02. 问题分析
0x02_1. 什么是webshell
webshell就是以asp、php、jsp或者cgi等网页文件形式存在的一种代码执行环境,主要用于网站管理、服务器管理、权限管理等操作。使用方法简单,只需上传一个代码文件,通过网址访问,便可进行很多日常操作,极大地方便了使用者对网站和服务器的管理。正因如此,也有小部分人将代码修改后当作后门程序使用,以达到控制网站服务器的目的。
0x02_2. 开始解题
我们使用burpsuite进行拦截,送入repeater,如图:
我们在最下面添加shell脚本,注意需要修改三个地方:
- 将传输方式改为POST
- 传输的Content-Type要加上,
Content-Type: application/x-www-form-urlencoded
- 传输shell脚本,
shell=system("find / -name 'flag*'");
如图:
可以看到,返回了内容/var/www/html/flag.txt
。
接着我们查看具体flag内容,使用脚本shell=system("cat /var/www/html/flag.txt");
:如图:
得到最终答案:cyberpeace{f3338db17dcd9233ed4c0685cf6f8c56}
0x03. 解法二
我们可以看看source,如图:
可以看到,该网页已经直接将一句话木马直接上传,那么打开蚁剑直接链接,如图:
连接后查看即可,如图:
0x04. 解法三
直接使用hackbar,post方式传递shell脚本即可,如图:
直接可以得到最终答案。
边栏推荐
- 小程序中的多表联合查询
- 基于php在线音乐网站管理系统获取(php毕业设计)
- NFT的10种实际用途(NFT系统开发)
- 模拟数据之mockjs
- 19 Lectures on Disassembly of Multi-merchant Mall System Functions - Invoice Management on the Platform
- 上传markdown文档到博客园
- RxJs SwitchMapTo 操作符之移花接木
- 熟悉的朋友
- Based on php hotel online reservation management system acquisition (php graduation project)
- 365 days challenge LeetCode1000 questions - Day 046 Generate a string with odd number of each character + add two numbers + valid parentheses
猜你喜欢
随机推荐
不卷了!入职字节跳动一周就果断跑了。
【ASM】字节码操作 MethodWriter
Pagoda application experience
Spark practice questions + answers
shell规范与变量
你居然不懂Bitmap和Drawable? 相关知识大扫盲
越长大越孤单
SQL injection of WEB penetration
Chapter 12, target recognition of digital image processing
No more rolls!After joining ByteDance for a week, he ran decisively.
基于php动漫周边商城管理系统(php毕业设计)
Upload markdown documents to blog garden
微软校园大使喊你来秋招啦!
render-props and higher order components
Spark练习题+答案
递归(各经典例题分析)
企业公众号文章写作方向:如何写出读者认可的优质内容
1. @Component注解的原理剖析
User Experience | How to Measure User Experience?
46.全排列