{"id":326,"date":"2021-07-23T12:27:51","date_gmt":"2021-07-23T12:27:51","guid":{"rendered":"https:\/\/ssdsunucum.com\/blog\/basic-security-concepts\/"},"modified":"2021-07-23T12:27:51","modified_gmt":"2021-07-23T12:27:51","slug":"basic-security-concepts","status":"publish","type":"post","link":"https:\/\/ssdsunucum.com\/blog\/basic-security-concepts\/","title":{"rendered":"Basic Security Concepts"},"content":{"rendered":"<\/p>\n<div class=\"col-md-9\">\n<div class=\"flex-column flex-md-row article-header\"><\/div>\n<hr>\n<h2 id=\"overview\">Overview<\/h2>\n<p>This document describes some basic security concepts that you can use to protect your system from cross-site request forgeries (XSRF) attacks. XSRF attacks occur when a malicious user exploits the trust between a website and a user\u2019s browser. When a malicious user exploit that trust, they can run unauthorized commands on a website.<\/p>\n<p>XSRF attacks rely on two items:<\/p>\n<ul>\n<li>Access to authentication credentials.<\/li>\n<li>Surreptitious execution of a command via a URL.<\/li>\n<\/ul>\n<p>For more information about XSRF attacks, visit Wikipedia\u2019s XSRF article.<\/p>\n<h2 id=\"authentication-methods\">Authentication methods<\/h2>\n<p>We recommend that you use cookies as an authentication method for cPanel &#038; WHM logins. An HTTP-authenticated session does <strong>not<\/strong> terminate unless you terminate the web browser application session. If you use HTTP authentication, the browser caches the login credentials until the system terminates the application.<\/p>\n<p>Some browsers allow you to flush login credentials. However, do <strong>not<\/strong> rely on this method, and it does not exist in all browsers. When a web browser caches login credentials, the credentials become susceptible to XSRF attacks.<\/p>\n<p>For more information, read our Email Deliverability documentation.<\/p>\n<h3 id=\"validated-cookies\">Validated cookies<\/h3>\n<p>Malicious users can steal cookies and use them in XSRF attacks. Most browsers do <strong>not<\/strong> provide any protection to mitigate this attack. We provide an option that allows you to validate the incoming IP address as part of the cookie during the authentication process.<\/p>\n<p>On subsequent authentication requests, the server compares the IP addresses to the original values in the cookies. A mismatched value causes an error that results in a re-authentication request.<\/p>\n<div class=\"callout callout-warning\">\n<div class=\"callout-heading\">Important:<\/div>\n<div class=\"callout-content\">\n<p>When you use validated cookies, we recommend that you disable service subdomain access. If you do <strong>not<\/strong> disable service subdomain access, any attempt to access interfaces via a service domain will cause the system to record the local host\u2019s IP address (usually <code>127.0.0.1<\/code>), which renders IP address validation useless.<\/p>\n<\/p><\/div>\n<\/div>\n<p>To disable service subdomains, disable the following settings in the <em>Domains<\/em> section of WHM\u2019s <em>Tweak Settings<\/em> interface (<em>WHM<\/em> &gt;&gt; <em>Home<\/em> &gt;&gt; <em>Server Configuration<\/em> &gt;&gt; <em>Tweak Settings<\/em>):<\/p>\n<ul>\n<li>Service subdomains<\/li>\n<li>Service subdomain creation<\/li>\n<\/ul>\n<h3 id=\"require-ssl\">Require SSL<\/h3>\n<p>You can also require your users to log in via SSL or TLS to improve your system\u2019s security. If users log in to their accounts over ports <code>2082<\/code>, <code>2086<\/code>, or <code>2095<\/code>, the system sends authentication credentials in plain text. The authentication credentials become easy to steal, read, and use again later.<\/p>\n<p>For more information about how to access cPanel &#038; WHM services securely, read our How to Log in to Your Server or Account documentation.<\/p>\n<h3 id=\"security-tokens\">Security tokens<\/h3>\n<p>cPanel &#038; WHM includes security tokens to help combat XSRF attacks. The system inserts unique security tokens into the URL for a single login session. Any requests that a user makes without the appropriate token produce an error and result in a request for re-authentication. This action effectively stops XSRF attacks because the malicious URL will <strong>not<\/strong> contain the appropriate token.<\/p>\n<div class=\"callout callout-danger\">\n<div class=\"callout-heading\">Warning:<\/div>\n<div class=\"callout-content\">\n<p>Security tokens may cause problems with custom scripts and some third-party applications that integrate with cPanel &#038; WHM. We <strong>strongly<\/strong> recommend that you verify that third-party applications are compatible with security tokens before you enable them. If you <strong>must<\/strong> use applications that are not compatible with security tokens, we recommend that you use URL referrer checks instead.<\/p>\n<\/p><\/div>\n<\/div>\n<h3 id=\"url-referrer-checks\">URL referrer checks<\/h3>\n<p>The HTTP referrer identifies the URL of the page from which a user originated. Referrer checks only function correctly when you enable the blank referrer check, and typically result in a large number of false positive alerts. However, if you <strong>must<\/strong> use third-party applications that are not compatible with security tokens, you can use referrer checks in place of security tokens.<\/p>\n<div class=\"callout callout-danger\">\n<div class=\"callout-heading\">Warning:<\/div>\n<div class=\"callout-content\">\n<p>If you cannot use security tokens on your server, we <strong>strongly<\/strong> recommend that you enable the following options in the <em>Security<\/em> section of WHM\u2019s <em>Tweak Settings<\/em> interface (<em>WHM &gt;&gt; Home &gt;&gt; Server Configuration &gt;&gt; Tweak Settings<\/em>):<\/p>\n<ul>\n<li>Blank referrer safety check<\/li>\n<li>Referrer safety check<\/li>\n<\/ul><\/div>\n<\/div>\n<h2 id=\"password-strength\">Password strength<\/h2>\n<p>Weak passwords provide insignificant protection against brute force attacks. Brute force attacks occur when a malicious user guesses the password for a specific account via the trial-and-error message. This process is most often an automated process that uses dictionary terms. Use WHM\u2019s <em>Password Strength Configuration<\/em> interface (<em>WHM<\/em> &gt;&gt; <em>Home<\/em> &gt;&gt; <em>Security Center<\/em> &gt;&gt; <em>Password Strength Configuration<\/em>) to set your user\u2019s minimum password strength.<\/p>\n<div class=\"callout callout-info\">\n<div class=\"callout-heading\">Note:<\/div>\n<div class=\"callout-content\">\n<ul>\n<li>We <strong>strongly<\/strong> recommend that you set a value of <code>50<\/code> or higher.<\/li>\n<li>The minimum password strength requirement <strong>only<\/strong> applies to passwords that cPanel &#038; WHM creates and modifies. A user with shell access may use the <code>passwd<\/code> command to set a weak password.<\/li>\n<\/ul><\/div>\n<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Overview This document describes some basic security concepts that you can use to protect your system from cross-site request forgeries (XSRF) attacks. XSRF attacks occur when a malicious user exploits the trust between a website and a user\u2019s browser. When a malicious user exploit that trust, they can run unauthorized commands on a website. XSRF &hellip;<\/p>\n","protected":false},"author":1,"featured_media":327,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/posts\/326"}],"collection":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/comments?post=326"}],"version-history":[{"count":0,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/posts\/326\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/media\/327"}],"wp:attachment":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/media?parent=326"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/categories?post=326"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/tags?post=326"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}