当前位置:网站首页>Document contains & conditional competition
Document contains & conditional competition
2022-06-30 20:25:00 【Whoa, whoa, whoa, whoa, whoa, whoa】
session.upload_progress
And open_basedir、allow_url_fopen、allow_url_include etc. PHP The configuration is the same ,session.upload_progress It's also PHP A function of , You can also php.ini Set related properties in . Some of the most important settings are as follows :
session.upload_progress.enabled = on
session.upload_progress.cleanup =on
session.upload_progress.prefix = “upload_progress_”
session.upload_progress.name = “PHP_SESSION_UPLOAD_PROGRESS”
session.upload_progress.enabled Can control whether to turn on session.upload_progress function
session.upload_progress.cleanup You can control whether to delete the file content after uploading
session.upload_progress.prefix You can set the prefix of the uploaded file content
session.upload_progress.name The value is session Key value in
take session.upload_progress.enabled Is set to on when , At this point, when we upload a file to the server ,PHP The details of the file will be ( Such as upload time 、 Upload progress, etc ) Stored in session among .
Then there will be a precondition at this time , Is how to initialize session And the session Write the contents in the file ?
It can be noted that ,php.ini in session.use_strict_mode The default is 0, In this case , Users can define their own sessionid, For example, when the user is cookie Set in sessionid=Lxxx when ,PHP It will generate a file /tmp/sess_Lxxx, At this time, it is initialized session, And the uploaded file information will be written to the file /tmp/sess_Lxxx In the middle
When session.upload_progress.cleanup The value of is on when , Even uploading files , But after uploading, the contents of the file will be cleared , What should I do ?
This time can be used Python The multithreading , Compete conditionally .
utilize session.upload_progress Conduct RCE
One :
adopt session_start() Ability to open session, Well, if not session_start() Isn't this posture useless . Here we will learn about a new configuration :session.use_strict_mode
This configuration item is not enabled by default , This means you can define session id, For example, I set... In the request package Cookie by PHPSESSID=haha, Then it will generate a sess_haha Of session file , here php Will be initialized automatically session, And generate a key value , The format is... In the configuration file session.upload_progress.prefix Value + Incoming session.upload_progress.name Value , The key value will be written to session file . According to the relevant configuration written above , The format of the key value should be :upload_progress_+PHP_SESSION_UPLOAD_PROGRESS Value .
Two :
because session.upload_progress.cleanup On by default , This leads to the end of the upload ,session Information about the upload progress in the file will be deleted immediately , So how can we include malicious code :
This problem can be solved by conditional competition , Use burp or python The script keeps sending upload packets , Then send the packets contained in the file in the same way , Can be included
边栏推荐
猜你喜欢

Halcon知识:盘点一下计量对象【1】

【450. 删除二叉搜索树中的节点】

操作系统面试题汇总(不定期更新)

如何做好测试用例设计

计网 | 【五 传输层、六 应用层】知识点及例题

Enterprise middle office planning and it architecture microservice transformation

神经网络入门(上)

25:第三章:开发通行证服务:8:【注册/登录】接口:接收并校验“手机号和验证码”参数;(重点需要知道【利用redis来暂存数据,获取数据的】的应用场景)(使用到了【@Valid注解】参数校验)

NLP技能树学习路线-(一)路线总览

Great God detailed open source Buff gain Introduction 丨 Live
随机推荐
Description of the latest RTSP address rules for Hikvision camera, NVR, streaming media server, playback and streaming [easy to understand]
新出生的机器狗,打滚1小时后自己掌握走路,吴恩达开山大弟子最新成果
Is it safe to open an account for online stock trading!?
好高的佣金,《新程序员》合伙人计划来袭,人人皆可参与
obsidian配合hugo的使用,让markdown本地编辑软件与在线化无缝衔接
Data intelligence - dtcc2022! China database technology conference is about to open
Is it safe to open an account in Guangzhou stock exchange by mobile phone?
Enterprise middle office planning and it architecture microservice transformation
[ICLR 2021] semi supervised object detection: unbiased teacher for semi supervised object detection
Qt:qaxobject operation Excel
Taihu Lake "China's healthy agricultural products · mobile phone live broadcast" enters Taihu Lake
计网 | 【五 传输层、六 应用层】知识点及例题
Lambda 表达式原理分析学习(2022.06.23)
Informatics Olympiad 1362: family problems
DEX file parsing - Method_ IDS resolution
暑期实训21组第一周个人工作总结
pytorch实现FLOPs和Params的计算
杰理之用测试盒配对软件修改注意点【篇】
Introduction to neural network (Part 1)
Basic syntax of VB