GithubHelp home page GithubHelp logo

wphardening's People

Contributors

elcodigok avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wphardening's Issues

Add a library to find timthumb.php

One of the main vectors of attacks in WordPress is due to the misuse of this library.

The idea is to inform the user that timthumb.php is present in your project as a warning.

Rename variable names

Within the project structure is a mixture of different variable names. The idea is to normalize all these names.

Changing file and directory owner

The idea is to create a new option for changing the owners and groups of files and directories

As the use of new option is proposed --chown

Change function wp_admin_css()

Change wp_admin_css() function of /wp-include/general-template.php because the css file calls giving the version of WordPress.

Example:

<link rel='stylesheet' id='buttons-css'  href='http://misite.com/wp-includes/css/buttons.min.css?ver=3.9.1' type='text/css' media='all' />

Download WordPress from the web

Instead of looking for a WordPress project from a local directory, it would be possible to start the project by downloading WordPress from its official website.

Improve malware scanner

Improve malware scanner including the following functions

assert, file_get_contents, curl_exec, popen, proc_open, unserialize, eval, base64_encode, base64_decode, create_function, exec, shell_exec, system, passthru, ob_get_contents, file, curl_init, readfile, fopen, fsockopen, pfsockopen, fclose, fread and file_put_contents

version.php

It is advisable to change the contents of the $wp_version variable in the wp-includes/version.php file?

Implement l10n

This way we can have the application in multiple languages.

Hide Login Error Messages

Error login messages may expose and give hackers an idea if they’ve gotten username correct/incorrect, vice versa. It is wise to hide it from unauthorized login.

To hide login error messages, simply put the following code in functions.php

add_filter('login_errors',create_function('$a', "return null;"));

search base64_decode(); function

The idea is to look at the whole project of WordPress and its source code's base64_decode(); function where it is usually a backdoor attempt encode or malware.

Remove Themes

The idea is to find all Themes of the project and give the user the option to remove them.

Class reference

removeWordPress.py

Remove unused themes

The idea is that the tool recognizes all themes and delete those that are not going to use.

Report in HTML format

The current code when running wphardening.py generates a default output to the console line. The idea is to export to a more user-friendly HTML format.

Add auto-update core

The idea is sicronizar with GitHub and keep always updated the code on the client side.

Deny bad query strings

This script goes in your .htaccess and will attempt to prevent malicious string attacks on your site (XSS). Please be aware some of these strings might be used for plugins or themes and doing so will disable the functionality. This script from perishablepress is fairly safe to use and should not break anything important. A more advanced one can be found on askapache.com.

RewriteCond %{QUERY_STRING} ../ [NC,OR]
RewriteCond %{QUERY_STRING} boot.ini [NC,OR]
RewriteCond %{QUERY_STRING} tag= [NC,OR]
RewriteCond %{QUERY_STRING} ftp: [NC,OR]
RewriteCond %{QUERY_STRING} http: [NC,OR]
RewriteCond %{QUERY_STRING} https: [NC,OR]
RewriteCond %{QUERY_STRING} mosConfig [NC,OR]
RewriteCond %{QUERY_STRING} ^.([|]|(|)||'|"|;|?|).* [NC,OR]
RewriteCond %{QUERY_STRING} ^.(%22|%27|%3C|%3E|%5C|%7B|%7C). [NC,OR]
RewriteCond %{QUERY_STRING} ^.(%0|%A|%B|%C|%D|%E|%F|127.0). [NC,OR]
RewriteCond %{QUERY_STRING} ^.(globals|encode|config|localhost|loopback). [NC,OR]
RewriteCond %{QUERY_STRING} ^.(request|select|insert|union|declare|drop). [NC]
RewriteRule ^(.*)$ - [F,L]

Reference

http://wpsecure.net/secure-wordpress-advanced/

Disable reporting errors

in flag --wp-config add

/* Disable reporting errors */ 
error_reporting(0); 
@ini_set(‘display_errors’, 0); 

Thaks Andres @p4ter0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.