接入教程
1. 访问CAPEsandbox官网注册账户并获取API密钥
2. 安装Python客户端库并配置认证信息
3. 提交待分析文件样本至API端点
4. 调用结果查询接口获取分析报告
5. 解析JSON格式的报告数据并集成到您的系统
提交恶意软件样本进行分析
import requests
url = 'https://api.example.com/api/submit'
headers = {'Authorization': 'Bearer YOUR_API_KEY'}
payload = {'file': open('sample.exe', 'rb'), 'options': '{"timeout": 120}'}
response = requests.post(url, headers=headers, files=payload)
print(response.json())
获取分析报告
<?php
$apiKey = 'YOUR_API_KEY';
$reportId = '12345';
$url = 'https://api.example.com/api/report/' . $reportId;
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer ' . $apiKey]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
检查任务状态
const axios = require('axios');
const checkStatus = async (taskId) => {
try {
const response = await axios.get(`https://api.example.com/api/status/${taskId}`, {
headers: { 'Authorization': `Bearer YOUR_API_KEY` }
});
console.log(response.data);
} catch (error) {
console.error('Error:', error.response?.data || error.message);
}
};
checkStatus('task_abc123');
常见问题
如何获取API密钥?
请访问CAPEsandbox官方网站,注册账户后,在用户控制面板的API设置部分生成您的专属API密钥。
支持哪些文件格式的分析?
CAPEsandbox支持常见可执行文件(如EXE、DLL)、文档(如PDF、Office文档)、脚本(如JS、VBS)及压缩包等多种格式的恶意软件样本分析。
分析报告包含哪些内容?
分析报告包含行为日志、网络活动、文件操作、注册表修改、进程树、安全评分、威胁指标(IOC)及建议措施等详细信息。
Aitishiku.com