<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Web Security on HTML5 in 24 Hours</title>
    <link>https://www.html5in24hours.com/tags/web-security/</link>
    <description>Web Security on HTML5 in 24 Hours</description>
    <generator>Hugo</generator>
    <language>en-us</language><copyright>Jennifer Kyrnin</copyright><lastBuildDate>Fri, 19 Aug 2016 17:10:26 +0000</lastBuildDate>
    <atom:link href="https://www.html5in24hours.com/tags/web-security/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Do Hackers Care About Your Meta CharSet?</title>
      <link>https://www.html5in24hours.com/posts/meta-charset-protects-against-hackers/</link>
      <pubDate>Fri, 19 Aug 2016 17:10:26 +0000</pubDate>
      <guid>https://www.html5in24hours.com/posts/meta-charset-protects-against-hackers/</guid><description>&lt;p&gt;The other day, I got this question about the meta charset tag in the mail:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;“Would you be so kind as to explain to me, in logical terms, how in 7 hecks does the presence of:&lt;br&gt;&#xA;&lt;code&gt;&amp;lt;meta charset=&amp;quot;utf-8&amp;quot;&amp;gt;&lt;/code&gt;&lt;br&gt;&#xA;is supposed to affect a &amp;lsquo;hacker attack&amp;rsquo; in accordance to your book?&lt;br&gt;&#xA;I literally cannot imagine hackers caring much about which charset you display on the UI side when attacking.”&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;This is a great question. The book he’s referencing is &lt;a href=&#34;https://www.html5in24hours.com/books/teach-yourself-bootstrap-in-24-hours/&#34;&gt;&lt;em&gt;Sams Teach Yourself Bootstrap in 24 Hours&lt;/em&gt;&lt;/a&gt;, and in it I emphasize the importance of using the meta charset tag and placing it as the first element of your &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; element. But while I explain that leaving it out can leave a page vulnerable to hacks, I don’t explain why. But I will now.&lt;/p&gt;&#xA;&lt;h3 id=&#34;cross-site-scripting-xss-attacks&#34;&gt;Cross-Site Scripting (XSS) Attacks&lt;/h3&gt;&#xA;&lt;p&gt;According to &lt;a href=&#34;https://en.wikipedia.org/wiki/Cross-site_scripting&#34;&gt;Wikipedia&lt;/a&gt;&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;“[a cross-site scripting or XSS attack] injects client-side scripts into web pages viewed by other users. A cross-site scripting vulnerability may be used by attackers to bypass access controls such as the same-origin policy.”&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;In other words, a website that has an XSS vulnerability can be hacked.&lt;/p&gt;&#xA;&lt;h3 id=&#34;the-utf-7-attack-and-how-to-protect-your-site&#34;&gt;The UTF-7 Attack and How to Protect Your Site&lt;/h3&gt;&#xA;&lt;p&gt;There is an exploit that hackers can use called the UTF-7 XSS attack. They attach content to web forms and other pages that include malicious code encoded as the fake encoding “utf-7.”&lt;/p&gt;&#xA;&lt;p&gt;Web pages that do not have the character set defined are vulnerable and can be attacked with this exploit. This doesn’t mean that every web page without the character set defined are vulnerable, because XSS attacks require other elements like JavaScript or a form. But if a web developer adds those elements to the page in the future, that page could be hacked.&lt;/p&gt;&#xA;&lt;h3 id=&#34;why-define-the-character-set&#34;&gt;Why Define the Character Set?&lt;/h3&gt;&#xA;&lt;p&gt;While it&amp;rsquo;s true that not every page has a cross-site scripting (XSS) vulnerability directly, by getting in the habit of always defining the character set of your web pages, you reduce the risk that you&amp;rsquo;ll forget to do it on a page that could be attacked.&lt;/p&gt;&#xA;&lt;p&gt;It’s also true that many web servers use HTTP requests to define the character set automatically on all pages. But it’s not easy for a web designer to check that. Plus if the server changes or the pages are moved, the new server might not have that feature. By adding the &lt;code&gt;&amp;lt;meta charset=&amp;quot;utf-8&amp;quot;&amp;gt;&lt;/code&gt; tag to your &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; element, you ensure that the page has one level of protection without having to do anything else.&lt;/p&gt;&#xA;&lt;p&gt;Note: you don’t have to use the meta tag to define the character set. You can use HTTP on the server, set it with PHP or another scripting language. It doesn’t really matter how you define the character set, as long as it’s set. It’s just easiest for most web developers to do it with the meta tag, because that’s what we have direct access to.&lt;/p&gt;&#xA;&lt;h3 id=&#34;do-i-have-to-use-utf-8-in-the-meta-charset&#34;&gt;Do I Have to Use UTF-8 in the Meta Charset?&lt;/h3&gt;&#xA;&lt;p&gt;It doesn&amp;rsquo;t matter what character set you use, as long as you use a valid one. I like UTF-8 because it includes a huge number of characters so I can write things like ñ and ∫ right in my HTML without having to use character codes. The default character set in HTTP 1.1 is &lt;code&gt;ISO-8859-1&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;h3 id=&#34;this-is-not-the-final-word-on-xss-protection&#34;&gt;This is Not the Final Word on XSS Protection&lt;/h3&gt;&#xA;&lt;p&gt;Please do not expect that adding the meta charset tag will protect your site and scripts from all XSS attacks. This is &lt;strong&gt;not&lt;/strong&gt; true. There are many things you need to do to protect your scripts from XSS vulnerabilities. But adding the meta charset tag is a start.&lt;/p&gt;&#xA;&lt;p&gt;XSS is not the only way your website can be hacked, for example the &lt;a href=&#34;https://www.html5in24hours.com/posts/shellshock-exploit-destroy-website/&#34;&gt;Shellshock exploit&lt;/a&gt; that came out a few years ago. Don&amp;rsquo;t think just because you&amp;rsquo;re writing HTML that your web pages cannot be hacked. Always take security seriously, even if, like the questioner, you cannot imagine a way that hackers can attack your pages. Just because you can&amp;rsquo;t imagine it doesn&amp;rsquo;t mean that the hackers can&amp;rsquo;t. And they are imagining new attacks and exploits every day.&lt;/p&gt;&#xA;</description>
    </item>
    <item>
      <title>Laugh of the Day: Prime Ranking in SERP, but No Content</title>
      <link>https://www.html5in24hours.com/posts/laugh-of-the-day-prime-ranking-in-serp-but-no-content/</link>
      <pubDate>Sat, 14 Nov 2015 18:08:02 +0000</pubDate>
      <guid>https://www.html5in24hours.com/posts/laugh-of-the-day-prime-ranking-in-serp-but-no-content/</guid><description>&lt;p&gt;Getting high ranking on search engines is usually pretty hard. But if you have invented something new or have a revolutionary product or service, your website might rank well for those search terms just because you’re the only one doing it. This is a really good thing. After all, if you’re the first, it is nice to be recognized for that. But be careful, as if you&amp;rsquo;re not ready, this can end up as bad SEO, not good.&lt;/p&gt;&#xA;&lt;p&gt;If you’re not ready for recognition, prime placement can end up backfiring.&lt;/p&gt;&#xA;&lt;p&gt;Today, I was thinking how nice it would be if the Apple Watch or other smart watches didn’t have to be worn on your wrist. My husband joked “an Apple Pocket Watch” and I thought “what about a necklace?”&lt;/p&gt;&#xA;&lt;p&gt;So I did a search on Bing for &lt;a href=&#34;https://www.bing.com/search?q=apple+watch+necklace&amp;amp;PC=U316&amp;amp;FORM=CHROMN&#34;&gt;Apple Watch Necklace&lt;/a&gt;. I was surprised and excited to see a listing (after all the ads for the Apple Watch, a Samsung smart watch, and plain watches) titled “Apple Watch Pendants | The Premier Site For Apple Watch …” I didn’t read any further, I just clicked through.&lt;/p&gt;&#xA;&lt;p&gt;At first glance, it looked pretty good. No pictures, but a nice clean template with the headline “The #1 Most Trusted Apple Watch Pendant Store.” I scrolled quickly to see if there were any pictures, and didn’ see any so I started to read:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. In in risus eget lectus suscipit malesuada. Maecenas ut urna mollis, aliquam eros at, laoreet metus.&lt;/p&gt;&#xA;&lt;p&gt;Shop Now&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;I thought “Number one? Yeah, because they got the domain name!” I don’t think that’s what the site owners wanted me to think. Sure, the domain name helped their search engine optimization, but having no content is just bad SEO. But since all they have put up so far is a template and some placeholder text I&amp;rsquo;m not going to stick around long enough to do anything other than laugh. Instead of being impressed by their cool idea or new concept I was reduced to tears laughing at their complete fail of a website. (See the &lt;a href=&#34;https://www.html5in24hours.com/posts/laugh-of-the-day-prime-ranking-in-serp-but-no-content/#attachment_1421&#34;&gt;screen shot of the entire page&lt;/a&gt;.)&lt;/p&gt;&#xA;&lt;h2 id=&#34;if-its-liveits-live&#34;&gt;If It’s Live—It’s Live&lt;/h2&gt;&#xA;&lt;p&gt;It’s easy to forget that if you build a web page and put it live on the Web that people other than yourself and your company may see it. But you should consider that a rule of thumb. If a page is live on the Web, &lt;em&gt;anyone&lt;/em&gt; can see it. And if anyone can see it, search engines can see it. And if search engines can see it, they will rank it in their results. And once you’re in their results people can find you.&lt;/p&gt;&#xA;&lt;p&gt;And if people find your page and then can only read “lorem ipsum…” they won’t be impressed. Not even if you have ebullient phrases adorning the page like “#1 most trusted” and “Holiday Sale.”&lt;/p&gt;&#xA;&lt;p&gt;In fact, by rushing your website out the door without all the content you need, you risk alienating some customers. I don’t recognize the company Divi, but I will remember them in the future. I don’t know if I would be willing to buy a pendant holder from them. And that’s too bad. As they might actually be a really great company for this type of accessory. I’ll never know now.&lt;/p&gt;&#xA;&lt;h2 id=&#34;apple-watch-pendants-do-exist&#34;&gt;Apple Watch Pendants Do Exist&lt;/h2&gt;&#xA;&lt;p&gt;There was a &lt;a href=&#34;https://www.kickstarter.com/projects/bucardo/pocket-watch-and-pendant-accessories-for-the-apple&#34;&gt;Kickstarter campaign&lt;/a&gt; that ended on September 5, 2015, to create both a pocket watch and pendant style holder for the Apple Watch. You can pre-order them from the &lt;a href=&#34;http://www.bucardostyle.com/shop/?category=Apple+Watch+Accessories&#34;&gt;Bucardo&lt;/a&gt; website and they will start shipping in January 2016. Too late for a birthday present for me for this year, but maybe next year! Of course, first I&amp;rsquo;d need to get an &lt;a href=&#34;http://www.apple.com/watch/&#34;&gt;Apple Watch&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;h2 id=&#34;security-through-obscurity-is-not-secure-its-just-bad-seo&#34;&gt;Security Through Obscurity is Not Secure It&amp;rsquo;s Just Bad SEO&lt;/h2&gt;&#xA;&lt;p&gt;The moral of this story is that you shouldn&amp;rsquo;t assume that a page you haven&amp;rsquo;t promoted won&amp;rsquo;t be seen. Security through obscurity is really just wishful thinking. If your content isn&amp;rsquo;t ready, then don&amp;rsquo;t put up a page.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://www.html5in24hours.com/images/security-through-obscurity-not-much.png&#34;&gt;&lt;img src=&#34;https://www.html5in24hours.com/images/security-through-obscurity-not-much-142x300.png&#34; alt=&#34;High ranking site with placeholder text - Bad SEO&#34;&gt;&lt;/a&gt; Full website - it’s not ready for prime time (click to view full size)&lt;/p&gt;&#xA;</description>
    </item>
    <item>
      <title>Could the Shellshock Exploit Destroy Your Website?</title>
      <link>https://www.html5in24hours.com/posts/shellshock-exploit-destroy-website/</link>
      <pubDate>Fri, 26 Sep 2014 18:15:03 +0000</pubDate>
      <guid>https://www.html5in24hours.com/posts/shellshock-exploit-destroy-website/</guid><description>&lt;h2 id=&#34;updated-october-7-2014-keep-patching&#34;&gt;UPDATED October 7, 2014: Keep Patching!&lt;/h2&gt;&#xA;&lt;p&gt;There have been several new patches since Shellshock was first patched, and you need to make sure that your server is still up-to-date, even if you patched on the first day.&lt;/p&gt;&#xA;&lt;h2 id=&#34;learn-what-you-need-to-do-to-protect-your-site&#34;&gt;Learn What You Need to Do to Protect Your Site&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&#34;http://www.troyhunt.com/2014/09/everything-you-need-to-know-about.html&#34;&gt;Shellshock&lt;/a&gt; is a huge security threat to the internet, but if you&amp;rsquo;re like most people, the technicalities underlying it make it hard to get too worried about other than in a general sense. After all, you may be thinking “Yes, I worry, but I worried about &lt;a href=&#34;http://www.troyhunt.com/2014/04/everything-you-need-to-know-about.html&#34;&gt;Heartbleed&lt;/a&gt; last month and nothing bad happened, so is this another one of those?”&lt;/p&gt;&#xA;&lt;h3 id=&#34;let-me-put-the-dangers-shellshock-poses-in-personal-terms&#34;&gt;Let Me Put the Dangers Shellshock Poses in Personal Terms&lt;/h3&gt;&#xA;&lt;p&gt;It&amp;rsquo;s one thing to hear that the exploit is  “using fast-moving worm viruses to scan for vulnerable systems and then infect them&amp;hellip;” (source: &lt;a href=&#34;http://timesofindia.indiatimes.com/tech/tech-news/Hackers-exploit-Shellshock-bug-with-worms-in-early-attacks/articleshow/43539155.cms&#34;&gt;The Times of India&lt;/a&gt;) or that they are creating botnets to attack Akamai with a distributed denial of service (DDoS) (source: &lt;a href=&#34;http://www.itnews.com.au/News/396197,first-shellshock-botnet-attacks-akamai-us-dod-networks.aspx&#34;&gt;itnews&lt;/a&gt;).&lt;/p&gt;&#xA;&lt;p&gt;Yes, those sound bad, but they probably wouldn&amp;rsquo;t immediately affect your bottom line. So, it might be enough to just wait and see what happens.&lt;/p&gt;&#xA;&lt;h3 id=&#34;but-if-you-run-a-website-your-server-could-get-infected&#34;&gt;But if You Run a Website Your Server Could Get Infected&lt;/h3&gt;&#xA;&lt;p&gt;And if your server gets infected the attackers could do all kinds of things that could directly impact you and your business. Things like:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Delete every page on your website&lt;/li&gt;&#xA;&lt;li&gt;Deface every page on your website&lt;/li&gt;&#xA;&lt;li&gt;Take control of your web database and steal all the data&lt;/li&gt;&#xA;&lt;li&gt;Add back-door functions to your web forms and scripts to steal your customer&amp;rsquo;s information as they submit it to you—things like credit card numbers, email addresses, and any other information&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;I have had to deal with scenarios where portions of a website were deleted, defaced or hacked, and it&amp;rsquo;s not fun. Do you really want to have to report to your customers that their credit card information may have been stolen? Do you really want to rebuild your entire site from scratch? I know I don&amp;rsquo;t.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-to-do-about-shellshock&#34;&gt;What To Do About Shellshock&lt;/h2&gt;&#xA;&lt;p&gt;The first thing you should be aware of are the devices and tools you use that might have Bash on them. This could affect things like: web servers, routers, Linux and Mac OS X Computers, and other devices.&lt;/p&gt;&#xA;&lt;h3 id=&#34;if-youre-running-a-web-server&#34;&gt;If You&amp;rsquo;re Running a Web Server&lt;/h3&gt;&#xA;&lt;p&gt;If you run your own web server, you should immediately go and patch it. This exploit affects nearly any web server running Bash and nearly all Linux and Unix boxes run that. Here is a list of some popular Linux vendors and their information on patching for Shellshock:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;http://centosnow.blogspot.com/2014/09/critical-bash-updates-for-centos-5.html&#34;&gt;CentOS&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.debian.org/security/2014/dsa-3032&#34;&gt;Debian&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;http://www.gentoo.org/security/en/glsa/glsa-201409-10.xml&#34;&gt;Gentoo&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;http://support.novell.com/security/cve/CVE-2014-6271.html&#34;&gt;Novell/SUSE&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://access.redhat.com/articles/1200223&#34;&gt;RedHat&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;http://www.ubuntu.com/usn/usn-2362-1/&#34;&gt;Ubuntu&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;if-you-host-your-website&#34;&gt;If You Host Your Website&lt;/h3&gt;&#xA;&lt;p&gt;If you don&amp;rsquo;t run your own web server, but you host on another site, you should find out if they are running on Linux (most hosting companies are) and if they&amp;rsquo;ve patched their server. There are several experimental tools available on the web that you can use to test your site.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;http://shellshock.brandonpotter.com/&#34;&gt;Shellshock Bash Vulnerability Test Tool&lt;/a&gt; tests for HTTP exploits&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;http://www.shellshocktest.com/&#34;&gt;ShellShock Tester&lt;/a&gt; tests ping exploits&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;And if you have access to a shell prompt on your web server, you can test using the following script. Just go to your shell prompt and type:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;env x=&amp;#39;() { :;}; echo vulnerable&amp;#39; bash -c &amp;#39;echo yay&amp;#39;&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;If your server is vulnerable you&amp;rsquo;ll get a response of:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;vulnerable&#xA;yay&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;If it&amp;rsquo;s not vulnerable, you&amp;rsquo;ll get a response of:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;bash: warning: x: ignoring function definition attempt&#xA;bash: error importing function definition for \`x&amp;#39;&#xA;yay&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;contact-your-web-hosting-provider&#34;&gt;Contact Your Web Hosting Provider&lt;/h3&gt;&#xA;&lt;p&gt;If you run these tests and your web server is vulnerable, you should contact your hosting provider immediately. Right after you contact them, you should then backup your entire website, including any scripts, databases, images and so on. Then if your server is attacked before your provider patches it, you have a current backup.&lt;/p&gt;&#xA;&lt;h3 id=&#34;if-you-run-a-mac-with-mac-os-x&#34;&gt;If You Run a Mac with Mac OS X&lt;/h3&gt;&#xA;&lt;p&gt;Mac OS X is currently vulnerable, and Apple has not yet released a patch. However Apple says “The vast majority of OS X users are not at risk to recently reported bash vulnerabilities&amp;hellip;” (source: &lt;a href=&#34;http://www.imore.com/apple-working-quickly-protect-os-x-against-shellshock-exploit&#34;&gt;iMore&lt;/a&gt;). This is because the system is protected by default, and advanced Unix services would need to be enabled to disable that protection.&lt;/p&gt;&#xA;&lt;p&gt;If you have enabled Bash on your Mac OS X system, you should take it back to the factory settings for now. Or you can patch it manually with the &lt;a href=&#34;http://www.linuxnews.pro/patch-bash-shell-shock-centos-ubuntu/&#34;&gt;instructions at LinuxNewsPro&lt;/a&gt; but &lt;em&gt;only do this if you know what you&amp;rsquo;re doing&lt;/em&gt;. If you don&amp;rsquo;t know what I mean by advanced Unix services, &lt;em&gt;do not do anything&lt;/em&gt;. Just wait for the Apple patch.&lt;/p&gt;&#xA;&lt;h3 id=&#34;if-you-have-other-things-running-bash-that-could-be-attacked-by-shellshock&#34;&gt;If You Have Other Things Running Bash That Could be Attacked by Shellshock&lt;/h3&gt;&#xA;&lt;h2 id=&#34;your-best-bet-is-to-contact-your-support-or-service-providers-for-them-to-find-out-if-they-have-provided-a-patch-many-router-companies-have-already-got-them-up-or-are-working-hard-on-a-patch-symantec-also-has-created-an-intrusion-prevention-signature-for-protection-against-this-exploit&#34;&gt;Your best bet is to contact your support or service providers for them to find out if they have provided a patch. Many router companies have already got them up, or are working hard on a patch. Symantec also has created an &lt;a href=&#34;http://www.symantec.com/security_response/attacksignatures/detail.jsp?asid=27907&#34;&gt;Intrusion Prevention signature&lt;/a&gt; for protection against this exploit.&lt;/h2&gt;&#xA;&lt;h3 id=&#34;comments&#34;&gt;Comments:&lt;/h3&gt;&#xA;&lt;h4&gt;&lt;/h4&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://olddelhiheritage.in/all-slots-casino-contacts-of-support-service-number-chat-rules-and-conditions/&#34; title=&#34;fanniehuntsman@vegemail.com&#34;&gt;Kenton&lt;/a&gt; - Dec 2, 2022&lt;/p&gt;&#xA;&lt;p&gt;What&amp;rsquo;s up, all the time i used to check web site posts here early in the break of day, since i like to learn more and more.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h4&gt;&lt;/h4&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://smartylooks.in/pokerstars-return-ept-monte-carlo-and-regional-tournaments/&#34; title=&#34;mattieleason@inbox.com&#34;&gt;Pokerstars Monte Carlo 2023&lt;/a&gt; - Dec 2, 2022&lt;/p&gt;&#xA;&lt;p&gt;As the admin of this website is working, no question very rapidly it will be renowned, due to its feature contents.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;</description>
    </item>
    <item>
      <title>How to Secure WordPress After You&#39;ve Been Hacked (or Before!)</title>
      <link>https://www.html5in24hours.com/posts/secure-wordpress-after-hack/</link>
      <pubDate>Tue, 29 Jul 2014 12:00:51 +0000</pubDate>
      <guid>https://www.html5in24hours.com/posts/secure-wordpress-after-hack/</guid><description>&lt;p&gt;[caption id=&amp;ldquo;attachment_796&amp;rdquo; align=&amp;ldquo;alignleft&amp;rdquo; width=&amp;ldquo;244&amp;rdquo;]&lt;a href=&#34;https://www.html5in24hours.com/images/google-authenticator.jpg&#34;&gt;&lt;img src=&#34;https://www.html5in24hours.com/images/google-authenticator-244x300.jpg&#34; alt=&#34;Login with 2-factor authentication&#34;&gt;&lt;/a&gt; Do you have 2-factor authentication?&lt;/p&gt;&#xA;&lt;p&gt;Getting hacked is a nightmare. After a hacker attacks your site, you can spend days, weeks, or even months worrying about when it&amp;rsquo;s going to happen again, how it happened in the first place, and what you can do about it to prevent future hacks.&lt;/p&gt;&#xA;&lt;h3 id=&#34;secure-wordpress-starts-with-you&#34;&gt;Secure WordPress Starts with You&lt;/h3&gt;&#xA;&lt;p&gt;The first thing you should do after you discover your site was hacked is to &lt;em&gt;take a deep breath&lt;/em&gt;. You are not the first person to get hacked and you won&amp;rsquo;t be the last. In many ways the fight against hackers is a constant battle with the hackers tools getting better and the security tools getting better to fight them. Security companies like McAfee and Symantec have been hacked! Don&amp;rsquo;t feel too bad if your website gets hacked. Just learn from what happened and do your best to fix things.&lt;/p&gt;&#xA;&lt;p&gt;Once you&amp;rsquo;re a bit calmer, look over your basic security measures. Things like:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;What is your admin password?&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;A secure password is long—more than 10-15 characters.&lt;/li&gt;&#xA;&lt;li&gt;It has upper and lowercase letters, numbers, and special characters (! # $ % etc.).&lt;/li&gt;&#xA;&lt;li&gt;You should never use the same password for your WordPress admin account as on any other site. If that other site gets hacked, your WordPress installation is then compromised too.&lt;/li&gt;&#xA;&lt;li&gt;It &lt;em&gt;should not&lt;/em&gt; be a word—even changing the letters to numbers like “p@5sW0rd” won&amp;rsquo;t work, as most hackers have those in their files as well. If you can read the word, then so can the hackers!&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;If you don&amp;rsquo;t think you can remember a password like “brg3@4u{o8pet#NHL?r2HuiFf,” and believe me most people can&amp;rsquo;t, then you should consider getting a password safe. This is an application that stores your passwords in an encrypted safe that you can use to look them up when you need them. Some options include: &lt;a href=&#34;http://www.pcmag.com/article2/0,2817,2426798,00.asp&#34;&gt;LastPass&lt;/a&gt;, &lt;a href=&#34;http://www.pcmag.com/article2/0,2817,2408063,00.asp&#34;&gt;KeePass&lt;/a&gt;, &lt;a href=&#34;https://agilebits.com/onepassword/win&#34;&gt;1Password&lt;/a&gt;, or even the built-in managers in your web browsers and operating system. A password safe or password manager will help keep your passwords secure while not forcing you to remember hundreds of crazy, random passwords.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;What is your administrator user name?If you&amp;rsquo;re like most WordPress users, it&amp;rsquo;s “admin.” I&amp;rsquo;m not a hacker, but I know that this is a common username. And if I know it, then the hackers know it. And that&amp;rsquo;s just one less thing they have to figure out before they can hack into your site.The challenge is, once you&amp;rsquo;ve got a WordPress admin password, and WordPress makes it very difficult to change it. While &lt;a href=&#34;http://en.support.wordpress.com/change-your-username/&#34;&gt;changing your username on Wordpress.com&lt;/a&gt; is just a matter of adjusting your personal settings, changing a self-hosted WordPress blog is a lot more difficult. The easiest way is like this:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Create a new user in WordPress by clicking Add New in the Users menu&lt;/li&gt;&#xA;&lt;li&gt;Give that new user admin access&lt;/li&gt;&#xA;&lt;li&gt;Login with the new username&lt;/li&gt;&#xA;&lt;li&gt;Change the access of the old admin account to the lowest access role available (usually “Subscriber”)&lt;/li&gt;&#xA;&lt;li&gt;If the old admin account has no posts associated with it, you can delete it rather than changing the role. But if you delete an account with posts, you may end up deleting the posts as well.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;What security plugins do you have on WordPress?In order to keep WordPress secure, it&amp;rsquo;s a good idea to use a couple of security plugins. Some of the ones I use include:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;http://www.acunetix.com/websitesecurity/wordpress-security-plugin/&#34;&gt;Acunetix WP Security&lt;/a&gt;&lt;a href=&#34;https://www.html5in24hours.com/images/block-security-holes-acunetix.jpg&#34;&gt;&lt;img src=&#34;https://www.html5in24hours.com/images/block-security-holes-acunetix-e1406604817742-150x150.jpg&#34; alt=&#34;block-security-holes-acunetix&#34;&gt;&lt;/a&gt;This is a comprehensive tool that attempts to make it harder for hackers to know a lot about your site. It removes information like the WordPress version, when WordPress needs updates, and so on. Plus, it gives you a list of items you should look at to know where your site is vulnerable.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;http://bad-behavior.ioerror.us/&#34;&gt;Bad Behavior&lt;/a&gt;&lt;a href=&#34;https://www.html5in24hours.com/images/use-bad-behavior.jpg&#34;&gt;&lt;img src=&#34;https://www.html5in24hours.com/images/use-bad-behavior-e1406604766834-150x150.jpg&#34; alt=&#34;use-bad-behavior&#34;&gt;&lt;/a&gt;Bad Behavior attempts to block automated bots from using your site. It is primarily for preventing spam. I find that it helps keep the spam manageable. However, this can sometimes block things you want to get through.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://github.com/julien731/WP-Google-Authenticator&#34;&gt;Google Authenticator for WordPress&lt;/a&gt;This allows you to enable (and require if you wish) 2-factor authentication on your WordPress site. This requires that people logging into your site have both a username/password and a code that &lt;em&gt;your&lt;/em&gt; phone generates. If they&amp;rsquo;ve stolen your phone as well, you probably have more problems than just whether they are breaking into your WordPress site.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;http://devel.kostdoktorn.se/limit-login-attempts&#34;&gt;Limit Login Attempts&lt;/a&gt;I find this tool invaluable. Today alone it blocked over 50 hack attempts on one site. Because you need access to the site, this tool doesn&amp;rsquo;t block IPs until they&amp;rsquo;ve reached a threshold number of attempts. You can set both the number of tries and how long the lock out is for. On one site I manage, we set the lockout to 5 days because of the number of hacking attempts we were getting.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;http://www.lionscripts.com/product/wordpress-ip-address-blocker-pro/&#34;&gt;LionScripts: IP Blocker Lite&lt;/a&gt;I use this to block the IPs that come back again and again to try to hack my sites. Limit Login Attempts blocks IPs for a period of time, but if a hacker is really determined they will just come back later and try again. So I use this IP blocker to block them completely.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;http://austinmatzko.com/wordpress-plugins/wp-db-backup/&#34;&gt;WordPress Database Backup&lt;/a&gt;While some people might not see this as a security plugin, I feel that regular backups are critical to any security system. That way if your site gets hacked, you can reinstall and not lose too much. I like this plugin because it&amp;rsquo;s automatic. I have it email me backups of all my sites.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;be-ruthless-when-trying-to-secure-wordpress&#34;&gt;Be Ruthless When Trying to Secure WordPress&lt;/h3&gt;&#xA;&lt;p&gt;Many people are reluctant to block IPs and limit access to customers because of just that—they are customers! But the reality is that anyone that you didn&amp;rsquo;t authorize who would try to login to your site using an admin account is &lt;em&gt;not&lt;/em&gt; a customer. They are a hacker. They aren&amp;rsquo;t going to read your articles, they aren&amp;rsquo;t going to comment on your site, and they certainly aren&amp;rsquo;t going to buy anything from you. You don&amp;rsquo;t need them. Be ruthless. If a hacker gets access, he won&amp;rsquo;t be gentle.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Start with your own access.&lt;/strong&gt; One thing that can really help your security, besides a strong password, is two-factor authentication. I use the Google Authenticator with my mobile devices to prove that I&amp;rsquo;m me and I should have access to my site. This means that I have to provide both something I know—my username and password—and something I have—my phone. If I can&amp;rsquo;t provide both those things then I can&amp;rsquo;t get into my account. Two-factor authentication can seem tedious at first, but it does improve your security, and most people keep their phones with them all the time.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;&lt;a href=&#34;https://www.html5in24hours.com/images/check-your-users-e1406604873435.jpg&#34;&gt;&lt;img src=&#34;https://www.html5in24hours.com/images/check-your-users-e1406604873435-150x150.jpg&#34; alt=&#34;check your users&#34;&gt;&lt;/a&gt;Then be ruthless with your subscribers.&lt;/strong&gt; You should periodically check out your WordPress users (in the Users tab) to make sure there aren&amp;rsquo;t any surprises. Look for any accounts that have higher access than you gave them. In general, “Subscriber” is the lowest level of access, and anyone who has more access than that should have been given those permissions by you. If you find any strange ones, &lt;strong&gt;delete them&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;h3 id=&#34;what-to-do-after-youve-been-hacked&#34;&gt;What to Do After You&amp;rsquo;ve Been Hacked&lt;/h3&gt;&#xA;&lt;p&gt;All of the above security measures are good, but what about after a hacking? If you discover your WordPress site has been hacked, you need to secure it as well as you can, but there are also a few things you need to do to help make sure that you get rid of the hackers.&lt;/p&gt;&#xA;&lt;p&gt;The problem is, once you&amp;rsquo;ve been hacked, the hackers could have put in back doors in many places on your site without you realizing it. So you have to do more than add security—closing the barn door after the horse is gone, so to speak.&lt;/p&gt;&#xA;&lt;p&gt;Here are the steps I recommend you follow after you discover a hack.&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Find or make a clean backup of your site data. I recommend getting a backup of your database, and all files in your wp-content directory. It&amp;rsquo;s best to choose backups dated &lt;em&gt;before&lt;/em&gt; you know the hack occurred, which is why regular backups are critical. If you&amp;rsquo;re not sure when it happened, get a backup that&amp;rsquo;s at least one month old. Yes, your site will be out-of-date, but the hacker will be gone! Here&amp;rsquo;s information on the WordPress Codex about &lt;a href=&#34;http://codex.wordpress.org/WordPress_Backups#Database_Backup_Instructions&#34;&gt;backing up your site&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;li&gt;Then delete &lt;em&gt;everything&lt;/em&gt; on the site except the database. Yes, this means your site will be down. People will get a 404 or other error. If you can leave it down for at least 24-48 hours, that would be best as this encourages the hackers to go somewhere else. If there&amp;rsquo;s nothing to hack, they will hack someone else.&lt;/li&gt;&#xA;&lt;li&gt;After your down time, &lt;em&gt;re-download&lt;/em&gt; WordPress from the &lt;a href=&#34;http://wordpress.org/&#34;&gt;wordpress.org&lt;/a&gt; site. This is critical. You must not use any old files from when you were hacked. You need to make sure that you have a clean install, and that means starting over from scratch. Don&amp;rsquo;t forget to download your plugins and themes as well.&lt;/li&gt;&#xA;&lt;li&gt;Turn on all the security plugins you&amp;rsquo;ve installed immediately. And if they recommend taking action, do this before you do anything else.&lt;/li&gt;&#xA;&lt;li&gt;If you haven&amp;rsquo;t already, change your administrator username to something other than “admin.”&lt;/li&gt;&#xA;&lt;li&gt;Take a deep breath—you&amp;rsquo;ve survived a hacking!&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h2 id=&#34;as-i-mentioned-above-maintaining-a-secure-wordpress-site-is-difficult-and-no-security-is-foolproof-but-if-youre-careful-and-ruthless-you-can-keep-your-site-as-secure-as-possible-no-one-likes-being-hacked-but-it-doesnt-have-to-be-the-end-of-your-site-i-have-personally-survived-being-hacked-including-one-major-site-i-was-running-as-well-as-other-disasters-including-completely-deleting-my-entire-web-directory-without-any-backups-its-not-fun-but-its-not-the-end-of-the-world&#34;&gt;As I mentioned above, maintaining a secure WordPress site is difficult. And no security is foolproof. But if you&amp;rsquo;re careful and ruthless you can keep your site as secure as possible. No one likes being hacked, but it doesn&amp;rsquo;t have to be the end of your site. I have personally survived being hacked (including one major site I was running) as well as other disasters (including completely deleting my entire web directory without any backups). It&amp;rsquo;s not fun, but it&amp;rsquo;s not the end of the world.&lt;/h2&gt;&#xA;&lt;h3 id=&#34;comments&#34;&gt;Comments:&lt;/h3&gt;&#xA;&lt;h4&gt;&lt;/h4&gt;&#xA;&lt;p&gt;&lt;a href=&#34;http://successful-parenting.com/&#34; title=&#34;denisewitmer@gmail.com&#34;&gt;Denise&lt;/a&gt; - Jul 2, 2014&lt;/p&gt;&#xA;&lt;p&gt;Great piece, Jen! Thanks so much for your well thought out advice, I appreciate it. I think I will look into one of those password lockers, too.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h4&gt;&lt;/h4&gt;&#xA;&lt;p&gt;&lt;a href=&#34;http://www.htmljenn.com/&#34; title=&#34;jenn@html5in24hours.com&#34;&gt;Jennifer Kyrnin&lt;/a&gt; - Jul 2, 2014&lt;/p&gt;&#xA;&lt;p&gt;Great! The password lockers are definitely a good and important start. I find mine invaluable.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;</description>
    </item>
  </channel>
</rss>
