当前位置:   article > 正文

/.git

/.git

。知识

1.1 GitHack(er)在kali的安装

GitHack(er)在kali的安装

1.2 githack使用

usage: githack [-h] [-o OUTPUT] [--level {NOTSET,DEBUG,INFO,WARNING,ERROR,CRITICAL}] [-k] URI

.git/ leakage exploit
//.git/ 泄漏漏洞
positional arguments:
//位置参数:
  URI                   target uri to exploit (eg. http://example.com/.git)
						//要利用的目标uri
options:
  -h, --help            show this help message and exit
  						//显示此帮助消息并退出
  -o OUTPUT, --output OUTPUT
                        output dir, all the file will download to this directory
                        //输出dir,所有文件将下载到此目录
  --level {NOTSET,DEBUG,INFO,WARNING,ERROR,CRITICAL}
                        log level (default: INFO)
                        //日志级别(默认值:INFO)
  -k, --insecure        Ignore ssl verify
  						//忽略ssl验证
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19

速度

githack http://node4.anna.nssctf.cn:28054/.git
  • 1

1.3 githacker使用

usage: githacker [-h] (--url URL | --url-file URL_FILE) --output-folder OUTPUT_FOLDER [--brute]
                 [--enable-manually-check-dangerous-git-files] [--threads THREADS] [--delay DELAY] [--version]

GitHacker

options:
//选项:
  -h, --help            show this help message and exit
					  	//显示此帮助消息并退出
  --url URL             url of the target website which expose `.git` folder
					  	//公开`.git`文件夹的目标网站的url
  --url-file URL_FILE   url file that contains a list of urls of the target website which expose `.git` folder
					 	//url文件,该文件包含目标网站的url列表,其中公开了`.git`文件夹
  --output-folder OUTPUT_FOLDER(输出文件夹)	  
  						the local folder which will be the parent folder of all exploited repositories, every repo will be stored in folder named md5(url).
 						//本地文件夹将是所有被利用的存储库的父文件夹,每个repo都将存储在名为md5(url)的文件夹中。
  --brute               enable brute forcing branch/tag names
 						//启用强制分支/标记名称
  --enable-manually-check-dangerous-git-files
                        disable manually check dangerous git files which may lead to *RCE* (eg: .git/config, .git/hook/pre-commit) when downloading malicious .git folders. If this argument is given, GitHacker will not download the files which may be dangerous at all.
              			//禁用手动检查危险的git文件,当下载恶意.git文件夹时,这些文件可能会导致*RCE*(例如:.git/config、.git/hook/pre-commit)。如果给出了这个论点,GitHacker将不会下载可能根本危险的文件。
  --threads THREADS     threads number to download from internet
  						//要从internet下载的线程数
  --delay DELAY         delay seconds between HTTP requests
  						//HTTP请求之间的延迟秒数
  --version             show program's version number and exit
						//显示程序的版本号并退出
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27

速度

githacker --url http://localhost:8013/ --output-folder test

。实例

。NSS

[GXYCTF 2019]禁止套娃

在这里插入图片描述

使用dirsearch扫描目录

dirsearch -u http://node4.anna.nssctf.cn:28157/ -e php

发现存在git泄露

在这里插入图片描述

然后是在GitHack中的套路操作
在这里插入图片描述
在这里插入图片描述

python GitHack.py http://node4.anna.nssctf.cn:28832/.git
ls
cd node4.anna.nssctf.cn_28832
ls
vi index.php
  • 1
  • 2
  • 3
  • 4
  • 5

图形化页面中可以复制源代码

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/繁依Fanyi0/article/detail/457603
推荐阅读
相关标签
  

闽ICP备14008679号