3 ms·
Those are nice suggestions and all but I already see one way to abuse this script since it's in the public html folder and pretty much wide open to attack if yo
by justindocanto 14y ago
Those are nice suggestions and all but I already see one way to abuse this script since it's in the public html folder and pretty much wide open to attack if you can gain access to it.
Let's say i see your site has timthumb and it hasn't been updated to the new, more secure, version. Perfect! I'll just use your timthumb to grab your htaccess file and see what folders your hiding. Alright so (theoretically) it looks like you're hiding it under /rj988fh4990j0jgggggf4f thinking I would never know! Clever name, but unfortunately that wasn't enough to stop me from finding it.
Next step, since timbthumb can write stuff to a cache folder, thanks to it's wonderful permissions and being able to run things using apache (which has access to your protecte folder)... I'll just copy and/or move your "secret" and "protected" bike folder into the cache folder using a quick php script i plugged into timthumb. Yay! Since Bike can be run pretty much anywhere you put it and just needs to be publically available to use it, now i'm in the clear and i can now access it at /cache/bike.
Who needs a shell script when you have timthumb and bike! Let's get SQLing!
Granted, this is not going to work for every site using bike since 1) not everybody uses timthumb and 2) a lot of people have updated it and/or have better security than this... but from my experience as a dev a lot of people who use timthumb have no effing clue what theyre doing and are vulernable to these kind of attacks. they know just enough to be dangerous. this app i feel would attract the same crowd who implement scripts like timthumb
Personally I dont think this should even exist in the public html folder. it puts you at more risk than it's use justifies.
Just to note, as I'm sure this will cross some people's minds... yes, i could gain access to somebodies database config file for say wordpress or joomla just as easy using timbthumb but those typicall dont have a built in interface that lets me run and store queries as i please =P
This app needs more security.
Update: i just realized i could probably edit the htaccess file if it was writable by apache, using timthumb, in order to disable the protection of the bike folder which would just make accessing it even easier. This just furthers my point that this app needs more security. Depending on 1 simple thing like protecting a folder using your htaccess file is like logging into an account with JUST a password (and no username, no handshake, no api key, no tokens, no nothing).
- iuguy 14y agoI tried to reply a few times last night but was having problems. You're absolutely right about timbthumb. I was referring to bike in isolation, which of course it never will be. Having said that, the same applies to phpmyadmin and other apps that you might have. Indeed, timbthumb is a common way of breaking into weak wordpress themes and plugins. Just to be clear I wasn't suggesting using a random folder name. I've never been one for security by obscurity, but by keeping anything you don't want near the Internet restricted from the great unwashed (and by following an appropriate application security strategy) then you have a better chance than just putting this under /bike and open to the world.