Gogs远程命令执行利用

0x01:

什么是 Gogs?
Gogs 是一款极易搭建的自助 Git 服务。

开发目的
Gogs 的目标是打造一个最简单、最快速和最轻松的方式搭建自助 Git 服务。使用 Go 语言开发使得 Gogs 能够通过独立的二进制分发,并且支持 Go 语言支持的 所有平台,包括 Linux、Mac OS X、Windows 以及 ARM 平台。

  

0x02: 

个人信息-> 仓库设置 -> 管理Git钩子

http://ip:3000/user/项目名/settings/hooks/git

Git钩子 添加 反弹shell payload  

修改后状态

 0x03:

$ git config --global user.name "runoob"
$ git config --global user.email test@runoob.com
touch README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin http://localhost:3000/admin1/ccccccc.git
git push -u origin master 
git remote add origin http://localhost:3000/admin1/ccccccc.git
git push -u origin master


 git commit -am "edit 11"

 在进行push的时候进行了更新,触发钩子 执行shell 语句

直接WEB修改文件 提交 同样触发

原文地址:https://www.cnblogs.com/0xdd/p/12977206.html