Google Gemini
Version: 1.0.1
Gemini can enhance SOAR by providing natural language understanding and generation capabilities for automating incident response, threat hunting, and report generation, significantly improving efficiency and accuracy.
Connect Google Gemini with LogicHub
- Navigate to Automations > Integrations.
- Search for Google Gemini.
- Click Details, then the + icon. Enter the required information in the following fields.
- Label: Enter a connection name.
- Reference Values: Define variables here to templatize integration connections and actions. For example, you can use https://www.{{hostname}}.com where, hostname is a variable defined in this input. For more information on how to add data, see 'Add Data' Input Type for Integrations.
- Verify SSL: Select option to verify connecting server's SSL certificate (Default is Verify SSL Certificate).
- Remote Agent: Run this integration using the LogicHub Remote Agent.
- API Key: API key for Google Gemini. Get API key from Google AI Studio.
- Gemini Model: Select the Google Gemini model that you want to use. Default is Gemini Flash.
- After you've entered all the details, click Connect.
Actions for Google Gemini
Submit Prompt
Generate a response to a free-text prompt using the Gemini model.
Input Field
Choose a connection that you have previously created and then fill in the necessary information in the following input fields to complete the connection.
Input Name | Description | Required |
---|---|---|
Prompt | Jinja-templated text containing a free-text prompt for the model to generate a response. Example: "What you understand by Devo SOAR." | Required |
Output
JSON containing the following items:
{
"result": "
The `docker ps` command displays key information about currently running Docker containers. The specific output can vary slightly depending on the Docker version and any customizations, but generally includes these fields:
* **CONTAINER ID:** A unique identifier for the container. This is a shortened version; you can use `docker inspect <CONTAINER ID>` to see the full ID.
* **IMAGE:** The name of the Docker image from which the container was created.
* **COMMAND:** The command that was executed when the container started.
* **CREATED:** The time the container was created.
* **STATUS:** The current status of the container (e.g., "Up 3 minutes," "Exited (0)" ).
* **PORTS:** A list of ports mapped from the container to the host machine. This shows which ports on your host machine are accessible to access services running inside the container. It's usually displayed as `HOST_PORT:CONTAINER_PORT`. If no ports are mapped, this column might be blank or contain `-`.
* **NAMES:** One or more user-assigned names for the container. If you didn't assign a name, Docker will assign a generated name.
**Optional Information (depending on flags and Docker version):**
* `docker ps -a`: (Shows all containers, including stopped ones) Will add a further column indicating the exit code if the container has stopped.
* `docker ps --format "{{.ID}} {{.Names}} {{.Status}}"`: (Using custom formatting) Allows specifying which fields are displayed and their order. This example shows only the ID, Names, and Status.
In short, `docker ps` gives you a quick overview of your running containers, allowing you to see what's running, which image they're based on, how long they've been running, and how to access them.
",
"error": null,
"has_error":false,
}
Analyze Data
Extract insights, patterns, and potential security risks from a given data.
Input Field
Choose a connection that you have previously created and then fill in the necessary information in the following input fields to complete the connection.
Input Name | Description | Required |
---|---|---|
Data | Jinja-templated text containing a dataset that requires analysis. | Required |
Output
JSON containing the following items:
{
"result": "
## Analysis of Docker `ps` Command Output
The provided text describes the output of the `docker ps` command, not a dataset with specific values. Therefore, a numerical analysis is impossible. Instead, this response will analyze the potential insights and security risks based on the described output fields.
### Key Insights from `docker ps` Output
* **System Resource Utilization:** The `STATUS` field (e.g., "Up 3 minutes") combined with information from other commands (not included in the provided text, like `docker stats`) can be used to infer resource consumption (CPU, memory, network) by each container. Prolonged "Up" time for resource-intensive containers might indicate a potential performance bottleneck.
* **Running Applications Overview:** The `IMAGE`, `COMMAND`, and `NAMES` fields provide a quick overview of the applications running in Docker containers. This is crucial for monitoring and managing the system.
* **Network Exposure:** The `PORTS` field is critical for security analysis. It shows which ports are exposed to the host machine and, by extension, the network. Unnecessarily exposed ports represent a significant security vulnerability.
* **Container Health:** The `STATUS` field indicates the health of each container. A container showing "Exited (non-zero)" signals a failure that needs investigation. Repeated failures could point to problems within the container's application or its configuration.
* **Container Lifecycle Management:** Analyzing the `CREATED` field, combined with the `STATUS`, can help track the lifecycle of containers, identifying containers that might be outdated or no longer necessary.
### Potential Security Risks
* **Exposed Ports:** The `PORTS` field is the primary source of potential security vulnerabilities. Any ports exposed to the host machine without proper authorization or security measures (firewalls, access controls) represent a direct pathway for attackers to compromise the system. Specifically:
* **Unnecessary port exposure:** Containers exposing ports that aren't needed for their function represent significant risk.
* **Default ports:** Using default ports increases the risk of attack, as they are commonly targeted by malicious scripts.
* **Outdated Images:** Using outdated Docker images is a major security risk, as they often contain known vulnerabilities. The `IMAGE` field allows for identifying outdated images which need updates.
* **Privileged Containers:** While not directly shown by `docker ps`, the use of privileged containers (requiring additional command-line options during the container creation) grants significant system access and increases the impact of any compromise.
* **Unsecured Command Execution:** While the `COMMAND` field shows the command launched, it doesn't reveal any potentially insecure arguments or environment variables. A malicious user could craft commands within the container that present a security risk.
### Summary of Findings
The `docker ps` command provides essential information for monitoring running Docker containers, assessing resource usage, and identifying potential security vulnerabilities. Careful analysis of the `PORTS`, `IMAGE`, `STATUS`, and `COMMAND` fields is crucial for maintaining a secure and efficient Docker environment. A comprehensive security posture should include regular image updates, minimizing port exposure, and implementing appropriate access control mechanisms. The lack of specific data prevents a more detailed risk assessment.
",
"error": null,
"has_error":false,
}
Analyze Image
Analyze an image for meaningful insights, potential security risks, or abnormalities.
Input Field
Choose a connection that you have previously created and then fill in the necessary information in the following input fields to complete the connection.
Input Name | Description | Required |
---|---|---|
Image File ID | Jinja-templated text containing the file ID of the image for analysis | Required |
Output
JSON containing the following items:
{
"result": "
# Security Risks Analysis of the Image
This analysis examines a provided image for potential security risks, focusing on embedded malicious content, suspicious file characteristics, and obfuscated data patterns. Since a full analysis requires specialized tools and deep expertise in malware analysis, this report provides a high-level assessment based on observable characteristics.
## Embedded Malicious Content
* **No obvious embedded malicious content:** A visual inspection and basic analysis of the image data did not reveal any readily apparent embedded scripts or malicious code within the image file itself or its metadata (EXIF data). However, sophisticated steganographic techniques might conceal malicious payloads undetectable by simple inspection.
## Suspicious File Characteristics
| Characteristic | Finding | Evidence |
|--------------------------|----------------------------------------------|-------------------------------------------------------------------------|
| File Size | Relatively large for a simple graphic | The Base64 encoding suggests a larger file size than expected for the visible content.|
| Structure/Encoding | Standard PNG encoding appears to be used | The Base64 header starts with `iVBORw0KGgoAAA`, indicating PNG. However, the size suggests potential for hidden data.|
| Metadata (EXIF/XMP) | Not readily accessible for analysis | Requires specialized tools to extract and analyze this data. |
## Obfuscated or Unusual Data Patterns
* **Complex Base64 Encoding:** The image is provided in Base64 encoding, which itself is not inherently suspicious. However, the sheer size of the Base64 string, compared to what is visually present in the decoded image, hints at the possibility of hidden data. This could be benign (e.g., exceptionally high-resolution data) or malicious (e.g., a compressed executable file). The repetitive patterns observed in the image's visual representation could also be a symptom of obfuscation.
* **Repetitive Visual Patterns:** The decoded image shows repeating blocks of color. While this could be a stylistic choice, it raises a flag for potential obfuscation. Such patterns could be used to mask a secondary message or data stream embedded in the image using steganography.
## Recommendations
To mitigate potential risks:
* **Deep Scan with Malware Analysis Tools:** Use specialized tools designed for malware detection and analysis (e.g., VirusTotal, sandbox environments) to thoroughly scan the image file for any hidden malicious content. These tools are capable of identifying complex obfuscation and steganographic techniques.
* **Metadata Extraction and Analysis:** Use tools like `exiftool` or other metadata extractors to analyze the image's metadata for any suspicious information. Check for unusual data embedded within EXIF or XMP tags.
* **Careful Image Source Evaluation:** Always be cautious about the source of images. If the image originates from an untrusted source (e.g., an email attachment, a suspicious website), exercise extreme caution.
* **Avoid Direct Execution:** Never directly execute or open files from untrusted sources. Decoding Base64 data directly in a script also presents a risk, potentially opening the system to malicious code execution. Always thoroughly inspect and analyze files using a secure environment and appropriate tools before opening or using them.
**Disclaimer:** This analysis is based on limited information and visual inspection. A conclusive assessment requires advanced digital forensics and malware analysis techniques. The possibility of hidden malicious content, while not confirmed, cannot be entirely ruled out.
",
"error": null,
"has_error":false,
}
Summarize Alerts
Create a concise summary of system alerts, highlighting key entities, events, and timelines.
Input Field
Choose a connection that you have previously created and then fill in the necessary information in the following input fields to complete the connection.
Input Name | Description | Required |
---|---|---|
Prompt | Jinja-templated text containing a list of JSON objects representing system alerts that need summarization. Example: [{"alert_type": "Login Attempt", "timestamp": "2024-11-28T09:00:00Z", "user": "Alice"}, {"alert_type": "File Upload", "timestamp": "2024-11-28T09:05:00Z", "user": "Bob"}] | Required |
Output
JSON containing the following items:
{
"result": "
## Alert Summary: August 30, 2022
This report summarizes alerts triggered on August 30, 2022. Only one alert was generated during this period.
### Testing Alerts (1)
* **Total Alerts:** 1
| Alert ID | Alert Name | Alert Type | Creation Time | Severity | Affected Component(s) | Description |
|---------------|---------------------------------|-------------|-----------------------------|----------|-------------------------|-------------------------------------------|
| alert-591 | fetchAlertOperatorTesting | testing | 2022-08-30 05:19:05 UTC | Info | Ingest Alerts | Date : 6th july |
**Timeline:**
* **05:19:05 UTC:** `fetchAlertOperatorTesting` alert triggered.
**Analysis:**
The single alert is of type "testing" and originated from the "Ingest Alerts" node within the "fetchAlertOperatorPlaybook.1" flow (flow ID: flow-1201). The description ("Date : 6th july") suggests this might be a test alert referencing a past date and does not indicate an immediate issue.
**Actionable Insights & Next Steps:**
* **Review Testing Procedures:** The alert description lacks context. The testing procedures should be reviewed to ensure meaningful data is logged in future test alerts. Including relevant timestamps and specifics about what was being tested would be beneficial.
* **Alert Suppression (if applicable):** If this alert is expected and consistently irrelevant, consider implementing alert suppression rules to avoid cluttering monitoring dashboards.
**Anomalies and Patterns:**
No significant anomalies or patterns were observed as only one test alert was recorded. Further investigation is only warranted if similar alerts with limited information continue to appear.
",
"error": null,
"has_error":false,
}
Summarize Case
Generate a summary of an incident or case, including details about linked cases, entities, and the timeline.
Input Field
Choose a connection that you have previously created and then fill in the necessary information in the following input fields to complete the connection.
Input Name | Description | Required |
---|---|---|
Case Details | Jinja-templated JSON object containing case details. Example: {"case_id": "12345", "incident_type": "Data Breach", "reported_by": "Alice", "timestamp": "2024-11-28T08:30:00Z"} | Required |
Output
JSON containing the following items:
{
"result": "
# Case Summary: lhub-108 - "Title field mandatory test"
## Overview
* **Case ID:** lhub-108
* **Type:** Case
* **Severity:** Medium
* **Status:** New
* **Affected Components:** Unknown. The case lacks sufficient details to identify specific affected systems or processes. The title suggests a test related to a mandatory title field, possibly in a form or application.
* **Reporter:** [email protected]
* **Assignee:** Unassigned
## Timeline of Events
| Timestamp (UTC) | Action |
|-----------------|----------------------------------------------|
| 2024-04-22 11:31:09 | Case created. |
| 2024-11-29 15:06:45 | Attachment (Screenshot) added to the case. |
## Key Entities
* **Reporter:** [email protected]
* **Systems/Applications:** Unspecified. Requires further investigation to identify the system where the "Title field mandatory test" is performed.
* **Users:** [email protected] (reporter)
## Root Cause Analysis
The root cause is currently unknown. The case description is empty, and the provided data only indicates that a case was created with a title suggesting it might be related to testing a mandatory title field. Further investigation is needed to understand the context of the test and whether it revealed an actual issue.
## Recommendations
* **Clarify the Issue:** The reporter ([email protected]) needs to provide a detailed description of the issue, including steps to reproduce, expected behavior, and actual behavior.
* **Identify Affected System:** Determine the specific system or application where the mandatory title field is located.
* **Investigate Test Results:** Analyze the attached screenshot (Screenshot 2024-11-29 at 3.04.51 PM.png) to understand the outcome of the mandatory title field test.
* **Assign the Case:** Assign the case to a relevant individual or team for investigation and resolution.
* **Implement Preventive Measures (if applicable):** If the test reveals a flaw in the mandatory title field implementation, appropriate corrective actions should be taken. This may involve code changes, configuration updates, or user training.
The lack of information in the provided JSON makes a thorough analysis difficult. Addressing the recommendations above will provide the necessary context for effective resolution.
",
"error": null,
"has_error":false,
}
Phishing Risk Score
Analyze an HTML email and assess its risk level for phishing, providing reasons for the score.
Input Field
Choose a connection that you have previously created and then fill in the necessary information in the following input fields to complete the connection.
Input Name | Description | Required |
---|---|---|
Prompt | Jinja-templated HTML content of an email to evaluate for phishing risks. Example: Dear user, click here to reset your password... | Required |
Output
JSON containing the following items:
{
"result": "
# Phishing Risk Assessment
## Risk Score: 70
## Reasons for Score
The provided HTML email, while extremely simple, presents several significant red flags that contribute to a high phishing risk score. The lack of detail makes it impossible to assess specific elements like branding or sophisticated technical indicators, but the core elements are inherently suspicious.
| Issue Category | Specific Example | Risk Contribution (0-100) | Explanation |
|-----------------------------|-----------------------------------------------|---------------------------|------------------------------------------------------------------------------------|
| **Suspicious Links/Domains** | `click here to reset your password...` (text link only) | 50 | The lack of a visible URL makes it impossible to verify the destination. This is a classic phishing tactic. The vagueness of the link also raises suspicion. |
| **Misleading Sender Information** | None provided in the example. | 20 | The absence of sender information (name and email address) is highly suspicious. This allows the sender to conceal their identity. |
| **Spoofed Branding/Logos** | None provided in the example. | 0 | Not applicable as there is no branding information included. |
| **Poor Language Quality** | "Dear user..." (Generic and impersonal greeting) | 0 | While not extremely poor, it's unusually generic and lacks personal details, raising suspicion. |
| **Technical Indicators** | None readily apparent | 0 | The simplicity of the HTML itself is a minor red flag; more sophisticated phishing emails often use more complex HTML to bypass security filters. |
## Recommendations
* **Verify the Sender:** The most crucial step is to verify the sender's identity *independently*. Do NOT click any links within the email. Instead, go directly to the website of the organization (e.g., your bank, your email provider) by typing the address into your browser's address bar. Look for official contact information and reach out through a verified channel if you suspect an issue with your account.
* **Inspect the URL (if you see one):** If the link resolves to a real website, verify that it is legitimate. Often, phishing links will mimic genuine addresses by using very similar, but slightly altered domain names. Carefully compare the URL with that of the official website. Look for misspellings or suspicious additions to the domain name.
* **Report Suspicious Emails:** Forward the email to your email provider's abuse or spam reporting address, usually found in the email's help section. Report it to your organization's IT security team as well if applicable.
* **Do not click links or download attachments:** Opening links or attachments can expose your computer to malware or allow the phisher to access your personal information.
* **Do not reply to the email:** Responding to a phishing email can confirm your email address is active, potentially leading to more targeted attacks.
**In summary:** This email's extreme lack of detail and reliance on a generic, unverified link make it highly suspicious. A cautious approach is strongly advised. Even if the link led to a legitimate website, the email's unprofessional appearance and unclear origin warrant extreme skepticism.
",
"error": null,
"has_error":false,
}
Release Notes
v1.0.0
- Initial release 6 actions :Submit Prompt
,Analyze Data
,Analyze Image
,Summarize Alerts
,Summarize case
andPhishing risk Score
Updated 9 days ago