[NewAngels Advisory #7]PHP Nuke <= 7.8 Multiple SQL Injections

So there is this advisory which is released:



[NewAngels Advisory #7]PHP Nuke <= 7.8 Multiple SQL Injections
========================================================================
=====

Software: PHP Nuke 7.8
Type: SQL Injections
Risk: High

Date: Sep. 10 2005
Vendor: PHP-Nuke (phpnuke.org)

Credit:
=======
Robin ‘onkel_fisch’ Verton from it-security23.net

Description:
============
PHP-Nuke is a news automated system specially designed to be used in Intranets and Internet.
The Administrator has total control of his web site, registered users, and he will have in the hand
a powerful assembly of tools to maintain an active and 100% interactive web site using databases.
[http://www.phpnuke.org/]

Vulnerability:
==============

PHP Nuke 7.8 is prone to multiple SQL injection vulnerabilities.
These issues are due to a failure in the application to properly sanitize user-supplied input before using it in SQL queries.

In the modules.php

$result = $db->sql_query(“SELECT active, view FROM “.$prefix.”_modules WHERE title=’$name'”);

The $name variable is not checked so you could inject malicious SQL Code. In an file which is included whe have the following code:

$queryString = strtolower($_SERVER[‘QUERY_STRING’]);
if (stripos_clone($queryString,’%20union%20′) OR stripos_clone($queryString,’/*’) OR stripos_clone($queryString,’*/union/*’) OR stripos_clone($queryString,’c2nyaxb0′)) {
header(“Location: index.php”);
die();
}

[…]

if (!ini_get(“register_globals”)) {
import_request_variables(‘GPC’);
}

So you can use UNION in a GET var. But because they use register_globals or impor_request_variables you can send
the malicous SQL-Code via POST so it is not checked if you insert an “union”.

http://www.example.com/modules.php POST: name=’ OR 1=1/*
will produce an error, neither
http://www.example.com/modules.php POST: name=’ OR 1=2/*
will only tell you taht the requestet ‘modul’ is not active, so you can read out the admin password hahs via blind injections.

Additionaly there are a few SQL-Injections in the modules.
Here a few examples:

http://www.example.com/modules.php?name=News&file=article&sid=[SQL] – here the same as above, send this via POST to
bypass the ‘union’-cover

http://www.example.com/modules.php?name=News&file=comments&Reply&pid=[SQ
L]

http://www.example.com/modules.php?name=News&file=comments&op=Reply&pid=
[SQL]

http://www.example.com/modules.php?name=News&file=comments&op=Reply&sid=
[SQL]

Greets:
==============
CyberDead, atomic, sirius_
Whole secured-pussy.de Team
Zealots 😀 😀


Of course I’m not thrilled so I just had to reply:



The $name variable and others like $sid are expected via $_GET and not
$_POST.  The proper start to sanitizing the data here is to ensure that
$name is obtained via $_GET and not injected by $_POST, $_COOKIE, or
anything else.


Since you did two things I’m avidly against:


1) no vendor contact information
2) no suggested patches


I wanted to reply and alert folks who run PHP-Nuke and its forks since
after running a cursory search on some popular PHP-Nuke sites I saw
nothing about this:


http://en.wikipedia.org/wiki/Php-nuke


About the above suggestion.


To be specific, find the modules.php file and check for the first instance
of “$name”.  An example:


if (isset($name)) {


Prior to that, simply put in such a line:


$name = $_GET[‘name’];


You’re forcing the $name variable to be set by the HTTP GET request,
rather than inject a value by a cookie or post ($_COOKIE, $_POST
respectively).

The same applies to the rest of the code for other variables.

Microsoft Security Bulletin Summary for August 2005


Microsoft
MS05-038 – Cumulative Security Update for Internet Explorer (896727)

– Affected Software:
– Windows 2000 Service Pack 4
– Windows XP Service Pack 1
– Windows XP Service Pack 2
– Windows XP Professional x64 Edition
– Windows Server 2003
– Windows Server 2003 Service Pack 1
– Windows Server 2003 for Itanium-based Systems
– Windows Server 2003 with SP1 for Itanium-based Systems
– Windows Server 2003 x64 Edition

– Review the FAQ section of bulletin MS05-O38 for information about these operating systems:
– Windows 98
– Windows 98 Second Edition (SE)
– Windows Millennium Edition (ME)

– Impact: Remote Code Execution
– Version Number: 1.0

MS05-039 – Vulnerability in Plug and Play Could Allow Remote Code Execution and Elevation of Privilege (899588)

– Affected Software:
– Windows 2000 Service Pack 4
– Windows XP Service Pack 1
– Windows XP Service Pack 2
– Windows XP Professional x64 Edition
– Windows Server 2003
– Windows Server 2003 Service Pack 1
– Windows Server 2003 for Itanium-based Systems
– Windows Server 2003 with SP1 for Itanium-based Systems
– Windows Server 2003 x64 Edition

– Impact: Remote Code Execution
– Version Number: 1.0

MS05-043 – Vulnerability in Print Spooler Service Could Allow Remote Code Execution (896423)

– Affected Software:
– Windows 2000 Service Pack 4
– Windows XP Service Pack 1
– Windows XP Service Pack 2
– Windows Server 2003
– Windows Server 2003 for Itanium-based Systems

– Impact: Remote Code Execution
– Version Number: 1.0

Important Security Bulletins
============================
MS05-040 – Vulnerability in Telephony Service Could Allow Remote Code Execution (893756)

– Affected Software:
– Windows 2000 Service Pack 4
– Windows XP Service Pack 1
– Windows XP Service Pack 2
– Windows XP Professional x64 Edition
– Windows Server 2003
– Windows Server 2003 Service Pack 1
– Windows Server 2003 for Itanium-based Systems
– Windows Server 2003 with SP1 for Itanium-based Systems
– Windows Server 2003 x64 Edition

– Review the FAQ section of bulletin MS05-O38 for information about these operating systems:
– Windows 98
– Windows 98 Second Edition (SE)
– Windows Millennium Edition (ME)

– Impact: Remote Code Execution
– Version Number: 1.0

– Impact: Remote Code Execution
– Version Number: 1.0

Moderate Security Bulletins
===========================
MS05-041 – Vulnerability in Remote Desktop Protocol Could Allow Denial of Service (899591)

– Affected Software:
– Windows XP Service Pack 1
– Windows XP Service Pack 2
– Windows XP Professional x64 Edition
– Windows Server 2003
– Windows Server 2003 Service Pack 1
– Windows Server 2003 for Itanium-based Systems
– Windows Server 2003 with SP1 for Itanium-based Systems
– Windows Server 2003 x64 Edition

– Impact: Denial of Service
– Version Number: 1.0

MS05-042 – Vulnerabilities in Kerberos Could Allow Denial of Service, Information Disclosure, and Spoofing (899587)

– Affected Software:
– Windows 2000 Service Pack 4
– Windows XP Service Pack 1
– Windows XP Service Pack 2
– Windows XP Professional x64 Edition
– Windows Server 2003
– Windows Server 2003 Service Pack 1
– Windows Server 2003 for Itanium-based Systems
– Windows Server 2003 with SP1 for Itanium-based Systems
– Windows Server 2003 x64 Edition

– Impact: Remote Code Execution
– Version Number: 1.0

Source<!–

–>

Microsoft Security Bulletin Re-Releases, August 2005

* MS05-023

– http://www.microsoft.com/technet/security/bulletin/MS05-023.mspx
– Reason for revision: Bulletin updated to reflect an additional affected product- Microsoft Word 2003 Viewer
– Originally posted: June 14, 2005
– Updated: August 9, 2005
– Bulletin Severity Rating: Critical
– Version: 2.0


* MS05-032

– http://www.microsoft.com/technet/security/bulletin/MS05-032.mspx
– Reason for revision: Bulletin updated to advise customers that a revised version of the security update is available for x64-based systems, Microsoft Windows Server 2003 for Itanium-based Systems, and Microsoft Windows Server 2003 with SP1 for Itanium-based Systems.
– Originally posted: June 14, 2005
– Updated: August 9, 2005
– Bulletin Severity Rating: Moderate
– Version: 2.0<!–

–>

CoolWebSearch found in massive spyware ring

Sunbelt Software recently reported to the FBI evidence that shows CoolWebSearch is in a massive spyware ring where private information such as user names, passwords, chat sessions, bank information are stored and uploaded to servers. The FBI responded and are working on the case.

Note that there is a LOT of bank information in here, including one company bank account with over US$350,000 and another small company in California with over $11,000 readily accessible. This list goes on and on and on. Of course, there’s also eBay accounts and much more.


http://castlecops.com/a6172-CoolWebSearch_found_in_massive_spyware_ring.html

Sober Revolutions

Zombie PCs infected with the Sober-P worm are set to reactivate on
Monday, 23 May. Sober-P posed as offers of a free ticket for next
year’s World Cup and set up backdoor access on compromised PCs,
claiming thousands of victims since its first appearance earlier this
month.

These infected machines were later used to generate a German hate-mail
spam outbreak this week. The sheer volume of this deluge illustrated
the potential for further mischief.

Excerpt from The Register and [ISN].

Microsoft Security Bulletin Summary for May 2005

********************************************************************
Title: Microsoft Security Bulletin Summary for May 2005
Issued: May 10, 2005
Version Number: 1.0
Bulletin: http://go.microsoft.com/fwlink/?LinkId=47292
********************************************************************

Summary:
========
This advisory contains information about all security updates
released this month. It is broken down by security bulletin severity.



Important Security Bulletins
============================

MS05-024 – Vulnerability in Web View Could Allow Remote Code
Execution (894320)

– Affected Software:
– Windows 2000 Service Pack 3
– Windows 2000 Service Pack 4

– Review the FAQ section of bulletin MS05-O24 for
information about these operating systems:
– Microsoft Windows 98
– Microsoft Windows 98 Second Edition (SE)
– Microsoft Windows Millennium Edition (ME)

– Impact: Remote Code Execution
– Version Number: 1.0

Update Availability:
===================
An update is available to address these issues.
For additional information, including Technical Details,
Workarounds, answers to Frequently Asked Questions,
and Update Deployment Information please read
the Microsoft Security Bulletin Summary for this
month at: http://go.microsoft.com/fwlink/?LinkId=47292

Support:
========
Technical support is available from Microsoft Product Support
Services at 1-866-PC SAFETY (1-866-727-2338). There is no
charge for support calls associated with security updates.
International customers can get support from their local Microsoft
subsidiaries. Phone numbers for international support can be found
at: http://support.microsoft.com/common/international.aspx

Additional Resources:
=====================
* Microsoft has created a free monthly e-mail newsletter containing
valuable information to help you protect your network. This
newsletter provides practical security tips, topical security
guidance, useful resources and links, pointers to helpful
community resources, and a forum for you to provide feedback
and ask security-related questions.
You can sign up for the newsletter at:

http://www.microsoft.com/technet/security/secnews/default.mspx

* Microsoft has created a free e-mail notification service that
serves as a supplement to the Security Notification Service
(this e-mail). It provides timely notification of any minor
changes or revisions to previously released Microsoft Security
Bulletins. This new service provides notifications that are
written for IT professionals and contain technical information
about the revisions to security bulletins.
Visit http://www.microsoft.com to subscribe to this service:

– Click on Subscribe at the top of the page.
– This will direct you via Passport to the Subscription center.
– Under Newsletter Subscriptions you can sign up for the
“Microsoft Security Notification Service: Comprehensive Version”.

* Join Microsoft’s webcast for a live discussion of the technical
details of these security bulletins and steps you can take
to protect your environment. Details about the live webcast
can be found at:

www.microsoft.com/technet/security/bulletin/summary.mspx

The on-demand version of the webcast will be available 24 hours
after the live webcast at:

www.microsoft.com/technet/security/bulletin/summary.mspx

* Protect your PC: Microsoft has provided information on how you
can help protect your PC at the following locations:

http://www.microsoft.com/security/protect/

If you receive an e-mail that claims to be distributing a
Microsoft security update, it is a hoax that may be distributing a
virus. Microsoft does not distribute security updates through
e-mail. You can learn more about Microsoft’s software distribution
policies here:
http://www.microsoft.com/technet/security/topics/policy/swdist.mspx

********************************************************************
THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS
PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND. MICROSOFT
DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING
THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE.
IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE
LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT,
INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL
DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN
ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY
FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING
LIMITATION MAY NOT APPLY.
********************************************************************