Mitigation Strategy: Change Default Voyager Admin Path
- Description:
- Open the
config/voyager.php
file located in theconfig
directory of your Laravel project. - Find the
'path'
configuration option within thevoyager
array. It will likely be set to'admin'
by default. - Replace
'admin'
with a unique and less predictable path. For example, use something like'secret-admin-panel'
or'backend-access'
. Choose a path that is not easily guessable. - Save the
config/voyager.php
file. - Inform all administrators about the new admin panel URL (e.g.,
yourdomain.com/secret-admin-panel
). Update any bookmarks or saved links accordingly.
- Open the
- List of Threats Mitigated:
- Brute-force attacks on default admin login: (Severity: Medium) - Attackers commonly target
/admin
for login attempts. Changing the path makes it harder to find the login page. - Automated vulnerability scans targeting default admin path: (Severity: Medium) - Automated tools often look for default admin paths to exploit known vulnerabilities.
- Information Disclosure (Default Path Exposure): (Severity: Low) - Revealing the default path makes it slightly easier for attackers to identify the technology stack and potential attack vectors.
- Brute-force attacks on default admin login: (Severity: Medium) - Attackers commonly target
- Impact:
- Brute-force attacks: Significantly reduces the risk of automated brute-force attacks targeting the default admin login page.
- Automated vulnerability scans: Reduces the likelihood of automated scanners finding and targeting the admin panel directly.
- Information Disclosure: Minimally reduces information disclosure by obscuring the admin panel location.
- Currently Implemented: Partially implemented. The
config/voyager.php
file exists, but the'path'
is likely still set to the default'admin'
. - Missing Implementation: Changing the
'path'
value inconfig/voyager.php
to a non-default, secret path.
Mitigation Strategy: Implement Strong Password Policies for Admin Users
- Description:
- Utilize Laravel's built-in authentication features or consider using packages like
laravel/fortify
orlaravel/jetstream
for enhanced password management. - Configure password complexity requirements specifically for Voyager admin users. This typically involves setting minimum password length, requiring uppercase and lowercase letters, numbers, and special characters.
- Enforce password history to prevent Voyager admin users from reusing recently used passwords.
- Consider implementing password expiration policies, requiring Voyager admin users to change passwords regularly (e.g., every 90 days).
- Educate Voyager admin users about the importance of strong passwords and best practices for password management within the context of the Voyager admin panel.
- Utilize Laravel's built-in authentication features or consider using packages like
- List of Threats Mitigated:
- Password Guessing/Brute-force attacks against Voyager admin accounts: (Severity: High) - Weak passwords are easily guessed or cracked through brute-force attacks, leading to Voyager admin account compromise.
- Credential Stuffing against Voyager admin accounts: (Severity: High) - If Voyager admin users reuse passwords across multiple services, compromised credentials from other breaches can be used to access the Voyager admin panel.
- Impact:
- Password Guessing/Brute-force attacks: Significantly reduces the risk by making passwords harder to guess or crack for Voyager admin accounts.
- Credential Stuffing: Reduces the risk by encouraging unique and strong passwords for Voyager admin accounts, making reused credentials less effective.
- Currently Implemented: Partially implemented. Laravel's default authentication provides basic password hashing, but strong password policies specifically for Voyager admin users might not be enforced.
- Missing Implementation: Configuring and enforcing strong password complexity rules, password history, and potentially password expiration within the application's authentication system, specifically applied to Voyager admin users.
Mitigation Strategy: Regularly Review and Audit Voyager User Roles and Permissions
- Description:
- Periodically (e.g., monthly or quarterly) review the list of Voyager users and their assigned roles within the Voyager admin panel.
- Examine the permissions granted to each Voyager role. Ensure that roles only have the necessary permissions to perform their intended tasks within Voyager (Principle of Least Privilege).
- Remove any unnecessary permissions from Voyager roles.
- If Voyager users have been granted roles that are no longer needed, revoke those roles.
- Document the Voyager roles and their associated permissions for clarity and future audits.
- List of Threats Mitigated:
- Unauthorized Access within Voyager due to excessive permissions: (Severity: Medium to High) - Voyager users with overly broad permissions can access and modify data or functionalities within Voyager they shouldn't, potentially leading to data breaches or system compromise through Voyager.
- Insider Threats (Accidental or Malicious) within Voyager: (Severity: Medium to High) - Overly permissive Voyager roles can increase the potential damage from accidental mistakes or malicious actions by authorized Voyager users.
- Lateral Movement within Voyager after Account Compromise: (Severity: Medium) - If a Voyager account with excessive permissions is compromised, attackers can move laterally within the Voyager system and gain access to more sensitive areas managed by Voyager.
- Impact:
- Unauthorized Access within Voyager: Significantly reduces the risk by limiting Voyager user access to only what is necessary within the Voyager admin panel.
- Insider Threats within Voyager: Reduces the potential impact of insider threats within Voyager by limiting the scope of damage an individual Voyager user can cause.
- Lateral Movement within Voyager: Limits the attacker's ability to escalate privileges and move laterally within the Voyager system after compromising a Voyager account.
- Currently Implemented: Potentially partially implemented. Voyager's RBAC system is in place, but regular reviews and audits of Voyager roles and permissions might not be consistently performed.
- Missing Implementation: Establishing a schedule for regular Voyager role and permission reviews, documenting Voyager roles and permissions, and implementing a process for Voyager permission adjustments based on audits.
Mitigation Strategy: Implement Two-Factor Authentication (2FA) for Admin Users
- Description:
- Choose a 2FA method (e.g., Time-Based One-Time Passwords (TOTP) using apps like Google Authenticator or Authy, SMS-based verification, or hardware security keys). TOTP is generally recommended for security and ease of use.
- Integrate a 2FA package into your Laravel application. Packages like
pragmarx/google2fa-laravel
ordarkghosthunter/laraguard
simplify this process. - Configure the chosen 2FA package to specifically protect the Voyager admin login route.
- Enable 2FA for all Voyager admin users. Guide users through the setup process (e.g., scanning a QR code with their authenticator app) for accessing the Voyager admin panel.
- Ensure a recovery mechanism is in place in case Voyager admin users lose access to their 2FA device (e.g., recovery codes).
- List of Threats Mitigated:
- Voyager Admin Account Takeover due to compromised passwords: (Severity: Critical) - Even if an attacker obtains a Voyager admin user's password (through phishing, data breaches, etc.), 2FA prevents Voyager admin account access without the second factor.
- Brute-force attacks on Voyager admin login credentials: (Severity: High) - 2FA makes brute-force attacks against Voyager admin logins significantly more difficult and time-consuming, rendering them largely ineffective.
- Impact:
- Voyager Admin Account Takeover: Dramatically reduces the risk of Voyager admin account takeover, even if passwords are compromised.
- Brute-force attacks against Voyager Admin Login: Makes brute-force attacks practically infeasible for Voyager admin account compromise.
- Currently Implemented: Likely missing. 2FA is often not implemented by default and requires explicit configuration for the Voyager admin panel.
- Missing Implementation: Integrating a 2FA package, configuring it for the Voyager admin panel login, and enabling it for all Voyager admin users.
Mitigation Strategy: Thoroughly Validate User Inputs in Voyager BREAD Configuration
- Description:
- When defining BREAD (Browse, Read, Edit, Add, Delete) for your models in Voyager, carefully review each field's configuration in the Voyager admin panel.
- For each field that accepts user input through Voyager's BREAD interface (e.g., text fields, textareas, select boxes), define appropriate validation rules using Laravel's validation syntax within the BREAD configuration.
- Utilize validation rules to enforce data type, format, length, and other constraints relevant to the field within the context of Voyager's BREAD operations. For example, use
required
,string
,email
,max:255
,integer
,url
, etc. - Test the validation rules thoroughly within the Voyager admin panel to ensure they are effective in preventing invalid data from being submitted through Voyager's BREAD forms.
- List of Threats Mitigated:
- SQL Injection through Voyager BREAD forms: (Severity: Critical) - Improperly validated inputs in Voyager BREAD forms can be used to inject malicious SQL queries, potentially leading to data breaches, data manipulation, or complete database compromise via Voyager.
- Cross-Site Scripting (XSS) through Voyager BREAD forms: (Severity: High) - While input validation primarily targets SQL injection, it can also help prevent certain types of stored XSS by sanitizing or rejecting malicious input patterns submitted through Voyager BREAD forms.
- Data Integrity Issues due to Voyager BREAD operations: (Severity: Medium) - Lack of validation in Voyager BREAD forms can lead to inconsistent or incorrect data being stored in the database through Voyager, causing application errors and data corruption.
- Impact:
- SQL Injection: Significantly reduces the risk of SQL injection through Voyager BREAD forms by preventing malicious code from being injected through user inputs in Voyager.
- Cross-Site Scripting (Stored XSS): Partially reduces the risk of stored XSS through Voyager BREAD forms by sanitizing or rejecting some malicious input patterns, but output encoding is more crucial for XSS prevention.
- Data Integrity Issues: Significantly improves data integrity of data managed through Voyager BREAD by ensuring data conforms to expected formats and constraints.
- Currently Implemented: Partially implemented. Voyager provides basic validation options in BREAD, but the extent and thoroughness of validation rules might vary across different BREAD configurations within Voyager.
- Missing Implementation: Reviewing all BREAD configurations in Voyager, identifying fields accepting user input through Voyager BREAD forms, and implementing comprehensive validation rules for each field within Voyager BREAD settings.
Mitigation Strategy: Sanitize User Inputs in Custom Voyager Controllers and Views
- Description:
- If you have extended Voyager's functionality with custom controllers or views that handle user input within the Voyager admin panel context, ensure you are sanitizing this input before processing it.
- Use Laravel's built-in sanitization functions (e.g.,
trim()
,strip_tags()
,e()
) or consider using a dedicated HTML sanitization library likehtmlpurifier/htmlpurifier
. - Sanitize input data before using it in database queries executed from custom Voyager controllers, displaying it in custom Voyager views, or passing it to other parts of your application from Voyager components.
- Context-aware sanitization is important. Sanitize differently depending on how the data will be used (e.g., HTML sanitization for display in HTML, database escaping for SQL queries).
- List of Threats Mitigated:
- Cross-Site Scripting (XSS) in custom Voyager components: (Severity: High) - Failing to sanitize user input in custom Voyager code can introduce XSS vulnerabilities, allowing attackers to inject malicious scripts into the Voyager admin panel.
- SQL Injection (in custom queries within Voyager): (Severity: Critical) - If custom Voyager controllers execute raw SQL queries with unsanitized user input, SQL injection vulnerabilities can arise within the Voyager context.
- Other Injection Attacks (e.g., Command Injection) in custom Voyager code: (Severity: Medium to High) - Depending on how user input is processed in custom Voyager code, other types of injection attacks might be possible if input is not properly sanitized.
- Impact:
- Cross-Site Scripting (XSS): Significantly reduces the risk of XSS vulnerabilities in custom Voyager code.
- SQL Injection (in custom queries within Voyager): Significantly reduces the risk of SQL injection in custom database queries within Voyager.
- Other Injection Attacks: Reduces the risk of various injection attacks in custom Voyager code depending on the sanitization methods used and the context of input usage.
- Currently Implemented: Partially implemented or missing. If custom Voyager controllers and views are present, sanitization might be inconsistently applied or overlooked in these custom Voyager components.
- Missing Implementation: Auditing custom Voyager controllers and views for user input handling, identifying areas where sanitization is needed within Voyager customizations, and implementing appropriate sanitization techniques in custom Voyager code.
Mitigation Strategy: Properly Escape Output in Voyager Views and Customizations
- Description:
- When displaying data in Voyager views, especially user-generated content or data retrieved from the database within the Voyager admin panel, use Blade templating engine's escaping features.
- Use
{{ $variable }}
for standard output escaping in Voyager views. Blade automatically escapes output to prevent XSS vulnerabilities in Voyager views. - Be cautious when using raw output with
{!! $variable !!}
in Voyager views. Only use raw output when you are absolutely certain the data is safe and already properly sanitized (e.g., when displaying trusted HTML content) within Voyager views. - If you are creating custom Voyager views or modifying existing Voyager views, ensure you are consistently using Blade's escaping features within these Voyager view customizations.
- List of Threats Mitigated:
- Cross-Site Scripting (XSS) in Voyager Views: (Severity: High) - Failing to properly escape output in Voyager views allows attackers to inject malicious scripts that will be executed in users' browsers when they view the Voyager admin panel.
- Impact:
- Cross-Site Scripting (XSS): Significantly reduces the risk of XSS vulnerabilities in Voyager views by preventing malicious scripts from being rendered as executable code in the browser when accessing the Voyager admin panel.
- Currently Implemented: Partially implemented. Blade's default escaping is likely used in many Voyager views, but there might be instances where raw output is used unnecessarily or escaping is missed in custom Voyager views.
- Missing Implementation: Reviewing Voyager views and any custom Voyager views, identifying instances of raw output usage, and ensuring proper escaping is applied everywhere, especially for user-generated content displayed within the Voyager admin panel.
Mitigation Strategy: Restrict Allowed File Types in Voyager Media Manager
- Description:
- Open the
config/voyager.php
file. - Locate the
'media'
configuration array. - Find the
'allowed_mimetypes'
and'allowed_extensions'
options within the'media'
array. - Modify these options to specify only the file types that are absolutely necessary for your application's media management within Voyager. For example, if you only need images, allow
image/jpeg
,image/png
,image/gif
, and corresponding extensions likejpg
,jpeg
,png
,gif
. - Remove any potentially dangerous file types like executable files (
.exe
,.sh
,.bat
,.php
, etc.), HTML files (.html
,.htm
), and other file types that are not required for your application's Voyager Media Manager functionality. - Save the
config/voyager.php
file.
- Open the
- List of Threats Mitigated:
- Malware Upload and Distribution through Voyager Media Manager: (Severity: High) - Allowing unrestricted file types enables attackers to upload malware (viruses, trojans, etc.) through the Voyager Media Manager, which could then be distributed to users or used to compromise the server via files uploaded through Voyager.
- Server-Side Scripting Vulnerabilities (if executable files are allowed and executed) via Voyager Media Manager: (Severity: Critical) - If executable files like PHP scripts are allowed through Voyager Media Manager and the server is misconfigured to execute them, attackers could gain complete control of the server via uploaded files through Voyager.
- Cross-Site Scripting (HTML file upload) via Voyager Media Manager: (Severity: Medium) - Allowing HTML file uploads through Voyager Media Manager could lead to stored XSS vulnerabilities if these files are served directly from Voyager.
- Impact:
- Malware Upload and Distribution: Significantly reduces the risk of malware being uploaded and distributed through the Voyager Media Manager.
- Server-Side Scripting Vulnerabilities: Eliminates the risk of server-side scripting vulnerabilities arising from executable files uploaded via Voyager Media Manager (if executable files are blocked).
- Cross-Site Scripting (HTML file upload): Reduces the risk of stored XSS from HTML files uploaded via Voyager Media Manager (if HTML files are blocked).
- Currently Implemented: Likely partially implemented or using default Voyager settings which might be too permissive in the Voyager Media Manager.
- Missing Implementation: Reviewing and restricting
'allowed_mimetypes'
and'allowed_extensions'
inconfig/voyager.php
to only include necessary and safe file types for the Voyager Media Manager.
Mitigation Strategy: Implement File Size Limits in Voyager Media Manager
- Description:
- Open the
config/voyager.php
file. - Locate the
'media'
configuration array. - Find the
'max_upload_size'
option within the'media'
array. It is typically set tonull
by default (no limit). - Set a reasonable file size limit in kilobytes (KB) or megabytes (MB) based on your application's needs and server resources for files uploaded through Voyager Media Manager. For example,
'max_upload_size' => 2048
(2MB). - Save the
config/voyager.php
file.
- Open the
- List of Threats Mitigated:
- Denial of Service (DoS) attacks through large file uploads via Voyager Media Manager: (Severity: Medium to High) - Attackers can attempt to exhaust server resources (disk space, bandwidth, processing power) by uploading extremely large files through Voyager Media Manager, leading to DoS.
- Storage Exhaustion due to Voyager Media Manager uploads: (Severity: Medium) - Unrestricted file uploads through Voyager Media Manager can quickly consume server storage space, leading to application instability or failure.
- Impact:
- Denial of Service (DoS) attacks: Reduces the risk of DoS attacks caused by large file uploads through Voyager Media Manager by limiting the maximum file size.
- Storage Exhaustion: Prevents storage exhaustion from Voyager Media Manager uploads by limiting the size of individual uploaded files.
- Currently Implemented: Likely missing or using default settings with no file size limit in Voyager Media Manager.
- Missing Implementation: Setting a reasonable value for
'max_upload_size'
inconfig/voyager.php
for Voyager Media Manager uploads.
Mitigation Strategy: Store Uploaded Files Outside of the Publicly Accessible Webroot
- Description:
- Open the
config/voyager.php
file. - Locate the
'storage'
configuration array. - Examine the
'disk'
and'root'
options within the'storage'
array. By default, Voyager might use thepublic
disk, which stores files in thepublic
directory, making them directly accessible via the web. - Change the
'disk'
option to use a storage disk that is configured to store files outside of the publicly accessible webroot. You can use Laravel'slocal
disk and configure its root path to a directory outside ofpublic
for files managed by Voyager. - Ensure that the chosen storage directory for Voyager Media Manager files is not directly accessible via web URLs.
- Voyager's Media Manager handles serving files through routes, ensure this mechanism is used and not bypassed for accessing files managed by Voyager.
- Open the
- List of Threats Mitigated:
- Direct Access to Voyager Media Manager Uploaded Files (Unauthorized Access): (Severity: Medium to High) - If files are stored in the public webroot, attackers can directly access files uploaded through Voyager Media Manager by guessing or finding file URLs, potentially bypassing Voyager's access control mechanisms.
- Information Disclosure via Voyager Media Manager Files: (Severity: Medium) - Publicly accessible files uploaded through Voyager Media Manager might inadvertently expose sensitive information if file names or content are predictable or contain sensitive data.
- Bypass of Voyager Application Security Logic: (Severity: Medium) - Direct access to files uploaded via Voyager Media Manager bypasses any access control or security checks implemented within the Voyager application.
- Impact:
- Direct Access to Voyager Media Manager Uploaded Files: Significantly reduces the risk of unauthorized direct access to files uploaded through Voyager Media Manager.
- Information Disclosure: Reduces the risk of information disclosure through publicly accessible files uploaded via Voyager Media Manager.
- Bypass of Voyager Application Security Logic: Prevents bypassing Voyager application security logic by forcing file access through Voyager's intended mechanisms.
- Currently Implemented: Potentially missing or using default settings that store files in the
public
directory for Voyager Media Manager uploads. - Missing Implementation: Configuring a storage disk (e.g.,
local
) to store files uploaded via Voyager Media Manager outside of thepublic
directory, updating the'disk'
setting inconfig/voyager.php
, and ensuring file access is controlled through Voyager's intended application logic.
Mitigation Strategy: Keep Voyager and its Dependencies Up-to-Date
- Description:
- Regularly check for updates to Voyager and its direct dependencies.
- Monitor Voyager's GitHub repository, release notes, and security advisories for announcements of new Voyager versions and security patches.
- Use Composer to update Voyager and its dependencies. Run
composer update the-dev-dojo/voyager
to update Voyager to the latest version (within version constraints defined incomposer.json
). - After updating Voyager, thoroughly test the Voyager admin panel and related functionalities to ensure compatibility and identify any breaking changes.
- Prioritize security updates for Voyager and apply them promptly.
- List of Threats Mitigated:
- Exploitation of Known Vulnerabilities in Voyager: (Severity: Critical to High) - Outdated versions of Voyager often contain known security vulnerabilities that attackers can exploit. Keeping Voyager up-to-date patches these vulnerabilities.
- Impact:
- Exploitation of Known Vulnerabilities in Voyager: Significantly reduces the risk of exploitation of known vulnerabilities in Voyager by patching them promptly.
- Currently Implemented: Potentially inconsistently implemented. Voyager updates might be performed periodically, but a regular and proactive update schedule for Voyager might be missing.
- Missing Implementation: Establishing a regular schedule for checking and applying Voyager updates, monitoring Voyager security advisories, and implementing a process for testing and deploying Voyager updates.
Mitigation Strategy: Review Voyager Configuration Files for Security Best Practices
- Description:
- Carefully review all Voyager configuration files located in the
config
directory, especiallyconfig/voyager.php
andconfig/voyager-hooks.php
. - Examine settings within these Voyager configuration files related to:
- Authentication:
path
,controllers.namespace
,middleware.admin
,middleware.guest
. - Storage:
storage.disk
,storage.root
,media.allowed_mimetypes
,media.allowed_extensions
,media.max_upload_size
. - Permissions and Roles:
user.admin_role_name
. - Other Voyager specific settings:
database.tables.users
,database.tables.roles
, etc.
- Authentication:
- Ensure that these Voyager settings are configured according to security best practices and your application's specific security requirements for the Voyager admin panel. For example, verify that the admin path is changed in Voyager config, file upload restrictions are in place in Voyager config, and storage settings are secure as configured in Voyager.
- Document the Voyager configuration choices and their security implications.
- Carefully review all Voyager configuration files located in the
- List of Threats Mitigated:
- Misconfiguration Vulnerabilities in Voyager: (Severity: Medium to High) - Default or insecure Voyager configurations can introduce vulnerabilities or weaken security measures within the Voyager admin panel. Reviewing Voyager configuration files helps identify and rectify Voyager-specific misconfigurations.
- Information Disclosure (Voyager Configuration Details): (Severity: Low to Medium) - Insecure Voyager configurations might inadvertently expose sensitive information or reveal attack vectors related to the Voyager admin panel.
- Impact:
- Misconfiguration Vulnerabilities in Voyager: Reduces the risk of vulnerabilities arising from insecure or default Voyager configurations.
- Information Disclosure: Minimizes the risk of information disclosure through Voyager configuration settings.
- Currently Implemented: Potentially partially implemented. Initial Voyager configuration might have been done, but a dedicated security review of Voyager configuration files might be missing.
- Missing Implementation: Scheduling a security-focused review of all Voyager configuration files to ensure they align with security best practices and application requirements specifically for the Voyager admin panel.
Mitigation Strategy: Monitor Voyager Logs for Suspicious Activity
- Description:
- Enable logging for Voyager admin panel activity. Leverage Laravel's logging capabilities to capture events specifically related to Voyager.
- Configure logging to capture relevant Voyager-specific events, such as:
- Failed login attempts to the Voyager admin panel.
- Successful logins to Voyager from unusual IP addresses or at unusual times.
- Unauthorized access attempts within Voyager (e.g., attempts to access Voyager resources without proper permissions).
- Unusual data modifications or deletions within Voyager.
- Error logs specifically related to Voyager functionalities.
- Regularly review these Voyager-specific logs (e.g., daily or weekly) for any suspicious patterns or anomalies related to Voyager admin panel usage.
- Set up alerts for critical Voyager security events (e.g., multiple failed Voyager login attempts from the same IP, unauthorized access attempts within Voyager) to enable timely incident response related to Voyager.
- Use log analysis tools or Security Information and Event Management (SIEM) systems to automate Voyager log monitoring and anomaly detection if Voyager log volume is high.
- List of Threats Mitigated:
- Active Attacks and Intrusions against Voyager (Early Detection): (Severity: Critical to High) - Voyager log monitoring can help detect active attacks or intrusions targeting the Voyager admin panel in progress, allowing for timely incident response and mitigation within Voyager.
- Unauthorized Access and Data Breaches via Voyager (Detection and Investigation): (Severity: Critical to High) - Voyager logs provide valuable evidence for investigating security incidents related to Voyager, identifying compromised Voyager accounts, and understanding the scope of data breaches originating from or affecting Voyager.
- Insider Threats within Voyager (Detection and Deterrence): (Severity: Medium to High) - Voyager log monitoring can help detect and deter malicious activities by insiders within the Voyager admin panel.
- Impact:
- Active Attacks and Intrusions against Voyager: Improves the ability to detect and respond to active attacks targeting Voyager in real-time, minimizing potential damage to the Voyager admin panel and data managed by Voyager.
- Unauthorized Access and Data Breaches via Voyager: Enhances incident response capabilities for Voyager-related security incidents and provides forensic evidence for investigations involving Voyager.
- Insider Threats within Voyager: Acts as a deterrent and provides evidence for investigating insider threats within the Voyager admin panel.
- Currently Implemented: Potentially partially implemented. Laravel's logging is likely enabled, but specific logging for Voyager admin panel activity and proactive log monitoring of Voyager-specific logs might be missing.
- Missing Implementation: Configuring detailed logging for Voyager admin panel activity, setting up regular Voyager log review processes, implementing alerts for critical Voyager security events, and potentially integrating with log analysis tools or SIEM systems for Voyager logs.