How to use Discovery?
Overview
Section titled “Overview”Discovery is a threat detection system that identifies potential security risks by running automated scripts against selected assets. The system operates on a scheduled basis, processing tasks in a queue-based manner to ensure systematic and organized threat assessment.
Key Concepts
Section titled “Key Concepts”What is Discovery?
Section titled “What is Discovery?”Discovery is the process of finding threats and vulnerabilities by executing specialized detection scripts against target assets. Each discovery run analyzes specific assets using predefined flows to identify potential security issues, data exposures, and other threats.
Core Components
Section titled “Core Components”- Assets: Target domains, applications, or resources to be analyzed
- Flows: Keywords and configurations that determine which specific scripts will be executed
- Schedule: Automated timing system for running discovery processes
- Queue System: Organized processing of discovery tasks to manage resources efficiently
How Discovery Works
Section titled “How Discovery Works”1. Asset Selection
Section titled “1. Asset Selection”Assets must be selected before running any discovery process. These can include:
- Domain names (e.g., tikaj.com, newindiabank.in)
- Subdomains
- Web applications
- API endpoints
2. Flow Configuration
Section titled “2. Flow Configuration”Flows are related keywords that signify which scripts will be executed during the discovery process. Different flows target different types of threats:
- Code Exposure Detection (github_d020) (Use keyword assets)
- Breach Risk Assessment (hibp_d035) (Use email assets)
- Scam Detection (job_search_d023) (Use keyword assets)
- Malware Detection (mobile_app_d026) (Use keyword assets)
- Counterfeit Detection (product_search_d025) (Use product assets)
- Data Exposure Detection (trawler_d024) (Use keyword assets)
3. Scheduling System
Section titled “3. Scheduling System”The discovery system operates on a scheduled basis with configurable frequency:
- ONCE: Single execution
- Recurring: Multiple scheduled runs
- Tasks are processed in queue order to prevent resource conflicts
4. Execution Queue
Section titled “4. Execution Queue”All scheduled discoveries are processed in a queue manner, ensuring:
- Systematic execution of tasks
- Resource management
- No overlapping processes
- Orderly completion of discovery runs
Status Indicators
Section titled “Status Indicators”Each discovery card displays a colored dot indicating the current status:
| Color | Status | Description |
|---|---|---|
| 🔴 Red | Error | Discovery encountered an error during execution |
| 🟡 Yellow | In Queue | Discovery is scheduled and waiting to be processed |
| 🟢 Green | Running | Discovery is currently being executed |
| 🔵 Light Blue | Completed | Discovery has finished successfully |
Discovery Cards Information
Section titled “Discovery Cards Information”Each discovery card displays the following information:
- Discovery ID: Unique identifier (e.g., SCH-DISC-75E1-75C4-4113)
- Asset Type: Category of the target (e.g., subdomain)
- Status Badge: Current execution status
- Discoveries Count: Number of threats/issues found
- Detections Count: Number of potential detections identified
- Last Run: Timestamp of the most recent execution
- Assets List: Specific assets being monitored
Setting Up a Discovery
Section titled “Setting Up a Discovery”Step 1: Select Targets
Section titled “Step 1: Select Targets”- Click “Select targets…” to choose your assets
- Add domain names, subdomains, or other resources
- Confirm your asset selection
Step 2: Configure Schedule
Section titled “Step 2: Configure Schedule”- Set the Schedule Frequency:
- Choose “ONCE” for single execution
- Select recurring options for ongoing monitoring
- Configure Flows related to:
- Select relevant keywords/flows for your use case
- Multiple flows can be selected for comprehensive coverage
Step 3: Execute
Section titled “Step 3: Execute”- Click “Schedule” to add the discovery to the queue
- Monitor the status dot for execution progress
- Review results once the discovery completes
Viewing Discovery Details
Section titled “Viewing Discovery Details”Accessing Discovery Results
Section titled “Accessing Discovery Results”Once a scheduled discovery runs, you can view detailed information by:
- Click on Discovery Card: Click on any discovery card to open the detailed view
- Check Execution Status: View the current execution status and history
- Review All Discoveries: Access the “All Discoveries” section to see comprehensive execution logs
Discovery Detail Views
Section titled “Discovery Detail Views”All Discoveries Section
- Lists all discovery executions with detailed information
- Shows Discovery ID, Execution Info, and Created/Updated timestamps
- Provides filtering and pagination for easy navigation
Execution Details
- Success Cases: View the complete script response and results
- Error Cases: Display detailed error messages and troubleshooting information
- Execution History: Track all previous runs and their outcomes
Error Tracking and Debugging
Section titled “Error Tracking and Debugging”When a discovery encounters an error:
- Error messages are prominently displayed in the discovery details
- Detailed error information helps identify root causes
- Error tracking allows for systematic troubleshooting
- Historical error logs help identify patterns and recurring issues
Managing Detection Results
Section titled “Managing Detection Results”Detection Categories
Section titled “Detection Categories”The system organizes detections into three main categories:
- Potential Detections: Newly discovered threats awaiting review
- Created Detections: Validated threats added to the system
- Invalid Detections: False positives or irrelevant findings
Potential Detections Table
Section titled “Potential Detections Table”The Potential Detections table displays:
- Title: Description of the detected threat
- Identifier: Unique detection identifier with clickable links
- Target: The asset where the threat was found
- Category: Type of threat (e.g., subdomain, vulnerability)
- Actions: Add/Remove buttons for detection management
Detection Management Actions
Section titled “Detection Management Actions”Adding Valid Detections
- Review threats in the “Potential Detections” table
- Click the ”+ Add” button next to valid threats
- Detection moves to “Created Detections” and becomes part of the system
- Valid detections are now tracked and monitored
Removing Invalid Detections
- Identify false positives in the “Potential Detections” table
- Click the “Remove” button next to invalid findings
- Detection is marked as invalid and moved to “Invalid Detections” table
- Helps improve detection accuracy over time
Detection Workflow
Section titled “Detection Workflow”Potential Detection → Review → Decision ↙ ↘ Add (Valid) Remove (Invalid) ↓ ↓ Created Detections Invalid DetectionsBest Practices
Section titled “Best Practices”Asset Management
Section titled “Asset Management”- Use valid key words
- Ensure assets are properly formatted (e.g., domain.com)
- Group related assets for efficient processing
- Regularly update asset lists as your infrastructure changes
Flow Selection
Section titled “Flow Selection”- Choose flows that match your security concerns
- Consider running multiple flows for comprehensive coverage
- Review flow documentation to understand detection capabilities
Scheduling Strategy
Section titled “Scheduling Strategy”- Use “ONCE” for initial assessments
- Implement recurring schedules for ongoing monitoring
- Balance frequency with resource availability
Monitoring Results
Section titled “Monitoring Results”- Regularly check discovery status
- Inform any error states immediately
- Review detection results and take appropriate action
- Actively manage potential detections by adding valid ones and removing un-related/invalid detections.
Integration
Section titled “Integration”The discovery system integrates with various providers and scripts located in:
providers: Detection scriptsrules: YAML configuration files for detection logicflow: JavaScript flow definitions for different threat types
This modular approach allows for easy expansion and customization of discovery capabilities based on evolving security needs.