Post by jones » Fri Oct 01, 2010 1:43 am

how about using sha1 and rand(time)

Active Member

Posts

Joined
Tue Aug 24, 2010 1:05 pm

Post by Qphoria » Fri Oct 01, 2010 9:18 am

this is all moot.. random is random. Randomizing and hashing a random hash with a random hash randomizer will only hash the randomized hash until the hash randomizer has randomized the hash out of its randomized hashing.
By simply seeding it with time or microtime, there is no way to go out and guess. Even without seeding, it is random enough

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by JAY6390 » Sun Oct 03, 2010 8:50 am

The multiple rand()s won't do anything other than take processing time. One random number from the function would be just as effective as 10. by default, mt_rand will use the mt_getrandmax() value if one isn't set, and most systems thats 2147483647. If that's not random enough, there's something wrong really. The chances of someone getting in with this is pretty slim. Of course, you can remove the problem of this by simply renaming your admin folder. Also, the seeding is done automatically, so it's not needed

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by grooverdan » Thu Oct 07, 2010 8:39 am

Qphoria wrote:mt_srand(time());
$token = mt_rand();
Well time isn't random so it makes a bad seed. Also according to the php documentation for mt_srand http://php.net/manual/en/function.mt-srand.php it isn't needed after php-4.2.0.

I like the simplification of removing the md5 function over the random number.

New member

Posts

Joined
Sun Jul 04, 2010 9:08 am

Post by 12oclocker » Wed Oct 13, 2010 8:57 pm

seeding to getprocessortickcount (I doubt php has that) would be a better idea, in some languages if you dont manually set the seed, the rng will always start at the same point, thus rand will be predictable. I remember programming in MFC, if you set the seed to 0 or 15 or whatever static number, or dont set it at all, and generate 20 random numbers. then do it again, you will see the same number sequences popup up, totally predictable. I never tested that in php yet, so not sure what would happen there.

Active Member

Posts

Joined
Fri Feb 19, 2010 10:50 am

Post by JAY6390 » Wed Oct 13, 2010 9:28 pm

Yeah, some languages do that, however mt_rand() does not

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by Qphoria » Wed Oct 13, 2010 9:33 pm

time isn't random but it is unpredictable and never repeating so it makes a great seed. But yes mt_rand doesn't need a seed

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by gdm82541 » Fri Oct 15, 2010 5:51 am

Thanks for this information...

Newbie

Posts

Joined
Wed Sep 22, 2010 1:02 pm

Post by billyggla » Mon Nov 08, 2010 8:18 am

Qphoria wrote:random is random. Randomizing and hashing a random hash with a random hash randomizer will only hash the randomized hash until the hash randomizer has randomized the hash out of its randomized hashing.
A gold star to anyone who can say that while drunk.. :drunk: :laugh:

Active Member

Posts

Joined
Mon Sep 20, 2010 7:05 am

Post by nikhil » Fri Nov 19, 2010 2:12 pm

Hi guys,

Can you please help me how to reproduce the RFI/LFI issue in Opencart v1.4.9.1 ? Its only when I will track the issue i will try to resolve it.

Thanx..

Newbie

Posts

Joined
Wed Nov 17, 2010 9:55 pm

Post by Xsecrets » Fri Nov 19, 2010 3:10 pm

nikhil wrote:Hi guys,

Can you please help me how to reproduce the RFI/LFI issue in Opencart v1.4.9.1 ? Its only when I will track the issue i will try to resolve it.

Thanx..
did you actually read this thread? It tells you how to reproduce the issue and how to solve it.

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by i2Paq » Fri Nov 19, 2010 3:34 pm


Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by humpadilly » Wed Aug 21, 2013 11:10 pm

Sorry if its been reported but i just stumbled on this: http://security-geeks.blogspot.ch/2013/ ... -csrf.html

Is the CSRF exploit back?

Newbie

Posts

Joined
Wed Mar 06, 2013 3:06 pm

Post by rph » Wed Aug 21, 2013 11:17 pm

No, it's a different issue.

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska

Post by humpadilly » Wed Aug 21, 2013 11:35 pm

oh ok, I was unable to find it listed in the release notes since 1.5.5 > is this something that Opencart is already aware of?

if so is there a reference i could search for?

Newbie

Posts

Joined
Wed Mar 06, 2013 3:06 pm

Post by Daniel » Thu Aug 22, 2013 12:49 am

i know about this its pretty obvious and this guy isn't clever.

its not worth protecting accounts on the front side because:

1. you would need to trick a customer of a opencart store to visit a web page with the password changing vulnerability in page linked to the store the customer is a member of. Hackers would not know which customers to target because no customer info such as email addresses are available from the front-end side of the store.

2. The victim that the hackers are targeting would have to be logged into the the opencart store that they are targeting.

So you would have to mass mail about 6 billion people in the world and hope one of these people are logged into the store you are targeting too gain access to customer account which would be absolutely pointless since there is nothing to steal.

this is why so called security researchers like Saadat Ullah are scumbags because they never reveal how hard it would be to pull off a hack like this off but also completely pointless.

mean while a people who don't know about programming see this article about a vulnerability and don't have a clue believe this guys bull shit.

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by MarketInSG » Thu Aug 22, 2013 12:57 am

agree that there's nothing to steal on the customer's account. You can't steal their physical goods, so there's not really a point for the hackers to go for a customer account.


User avatar
Guru Member

Posts

Joined
Wed Nov 16, 2011 11:53 am
Location - Singapore

Post by rph » Thu Aug 22, 2013 1:25 am

While I agree the severity is low the issue absolutely should get fixed. If nothing else it can be used to expose a customer's personal info and gain access to their downloads.

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska

Post by humpadilly » Thu Aug 22, 2013 1:48 am

thanks for the info!

Should i open a bug to officially track this and set it to Low? or just leave it?

Newbie

Posts

Joined
Wed Mar 06, 2013 3:06 pm

Post by rph » Thu Aug 22, 2013 2:15 am

Daniel wrote:The person that the hackers are targeting would have to be logged into the the opencart store that you are targeting.
A phisher could send a bulk pre-attack email designed to get the user to log into their account (such as a fake order notice). Once they know a particular email address clicked the account login link they follow up with the CSRF exploit.

Likely? Not very. But "you're safe as long as long as you don't have a big store" isn't a very good selling point for OpenCart.

Edit: Even easier, use a bot to verify your email list using account registration which discloses if an email is registered in the store.

-Ryan


rph
Expert Member

Posts

Joined
Fri Jan 08, 2010 5:05 am
Location - Lincoln, Nebraska
Who is online

Users browsing this forum: No registered users and 4 guests