Login Register


PHP MD5-SHA1 Cracker filter_list
Author
Message
RE: PHP MD5-SHA1 Cracker #8
(04-05-2013, 12:25 AM)1llusion Wrote: Hi,

I just couldn't help myself, you have 2 security issues in your script.

The first one is a confirmed reflected XSS which is due to no input validation at:
PHP Code:
if (isset($_POST['submit'])) { $wordlist = $_POST['wordlist'];

You could fix it by using:
PHP Code:
if (isset($_POST['submit'])) { $wordlist = htmlspecialchars($_POST['wordlist']);

The second security issue is by opening a file, that the user defines:
PHP Code:
$wordlist = file($_POST['wordlist']);
You don't use any protection here and this flaw could be used to brute-force file locations and names on your server.

I personally would take out the part where user enters the name of the dictionary by himself and instead, use a menu, where the user simply ticks which one he wants. Also, I'd use integer values for passing the choice of the user and on the server, I'd simply filter out everything except the integers. This way you:
1) Have no chance of XSS vulnerability
2) Have control over what the user can access.

When I have some time, I'll edit the script to the more secure solution Smile
That's actually my bad, I didn't realize he was going to put it online. Confusedurprised:

Reply





Messages In This Thread
PHP MD5-SHA1 Cracker - by noize - 04-04-2013, 02:18 PM



Users browsing this thread: