GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Possible solution to brute force password hacking our member area's (code inside) (https://gfy.com/showthread.php?t=79852)

strainer 11-14-2002 03:53 PM

Tried your solution, nice idea but for me at least it doesn't work. Under Windows XP, once the 200 is sent back, I can't EVER get a password prompt again. Closing browser windows doesn't help - I'd have to REBOOT!

strainer 11-14-2002 03:59 PM

I too have about 500,000 break in attempts today. None of the solutions I have heard about appeal to me.

I started writing a PHP custom login page today, and I was able to authenticate a user but got hung up. Turns out there is no way to pass the credentials on with a redirect; the user just gets asked for the username/password again.

Almost considering doing that anyway; it would solve the problem.

Libertine 11-14-2002 04:02 PM

Quote:

Originally posted by strainer
I too have about 500,000 break in attempts today. None of the solutions I have heard about appeal to me.

I started writing a PHP custom login page today, and I was able to authenticate a user but got hung up. Turns out there is no way to pass the credentials on with a redirect; the user just gets asked for the username/password again.

Almost considering doing that anyway; it would solve the problem.

There are plenty ways to pass the credentials on with a redirect - for instance:

header(Location: http://user:[email protected]/page.html);

Just an example though (and a bad one at that).

strainer 11-14-2002 04:08 PM

I believe that is incorrect. I tried exactly what you said many times today, and it didn't work. I then read an article that is is not possible to pass credentials in the header, at least not this way??

strainer 11-14-2002 04:12 PM

Here is a snip of what I tried - doesn't work, browsers still prompts for password:
<?

$directory = "/members/" ;

$uname = $_POST["name"] ;


$upassword = $_POST["password"] ;

// first, is this a good password???
// just testing here, later the "real" directory will be a random number

$file = @ fopen ("http://$uname:$upassword@www.mysite.com$directory", "r");

if (!$file) {
echo "<p>DEBUG Unable to open remote file.\n";
exit;
}

// if good password, just redirect to the section as expected
header("Location: http://$uname:$upassword@www.mysite.com$directory/index.html");


?>

strainer 11-14-2002 04:39 PM

Ok, here is how Boldy's original idea worked great for me:

// Range of numbers
$min = "1"; // Min number
$max = "10"; // Max number

mt_srand(time()); // mt_srand() is used to seed mt_rand()

$RandomValue = mt_rand( $min, $max);

if ($RandomValue == 10) {
header("HTTP/1.0 200 OK");
//echo ( "fooey" ) ;
}

What this does now is only return the 200 OK 10% of the time. The other 90% of the time the user can hit the back key after they see a nice error page. I think I am going to change this to say, 1 ouf 20 and put in production now. Looks great in test...

Backov 11-14-2002 06:19 PM

Quote:

Originally posted by Dragon Curve
ProxyPass - doesn't sound like a very good idea to me. Obviously this will be checking for open 80/8080/1080 or what not ports on the incoming host. This poses many problems. For starters, clearly you need a timeout to verify the ports are open/closed. This will drastically slow down your response time for servers which I wouldn't consider a good thing AT ALL especially in this industry.

Educate yourself.

This is not a port scanner. It's a huge db of proxies that is updated and added to.. A centralized db.

We have it, we use it, it works great with no noticable server lag and no noticable extra cpu load.

This is a good solution, and if you don't even bother to read how it works - how well have you evaluated it?

Making assumptions is the mark of a newbie programmer.

Cheers,
Backov

strainer 11-14-2002 07:05 PM

Could someone please brute force try to hack me? :mad: :mad:

I have implemented the "200 OK" idea (only 5% of the time though) and am dying to see it in action....:ak47:

Dragon Curve 11-15-2002 01:13 AM

Quote:

Originally posted by Backov


Educate yourself.

This is not a port scanner. It's a huge db of proxies that is updated and added to.. A centralized db.

We have it, we use it, it works great with no noticable server lag and no noticable extra cpu load.

This is a good solution, and if you don't even bother to read how it works - how well have you evaluated it?

Making assumptions is the mark of a newbie programmer.

Cheers,
Backov

Uhm, I'd like to see on their page where it says they use a database of proxies.

Dragon Curve 11-15-2002 01:15 AM

Quote:

Originally posted by strainer
Ok, here is how Boldy's original idea worked great for me:

// Range of numbers
$min = "1"; // Min number
$max = "10"; // Max number

mt_srand(time()); // mt_srand() is used to seed mt_rand()

$RandomValue = mt_rand( $min, $max);

if ($RandomValue == 10) {
header("HTTP/1.0 200 OK");
//echo ( "fooey" ) ;
}

What this does now is only return the 200 OK 10% of the time. The other 90% of the time the user can hit the back key after they see a nice error page. I think I am going to change this to say, 1 ouf 20 and put in production now. Looks great in test...

Note that that won't give you a 10%. For all you know you could get RandomValue equaling 10 every single time. Unlikely, but possible. Doesn't really matter tho.

cat 11-15-2002 03:02 AM

hi Boys,

Boldy is ill, he soon will be back again.

Backov 11-15-2002 03:20 AM

Quote:

Originally posted by Dragon Curve


Uhm, I'd like to see on their page where it says they use a database of proxies.

http://www.proxypass.com/ppass.php?page=solutions

Reading est good. Comprehending is better.

strainer 11-15-2002 09:02 AM

Quote:

Originally posted by Dragon Curve


Note that that won't give you a 10%. For all you know you could get RandomValue equaling 10 every single time. Unlikely, but possible. Doesn't really matter tho.

Actually it does work perfectly; I have tested it. Once seeded and started, a proper working random generator like this will indeed produce a 10 almost precisely 10% of the time.

That doesn't mean that SOMETIMES you won't get 2 10's in a row, but after a million runs you will have 100,000 10's, evenly distributed across the bell curve.

boldy 11-15-2002 11:38 AM

Nice stuff guys! Ill implement the 10% thingie to ...

PxG 11-15-2002 12:51 PM

Quote:

Originally posted by Dragon Curve
ProxyPass - doesn't sound like a very good idea to me. Obviously this will be checking for open 80/8080/1080 or what not ports on the incoming host. This poses many problems. For starters, clearly you need a timeout to verify the ports are open/closed. This will drastically slow down your response time for servers which I wouldn't consider a good thing AT ALL especially in this industry.

Secondly, if it were just open ports, then that's a very poor method of checking if the server is an open proxy (I doubt it would be done like this). Some sort of verification (especially for port 80) would have to be done - again, taking x amount of time to do.

"(4) Detection and denial of requests from multiple (non-proxy) IP addresses sending high numbers of unsuccessful authentication requests for the same username. This implies a distributed network attack."

I would very much like to know how you could ever possibly hope to protect against something like that and not give users downtime.

"In addition, the authentication portions of Apache were written in relatively poor manner. "

I'd like to see info that could back that up =P

There is no real protection against brute force attacks like this that I can see that will guarantee your users uptime.

Please Get Educated about our product. Here's a link to oue technical FAQ:!
http://www.proxypass.com/docs/proxypass_tech_faq.pdf

:thumbsup

Best regards,
PxG

boldy 12-08-2002 04:06 AM

For those who are interested i've add that 10% thingie to my 401.php

http://www.kimhollandcash.com/401.txt

:thumbsup

goBigtime 12-08-2002 04:13 AM

For bruteforce protection/deterrance we use MemLogin
(available from PaysitePowertools.com )

and use Iprotect (an apache module) for password abuse - though iprotect doesn't help much against proxy based attacks.

Memlogin basically hides the real members URL from everyone except you & your members. If you set things up properly you won't ever be bothered by bruteforce traffic spikes again =]

boldy 02-10-2003 05:26 PM

*bruteforce night bump*


All times are GMT -7. The time now is 09:35 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123