{"id":21028,"date":"2011-03-20T09:30:01","date_gmt":"2011-03-20T13:30:01","guid":{"rendered":"http:\/\/www.sierraexpressmedia.com\/?p=21028"},"modified":"2011-03-20T09:30:01","modified_gmt":"2011-03-20T13:30:01","slug":"joomla-security-primer","status":"publish","type":"post","link":"https:\/\/sierraexpressmedia.net\/?p=21028","title":{"rendered":"Joomla Security Primer"},"content":{"rendered":"<p style=\"text-align: justify;\">I wish security was measured on a scale of 1 to 10. But it\u2019s not a scale, instead, it\u2019s considered by most security experts as a total philosophy, and a set of tools and actions. This does not mean it cannot be measured, and taking singling Joomla out is foolish. But looking at Joomla as part of your total site security makeup is the right answer. It\u2019s a good idea to measure security holistically because if any part of your security is weak, it weakens your entire infrastructure.<\/p>\n<p style=\"text-align: justify;\">How to secure your Joomla site &#8211; First, Joomla is only as secure as the server platform it is on, the extensions installed on it, and the proper safeguards that are put in place. In fact, when a Joomla site is hacked ,in most cases it could be any number of things.\u00a0 It&#8217;s not typically Joomla&#8217;s fault.\u00a0 It\u2019s many times the webmaster\u2019s or administrator\u2019s fault for failing in some basic areas. To be fair to the administrator, security is an entire practice itself, and in this article I will explain some basic concepts for securing Joomla and non-Joomla to help you understand how to secure your site.<\/p>\n<h2 id=\"21028_file-and-folder-perm_1\" style=\"text-align: justify;\">File and Folder Permissions:<\/h2>\n<p style=\"text-align: justify;\">In most situations, a new Joomla user will install the software and occasionally run into trouble when file and folder permissions need to be modified manually.\u00a0 They set permissions to 777 (r\/w\/x) for everyone and this is a BIG NO NO, AND A BIG RED FLAG.\u00a0 Improperly configured server, and or extension(s), are the culprit here.\u00a0 Don&#8217;t use a host that makes you set up your site this way, and avoid extensions that will ONLY run with 777.\u00a0 While there are exceptions to this statement, overall it holds true.<\/p>\n<p style=\"text-align: justify;\"><strong>NOTE: Always set the permission of folders to 755 and files to 644 <\/strong><\/p>\n<h2 id=\"21028_server-ownershipperm_1\" style=\"text-align: justify;\">Server Ownership\/Permissions<\/h2>\n<p style=\"text-align: justify;\">This is usually a hosting related problem, or a hacker has been here.\u00a0 But sometimes ownership of files (as seen from the Operating Systems Point of View), can cause weird problems, or in some cases expose the system.\u00a0 Sometimes in shared hosting, you will see this problem.\u00a0 The net is, if a bad guy gets in from this level, one you&#8217;re hosed&#8230; two it wasn&#8217;t Joomla.. \ud83d\ude42<\/p>\n<p style=\"text-align: left;\"><strong>NOTE: Get a new host if they have trouble with basic server configuration. (I recommend our hosting &#8211; http:\/\/hosting.SaloneTech.com )<\/strong><\/p>\n<h2 id=\"21028_xsssql-injections_1\" style=\"text-align: justify;\">XSS\/SQL Injections:<\/h2>\n<p style=\"text-align: justify;\">This one does show up frequently in the Joomla space, but also in every other web property.\u00a0 However it&#8217;s one of the most prevalent attacks on the Internet. This is a direct result of the code, typically an extension, not checking its inputs for trouble.\u00a0 For coders, it&#8217;s known as &#8220;Not sanitizing your inputs&#8221;. That\u2019s a very simple explanation, but suffice to say, it happens a lot. Typically, the core Joomla code is scoured and tested with a commercial tool to check for XSS and SQL injections before it&#8217;s released and does not suffer from these.\u00a0 Yet, when an extension has one, it Joomla!\u00a0 That gets the wrap.<\/p>\n<p style=\"text-align: justify;\"><strong>NOTE: Check the extensions by Googling for <em>extension name<\/em> and vulnerabilities. And check Joomla.org for up to date information.<\/strong><\/p>\n<h2 id=\"21028_passwords_1\" style=\"text-align: justify;\">Passwords:<\/h2>\n<p style=\"text-align: justify;\">Alright, guess what &#8211; <strong><em>P@ssw0rd<\/em><\/strong> does not make a good password. Neither do any of the words on <a href=\"http:\/\/www.defaultpassword.com\/\" target=\"_blank\">DefaultPassword.com&#8217;s<\/a> list. The bad guys have terrific tools, called Brute Force Tools and password crackers. They contain dictionaries of common passwords, combinations, and so forth. Using your dog\u2019s name, such as <strong><em>Lassie1<\/em><\/strong> is not acceptable.<\/p>\n<p style=\"text-align: justify;\"><strong>NOTE: Craft a password that is VERY hard by creating it using numbers, letters, and symbols. Using upper and lower case. And change them every 30, 60, or 90 days<\/strong><\/p>\n<h2 id=\"21028_patching_1\" style=\"text-align: justify;\">Patching:<\/h2>\n<p style=\"text-align: justify;\">One HUGE industry problem is patching. This is partly due to lack of a good plan <em>to patch, and partly due to the volume of patches that are released. <\/em>Patching is where older code is updated with new or fixed code.\u00a0 Many times an upgrade will be just fine.\u00a0 However it&#8217;s up to you to read \u201cthechangelog\u201d file to see what the developer changed.\u00a0 If you see it contains a security fix, apply, test and release it.\u00a0 One area that often gets missed is your server.\u00a0 There are several easy methods to determine your current levels.\u00a0 It&#8217;s solely your responsibility to keep up with the site, but the host has the responsibility to patch the servers. You would be surprised how hosts do not keep servers patched.<\/p>\n<p style=\"text-align: justify;\"><strong>NOTE: Stay with a reputable host that offers 24&#215;7 technical support and that will address issues you find wrong.<\/strong><\/p>\n<h2 id=\"21028_basic-protection-lay_1\" style=\"text-align: justify;\">Basic Protection Layers of Joomla:<\/h2>\n<p style=\"text-align: justify;\">The basic protections that are built into Joomla are fairly good, as long as the server they are on is PROPERLY configured.\u00a0 Joomla uses the following means to keep itself secure:<\/p>\n<ul style=\"text-align: justify;\">\n<li>Permissions are set to 755 for folders, 644 for files.<\/li>\n<li>Apache has been configured to not allow browsing\/indexing, etc.<\/li>\n<li>Passwords are MD5 Encrypted + SALTED.<\/li>\n<li>Database access is password protected at the MySQL level.<\/li>\n<\/ul>\n<p style=\"text-align: justify;\">The basic authentication of Joomla is pretty good and that it&#8217;s easy to use, fairly hard to crack the passwords &#8211; in fact &#8211; it&#8217;s not very likely given the SALT. However for added level of protection, you may wish to look at a stronger authentication\/encryption system. There are a few that exist but are beyond the scope of this article.<\/p>\n<p style=\"text-align: justify;\"><strong>Database Security:<\/strong><\/p>\n<p style=\"text-align: justify;\">The database itself is typically MySql, so Joomla simply relies on the underlying security of the database.\u00a0 While typically the database itself is not encrypted, the proper security around the db\/web server should prevent access. Providing a strong password is many times sufficient &#8211;\u00a0however &#8211; remember &#8211; a single SQL injection could result in the loss of your data. What I like about MySql is the various levels of inherent protection it offers.\u00a0 Typically it\u2019s configured straight out of the box properly and not too much needs to be done.\u00a0 Again, the areas of concern are the server it is on.<\/p>\n<p style=\"text-align: justify;\"><strong>NOTE: Make sure your Database port isn&#8217;t open to the world &#8211; a good tool for this is NMAP.<\/strong><\/p>\n<p style=\"text-align: justify;\">Scenarios where security of Joomla installations can break down:<\/p>\n<p style=\"text-align: justify;\">First of all ANY site that is not patched, improperly setup, has vulnerable code, dedicated attackers are gunning for the site, then will get broken into. Joomla is not any different. Microsoft, Oracle, HP-UX have published vulnerabilities on a regular basis. And all at one time or another have had their share of troubles.<\/p>\n<p style=\"text-align: justify;\">Here are some common scenarios that may help you be safer.<\/p>\n<p style=\"text-align: justify;\">Scenario 1: Database exposed:<\/p>\n<ul style=\"text-align: justify;\">\n<li>Let&#8217;s say that the 3306 port allows me to get in to the DB. I access it, dump the tables, and I find the admin user name, replace the password with my own salted + md5 password &#8211; upload and I&#8217;m in as the admin. <strong>Note &#8211; this is a VERY unlikely scenario, but possible. &#8211; Check your ports.<\/strong><\/li>\n<\/ul>\n<p style=\"text-align: justify;\">Scenario 2: Cross Site Scripting and Sql Injections<\/p>\n<ul style=\"text-align: justify;\">\n<li>As we discussed, this is not reserved solely for Joomla, but in fact, is one of the most prevalent problems in websites &#8211; This is one of the MORE likely thing&#8217;s you might see.<\/li>\n<\/ul>\n<p style=\"text-align: justify;\">The solution here is to<\/p>\n<ol style=\"text-align: justify;\">\n<li>Do a detailed code review on ANY extension put in &#8211; and<\/li>\n<li>Run a test suite, (several good ones available) to determine where the holes are.<\/li>\n<li>Fix or patch the code.<\/li>\n<li>Consider installing Securelive.net&#8217;s product for Joomla to protect against SQL Injections &#8211; you can learn more at their website.<\/li>\n<\/ol>\n<p style=\"text-align: justify;\"><strong>Scenario 3: Malware<\/strong><\/p>\n<ul style=\"text-align: justify;\">\n<li>This is closely related to number 2. Joomla sites, when properly configured are pretty resilient to this type of attack. I suggest Kapersky virus scanning for your workstations to be sure you doesn\u2019t receive or transmit Malware.<\/li>\n<\/ul>\n<p style=\"text-align: justify;\"><strong>Scenario 4: Improper configuration of servers<\/strong><\/p>\n<ul style=\"text-align: justify;\">\n<li>This is one of the most common things I see in the Joomla world. The server is not patched or has open ports, or shared hosting that is weak.\u00a0 This by far is the biggest issue I see.<\/li>\n<\/ul>\n<p style=\"text-align: justify;\"><strong>Remedies for these scenarios :<\/strong><\/p>\n<ul style=\"text-align: justify;\">\n<li>Get the book &#8211; Joomla! Web Security book and ensure you have proper .htaccess, serverconfig, php.ini settings, you are at PHP 5.2.x or GREATER and the latest Apache. There are many other items in the book to help you stay secure.<\/li>\n<li>Do a code review of extensions &#8211; ensure they have proper safeguards in place.<\/li>\n<li>Add <a title=\"SecureLive Hacker Protection Software\" href=\"http:\/\/www.securelive.net\/\" target=\"_blank\">SecureLive Hacker Protection Software<\/a> to your Joomla Installation &#8211; this will blockmalware, sql injections, xss and other hacks.\u00a0 It also protects forums, blogs, shopping carts and more.<\/li>\n<li>Monitor your logs &#8211; By learning to read the logs, you will be better prepared to see trouble before it harms you.<\/li>\n<li>You may wish to add SSL to the site &#8211; and force Joomla into SSL mode for all logins. This will encrypt the traffic between the user login and the site. Of course any malware on the server or desktop could still see it.<\/li>\n<li>Overall Joomla properly configured on a properly configured server is about as safe as any other off the shelf product. But &#8211; it&#8217;s only as safe as the weakest point, and while that sound clich\u00e9&#8217; it&#8217;s often overlooked.<\/li>\n<li>As you can see the admin has the heavy responsibility to ensure his or her site is properly patched, secured, and maintained. Taking care of these things will help to keep you safe when others are getting hacked.<\/li>\n<\/ul>\n<p style=\"text-align: justify;\">If you need help in securing your Joomla, Drupal or WordPress site, feel free to contact me at <a href=\"mailto:email@tambalamin.net\">email@tambalamin.net<\/a> or call (917) 623 4281<\/p>\n<p style=\"text-align: justify;\"><em>Original article Source: <a href=\"http:\/\/www.howtojoomla.net\/how-tos\/security\/joomla-security-primer\">http:\/\/www.howtojoomla.net\/how-tos\/security\/joomla-security-primer<\/a> by Tom Canavan<\/em><\/p>\n<p><em><strong>Stay with Sierra Express Media, for your trusted place in news!<\/strong><\/em><\/p>\n<hr \/>\n","protected":false},"excerpt":{"rendered":"<p>I wish security was measured on a scale of 1 to 10. But it\u2019s not a scale, instead, it\u2019s considered by most security experts as [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":75801,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7154,7010,1],"tags":[7461,7462,7463,7464],"class_list":["post-21028","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ict-for-development","category-technology","category-uncategorized","tag-joomla","tag-joomla-security-primer","tag-securing-a-web-site","tag-website-security"],"_links":{"self":[{"href":"https:\/\/sierraexpressmedia.net\/index.php?rest_route=\/wp\/v2\/posts\/21028","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sierraexpressmedia.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sierraexpressmedia.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sierraexpressmedia.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sierraexpressmedia.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=21028"}],"version-history":[{"count":0,"href":"https:\/\/sierraexpressmedia.net\/index.php?rest_route=\/wp\/v2\/posts\/21028\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sierraexpressmedia.net\/index.php?rest_route=\/wp\/v2\/media\/75801"}],"wp:attachment":[{"href":"https:\/\/sierraexpressmedia.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=21028"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sierraexpressmedia.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=21028"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sierraexpressmedia.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=21028"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}