Securing your Software

No, I'm saying if the big boys like Microsoft and Apple can't keep security vulnerabilities out of their software, and you still have banks, airlines, government depts, and so on being hacked into, then it's pretty naive to believe your software is 100% secure because you're using a popular framework.

If you could quote where I said I believe my software is 100% secure that would be helpful, otherwise you're arguing a point that was never made by any of us here.

And when it comes to security vulnerabilities, wouldn't you rather a team of extremely good developers work on it than just yourself?
 


And when it comes to security vulnerabilities, wouldn't you rather a team of extremely good developers work on it than just yourself?

Well, of course. On the flip side, I'd much prefer to continue on the path I am, versus doing what everyone else is doing. It's already proven beneficial, and will only continue to do so. Give me 6 months, and you'll see for yourself.
 
Well, of course. On the flip side, I'd much prefer to continue on the path I am, versus doing what everyone else is doing. It's already proven beneficial, and will only continue to do so. Give me 6 months, and you'll see for yourself.

You're the one people claim to have exploited brah.
 
if you ever have a look at the security patches that the big OS projects like Apache release, it's nearly always for really minor shit that is basically impossible to meaningfully exploit.

but i disagree that you can't have some security through obscurity. people don't stop to think who the hell would bother to hack their shit. it's nearly always russian cybercriminals who do it for money and they only target the big OS stuff like wordpress and don't give a shit about your own code. i know that i've some very sloppy custom code on my servers but i've only ever been hacked through wordpress/phpbb or some other big OS project.
 
dchuk I think you're in denial about rails considering the numerous amount of security holes found frequently

the security of rails is almost as laughable as the security of apple software
 
Between several posts, the pros/cons of using a framework/library/whatever vs. creating your own from scratch were covered. Regardless of which you pick, here are some tips that you'll find useful.


For using someone else's code:
Be sure to suppress all warnings and errors. Easy, but very helpful as blind SQL injection is much harder. If an exploit is found, whatever minor differences you have from the original code (different number of columns, renamed columns, table prefix, etc.) should hold off any attacks until an update is released. The bad code is still there, it's just much harder to exploit.


For creating your own code from scratch:
Create a class or set of functions that handle all database stuff. Have one function that handles all the character escaping and whatnot. Another for HTML encoding, if your users' input is being posted back on the site. Protip for the lazy: at the beginning of your script, iterate through all of the user input variables, and directly change them to make them safe for SQL. You won't have to worry about it for the rest of the script. I don't like doing this but it's a nice quick-fix when you don't have time to go through your code thoroughly.


For Both:
Use privileges to your advantage! Once your site is set up, there's a good chance you won't be using things like CREATE or DROP, so remove these privileges. Hell, you can even create 3 - 4 users, and use them in different parts of your script; for an "update profile" script, allow UPDATE but not INSERT, for a "post blog reply" script, allow INSERT but not UPDATE, etc.

Write all SQL errors to a file that only you have access to. Be sure to log the URI as well; at least you'll know what causes the problem. If you created the script, you can now fix it with ease. If you are using someone else's script, you can patch it until an update is rolled out.
 
You are not abstracting enough and your interfaces had a design flaw. Next time think about your interface OK?
 
And a quick bump to this. Have a client where security is paramount. Looking for creative solutions to lock the system(s) down. Found this so far:
https://www.duosecurity.com/

Basically smart phone app, and when you try to login, app is activated asking you to allow or deny access. You don't get into the admin panel unless you allow access via your smart phone.

Any other solutions you guys know of? Is there maybe a USB based fingerprint scanner we can integrate with, or anything to that effect? Thanks in advance.
 
EDIT - scratch that, won't work.

Might be helpful - stackoverflow.com/questions/60174/how-can-i-prevent-sql-injection-in-php
 
For anyone wondering, here's a good tool.

Website Security with Acunetix Web Vulnerability Scanner | Web Vulnerability Scanner

Does a really good job, and provides a nice detailed report that's easily to follow up on. Gives quite a few false positives, but nonetheless, quite impressed with it. Give it a spin on your sites.

Managed to find a few vulnerabilities, but honestly, not as many as I was hoping for. Not sure if that's a good or bad thing yet.
 
Were they SQL injections?

No, not really. I have that locked down pretty tight now via both, server config and software. There was one SQL injection report of being able to run the PHP sleep() function, and I patched that. Nothing else though. I know that's not SQL injection, but that's what the software reported it as.

Other than that, basically a bunch of CSRF vulnerability reports, so I modified things accordingly, and now every form server wide is validated for that.

Then a couple other minor things, but nothing too special.
 
Regarding standalone software:

Honestly after ripping some stuff myself I've found that anything .NET can be decompiled with 2 clicks, .dll's, .jar, and .exe about as easily as well.

Reflector is one popular tool and then there are many others for specific frameworks... If a video game is made with Unity 3d or XNA, for example, there's a program that strips out the code and 3d models/animations/textures/shaders/etc and dumps it all into a folder of your choosing, then you can drop them in unity and use them in your own projects.

About the only thing you can do is make it a tedious process to put back together to hopefully make people not take the time to do it. But anything can be cracked if you release it.
 
Regarding standalone software:

Honestly after ripping some stuff myself I've found that anything .NET can be decompiled with 2 clicks, .dll's, .jar, and .exe about as easily as well.

Reflector is one popular tool and then there are many others for specific frameworks... If a video game is made with Unity 3d or XNA, for example, there's a program that strips out the code and 3d models/animations/textures/shaders/etc and dumps it all into a folder of your choosing, then you can drop them in unity and use them in your own projects.

About the only thing you can do is make it a tedious process to put back together to hopefully make people not take the time to do it. But anything can be cracked if you release it.

Seems like this is why DRM is doomed to fail, unless very well protected specialized hardware can be used.