hardening | Business, Marketing & SEO Forums https://support.shorturl.gg Knowledge Help Portal | Business and Marketing SEO Forums. Find your answers here Thu, 10 Aug 2023 18:17:11 +0000 en-US hourly 1 https://support.shorturl.gg/wp-content/uploads/2020/08/url-chain-32px.png hardening | Business, Marketing & SEO Forums https://support.shorturl.gg 32 32 Prevent yourself from WordPress User Enumeration Attacks https://support.shorturl.gg/business-marketing-and-seo-forums/topic/protect-yourself-from-wordpress-user-enumeration-attacks-and-how-to-prevent-it/ Wed, 09 Nov 2022 11:28:00 +0000 https://support.shorturl.gg/?post_type=topic&p=2837 protect yourself user-enumeration wp WordPress, Simple URL Business, Marketing, SEO forums

Protect yourself from WordPress User Enumeration Attacks and how to prevent it.

So what is user Enumeration Attacks?

Well user Enumeration Attacks are several brute-force techniques with the purpose of guessing or confirming login credentials such as usernames, e-mail addresses and passwords. Basically a hacker attempts to guess your login information and they do not of course do this manually but they use computers/servers to randomly scan the internet with bot spiders to din a vulnerable website; you website!

User enumeration is often a web application vulnerability, though it can also be found in any system that requires user authentication. Two of the most common areas where user enumeration occurs are in a site’s login page and its ‘Forgot Password’ functionality.

The malicious actor is looking for differences in the server’s response based on the validity of submitted credentials. The Login form is a common location for this type of behavior. When the user enters an invalid username and password, the server returns a response saying that user ‘rapid7′ does not exist.

By default, WordPress is vulnerable to such User Enumeration attempts. Of course, bad username and password practices will have an even greater impact on this vulnerability.

The two most common web application targets for enumeration attacks are:
  • The login page
  • Password reset page

A webserver with poor application security will identify a non-existent username with an invalid username message where is displays that either the user name does not exist or password is incorrect:

Login screen WordPress, , Simple URL Shortner, Business, marketing, SEO forums

This confirms for a hacker/ cyber criminal that the user/password doesn’t exist in the database. Thus this is a way to validate if the user does not exist and keep trying until a combination works and the hacker can successfully login.

WordPress user enumeration, Simple URL Shortner, Business, marketing, SEO forums

How Does User Enumeration Work in WordPress?

Method 1: Author Archives
Perhaps the easiest method to find WordPress usernames is by going through the author archives. To enumerate usernames through the author archives method, simply append an integer (i.e. 1,2,3, etc.) as a value to the parameter “author”. For example, look at the following values:

<codestyle=”color:#000000;”>http://example.com/?author=1 http://example.com/?author=2 http://example.com/?author=3

These values would then fetch the results like the following:

http://example.com/author/admin/
http://example.com/author/user2/
http://example.com/author/user3/

Therefore, by fuzzing the parameter author in the WordPress home URL, multiple author names can be enumerated.

How can you prevent these attacks?

Use a security plugin such as :

  • WPMU Dev Defender – https://wpmudev.com/project/wp-defender/
  • CledanTalk Cloud firewall: https://cleantalk.org/wordpress-security-malware-firewall
  • WordFence – https://wordpress.org/plugins/wordfence/
  • All-In-One Security (AIOS) – https://wordpress.org/plugins/all-in-one-wp-security-and-firewall/
  • BBQ Firewall – https://wordpress.org/plugins/block-bad-queries/
  • Really Simple SSL (Their pro version which allows you to lock down vulnerabilities): https://wordpress.org/plugins/really-simple-ssl/
  • Require two-factor authentication (2FA) on all users on your website. At least for the administrators, editor and moderation accounts.
  • Use strong password that is at least 15-20 characters long and mixed with both upper, lower characters and various symbols. You could use for this purpose a password manager such as Lastpass: https://www.lastpass.com either for yourself or your entire team and set the password policies there too. This will prevent any hackers from finding any weak passwords in your website. LastPass can also generate passwords up to 100 characters making passwords extremely secure.

You can also do further hardening of your WordPress security by blocking user-enumeration through functions.php in your WordPress theme:

Alternatively you could also do it by creating a WordPress MU-plugin:

A MU-plugin is a little custom code plugin that enables the code’s function systemwide. This is very useful and requires a less resources from your servers too than using a plugin for it. It also is beneficial when running WordPress Multisite as all websites created in the system will apply the code simultaneously thus effectively protecting all websites instead of manually applying it to every website’s theme functions.php.

How to activate your MU-plugin:

Once you saved the plugin with a unique name “My-plugin-function.php“.
Now create a new directory in your WordPress installation server folder E.g. the www folder:

Save or create your MU-plugin folder as follows: Path: Your www root folder >>> wp-content >>> mu-plugins

and upload your new MU-plugin to that folder. Once it is uploaded it is activated instantly. That’s it!

You can confirm also that the MU-plugin is activated:

Login to your WordPress admin back-end and click on “plugins” in the right menu pane. Click on “Must Use” and find your new mu-plugin in the list.

MU-plugins wordpress , Simple URL Shortener, Business, marketing, SEO forums

Block WordPress Enumeration through the .htaccess file:

You can also block at server level rather than website level and block server requests by adding the this .htaccess code in your server’s www root.

Note: You must change http://mywebsite.com to your own website domain name address!span

Examples of Complex Enumeration Attacks:

LDAP Enumeration: Light-Weight Directory Access Protocol (LDAP) is a protocol used to access directory services – hierarchical structures of user records.

A successful LDAP enumeration attack could reveal the following sensitive information:

  • ​Usernames
  • Addresses
  • Contact information
  • Business sector information

NetBIOS Enumeration
Network Basic Input Output System (NetBIOS) is used as an API that enables endpoints to access LAN resources.

Each NetBIOS protocol is comprised of a unique 16-character string that identifies network devices over TCP/IP.

To facilitate NetBIOS enumeration attacks, printer and file services need to be enabled. These attacks occur via port 139 on the Microsoft Operating System.

A successful NetBIOS enumeration attack could make the following attacks possible on the compromised machine.

  • The compromised endpoint could be recruited into a Botnet and used to launch DDoS attacks.
  • The hackers could execute further enumerate privileged access accounts to gain access to sensitive resources.
  • SNMP Enumeration
    Simple Network Management Protocol (SNMP) is a framework for requesting or modifying information on networked devices. SNMP is software agnostic, meaning networked devices can access regardless of the type of software they are running.

Cyberattacks enumerate SNMP on remote devices to gather the following intelligence:

  • Traffic behavior
  • Remote device identifiers
  • Identifying information about networked devices and resources
]]>
How to Harden Both WordPress and Your Server’s Security https://support.shorturl.gg/business-marketing-and-seo-forums/topic/how-to-harden-both-wordpress-and-your-servers-security/ Wed, 24 Aug 2022 15:24:11 +0000 https://support.shorturl.gg/?post_type=topic&p=1072 How to your harden WordPress the right way. Simple URL Shortener

How to your harden WordPress the right way

A short guide to prevent you from being hacked

Below you find a list with some very good tricks to harden your server and WordPress installation which will help with preventing your system from being hacked by script kiddies and other lame bad people that which you mess up peoples hard work; including yours.
Remember that there isn’t a fool proof way to secure your system. Internet security is an on-going process and never stops.

    • Place .htaccess files in all folders that should not be accessed.

 

    • In your control panel shut down all directory listing and browsing access. Login to your control panel at your web host and search for “Indexes” and then chose the directory folders that needs to be protected
      C-Panel login screen | Simple URL Shortener SEO forums

      cPanel Main Indexes sub panel | Simple URL Shortener SEO forums

      C-Panel Indexes folders | Simple URL Shortener SEO forums

      C-Panel Indexes config choices | Simple URL Shortener SEO forums

 

    • Prevent editing core files from WordPress itself. Add the code to your wp-config.php file in wordpress which then will disable the ability to edit WordPress server files from the WP dashboard.

 

    • Move the wp-config file above the WP root directory e.g. public_html
      C-Panel File Manager | Simple URL Shortener SEO forums

      C-Panel file manage overview | Simple URL Shortener SEO forums

 

    • Move the content of the wp-config file to another secret location above the public_html so that the wp-config file is just a fake file.


      Once you done that then you need to create a new directory in C-panel (home/your-account-name/) where you place your real wp-config file in. The real WP-config should be locked with 400 file permission and the .htaccess file should use 404 file permission.

      C-Panel File Manager overview secret folder | Simple URL Shortener SEO forums

      C-Panel File Mananger WordPress configuration file wp-config.php | Simple URL Shortener SEO forums

    • Delete the first user (The first administrator user) and create new one that do not have ID number 1. The WordPress admin user that is automatically created for you when you first install WordPress is known as WordPress user with id of 1. This is because in the _users database table, the record id for the admin user is 1. As you can see here:

      WordPress Administrator | Simple URL Shortener SEO forumsuser number one
      The user can be easily replaced that you create a new user in the WordPress control panel and then set that new user to be the administrator. Once you have done that then logout of the first admin with ID1 and login to your new administrator account and then delete the first account. This can of course be done from the database too and delete the user with ID1. But it just easier to do it directly from the WP backend.

 

 

    • Harden the server itself. Use Patchman:
      Patchman server monitor manware | Simple URL Shortener SEO forum

      If it is your own hardware/VPS server, (Which you should run anyway in the first place and not a shared hosting environment), then installing an additional security layer in Linux itself such as Patchman makes perfect sense: https://www.patchman.co ,
      (Patchman is a Premium service).

      Patchman will scan and monitor 24/7/365 not just your WPMU (WPMU=WordPress Multisite) or single/stand-alone WordPress installation, but the whole Linux server itself and all other web applications you might run off your server and Patchman does this down deep from the OS core itself. If any mischief things are found then Patchman will automatically correct and patch it to close the security hole. Pretty neat, right?

 

    • Also always remember to delete the files upgrade.php and install.php from your wp-admin and license.txt and readme.txt from the wp-root directory each time you upgrade.

 

    • Make sure to have access to real host backups:

      WordPress Host backup | Simple URL Shortener SEO forums

      No backup plugin can ever substitute and beat host backups which is based on real server backup infrastructure taking full backups of your whole server on a daily basis, (and it makes your site faster too because one less plugin to bog down your server which is an additional bonus.). Having access to a reliable solid backup system with retention points that goes months back will save your sorry skinny butt when the sky falls down on you and it will.

      It is not a question of “if it will happen“, but when it happens. You need to be ready for that situation when things fail in regards to your website.

    • How to Configure Secure WordPress Database Permissions,(After WordPress installation):

      databases MySQL mariaDB | Simple URL Shortener SEO forums

      Never run your WordPress Installation with full database user permissions.

      The WordPress database is the most important component of your WordPress website. It contains all the content of your website, such as information about your users and all your posts, etc.

      In order to access the database, a database user should have specific privileges that allow him or her to manipulate it. The WordPress database is built using MySQL/MariaDB and contains privileges which allow users to make certain changes. The ‘grant access privileges’ give users full privileges. This is a very convenient option for a user if they want to have full control over the WordPress database.

      However, from the security point of view, this is extremely dangerous, since if a hacker gains access to the database then he or she will have full control over the WordPress database and the stored data, which can have catastrophic consequences on your website security. Therefore it’s not recommended to grant a user full access, unless the user needs to be able to use the DROP or DELETE SQL commands.

      Below is an example of the minimum privileges a database user needs to have. Other database permissions are regarded as “extra” privileges that in most cases are not needed. A typical WordPress user should be granted the following database privileges only:

      • SELECT
      • INSERT
      • UPDATE

      C-Panel MySQL Database WordPress DB user minimum permission requirement | Simple URL Shortener SEO forums

      If you are upgrading WordPress, the above database permissions might not suffice between versions, WordPress might need to make further changes to the database. In this case, if you are only upgrading to the latest version of WordPress, add the below privileges to the WordPress database user:

      • CREATE
      • ALTER

      NOTE: Some plugins might require additional database privileges such as CREATE, DROP or DELETE and in those cases these privileges should be granted.

      In addition to securing your WordPress database permissions, you should make sure that each database of your website is accessed through a separate account and not through the root account.

      C-Panel MySQL Database full user permissions WordPress | Simple URL Shortener SEO forums

 

]]>