当前位置:网站首页>Broken knowledge
Broken knowledge
2022-06-21 11:35:00 【Whoa, whoa, whoa, whoa, whoa, whoa】
List of articles
php Code
curl_init : Initialize a cURL conversation , for curl_setopt(), curl_exec() and curl_close() Function USES .
curl_setopt : Request one url.
among CURLOPT_URL Indicates that you need to obtain URL Address , Then I followed its value .
CURLOPT_RETURNTRANSFER take curl_exec() The information is returned as a file stream , Instead of direct output .
curl_exec, Return on success TRUE, Or return on failure FALSE. However , If CURLOPT_RETURNTRANSFER Options are set , When the function is executed successfully, it will return the execution result , Return... On failure FALSE .
CURLINFO_HTTP_CODE : The last one received HTTP Code .
curl_getinfo: Returns its value as a string , Because it's set up CURLINFO_HTTP_CODE, So it's the returned status code .
If the status code is not 404, Just go back to exec Result .
PHP escapeshellarg()+escapeshellcmd() Regression of
exp=highlight_file(next(array_reverse(scandir(pos(localeconv())))));
highlight_file() Function to highlight the syntax of the file , This function is show_source() Another name for
next() Output the values of the current element and the next element in the array .
array_reverse() The function returns an array in the reverse order of elements .( It mainly returns the value )
scandir() Function returns an array of files and directories in the specified directory .
post() Output the value of the current element in the array .
localeconv() Function returns an array containing local numbers and currency format information , The first element of the array is ".".
principle :
loacleconv The function will return a fixed . then pos What we got . Return to the... We constructed payload bring scandir Can return the array under the current directory ( let me put it another way , Is to read out the files in the current directory ) rray_reverse() Output... In reverse order ( The purpose is to output the queried content in positive order ) then next Extract the second element ( take . Filter out ), Last highlight_file() Show me .
preg_replace() The function ends with /e At the end , There will be a command execution vulnerability , That is to say, if there is /e, And match to the string that matches the regular expression , Then the string of the second parameter will be executed as code
-
Regular expression's \S: Match all non white space characters ;
. Number : Matching elimination \n Any character outside ;
* Number : Match preceding characters 0 Times or more
+ Number : Match preceding characters 1 Times or more ( If you want to in url Internal input + Number , It must be coded ,+ The number code is :%2b)
_
php in , If There are variables in double quotation marks , that php The interpreter will replace it with the result of variable interpretation , But variables in single quotes are not processed ( However, the function in double quotation marks will not be executed
WEB-INF/web.xml Let the cat out of the
WEB-INF yes Java Of WEB Security directory of application . If you want to access the files directly in the page , Must pass web.xml The file can only be accessed by mapping the file to be accessed .WEB-INF It mainly includes the following files or directories :
/WEB-INF/web.xml:Web Application configuration files , It describes servlet And other application component configuration and naming rules .
/WEB-INF/classes/: Including all the sites used class file , Include servlet class He Fei servlet class, They cannot be included in .jar In file
/WEB-INF/lib/: Deposit web Applications require a variety of JAR file , Place only those required for this application jar file , Such as database driver jar file
/WEB-INF/src/: Source directory , Place each item according to the package name structure java file .
/WEB-INF/database.properties: Database configuration file
Causes of loopholes : Usually web We will use multiple web Use with server , Solve one of them web The performance defects of the server, the advantages of load balancing and the completion of some hierarchical security policies . When using this architecture , Due to improper mapping of directories or files of static resources , It may cause some safety problems , Lead to web.xml Wait until the file can be read . Vulnerability detection and utilization methods : By finding web.xml file , infer class Path to file , Finally, directly class file , Through decompilation class file , Get the source code of the website . General situation ,jsp By default, the engine is forbidden to access WEB-INF The directory ,Nginx coordination Tomcat When doing load balancing or clustering , The reason for the problem is actually very simple ,Nginx I won't consider configuring other types of engines (Nginx No jsp engine ) And introduce it into its own safety specifications ( This coupling is too high ), modify Nginx Access to the configuration file is prohibited WEB-INF Just a list :location ~ ^/WEB-INF/* { deny all; } perhaps return 404; Or other !
边栏推荐
- boost一定要入门呀
- Citus 11 for Postgres 完全开源,可从任何节点查询(Citus 官方博客)
- 使用赞美提高绩效
- QML introduction to advanced
- A Kuan food: the battle for "the first share of convenience food" continues
- 有意思的鼠标指针交互探究
- 中国企业海外业务DDoS防护探索
- 泰克Tektronix示波器上位机软件NS-Scope介绍
- Implementation of qcustomplot based on qtquick
- 『忘了再学』Shell流程控制 — 35、多分支case条件语句
猜你喜欢

第九章Cisco ASA应用NAT

It is the German oscilloscope software and the keysight oscilloscope upper computer software ns-scope

2022 special operation certificate examination question bank and online simulation examination for safety management personnel of hazardous chemical business units

Scholar magic changes QT creator plug-in framework (with examples)

qmlbook学习总结

Flink tuning (I) resource tuning and back pressure analysis

High performance parallel programming and optimization | lesson 01 homework

2022年安全员-C证上岗证题目及答案

From zero into the world of software development

重磅,MapStruct 1.5 发布,这次终于支持Map转为Bean了!
随机推荐
【100个 Unity踩坑小知识点】| 在编辑器中绘制正方体虚线、球体虚线(Gizmos 辅助线框)
请教下。使用mysql-cdc需要mysql启用什么设置或者功能的保障么,还是说只要有mysql的i
Démarrer avec la visualisation des données
What if the server is invaded
完美安全代码审计的5个最佳实践
Hezhili: microbial driven carbon nitrogen sulfur phosphorus cycle in mangrove wetland sediments and its coupling mechanism
服务器安全审计系统设计与实现
Flink调优(一)资源调优、背压问题的分析
Never ending database injection attack and defense
ThinkPHP安全开发规范
Qmlbook learning summary
qt对sqlite数据库多线程的操作
Five steps to successfully complete threat modeling
分解任务
QT operation on SQLite database multithreading
Getting started with data visualization
SSD【目标检测篇】
Simulated 100 questions of 2022 safety officer-a certificate examination and online simulated examination
2022 special operation certificate examination question bank and online simulation examination for safety management personnel of hazardous chemical business units
『忘了再学』Shell流程控制 — 35、多分支case条件语句