HTML
 Computer >> コンピューター >  >> プログラミング >> HTML

ウェブサイトを保護するには? (完全な Web サイト セキュリティ ガイド)

更新が間に合わなかった、パスワードが安全でないなど、完全に防止可能な理由により、いくつかのハッキングが発生しています。

どうすればこれを知ることができますか? 25,000 以上のハッキングされたサイトを支援しており、ウェブサイト セキュリティに関して豊富な経験があります。 .

このウェブサイト セキュリティの基本ガイドでは、ウェブサイトを保護する方法について説明します :

  • あなたがウェブサイトのセキュリティに不慣れで、その意味を完全に理解していない場合でも、
  • ウェブサイトを保護しようとして失敗したことがあるとしても、
  • たとえ… 圧倒されて、どこから始めたらよいかわからない場合でも;
  • たとえ…「私はハッカーには敵わない。なぜ挑戦する必要があるのか​​?」と思ったとしても

しかし、さらに重要なことは、そもそも Web サイトのセキュリティについてどのように考えるかについてお話しすることです.このようにして、あなたはあなたのウェブサイトのために正しい決定を下す準​​備ができています.

TL;DR: Web サイトを保護する最も簡単な方法は、セキュリティ プラグインをインストールすることです。 Web サイトのセキュリティに取り組む時間がない人に最適です。プラグインを設定して忘れるだけです。ただし、時間と帯域幅に余裕がある場合は、これらの対策を読んで実装することをお勧めします.

ウェブサイトのセキュリティとは?

Web サイトを保護するための措置を講じていることは素晴らしいことですが、Web サイトのセキュリティは継続的なプロセスであることを認識することが重要です。ハッカーはクリエイティブな集団であるため、脅威は常に進化しています。

以下の記事で、優れたセキュリティ プラグインがマルウェアに関して重労働のほとんどを処理することを確認できますが、用心深く警戒することが Web サイトのセキュリティを確実なものにします。

ハッカーから Web サイトを保護するには? (実行可能な手順)

Web サイトを保護するための実行可能な計画を立てるための最初のステップは、Web サイトがどのようにハッキングされるかを理解することです。私たちの調査によると、ウェブサイトは主に次の 3 つの方法でハッキングされます。

ウェブサイトを保護するには? (完全な Web サイト セキュリティ ガイド)
ウェブサイトがハッキングされる理由

  • 90+% → プラグインまたはテーマの脆弱性
  • 5% 以上 → ユーザー名やパスワードの侵害
  • <1% → 質の悪いウェブ ホスト サービス

この分布は、Web サイトのセキュリティをどのように計画するか、および最も多くの時間とリソースをどこに割り当てるかの基礎を形成する必要があります。

1.ウェブサイトを脆弱性から保護

ハッカーは、脆弱な Web サイトを常に監視しています。ウェブサイトが大きいか小さいかは関係ありません。ほぼすべての Web サイトをハッキングすることで、彼らは多くの利益を得ることができます。私たちの経験では、すべてのハッキングの 90% 以上が、ハッカーが脆弱性を特定して悪用したために発生しています。

脆弱性とは何かをもう少し詳しく見てみましょう。これを理解することは非常に重要です。そうすることで、将来的に Web サイトのセキュリティ戦略を慎重に策定することができます。

脆弱性とは正確には何ですか?

Web サイトは、WordPress、プラグイン、テーマの 3 つの主要コンポーネントで構成されています。これらはすべて基本的にソフトウェアであり、他のソフトウェアと同様に、バグが含まれているため、誤動作することがあります。

バグはさまざまな結果をもたらす可能性があります。一部のバグは、Web サイトの速度を低下させたり、誰かがアクセスしたときにエラーをスローしたりします。これらは煩わしく問題がありますが、より重大な問題により、許可されていないユーザー (ハッカーなど) が Web サイトにアクセスできるようになります。この種のバグは、脆弱性として知られています。

脆弱性の種類

脆弱性は、前の段落で行ったように、コードのバグとして要約できます。ただし、他よりも頻繁に発生する特定のタイプがいくつかあります:

  • 古いソフトウェア:コア、プラグイン、テーマを最新の状態に保つことが重要です。
  • 不十分なユーザー ロール管理:すべてのユーザーに完全な管理者アクセス権を付与しないでください。
  • サニタイズされていない入力:入力フィールドは、保存および/または実行の前に入力をチェックする必要があります。

安全でない Web サイトでのハッキングの可能性

脆弱性は、それが許可する攻撃の種類と密接に結びついており、しばしば同じ意味で語られます。 WordPress が経験する最も一般的な攻撃は次のとおりです:

  • コード インジェクション:悪意のあるコードが入力フィールドを介して挿入され、ウェブサイトのコードまたはデータベースによって実行されます。 SQL インジェクションでよく見られるコード インジェクションの亜種で、WordPress などのデータベース駆動型アプリケーションでは特に悪質です
  • クロスサイト スクリプティング攻撃:このタイプの脆弱性は、ユーザーの Cookie を盗んで偽装したり、セッションを乗っ取ったりします。標的となったユーザーのアクセスは、Web サイトへの攻撃に使用されます
  • ブルート フォース攻撃:名前が示すように、このタイプの攻撃には巧妙さがありません。ハッカーは正しいものを明らかにしようとして、ユーザー名とパスワードの組み合わせでログイン ページを攻撃します。
  • SEO スパム:すべてのスパムは深刻ですが、この攻撃は Web サイトに最も大きな打撃を与える場所、つまり SEO に影響を与えます。 Web サイトの所有者は SEO にリソースを費やしますが、ハッカーがポップアップや違法またはグレー マーケットのアイテムへのリンクを挿入することによって、過度に利用するだけです。 SEO スパム攻撃も検出が難しく、多くの場合、Web サイトは感染していることに気付く前にスパムの悪影響を受けます。
  • フィッシング攻撃:これらの攻撃では、ハッカーが正当なエンティティになりすまして、ユーザーをだまして情報を喜んで提供させようとします。フィッシングは、これらの資格情報を取得するために、メールとハッキングされた Web サイトを介して連携して機能します。

脆弱性の影響は?

プラグインとテーマは数千の Web サイトにインストールされているため、この 1 つの欠陥の影響が大幅に増幅されます。

責任あるプラグインとテーマの開発者は、更新をリリースすることで、製品のこれらのセキュリティ ホールを塞ごうと努力しています。これが、可能な限りプレミアム プラグインを選択することをお勧めする主な理由です。 Web サイトのセキュリティ戦略において、ソフトウェアの定期的なメンテナンスはいくら強調してもしすぎることはありません。

素晴らしいので、バグは修正されました。もう安全ですよね?まあ、そうではありません。脆弱性の発見は、Web サイトの所有者にとって危険な時期です。

脆弱性が発見されるとどうなりますか?

脆弱性は、セキュリティ研究者によって発見されることがよくあります。調査結果をプラグインまたはテーマの開発者に開示します。前のセクションで述べたように、責任ある開発者は問題を修正してアップデートをリリースするために競争します。

脆弱性が修正されると、セキュリティ研究者は調査結果を公開します。開発者が修正をリリースしたので、ウェブサイトは安全ですよね?

そうではありません。

ハッカーは脆弱性についても読み、バージョンが更新されていない Web サイトを探します。公開されている脆弱性は、初心者のハッカー (スクリプト キディーとも呼ばれます) を惹きつける傾向があります。彼らはターゲットがどこにいるかを正確に把握しています。

脆弱性からサイトを保護するために必要なこと

ここでは、Web サイトのセキュリティを確保し、ハッカーからサイトを保護するために実行できる具体的な手順について説明します。これらの手順は簡単に思えるかもしれませんが、Web サイトを安全に保つための強力な方法です。

1.バックアップを取る

バックアップは、セキュリティ戦略の中で最も過小評価されている部分です。定期的なバックアップの重要性はいくら強調してもしすぎることはありません。彼らはあなたのセーフティネットであり、物事がうまくいかないときに頼ることができる唯一のものです.バックアップは、すぐに立ち直るのに役立ちます。

ただし、すべてのバックアップ プラグインが同じように構築されているわけではありません。多くの場合、最も必要なときに失敗します。復元時です。適切なプラグインを選択するには、いくつかの要因があります。これらの基準をしっかりと念頭に置いて、利用可能な上位のWordPressバックアッププラグインを確認しました.

2.プラグインとテーマを最新の状態に保つ

これは、特に更新の重要性に関する前のセクションを読んだ場合、非常に明白に聞こえるかもしれません。ただし、ダッシュボードの赤い通知を無視して、より緊急のことを行うのは非常に簡単です。

したがって、繰り返します。プラグインとテーマの開発者は、セキュリティ修正を含むアップデートをリリースします。アップデートのインストールを先延ばしにすることを選択した場合でも (そうしないでください)、少なくともリリース ノートを読んだ後はそうしてください。

3.高品質のプラグインとテーマを選択

ここまでで、プラグインとテーマが Web サイトの中心となる方法を十分に説明しました。完全に誰にでもできるソフトウェアはありそうにありませんが、Web サイトに適したプラグインとテーマを選択する際に留意すべき重要な要素があります。

  • プラグインは定期的に更新されていますか :開発者によって一貫して維持されているプラ​​グインまたはテーマは、脆弱性が発見された場合にセキュリティ パッチを取得する可能性があります。
  • プラグインは人気がありますか :これはもろ刃の剣です。何百万回もインストールされている人気のプラグインは、ハッカーの標的になります。しかし、これらのプラグインは、より多くの人が監視しているため、より安全になる傾向があります.
  • それはプレミアム プラグインですか :有料のプラグインは開発者の作業をサポートするため、無料のプラグインよりも放棄される可能性がはるかに低くなります。オープンソース ソフトウェアが安全でないと言っているわけではありませんが、プレミアム製品の場合、カスタマー サポートと製品の品質に対価を支払っています。
  • 無効なプラグインとテーマをインストールしない :無料で利用できるプレミアム ソフトウェアは、多くのレベルで問題があります。無効化されたソフトウェアにはマルウェアやバックドアが含まれていることが多く、インストールするとハッカーが Web サイトにアクセスできるようになります。

4.ファイアウォールを使用

ハッカーやハッカーが設計したボットがあなたのような Web サイトを攻撃するのを防ぐ確実な方法はありません。ただし、ファイアウォールをインストールすることで、確率を大幅に下げることができます。
最適な WordPress ファイアウォールのリストは次のとおりです。

2.ユーザー名とパスワードを保護する

We’ve found around 5% of hacked websites were vulnerable to attack because of weak passwords. This may seem a small number when compared to outright malicious activity, but it is still significant enough to command your attention.

Losing the admin password to your site is like losing keys to your home or car. With the key, the thief has complete control over your prized possessions. Likewise, with the password, hackers have complete access to your website. At this point, not even a firewall or a security plugin can prevent hackers from causing damage to your website.

The need for strong passwords continues to be very strongly advocated, but because of the difficulties associated with it, it’s often ignored by website users.

Before we go into mechanisms to have strong credentials, let’s address some common questions people have about them.

How is it possible to steal a password?

The answer may come as a surprise:the hacker tries to guess the password. By this, we don’t mean they are trying out various passwords manually, but there are bots to do this. This is also known as a brute force attack, or if the bot is guessing words, a dictionary attack.

These attacks work very well because of several reasons:

  • Easy-to-guess passwords: common words, short words, the word ‘password’ itself in different permutations
  • Data from previous hacks: there is a reason why people recommend using different passwords for different services and websites

How to safeguard against password theft

ウェブサイトを保護するには? (完全な Web サイト セキュリティ ガイド)

1. Use a strong password

Strong passwords use a combination of letters, numbers, and symbols in random configurations, because those are hard to crack. It may take hacker bots years to get find the correct one.

You could try creating a strong password on your own, or use a password generator. Then you can use plugins to enforce strong passwords.

Strong, hard-to-crack passwords can be difficult to remember, so we recommend using password managers like LastPass.

2. Limit login attempts

A good way to thwart a brute force attack is to block attackers after multiple failed login attempts. This is an effective mechanism, since, this type of attack consists of hackers’ bots repeatedly trying different passwords.

MalCare firewall comes integrated with this feature. Limiting login attempts is a highly effective way to secure your website without many downsides

ウェブサイトを保護するには? (完全な Web サイト セキュリティ ガイド)

If an authorised user has inadvertently reached this point, they can click through the link to find a captcha confirming they are indeed human.

3. Implement two-factor authentication

Several services use two-factor authentication during the login process, which essentially means you need to have two (ideally) separate tokens to access your account. Most commonly, these involve a combination of passwords and a limited-time token like a pin code or QR code sent to your email or a device.

There are several plugins that implement two-factor authentication or 2FA, and they vary depending on the services they provide. 2FA comes integrated in MalCare’s security suite as well.

4. Implement CAPTCHA protection

CAPTCHAs can only be resolved by humans. They are designed to prevent hacker bots from accessing an account. You can use it to protect your website.

Here’s a neat little article by Kinsta that’ll help you get started.

5. Use a firewall

Certain website security firewalls like MalCare’s also keep track of malicious IPs at a global level. The firewall learns from all the sites with the plugin installed. It then automatically blocks bad IPs even before they have attempted to crack your password. This, in combination with limit-login capability, can protect your site from hackers trying to force their way in.

ウェブサイトを保護するには? (完全な Web サイト セキュリティ ガイド)

3. Choose a good web hosting provider

There is a tendency to blame the web host for anything that goes wrong with a website. While web hosts are generally responsible for many aspects of a website, they are rarely at fault when a website gets hacked.

In fact, the opposite is generally true, web hosts improve website security.

Of course, there are some web hosts who play a role in the compromise of websites hosted on their server. It rarely happens, but when it does, it’s a major incident that compromises thousands of websites.

4. Install an SSL certificate

Secure Sockets Layer, more commonly known as SSL, is a security protocol that encrypts all communication to and from a website. Once installed, it appears as a padlock at the beginning of your website’s URL.

The benefits of using an SSL certificate are as follows:

  • All data passing to and from your website is encrypted
  • It is a badge of trust for your website. In fact, most browsers will flag sites without SSL as ‘Not secure’ in the address bar.
  • Google loves websites with an SSL certificate and even rewards them with a higher ranking.

Easily install an SSL certificate on your website. It barely takes any time, and it is well worth the effort spent.

Good website security practices

As we said at the outset, website security is an ongoing practice. In this section, we are listing out practices that are good to inculcate in your overall website security strategy. Once you get into the habit of doing so, the small investment of your time and effort will pay for itself many times over with a secure website.

1. Change your password frequently

We understand that setting difficult-to-guess passwords is tricky, especially because they are often synonymous with difficult-to-remember. We can also imagine the dismay at being asked to change this most excellent password regularly.

The reason is that passwords are the weakest links in security; especially if you use the same passwords for multiple accounts. Even if one site experiences a breach, you can safely assume that all your accounts are potentially compromised. There are news stories about breaches every few weeks–and those are just the reported ones.心に留めておくべきこと。

Regularly can also mean different things to different people. Some financial institutions, like banks, mandate that passwords be changed every 90 days. Using a password manager is the way forward.

2. Review website users + track new admin users

Hackers often leave behind admin users, so that they can regain access to a site. Hence, reviewing admin users on a regular basis can improve website security.

Secondly, website collaborators can change. If a user no longer needs access, it is best to remove their access. The reason is two-fold:you don’t want the user to make any more changes to your website; their inactive accounts can be compromised by hackers.

Over time, as we build our site with newer content and design, we keep adding new users to our site. We should review these users periodically. You may be following good security practices yourself, but another user getting compromised will cause your site to be affected.

When adding users, give only necessary access levels as far as possible. For instance, If someone is only writing articles don’t give them admin access.

3. Set up activity log on your site

We are big fans of having activity logs for our website. It has saved our bacon multiple times.

Hackers don’t use core WordPress APIs to modify a website, therefore many of the changes they make will not reflect in an activity log. However, they can leave footprints behind, such as creating admin accounts for themselves to access the site. These unexpected actions can help detect hacks.

Conversely, if changes are made by a collaborator, then activity logs can help avoid unnecessary panic, when you see changes made to your website.

4. Block PHP in the Uploads folder

A whole class of vulnerabilities (Remote Code Execution, to be precise) lets hackers upload malicious PHP files to the Uploads folder. The hacker can then use it to execute any code they want on your website. In other words, they have complete control over your website.

The attack can be neutered effectively if you block the execution of PHP files in the Uploads folder.心配しないで。 Blocking PHP files in the Uploads folder is safe because they shouldn’t be present there, in the first place. Uploads folder is where you store your media, not scripts.

If you are using, MalCare security plugin, you can block PHP execution in the Uploads folder with the click of a button. For Apache/Litespeed based sites, we can add rules to htaccess to enforce this protection.

Things to avoid when securing your website

A quick Google search will give you numerous tips and strategies to secure your website. Several security plugins will also present multiple options to protect your site against password crackers. Securing your website is a great deal about what you should do; however, there are also some things you should avoid.

The reasons vary for each of the points we talk about below, but at its core, there should be a tangible security benefit to your measures—especially if you are asking your users to jump through additional security hoops. For example, if you apply both captcha and 2-factor authentication, getting into your site becomes trying, with little additional benefit.

You may get an additional sense of security from applying all available options, but in cost-benefit analysis, they don’t cut mustard.

1. Hide wp-login page

You’ll see this one on a lot of forums:change the wp-login page to a custom URL for your site. The logic is, if the hackers can’t find the login page, they can’t use brute force attacks to gain entry to your site.

There are a few flaws with this:

  • WordPress also lets you log in using XML-RPC
  • It will make your site difficult to use. If you forget the special URL you have created for yourself in lieu of wp-login, then recovering from this can be difficult.
  • If you use a common URL or the default one that comes with the security plugin, it will be easy for the hackers to guess anyway, therefore defeating the purpose entirely.
  • Hiding this page involves applying complicated settings to your site which can have other unexpected side effects.

Therefore, in our opinion, it is just not worth the effort.

2. Geo-blocking

Another commonly recommended security measure is geo-blocking. You may not need or expect legitimate traffic from certain countries, and hence decide to restrict access. MalCare supports this feature, but we don’t recommend you do this because:

  • IPs for regions are not perfect and can have errors.
  • If you block yourself out by mistake, reverting this will be difficult.
  • You might end up blocking good bots such as Google which can harm your site.

A good firewall can and will protect your website against malicious bots and undesirable traffic. We’ve covered the benefits of firewalls in a previous section.

3. Password protect wp-admin directory

The wp-admin folder is one of the most crucial folders on your website. Naturally, it attracts a lot of attention from hackers. Therefore, protecting it with a password may seem like a brilliant move, but it’s counterproductive.

Password protecting your wp-admin directory breaks AJAX functionality on your WordPress website. AJAX is a coding technique that loads parts of your website from the server without changing the currently displayed page.

If this sounds like gobbledegook, it essentially means that it makes your website dynamic, without constantly reloading it for users every time something changes.

Think about scrolling on the newsfeed of a social networking site. New stories or tweets load while you are still reading the ones already on your screen, and you can refresh the newsfeed when you want to load the new content.

4. Hide WordPress version

The logic behind hiding the WordPress version of your website is related to security updates. If your website doesn’t have the latest version of WordPress, a hacker may be able to exploit a vulnerability that exists in an older version.

However, hiding your WordPress version has no benefit whatsoever. There are several ways to determine a website’s WordPress version:inspecting the site’s frontend code, checking the RSS feed, etc. All of which are legitimate, incidentally.

The way to combat WordPress vulnerabilities in older versions is to keep your version updated to the latest one. Many website administrators are afraid that updating a live site may cause something to break. Therefore, it is best to do so on a staging site first.

What to do if your website has been hacked?

ウェブサイトを保護するには? (完全な Web サイト セキュリティ ガイド)

If your site has been hacked recently, it is even more important for you to be extremely diligent about the security of your site. If not done correctly, it can lead to the site getting hacked repeatedly and the whole situation becoming a total nightmare.

  • Clean the malware first :Use a good security plugin, like MalCare, to automatically remove malware without a trace.
  • Update everything :As we said before, software updates are vital. Make sure you have the latest versions of WordPress, themes and plugins. If you don’t, there is a good chance this is the reason your website got hacked in the first place.
  • Review every admin user: Scrutinise every admin account carefully. We’ve said this already in this article, but hackers create admin accounts to regain access to a website that they have hacked, in case the malware has been discovered.
  • Change all passwords: Assume your credentials have been compromised and change passwords. Hopefully you do not use the same password for different products and services, otherwise you should change those passwords as well.
  • Change DB credentials (if possible): The wp-config.php file contains the credentials the WordPress site uses to connect to the database of the site. In many cases, access to the database is restricted even if the DB credentials are compromised. However, with some hosts, hackers can use this information to directly modify the database. This can cause the site to be reinfected.
  • Change security keys: WordPress uses security keys to manage sessions for logged-in users. Read more about what they are and how to make a website secure by changing them.
  • Set up a WordPress firewall: We’ve already covered this in detail in this article. A WordPress firewall is your best defence against malicious bots and bad traffic.

結論

We started this article on how to secure a website with a clear signpost:the first step is to think about website security in the right way. It is an ongoing process. A good standard practice to have in any organization is to conduct periodic website security audits.

The threat landscape is constantly changing, and hackers will find more creative ways to defeat defences. Security experts remain constantly vigilant, and this is the main takeaway from all of what we have learned in our years of research:don’t get complacent.

Have thoughts to share? Drop us a line, or connect with us on social media. Love to hear your thoughts.

よくある質問

What is website security?

Website security is putting together a plan to protect your website and users from hackers and their malware. It involves understanding the components of your website, how they work together and what vulnerabilities they have.

Once this foundation is in place, then you need to formulate a comprehensive security plan to protect against vulnerabilities. This involves a series of configuration steps, implementation of policies, and keeping up to date with respect to threats.

A key factor in achieving website security is to understand that it is not a one-time activity. Security evolves, because threats evolve.


Why website security is important?

WordPress is used by millions of people, so it is probably secure, right? Yes and no.

Yes, because WordPress core files are secure, and even when a vulnerability is discovered, it is addressed very quickly.

No, because your website isn’t just the WordPress core. It is a combination of plugins and themes, used to help make your website more functional, interactive and attractive. These plugins and themes extend the functionality of WordPress, but also increase the opportunities for vulnerabilities. Good plugin and theme developers will fix vulnerabilities quickly. However the danger is significantly greater.

To protect your website—including the time, money and other resources you have invested in it—and to safeguard your visitors from having their data and identities stolen, you need to secure your website. If you are WordPress user, you can go through our wordpress security guide to secure your site.


How to secure a website from hackers?

You can take several steps to secure your website from hackers: 

1. Keep your WordPress, plugins and themes up to date
2. Install a good firewall
3. Implement login protection
4. Install SSL 
5. Use two-factor authentication for logins
6. Review user roles regularly
7. Set up an activity log


  1. ハッキングされた Web サイトを簡単に修復するには? (完全なガイド)

    ウェブサイトがハッキングされていませんか ?私たちに連絡するほとんどのウェブサイト管理者は、ウェブサイトのリダイレクトやウェブサイトでのスパム ポップアップなどの症状を目にします。これがストレスになるのは当然です。ハッキングされた Web サイトを修正できます。 ウェブサイトのクリーニングに入る前に、あなたのウェブサイトがハッキングされていることを確認する必要があります。 セキュリティ プラグインを使用して Web サイトをスキャンし、Web サイトのハッキングを確認します。 ハッキングを確認すると、次のステップはずっと簡単になります。この記事では、Web サイト上のマルウェアを特定し

  2. Mac を保護する方法:Mac のセキュリティを強化する

    Mac のセキュリティを強化するための標準的な手順には、macOS ソフトウェアの定期的な更新、ファイアウォールの有効化、Mac 用のウイルス対策のインストール、公式サイトからのアプリのダウンロードなどが含まれます。これらの Mac セキュリティのヒントは、設定の変更に限定されるものではありませんが、ユーザーの行動の変化にも関係しています。 オープン ネットワークの回避、疑わしいリンクや添付ファイルの回避、ゲスト アカウントの設定、強力なパスワードの使用は、Mac を保護するためのその他の有用なヒントです。ここでは、さまざまな脅威を効果的に回避するのに役立つ、システムに組み込まれている多くの