当前位置:网站首页>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脚本即可,如图:
直接可以得到最终答案。
边栏推荐
- 使用 Zokrates 在 BSV 上创建您的第一个 zkSNARK 证明
- 第3讲:MySQL数据库中常见的几种表字段数据类型
- 论文解读(GSAT)《Interpretable and Generalizable Graph Learning via Stochastic Attention Mechanism》
- [Niu Ke brush questions-SQL big factory interview questions] NO4. Travel scene (a taxi)
- 企业公众号文章写作方向:如何写出读者认可的优质内容
- 教你VSCode如何快速对齐代码、格式化代码
- The thing about npm
- [ASM] Bytecode Operation MethodWriter
- long investment career
- kubernetes CoreDNS全解析
猜你喜欢
基于php在线音乐网站管理系统获取(php毕业设计)
Raspberry Pi information display small screen, display time, IP address, CPU information, memory information (C language), four-wire i2c communication, 0.96-inch oled screen
number of solutions to solve a multivariate multi-degree equation
Kubernetes Scheduler全解析
LeetCode952三部曲之一:解题思路和初级解法(137ms,超39%)
Based on php hotel online reservation management system acquisition (php graduation project)
Based on php tourism website management system acquisition (php graduation design)
AI应用第一课:支付宝刷脸登录
迁移学习——Discriminative Transfer Subspace Learning via Low-Rank and Sparse Representation
render-props和高阶组件
随机推荐
No more rolls!After joining ByteDance for a week, he ran decisively.
小程序--独立分包&分包预下载
render-props和高阶组件
dvwa 通关记录1 - 暴力破解 Brute Force
0DFS Medium LeetCode6134. Find the closest node to the given two nodes
Pagoda application experience
感觉自己好傻
Implementation principle of VGUgarbage collector (garbage collector)
Based on php hotel online reservation management system acquisition (php graduation project)
Shell programming conditional statement
基于 OData 模型和 JSON 模型的 SAP UI5 表格控件行项目的添加和删除实现
How to prevent governance attacks in DAOs?
SAP Spartacus Accessibility E2E 端到端测试
【C语言实现】最大公约数的3种求法
企业公众号文章写作方向:如何写出读者认可的优质内容
familiar friend
SOM网络1:原理讲解
shell specification and variables
Uses of Anacoda
漫长的投资生涯