Jsecure is a great start but it has a few potential areas of improvement:
1. OK it redirects the /administrator folder but because it does this just for the admin folder it tells the hacker that the site is using Jsecure.
I would like to see it trap all 404 errors for the site and redirect them to the root.
2. The documentation is another givaway, all a hacker has to do is type
www.yourdomain.com/plugins/system/readme.jsecure.html
and not only does it confirm Jsecure is in use but it gives clues on how to hack it.
I would not include this file at all to the uploaded site.
3. Jsecure installs to common names and install folders which make it easier to hack.
I would like to see the install work in in two phases, first the upload, then the config which should ask you for an install directory, a key name and a name to rename the plug-in. It could collect an email and auto generate a long keynames such as fGYtEGJS9WWW, slkfvdtiII3, then create a folder called fGYtEGJS9WWW, rename jsecure.php to slkfvdtiII3.php, install it to the folder fGYtEGJS9WWW and modify all code to make it work. The email would be used to provide key confirmations/reminders and warn of attempt to hack the system.
4. The 404 message graphic is another giveaway, I would just use a system generated 404. For example if you enter
www.microsoft.com/dhfjgr
You get a message saying
We are sorry, the page you requested cannot be found. See below for search results close to your request, or try a new search.
I for Jsecure a parameter for the 404 text could be used with the default "We are sorry, the page you requested cannot be found." and a redirect to the root of the domain in 5 seconds.
Also if you must use a 404 graphic, install it in a random custom folder.
5. Help Page helps hackers
The help page helps hackers because it tells you not to use numbers, so if you say “what happens if I try” you get this
Illegal variable _files or _env or _get or _post or _cookie or _server or _session or globals passed to script.
So one wonders what PHP variables might be able to be used, could one use PHP injection or SQL injection?
Well the answer is to check inputs for potential errors and treat them as a 404.
6. Things missing from the help file
a. Note that plug in will appear on page 2 so set view on plugins to ALL.
b. It should tell you, 1 is to log out of admin before testing.
c. It would be helpful if it could give instructions on how to change things manually, for example changing the name of the PHP file in the config just stops jsecure from working and changing the jsecure.php file manually with FTP does not make it work either, so it would be useful to know what needs to be changed until you can provide the automatic random names I have suggested above.
I am no security expert, but what I do know is that you should try not to leave clues and you not introduce a system that potentially makes it easier to hack.
Is the PHP introduced by Jsecure more secure or does it have loopholes of it's own?
These sites seems to suggest that Joomla is vulnerable to hackers
www.packtpub.com/article/preventing-sql-...s-on-joomla-websites
www.chr00t.com/2009/02/joomla-hackers-command/
While this one give the SQL code required to find the Jsecure key
www.chr00t.com/2009/02/hack-joomla-jsecure-key/
So IF the jsecure login does not prevent injection then in theory the above exploits could be used.