PolarCTF靶场[web]file、ezphp WP

[WEB]file

知识点:文件上传漏洞

工具:Burp Suite、dirsearch

方法一:

 根据页面提示,先用dirsearch工具扫一扫

访问/upload.php,发现一个上传区

在访问/uploaded/,再点击Parent Directory,发现链接到首页,盲猜是一个上传示例

 在上传区,上传图片,访问/uploaded/猜测正确

再上传区上传一句话木马

 发现没有返回页面,访问/uploaded,发现没有上传成功

说明上传不了php文件,那就将其后缀改为jpg,再进行抓包上传,将jpg改为php,点击放行

 再次访问/uploaded/,发现上传成功

 

 用蚁剑连接根目录下flag

 方法二:

在首页【点我开始】这个按钮跳不进去

 更改button的disabled属性,也就是把disabled属性删掉

在此点击【点我开始】按钮即可跳转到/upload.php后续操作如方法一同理

[WEB]ezphp

知识点:文件包含、文件上传漏洞

工具:Burp Suite、御剑、dirsearch

方法一:

访问网址,“爬虫”想到robots.txt特殊敏感文件

访问robots.xt

 得到三个子域

一个一个访问

发现/file里的/flie.php用来文件包含

 /uploads里的upload.php用来上传

/uploads里的images用来储存,查看是否成功上传文件

 文件包含:

/file/file.php?filename=文件路径+文件名

 在上传区/upload.php上传一句话木马

发现不能上传php文件,图片是可以成功上传的

将文件后缀改为jpg,使用抓包上传,后缀改为php

 还是显示不能上传该文件

所以我们上传一句话木马图片再次尝试 

 

 点进去也有回显

用蚁剑进行连接

=../uploads/images/2.jpg

 

添加数据之后,这flag真的让我好找🙄,最终在home/webuser/下

 方法二: 

要是实在不了解robots.txt可以直接无脑用御剑或者dirsearch工具扫,扫到之后一个一个进行查看,以下操作也是和方法一同理哦

### PolarCTF Easy Shellcode Challenge Walkthrough In the context of CTF challenges, particularly within PolarCTF’s Easy Shellcode challenge, participants are often tasked with crafting a simple shellcode that performs specific actions without using certain characters or instructions to increase difficulty[^1]. The goal typically involves creating an executable code snippet that can bypass restrictions and achieve objectives such as spawning a shell. For this particular challenge, contestants need to understand assembly language fundamentals along with how operating systems handle memory execution permissions. A common approach is to write minimalistic inline assembly codes which avoid bad chars (characters not allowed by filters). This requires deep knowledge about system calls on Linux environments since most challenges occur there[^2]. To solve similar problems effectively: - Study basic principles behind writing position-independent shellcodes. - Learn techniques like encoding payloads to evade detection mechanisms. - Practice debugging skills through tools like GDB for analyzing binary behaviors during runtime. ```nasm section .text global _start _start: xor eax, eax ; Clearing registers push eax ; Push NULL bytes onto stack mov al, 0x6c ; syscall number for execve(/bin/sh) lea ebx, [esp] ; Load address of "/bin//sh" int 0x80 ; Trigger interrupt to invoke kernel function call ``` This example demonstrates part of what might be involved when tackling these types of tasks but should only serve educational purposes rather than being directly applicable due to variations between different instances of challenges[^3].
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

剁椒排骨

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值