Post

Go Fastdfs Getclientip Unauthorized Access Vulnerability

Go Fastdfs Getclientip Unauthorized Access Vulnerability

Go-fastdfs GetClientIp Unauthorized Access Vulnerability

Vulnerability Description

The Go-fastdfs GetClientIp method has an XFF header bypass vulnerability. Through the vulnerability, an attacker can call the interface without authorization to obtain sensitive information such as configuration files.

Vulnerability Impact

Go-fastdfs

Network surveying and mapping

“go-fastdfs”

Vulnerability reappears

Main page

img

Call the read configuration interface, return ip not allowed to access

/group1/reload?action=get

img

Tracking error message code

img

img

Follow the GetClientIp method, here we will get the value from X-Forwarded-For and other parameters

img

Go back to the starting point of the call, the verification method is to call the IsPeer parameter

img

img

Here is mainly to verify whether the obtained value is the AdminIps in the configuration

img

In the configuration file cfg.json, admin_ips defaults to 127.0.0.1 (can be blasted)

img

Therefore, by setting X-Forwarded-For, you can bypass interface call restrictions, perform operations such as modifying configuration files, and verifying the POC

/group1/reload?action=get

X-Forwarded-For: 127.0.0.1

img

This post is licensed under CC BY 4.0 by the author.