摘要: 源码:(因为比赛时本地测试,删掉了一段黑名单验证的代码) import uuid from flask import Flask, request, session import json app = Flask(__name__) app.secret_key = str(uuid.uuid4() 阅读全文
posted @ 2023-07-23 15:10 Galio 阅读(31) 评论(0) 推荐(0) 编辑
摘要: 首先看一下md5截断: substr(md5(captcha), -6, 6) == "4c3d26",表示从字符串倒数第6位开始,往后截取6位 captcha是验证码的意思,一般是数字,所以可以直接爆破数字 import hashlib for i in range(1000000): if ha 阅读全文
posted @ 2023-07-17 23:41 Galio 阅读(85) 评论(0) 推荐(0) 编辑
摘要: 点进去就是一个代码审计: <?php highlight_file(__FILE__); $url = 'http://back-end:3000/flag?'; $input = file_get_contents('php://input'); $headers = (array)json_de 阅读全文
posted @ 2023-07-08 09:50 Galio 阅读(600) 评论(0) 推荐(0) 编辑
摘要: 这道题考的是undefsafe函数导致的原型链污染。 源码: var express = require('express'); var path = require('path'); const undefsafe = require('undefsafe'); const { exec } = 阅读全文
posted @ 2023-07-06 11:12 Galio 阅读(52) 评论(0) 推荐(0) 编辑
摘要: 根据指引拿到源码,之前访问网页拿到的源码是无缩进的,我还以为是出题人故意这样,后来才知道view-source一下能看到有缩进的源代码。 #!/usr/bin/python3.6 import os import pickle from base64 import b64decode from fl 阅读全文
posted @ 2023-07-05 11:42 Galio 阅读(56) 评论(0) 推荐(0) 编辑
摘要: 是一个jinjia2的模板渲染,之前知道的命令执行类只有一个os._wrap_.close,这次用__subclasses__()列出来所有子类后,查找并没有发现os._wrap_.close类,其实除了os._wrap._close类,还有很多其他可用的命令执行类: 可以命令执行的类有6个 sit 阅读全文
posted @ 2023-06-30 15:37 Galio 阅读(23) 评论(0) 推荐(0) 编辑
摘要: 源码: @app.route('/getUrl', methods=['GET', 'POST']) def getUrl(): url = request.args.get("url") #获取url host = parse.urlparse(url).hostname #获取主机名例如:htt 阅读全文
posted @ 2023-06-27 16:05 Galio 阅读(21) 评论(0) 推荐(0) 编辑
摘要: 目标类:os._wrap_close #引入html模块用于处理html转义字符 import requests,html,re url='target url' # 设置请求头 headers = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win6 阅读全文
posted @ 2023-06-17 19:46 Galio 阅读(7) 评论(0) 推荐(0) 编辑
摘要: 当时做的时候没想到这道题考的是XSS,归结原因在于对nodejs的代码不熟悉。先上源码: bot.js源码就不放了,主要功能概括一下就是点击用户提交的链接,把flag放到cookie里传过去,很容易联想到靶机出网,用buurequestbin接收。 index.js: const fs = requ 阅读全文
posted @ 2023-03-21 20:47 Galio 阅读(104) 评论(0) 推荐(0) 编辑
摘要: 拿到源码,是一个node.js写的后端,源码如下: app.js: var express = require('express'); var bodyParser = require('body-parser') const crypto = require("crypto"); var path 阅读全文
posted @ 2023-03-14 19:23 Galio 阅读(349) 评论(0) 推荐(0) 编辑