Thank you for your interest in contributing to Exposor! Your contributions help improve the tool and expand its capabilities. This guide explains how to add new YAML files for intels, how to use the vulners-api.py script to generate vulnerabilities, and how to follow the contribution process.
The intels directory contains YAML files used for detecting technologies and vulnerabilities. New YAML files should:
- Be well-structured and follow the existing format.
- Include accurate and valid queries for supported platforms (e.g., Shodan, Fofa, ZoomEye, Censys).
- Be tested to ensure they work correctly.
The repository is organized to keep YAML files structured and easy to navigate. Below is an overview of the directory structure:
exposor/
├── intels/ # Folder for intelligence YAML files
│ ├── technology_intels/ # Technology-specific YAML files
│ │ ├── vendor_name/ # Vendor name folder
│ │ │ ├── product_name/ # Product name folder
│ │ │ │ ├── vendor_product.yaml <––– Example technology YAML
│ └── vulnerability_intels/ # Vulnerability-specific YAML files
│ │ ├── vendor_product_cves.yaml <––– Example vulnerability YAML
└── ...
technology_intels/: Contains YAML files for detecting specific technologies or platforms. Files are organized byvendor_name/product_name/vendor_product.yaml.vulnerability_intels/: Contains YAML files for tracking vulnerabilities (e.g., CVEs) generated using thevulners-api.pyscript.
For example:
- YAML file for cpe:2.3:a:apache:activemq should be placed in:
exposor/intels/technology_intels/apache/activemq/apache_activemq.yaml
Every YAML file must include the following fields:
cpe: The name of the technology or vulnerability.description: A brief description of the detection.queries: The platform-specific queries.
info:
author: exposor
cpe: cpe:2.3:a:3cx:3cx:*:*:*:*:*:*:*:*
description: Detection of 3cx 3cx
version: '1.0'
queries:
censys:
- services.http.response.html_title:"3CX Phone System Management Console"
fofa:
- title="3CX Phone System Management Console"
shodan:
- http.title:"3CX Phone System Management Console"
zoomeye:
- title:"3CX Phone System Management Console"You can run the vulners-api.py script against your YAML file to generate a list of vulnerabilities for related CPEs.
-
Place Your YAML File:
- Ensure your YAML file is located in the appropriate directory (e.g.,
intels/technology_intels/apache/activemq/apache_activemq.yaml).
- Ensure your YAML file is located in the appropriate directory (e.g.,
-
Run the
vulners-api.pyScript:- Use the following command to generate vulnerabilities:
python3 scripts/vulners-api.py intels/technology_intels/<vendor>/<product>/<vendor_product>.yaml
- Example for Apache ActiveMQ:
python3 scripts/vulners-api.py intels/technology_intels/apache/activemq/apache_activemq.yaml
- Use the following command to generate vulnerabilities:
-
Output File:
- The script will save the vulnerabilities in:
exposor/intels/vulnerability_intels/<vendor_product>_cves.yaml - Example:
exposor/intels/vulnerability_intels/apache_activemq_cves.yaml
- The script will save the vulnerabilities in:
-
Validate the Output:
- Ensure the generated file is saved correctly in
vulnerability_intels/and includes all relevant CVEs.
- Ensure the generated file is saved correctly in
-
Fork the Repository:
- Fork the Exposor repository to your GitHub account.
-
Clone Your Fork:
- Clone the repository to your local machine:
git clone https://github.com/abuyv/exposor.git cd exposor
- Clone the repository to your local machine:
-
Create a New Branch:
- Create a branch for your contribution:
git checkout -b feature/add-<vendor>-<product>
- Create a branch for your contribution:
-
Add Your YAML File:
- Create the YAML file in the appropriate folder:
mkdir -p intels/<vendor>/<product> touch intels/<vendor>/<product>/<vendor_product>.yaml
- Create the YAML file in the appropriate folder:
-
Run
vulners-api.py(Optional but Recommended):- Generate vulnerabilities for your CPEs using the
vulners-api.pyscript as described above.
- Generate vulnerabilities for your CPEs using the
-
Test Your Changes:
- Ensure there are no syntax errors in your YAML file.
-
Commit Your Changes:
- Commit the changes with a clear message:
git add . git commit -m "Add detection for <Vendor Product>"
- Commit the changes with a clear message:
-
Push Your Branch:
- Push the branch to your fork:
git push origin feature/add-<vendor>-<product>
- Push the branch to your fork:
-
Open a Pull Request:
- Open a pull request from your fork to the main repository.
When you submit a pull request:
- A maintainer will review your YAML file to ensure it follows the guidelines.
If you encounter any issues with the project, please open an issue with the following details:
- A clear title.
- A description of the issue.
- Steps to reproduce the problem.
- Logs or screenshots, if applicable.
- Refer to the README.md for an overview of the project.
Thank you for contributing to Exposor!