CVE-2018-10931 - Exposed Dangerous Method or Function

Severity

75%

Complexity

99%

Confidentiality

106%

It was found that cobbler 2.6.x exposed all functions from its CobblerXMLRPCInterface class over XMLRPC. A remote, unauthenticated attacker could use this flaw to gain high privileges within cobbler, upload files to arbitrary location in the context of the daemon.

It was found that cobbler 2.6.x exposed all functions from its CobblerXMLRPCInterface class over XMLRPC. A remote, unauthenticated attacker could use this flaw to gain high privileges within cobbler, upload files to arbitrary location in the context of the daemon.

CVSS 3.0 Base Score 9.8. CVSS Attack Vector: network. CVSS Attack Complexity: low. CVSS Vector: (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).

CVSS 2.0 Base Score 7.5. CVSS Attack Vector: network. CVSS Attack Complexity: low. CVSS Vector: (AV:N/AC:L/Au:N/C:P/I:P/A:P).

Demo Examples

Exposed Dangerous Method or Function

CWE-749

In the following Java example the method removeDatabase will delete the database with the name specified in the input parameter.


               
}
} catch (SQLException ex) {...}
stmt.execute("DROP DATABASE " + databaseName);

The method in this example is declared public and therefore is exposed to any class in the application. Deleting a database should be considered a critical operation within an application and access to this potentially dangerous method should be restricted. Within Java this can be accomplished simply by declaring the method private thereby exposing it only to the enclosing class as in the following example.


               
}
stmt.execute("DROP DATABASE " + databaseName);

Exposed Dangerous Method or Function

CWE-749

These Android and iOS applications intercept URL loading within a WebView and perform special actions if a particular URL scheme is used, thus allowing the Javascript within the WebView to communicate with the application:


               
}// Android
}
}
return false;
return true;

               
}// iOS
return YES;
return NO;
UIWebView *webView = [self writeDataToView:[URL query]];// Make data available back in webview.

A call into native code can then be initiated by passing parameters within the URL:


               
window.location = examplescheme://method?parameter=value

Because the application does not check the source, a malicious website loaded within this WebView has the same access to the API as a trusted site.

Exposed Dangerous Method or Function

CWE-749

This application uses a WebView to display websites, and creates a Javascript interface to a Java object to allow enhanced functionality on a trusted website:


               
}
}
setContentView(mainWebView);
}
return currentUser.Info();

Before Android 4.2 all methods, including inherited ones, are exposed to Javascript when using addJavascriptInterface(). This means that a malicious website loaded within this WebView can use reflection to acquire a reference to arbitrary Java objects. This will allow the website code to perform any action the parent application is authorized to.

For example, if the application has permission to send text messages:


               
</script>
userInfoObject.getClass().forName('android.telephony.SmsManager').getMethod('getDefault',null).sendTextMessage(attackNumber, null, attackMessage, null, null);

This malicious script can use the userInfoObject object to load the SmsManager object and send arbitrary text messages to any recipient.

Exposed Dangerous Method or Function

CWE-749

After Android 4.2, only methods annotated with @JavascriptInterface are available in JavaScript, protecting usage of getClass() by default, as in this example:


               
}
}
return currentUser.Info();

This code is not vulnerable to the above attack, but still may expose user info to malicious pages loaded in the WebView. Even malicious iframes loaded within a trusted page may access the exposed interface:


               
</script>
sendUserInfo(info);

This malicious code within an iframe is able to access the interface object and steal the user's data.

Overview

Type

Red Hat Satellite

First reported 6 years ago

2018-08-09 20:29:00

Last updated 5 years ago

2019-09-11 21:15:00

Affected Software

Red Hat Satellite 5.6

5.6

Red Hat Satellite 5.7

5.7

Red Hat Satellite 5.8

5.8

Stay updated

ExploitPedia is constantly evolving. Sign up to receive a notification when we release additional functionality.

Get in touch

If you'd like to report a bug or have any suggestions for improvements then please do get in touch with us using this form. We will get back to you as soon as we can.