riogrande/virustotal
Composer 安装命令:
composer require riogrande/virustotal
包简介
VirusTotal API v3 interface
关键字:
README 文档
README
VirusTotal
VirusTotal is a file (and more) scanning service that offers a well documented public API to upload files and access information.
RioGrande
RioGrande is simply the top namespace I've picked for any PHP code I publish. It's a nerdy reference to a Star Trek shuttle - my top namespaces are named after spaceships.
Abstract
Basic API v3 functionality to deal with files, IPs and domains, retrieving reports, comments, votes (and adding them), behaviours...
For all requests, the returned JSON data can be accessed through a PHP array. For important fields, getters are getting implemented.
Create a new issue to request new features.
This is work in progress, trickling a bit slow since the code tests easily reach the daily API limit of 500 calls currently.
More v3 functionality will be added over time.
How to test the code
- Check out this repository.
- Run
composer updateto get development-related tools like phpunit and php-cs-fixer. - Open a console and run
php test.php. - Open a console and run
./runtests.shto use phpunit.
How to add to your own code
- Download a .phar or create one using
./make-phar.sh. - Copy
riogrande-virustotal-(version).pharinto your code folder. - Require said file using
require_once 'riogrande-virustotal-(version).phar'; - Try e.g. using the code below.
require_once 'riogrande-virustotal-(version).phar';
$sResource = '8c8fbcf80f0484b48a07bd20e512b103969992dbf81b6588832b08205e3a1b43';
$report = new \RioGrande\VirusTotal\APIv3\FileBehaviours($sResource);
$report->setAPIKey('caffee...');
$report->execute();
print_r($report->getUninstallValues());
Or use the meta-class combining multiple requests:
require_once 'riogrande-virustotal-(version).phar';
$sResource = '8c8fbcf80f0484b48a07bd20e512b103969992dbf81b6588832b08205e3a1b43';
$file = new \RioGrande\VirusTotal\APIv3\VTFile($sResource);
$file->setAPIKey('caffee...');
$behaviours = $file->getBehaviours();
print_r($behaviours->getUninstallValues());
Supported Universal API Endpoints
Files
- [ ] Upload a file
- [ ] Get a URL for uploading large files
- [x] Get a file report
- [ ] Request a file rescan (re-analyze)
- [x] Get comments on a file
- [x] Add a comment to a file
- [x] Get votes on a file
- [x] Add a vote on a file
- [ ] Get objects related to a file
- [ ] Get object descriptors related to a file
- [x] Get a summary of all behavior reports for a file
- [x] Get a summary of all MITRE ATT&CK techniques observed in a file
- [x] Get all behavior reports for a file
- [ ] Get a file behavior report from a sandbox
- [ ] Get objects related to a behaviour report
- [ ] Get object descriptors related to a behaviour report
- [ ] Get a detailed HTML behaviour report
- [ ] Get a crowdsourced Sigma rule object
- [ ] Get a crowdsourced YARA ruleset
URLs
- [ ] Scan URL
- [ ] Get a URL analysis report
- [ ] Request a URL rescan (re-analyze)
- [ ] Get comments on a URL
- [ ] Add a comment on a URL
- [ ] Get votes on a URL
- [ ] Add a vote on a URL
- [ ] Get objects related to a URL
- [ ] Get object descriptors related to a URL
Domains & Resolutions
- [x] [Get a domain report](https://developers.virustotal.com/reference/domain-info)
- [x] [Get comments on a domain](https://developers.virustotal.com/reference/domains-comments-get)
- [x] [Add a comment to a domain](https://developers.virustotal.com/reference/domains-comments-post)
- [x] [Get votes on a domain](https://developers.virustotal.com/reference/domains-votes-get)
- [x] [Add a vote to a domain](https://developers.virustotal.com/reference/domain-votes-post)
- [x] [Get objects related to a domain](https://developers.virustotal.com/reference/domains-relationships)
- [x] [Get object descriptors related to a domain](https://developers.virustotal.com/reference/domains-relationships-ids)
- [x] [Get a DNS resolution object](https://developers.virustotal.com/reference/get-resolution-by-id)
IP addresses
- [x] Get an IP address report
- [x] Get comments on an IP address
- [x] Add a comment to an IP addressp
- [x] Get votes on an IP address
- [x] Add a vote to an IP address
- [x] Get objects related to an IP address
- [x] Get object descriptors related to an IP address
Analyses, Submissions & Operations
- [ ] Get a URL/file analysis
- [ ] Get objects related to an analysis
- [ ] Get object descriptors related to an analysis
- [ ] Get a submission object
- [ ] Get an operation object
Graphs
- [ ] Search graphs
- [ ] Create a graph
- [ ] Get a graph object
- [ ] Update a graph object
- [ ] Delete a graph
- [ ] Get comments on a graph
- [ ] Add a comment to a graph
- [ ] Get users and groups that can view a graph
- [ ] Grant users and groups permission to see a graph
- [ ] Check if a user or group can view a graph
- [ ] Revoke view permission from a user or group
- [ ] Get users and groups that can edit a graph
- [ ] Grant users and groups permission to edit a graph
- [ ] Check if a user or group can edit a graph
- [ ] Revoke edit graph permissions from a user or group
- [ ] Get objects related to a graph
- [ ] Get object descriptors related to a graph
Comments
- [ ] Get latest comments
- [ ] Get a comment object
- [ ] Update a comment
- [ ] Delete a comment
- [ ] Add a vote to a comment
- [ ] Get objects related to a comment
- [ ] Get object descriptors related to a comment
Search & Metadata
- [ ] Search files, URLs, domains, IPs and tag comments
- [ ] Get VirusTotal metadata
Collections
- [ ] Create a new collection
- [ ] Get a collection
- [ ] Update a collection
- [ ] Delete a collection
- [ ] Get comments on a collection
- [ ] Add a comment to a collection
- [ ] Get objects related to a collection
- [ ] Get object descriptors related to a collection
- [ ] Add new items to a collection
- [ ] Delete items from a collection
Attack Tactics
- [ ] Get an attack tactic object
- [ ] Get objects related to an attack tactic
- [ ] Get object descriptors related to an attack tactic
Attack Techniques
- [ ] Get an attack technique object
- [ ] Get objects related to an attack technique
- [ ] Get object descriptors related to an attack technique
Popular Threat Categories
- [ ] Get a list of popular threat categories
riogrande/virustotal 适用场景与选型建议
riogrande/virustotal 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 9 次下载、GitHub Stars 达 0, 最近一次更新时间为 2023 年 05 月 09 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「php」 「security」 「api」 「virus」 「virustotal」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 riogrande/virustotal 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 riogrande/virustotal 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 riogrande/virustotal 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Provide a way to secure accesses to all routes of an symfony application.
A PSR-7 compatible library for making CRUD API endpoints
It's a barebone security class written on PHP
Contao CMS integrity check for some files
A PHP security linter to detect insecure functions like var_dump, print_r, and other dangerous functions in your codebase
Alfabank REST API integration
统计信息
- 总下载量: 9
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 20
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-05-09