Hi Jaime, Keith and Tim,
Thanks for your answers and input!
Harmen
-----Oorspronkelijk bericht-----
Van:
simple...@googlegroups.com [mailto:
simple...@googlegroups.com] Namens Jaime Perez Crespo
Verzonden: Thursday 16 August 2018 12:38
Aan:
simple...@googlegroups.com
Onderwerp: Re: [simplesamlphp-users] hiding the SSP admin page from prying eyes and brute-force attacks
Hi Harmen,
On 16 Aug 2018, at 11:44 AM, Harmen Meijer <
harmen...@bsl.nl> wrote:
> Hi,
>
> We've had our SP security tested and received the following advice:
>
> ------------------------------------
> The target application was found to be publicly exposing an administrative login page. This is not inline with good security practice as it attracts unwanted attention and exposes the application to a variety of potential attacks, including brute-force password attacks. As authentication was out of scope for this particular instance of the assessment, no brute-force attacks have been performed.
>
> The following administrative login page was found to be publicly available:
https://urldefense.proofpoint.com/v2/url?u=https-3A__example.com_simplesaml_module.php_core_loginuserpass.php-3FAuthState-3D-5F4ac84ffb8e431edc0a5d83fe261ea436b9e5b372e0-253Ahttps-253A-252F-252Fexample.com-252Fsimplesaml-252Fmodule.php-252Fcore-252Fas-5Flogin.php-253FAuthId-253Dadmin-2526ReturnTo-253Dhttps-25253A-25252F-25252Fexample.com-25252Fsimplesaml-25252Fmodule.php-25252Fcore-25252Ffrontpage-5Fwelcome.php&d=DwIFaQ&c=vh6FgFnduejNhPPD0fl_yRaSfZy8CWbWnIf4XJhSqx8&r=9jpZoSz9hqgzBa5Rv9G13Dq2-0-e7lsTgw1j4vdt1eQ&m=eXSktswWxF9nehdEk0gKB2B1_a2Xigm67Polo-5S4vc&s=ts76zwA5Px-EBEHYJIz19NH9sXmRm4IOdralPyVVP_k&e=
>
> Please note that the Username field is disabled, and shows the "admin" user as the only user to log on to the application. Technically, this would be categorised as username enumeration, only without the need to perform an enumeration attack against the target.
>
> Recommendation
> Restrict public access to the administrative login. If remote access is necessary, consider restricting access to authorised IP addresses by using VPN technology and/or enforcing strong authentication and/or two (or more) factor authentication.
> --------------------------------------
>
> Following their advice I restricted access to the admin login pages by ip range
10.0.0.0/24 from httpd.conf like this:
>
> <Location "/simplesaml/module.php/core/loginuserpass.php">
> Order deny,allow
> Deny from all
> Allow from
10.0.0.0/24
> </Location>
>
> Problem solved but it seems odd that I need to implement security measures to secure SSP security software. Is there a better way to secure the admin pages? Or is there an out of the box one, maybe from within the SSP application config?
https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_simplesamlphp_simplesamlphp_blob_master_config-2Dtemplates_config.php-23L118-2DL123&d=DwIFaQ&c=vh6FgFnduejNhPPD0fl_yRaSfZy8CWbWnIf4XJhSqx8&r=9jpZoSz9hqgzBa5Rv9G13Dq2-0-e7lsTgw1j4vdt1eQ&m=eXSktswWxF9nehdEk0gKB2B1_a2Xigm67Polo-5S4vc&s=J82Pa3lg4fWMEwcZAfnINaIL_kkES3Izggw2peteRNY&e=
In any case, the countermeasures they are suggesting are a bit misguided, in the sense that “hiding” the fact that there’s an administrative login is essentially "security by obscurity”, which is generally considered as bad practice. The security of something should not depend on it being unknown or hidden. Additionally, they are kind of missing the point of SSP. The same problem applies to regular login. Obviously, it sounds really weird to use a VPN and/or restrict access by IP address in order to use a software that’s *precisely* intended to avoid IP access controls and VPNs.
That given, and to answer your comment about "implementing security measures to secure SSP”, it makes full sense since SSP is basically a web application, and as such, it cannot anticipate and protect against all possible attack surfaces (e.g. the server where you host it must be secure, and SSP cannot do anything to protect its signing key if no proper access rules are enforced in the server). An application that provides any kind of security cannot make your infrastructure secure beyond the limits of the application itself.
In this particular scenario (brute force attacks), there’s not much the software could do. It could slow down each authentication request for the admin auth source, so that it’s really hard for an attacker to test many passwords in a small amount of time. However, a smart attacker would simply perform the attack in parallel, running the countermeasure ineffective. If many passwords are tested in parallel, that could in fact lead to a Denial of Service on your installation, when the maximum number of clients allowed is hit by the attacker. This is something that needs to be accounted for outside the software, in the server and in the network.
Another alternative would be to record the amount of passwords tried per IP address, but there are as well techniques that can be used to circumvent this limitation (e.g. using botnets with thousands of different IP addresses) and it would make it more difficult to deploy (an extra database would be needed) and require more resources (two queries to the database per request, one to test if the client passed the limit, another to increase the attempt count).
So, as you can see, nothing really useful that SSP can do on its own. I’d recommend you to set a very long, alphanumeric password to the admin user, making it unfeasible to guess by brute force in a reasonable amount of time. If you are worried about attackers with enough resources to do a successful brute force attack, you should worry about them breaking your user’s passwords rather than the admin password (which doesn’t really offer them much). In that case, you’d need to deploy detection measures in your network, in order to detect possible brute force attacks and restrict access at the network level.
--
Jaime Pérez
Uninett / Feide
jaime...@uninett.no
jaime...@protonmail.com
9A08 EA20 E062 70B4 616B 43E3 562A FE3A 6293 62C2
"Two roads diverged in a wood, and I, I took the one less traveled by, and that has made all the difference."
- Robert Frost
--
This is a mailing list for users of SimpleSAMLphp, not a support service. If you are willing to buy commercial support, please take a look here:
https://urldefense.proofpoint.com/v2/url?u=https-3A__simplesamlphp.org_support&d=DwIFaQ&c=vh6FgFnduejNhPPD0fl_yRaSfZy8CWbWnIf4XJhSqx8&r=9jpZoSz9hqgzBa5Rv9G13Dq2-0-e7lsTgw1j4vdt1eQ&m=eXSktswWxF9nehdEk0gKB2B1_a2Xigm67Polo-5S4vc&s=LSqGjsBvoBNSL_YoC_lVxnWKIg0Ju3_LK9aU_2RjVL8&e=
Before sending your question, make sure it is related to SimpleSAMLphp, and not your web server's configuration or any other third-party software. This mailing list cannot help with software that uses SimpleSAMLphp, only regarding SimpleSAMLphp itself.
Make sure to read the documentation:
https://urldefense.proofpoint.com/v2/url?u=https-3A__simplesamlphp.org_docs_stable_&d=DwIFaQ&c=vh6FgFnduejNhPPD0fl_yRaSfZy8CWbWnIf4XJhSqx8&r=9jpZoSz9hqgzBa5Rv9G13Dq2-0-e7lsTgw1j4vdt1eQ&m=eXSktswWxF9nehdEk0gKB2B1_a2Xigm67Polo-5S4vc&s=TYtQPtKvk38EQiNBvJZo7zZ-_0OvPKOsz662RGgz40M&e=
If you have an issue with SimpleSAMLphp that you cannot resolve and reading the documentation doesn't help, you are more than welcome to ask here for help. Subscribe to the list and send an email with your question. However, you will be expected to comply with some minimum, common sense standards in your questions. Please read this carefully:
https://urldefense.proofpoint.com/v2/url?u=http-3A__catb.org_-7Eesr_faqs_smart-2Dquestions.html&d=DwIFaQ&c=vh6FgFnduejNhPPD0fl_yRaSfZy8CWbWnIf4XJhSqx8&r=9jpZoSz9hqgzBa5Rv9G13Dq2-0-e7lsTgw1j4vdt1eQ&m=eXSktswWxF9nehdEk0gKB2B1_a2Xigm67Polo-5S4vc&s=C2e2KUf0QeKfr4GFnaBUtYmHykIrPR_0f3rrdc8b1UU&e=
---
You received this message because you are subscribed to the Google Groups "SimpleSAMLphp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
simplesamlph...@googlegroups.com.
For more options, visit
https://urldefense.proofpoint.com/v2/url?u=https-3A__groups.google.com_d_optout&d=DwIFaQ&c=vh6FgFnduejNhPPD0fl_yRaSfZy8CWbWnIf4XJhSqx8&r=9jpZoSz9hqgzBa5Rv9G13Dq2-0-e7lsTgw1j4vdt1eQ&m=eXSktswWxF9nehdEk0gKB2B1_a2Xigm67Polo-5S4vc&s=BrrkJ3Q8K2M_C0TvRPuCrYTi58lAhRq_wO4_0XtvrDo&e=.