diff --git a/network-services-pentesting/pentesting-sap.md b/network-services-pentesting/pentesting-sap.md index 542e8da1b59..34e2a916f9d 100644 --- a/network-services-pentesting/pentesting-sap.md +++ b/network-services-pentesting/pentesting-sap.md @@ -201,6 +201,85 @@ BWDEVELOPER:Down1oad:001 ``` +# Configuration Parameters + +If you have correct login details during the pentest or you have managed to login to SAP GUI using basic credentials, you are able to check the parameter values. Many basic and custom configuration parameter values ​​are considered vulnerabilities. + +You can check parameter values ​​both manually and automatically, using scripts (e.g. [SAP Parameter Validator](https://github.com/damianStrojek/SAPPV)). + +## Manual Parameter Checking + +By navigating to Transaction Code `RSPFPAR`, you can query different parameters and look up their values. + +The table below contains the defined parameters and the conditions for which they are distinguished. + +For example, if gw/reg_no_conn_info is set to less than 255 (`<255`), then it should be considered as threat. Similarly, if icm/security_log is equal to two (`2`), it will also be a possible threat. + +| Parameter | Constraint | Description | +|------------------------------------------------|-------------|------------------------------------------------| +| `auth/object_disabling_active` | `Y` | Indicates if object disabling is active. | +| `auth/rfc_authority_check` | `<2` | Sets the authority check level for RFCs. | +| `auth/no_check_in_some_cases` | `Y` | Specifies whether checks are bypassed in some cases. | +| `bdc/bdel_auth_check` | `FALSE` | Determines if authorization checks are enforced in BDC. | +| `gw/reg_no_conn_info` | `<255` | Limits the number of characters for registration number connection info. | +| `icm/security_log` | `2` | Defines the security log level for ICM (Internet Communication Manager). | +| `icm/server_port_0` | `Display` | Specifies the server port for ICM (port 0). | +| `icm/server_port_1` | `Display` | Specifies the server port for ICM (port 1). | +| `icm/server_port_2` | `Display` | Specifies the server port for ICM (port 2). | +| `login/password_compliance_to_current_policy` | `0` | Enforces password compliance with the current policy. | +| `login/no_automatic_user_sapstar` | `0` | Disables automatic user SAPSTAR assignment. | +| `login/min_password_specials` | `0` | Minimum number of special characters required in passwords. | +| `login/min_password_lng` | `<8` | Minimum length required for passwords. | +| `login/min_password_lowercase` | `0` | Minimum number of lowercase letters required in passwords. | +| `login/min_password_uppercase` | `0` | Minimum number of uppercase letters required in passwords. | +| `login/min_password_digits` | `0` | Minimum number of digits required in passwords. | +| `login/min_password_letters` | `1` | Minimum number of letters required in passwords. | +| `login/fails_to_user_lock` | `<5` | Number of failed login attempts before locking the user account. | +| `login/password_expiration_time` | `>90` | Password expiration time in days. | +| `login/password_max_idle_initial` | `<14` | Maximum idle time in minutes before requiring password re-entry (initial). | +| `login/password_max_idle_productive` | `<180` | Maximum idle time in minutes before requiring password re-entry (productive). | +| `login/password_downwards_compatibility` | `0` | Specifies if downward compatibility for passwords is enabled. | +| `rfc/reject_expired_passwd` | `0` | Determines if expired passwords are rejected for RFC (Remote Function Calls). | +| `rsau/enable` | `0` | Enables or disables RS AU (Authorization) checks. | +| `rdisp/gui_auto_logout` | `<5` | Specifies the time in minutes before automatic logout of GUI sessions. | +| `service/protectedwebmethods` | `SDEFAULT` | Specifies the default settings for protected web methods. | +| `snc/enable` | `0` | Enables or disables Secure Network Communication (SNC). | +| `ucon/rfc/active` | `0` | Activates or deactivates UCON (Unified Connectivity) RFCs. | + +## Script for Parameter Checking + +Due to the number of parameters, it is also possible to export all of them to an .XML file and use the script [SAPPV (SAP Parameter Validator)](https://github.com/damianStrojek/SAPPV), which will check all the above-mentioned parameters and print them values ​​with appropriate distinction. + +``` +./SAPPV.sh EXPORT.XML + +Parameter: auth/no_check_in_some_cases +User-Defined Value: No data +System Default Value: Y +Comment: Activation of the Profile Generator +Vulnerability: "SAP Parameter Misconfiguration: auth/no_check_in_some_cases" + +Parameter: auth/object_disabling_active +User-Defined Value: N +System Default Value: N +Comment: Value 'N' prohibits disabling of authorization objects +Vulnerability: "SAP Parameter Misconfiguration: auth/object_disabling_active" + +Parameter: auth/rfc_authority_check +User-Defined Value: 6 +System Default Value: 6 +Comment: Execution option for the RFC authority check +Vulnerability: "SAP Parameter Misconfiguration: auth/rfc_authority_check" + +Parameter: bdc/bdel_auth_check +User-Defined Value: No data +System Default Value: FALSE +Comment: batch-input: check authorisation for activity DELE when delete TA +Vulnerability: "SAP Parameter Misconfiguration: bdc/bdel_auth_check" + +[...] +``` + # Attack! * Check if it runs on old servers or technologies like Windows 2000.