Live data from Hacker News

Bike - phpMyAdmin replacement for geeks

webcheatsheet.com

31–40 of 47 posts

Re: Bike - phpMyAdmin replacement for geeks

#31
post #25
post #19

Earlier quoted context omitted.

So wouldn't you just setup a simple secure tunnel and run this on your local dev machine (with key-auth and an ssh agent to manage the connections)? That's how I run my phpAdmin. No server security issues.

That of course works too, but then again, I wonder what features of phpMyAdmin warrant the overhead of actually installing it plus the webserver it needs as opposed to just using the mysql command line tool (honest question - I haven't been using MySQL in a long time and on Postgres' side there's nothing that a GUI would allow me to do quicker than what I can do in the CLI psql utility)

There are a ton of things I can do quicker in a GUI when using Postgres. That's simply because I'm not proficient with the Postgres CLI. Of course I can and try to fix that, but that takes time I don't always have.

Re: Bike - phpMyAdmin replacement for geeks

#33
post #24

If you go to their github page it says the following under security: "On current stage I don't care about login functionality. Put Bike into folder with name like 'tASTDKUWYVEjhas' or just use Apache httpauth as workaround." So basically... they have absolutely nothing built in for security, other than hoping you choose a good folder name. Even if you ignore that, this is an all-around poor attempt to be an alternati…

"So basically... they have absolutely nothing built in for security …" So I wonder how long before this becomes a trending search query? https://www.google.com.au/search?q=inurl%3A%2Fbike+%22Run+Qu... (a slightly more refined version of that search, which I'll leave as an exercise for the reader, has already revealed 3 probably exploitable urls, based on the google snippet - I'm not prepared to click the links to con…

i didn't even think of that (the google search). i fear for all the novice developers that use this and do nothing more than just install it and leave it wide open.

Re: Bike - phpMyAdmin replacement for geeks

#34
post #6

The issue behind phpMyAdmin IMHO neither is the fact that it's written in PHP nor that it looks unsexy. The problem is that it exists. It's too tempting to leave it running on some server and promptly forget it. Or get it installed without knowing by some third-party CMS. Even if it had a spotless security track record (it doesn't), this is just too big an attack surface. MySQL and especially Postgres have really goo…

To be honest i do run phpMyAdmin, but I run it on a subdomain that has HTTP auth over SSL and the log files are included by fail2ban scans (thus anyone that fails to HTTP auth correctly 3 times gets auto-banned in iptables).

So while I do agree with your points regarding phpMyAdmin, you can have the convenience of running it (and securely) if you really wanted to.

Re: Bike - phpMyAdmin replacement for geeks

#36
post #27

If you go to their github page it says the following under security: "On current stage I don't care about login functionality. Put Bike into folder with name like 'tASTDKUWYVEjhas' or just use Apache httpauth as workaround." So basically... they have absolutely nothing built in for security, other than hoping you choose a good folder name. Even if you ignore that, this is an all-around poor attempt to be an alternati…

The two simple ways of addressing this are to use some sort of folder level authentication (e.g. htaccess and htpasswd or equivalent) and to make sure it's not referenced in sitemaps or robots.txt, nor linked to from elsewhere on the net.

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).

Re: Bike - phpMyAdmin replacement for geeks

#40

I realize that this is a totally different strategy to solve the mySQL admin thing, but WOW is Sequel Pro great if you're on a Mac: http://www.sequelpro.com/ I used phpMyAdmin for 10 _years_, and switched after using Sequel Pro for 5 minutes.

Sequel Pro + SSH tunnels is how I connect to all of my mySQL servers and i can honestly say you will not find a better experience out there.
Post reply on HN