by kkikta
29. August 2008 05:15
Recently a old client I use to do some consulting for called me up because their in-house development team was having problems stopping SQL Injection. I did the polite thing and attempted to explain how it could be fixed. They then asked me what it would cost for me to fix their cold fusion and SQL Server code. I sent them over a rate sheet and I have yet to hear back that was about 3-4 weeks ago. Guess they didn't like the price ;P
Anyway fast forward one of my friends was browsing my sites (.NET) and ran across an error in which it appeared Npgsql stated there were no more connections in the pool (woops forgot to turn on custom errors). Anyway I decided to see if this was happening alot so I opened up event viewer. What did I find someone was trying to attack my site with the same type of script. So I ran a few quick tests to confirm that my stored proc's are not vunerable. Then i got to thinking even if they were I implement at least a dual password system where one account (read-only) is used for select queries and another (read-write) is used for everything else so I figured I am pretty safe. Never mind that the script is targeting SQL Server and my projects are running on PostgreSQL. Needless to say I decided to let it go since who ever is attempting to attack me is just spinning their wheels and maybe as long as they are going after me they wont find someone who is vunerable.
In any case I find the whole situation mildly amusing.

I cannot stress enough sanatize your inputs and consider setting up different user accounts so that in case you forget to to protect something you limit what an attacker can do.
by kkikta
14. August 2008 14:12
Ok so another password thing I just realized Subversion uses apache style hashed passwords. In any case they can be generate by the following command
htpasswd -nbm <username> <password>.
7d2119d2-1b77-46ee-a3ab-4497f5482481|0|.0
Tags:
FreeBSD
by kkikta
14. August 2008 14:03
I always forget how to generate passwords and apparently I am not alone as I have found many blogs that have perl and python scripts used just to perform this action. Anyway after about half an hour of searching I kinda remembered openssl can generate passwords. From this point it was just finding the right options so here it is
openssl passwd -1 <mypassword>
8cb53681-9f5c-437e-9578-80b882cc0794|0|.0
Tags:
FreeBSD