当前位置:网站首页>Buuctf questions upload labs record pass-01~pass-10
Buuctf questions upload labs record pass-01~pass-10
2022-07-28 21:06:00 【Goodric】
BUUCTF Problem. Upload-Labs Record pass-01~pass-10
——
pass-01
Front end validation suffix .
Pass on 1.png Bag grabbing 1.php that will do .
Ant Jianlian :http://your-ip/upload/1.php
——
pass-02
verification content-type
Take care of the bag :Content-Type: image/jpeg
Same pass 1.png Bag grabbing 1.php
——
pass-03
Filtration : A lowercase letter , Delete the end point of the file name , Go through the blanks
The blacklist , Upload is not allowed .asp,.aspx,.php,.jsp Suffix file !
php3 ,php4 ,pht ,phtml And so on can be uploaded successfully
The uploaded file name is changed to timestamp
utilize :/upload/202207250818552340.php3, Ant sword connection 
Conditions :
To be in apache Of httpd.conf There is the following configuration code in :AddType application/x-httpd-php .php .phtml .phps .php5 .pht, If it is not configured, it cannot be parsed php5 Code , When you visit, it is a blank page
——
pass-04
Filtration : A lowercase letter , Delete the end point of the file name , Go through the blanks , Remove strings ::$DATA( The files uploaded to the server are in Windows Will be automatically removed from ::$DATA)
I can't use the following question php4 ,pht ,phtml And so on
Through here htaccess file , It can help us realize : Webpage 301 Redirect 、 Customize 404 Error page 、 Change the file extension 、 allow / Block access to specific users or directories 、 List of prohibited directories 、 Configure default documents and other functions .
Set the current directory. All files use PHP analysis , So no matter what file you upload , As long as the contents of the document comply with PHP Language code specification , Will be treated as PHP perform . If not, an error will be reported .
Two files need to be uploaded
One .htaccess file :
Content :
<FilesMatch " The file name of the uploaded picture horse ">
SetHandler application/x-httpd-php
</FilesMatch>

Another picture horse 1.jpg , It is to directly change the suffix of horse passed in the previous questions to .jpg
utilize :/upload/2.jpg
——
pass-05
Filtration : Delete the point at the end of the filename , Remove strings ::$DATA, Head to tail , .htaccess Suffix files are also filtered
The uploaded file name will be modified to timestamp
There is no condition for all file names to be lowercase , Case filtering :.Php
utilize :/upload/202207251044098514.Php
There is a way to say that the fourth level is used to construct suffixes , But it doesn't seem to work here , For example, upload 5.php. .
The file name becomes xxx. ( no suffix )
——
pass-06
Filtration : Delete the point at the end of the filename , Convert to lowercase , Remove strings ::$DATA
Compared with the previous source code , There is no filter of leading and trailing spaces .
So it can be suffixed php Add a space after it “1.php ”
Although it can be uploaded successfully , But it seems that it can't be used , Access has not been php analysis .
——
pass-07
Filtration : Convert to lowercase , Remove strings ::$DATA, Head to tail
Compare to the front , The dot at the end of the file name was not deleted
Upload 7.php.
utilize :/upload/7.php.
——
pass-08
Filtration : Delete the point at the end of the filename , Convert to lowercase , Head to tail
Compared with the previous without removing the string ::$DATA
Upload 8.php::$DATA
Here is linux , No way .
——
pass-09
Filtration : Delete the point at the end of the filename , Convert to lowercase , Remove strings ::$DATA, Head to tail
Pass it online php. .
But there is a problem with the returned file name
Apache/2.4.38 (Debian) Server
apache Parsing vulnerabilities
Pass on .php.jpg
utilize :/upload/2.php.jpg
——
pass-10
str_ireplace($deny_ext,"", $file_name);
Function to replace the matched character with null
Double writing bypasses
Upload .pphphp
utilize :/upload/10.php
——
These are all bypassed by the blacklist , And it is only verified once , So all these levels can be solved with one idea , That's it .php. . Can be like this , But this goes against the mind of the person who created the range , The shooting range is meaningless , Can't play the real role of the shooting range .
边栏推荐
- Dom4J的Bug
- Guo Mingxuan: meta contraction is conducive to the development of VR competitors, and apple XR headshow will change the industry rules
- Random talk on GIS data (VI) - projection coordinate system
- C # basic 5-asynchronous
- 既要便捷、安全+智能,也要颜值,萤石发布北斗星人脸锁DL30F和极光人脸视频锁Y3000FV
- dll反编译(反编译加密dll)
- Space game Lesson 12: shield
- MySQL修改端口号(修改mysql的端口号会有问题吗)
- BUUCTF做题Upload-Labs记录pass-11~pass-20
- Ask if you don't understand, and quickly become an advanced player of container service!
猜你喜欢

The EMC vnx5200 fault light is on, but there is no hardware fault prompt

Guo Mingxuan: meta contraction is conducive to the development of VR competitors, and apple XR headshow will change the industry rules

MoCo V3:视觉自监督迎来Transformer

How do we do full link grayscale on the database?

融合数据库生态:利用 EventBridge 构建 CDC 应用

C language final review questions

Read the recent trends of okaleido tiger and tap the value and potential behind it

既要便捷、安全+智能,也要颜值,萤石发布北斗星人脸锁DL30F和极光人脸视频锁Y3000FV

不懂就问,快速成为容器服务进阶玩家!

【云原生】什么是 CI/CD ? | 摆平交付障碍的 CI/CD
随机推荐
ZCMU--5066: 黑暗长廊
【input 身份证号】星号 代替,input 切割成 多个 小格格(类似)
取色器实战(Qt含源码)
Unity3d tutorial notes - unity initial 03
Meaning of disk status of EMC DataDomain
Two written interview questions about regular
Color finder actual combat (QT including source code)
Introduction to singleton mode
Thinking and summary of R & D Efficiency
How to build internal Wikipedia
Moco V2: further upgrade of Moco series
Unity foundation 5-optimization strategy
Baklib|为什么说企业需要重视客户体验?
Unity knowledge points summary (1)
Confusing knowledge points of software designer examination
九鑫智能正式加入openGauss社区
【TiDB】txt文档导入数据库,这样做真的很高效
图书馆借阅系统「建议收藏」
什么是低代码?哪些平台适合业务人员?用来开发系统靠不靠谱?
Explain the imported 3D model in unity