473,385 Members | 2,180 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Defense Against the Dark Arts

Hi All,
There have been a whole lot of high-profile hacks lately: Sony, Lockheed Martin, the CIA, the Senate, the list goes on. I've heard that many of these relied at least in part on SQL injection. However, news reports don't provide much information regarding what we as coders can do to protect ourselves, our websites, and our users.

Within a PHP/MySQL environment, I think most people know by now that
  • all user-submitted data should be escaped, e.g. with mysql_real_escape_string()
  • user-submitted data output to the browser should be cleaned with htmlspecialchars()
  • whenever possible, user-submitted data should be type checked, e.g. numbers can be checked with is_numeric(); phone numbers and zip codes can be matched against a regular expression; and e-mail addresses can be checked with filter_var($input, FILTER_VALIDATE_EMAIL).
  • MySQL databases should have names that are difficult to guess, as should the database users with access privileges
  • database users and server administrator accounts should have highly complex passwords

The question is, is that enough? Given how many major sites have been hacked lately, it seems as though these types of precautions must not be sufficient. (Or could it be possible that somebody forgot to escape the input data on the Senate website? Seems so unlikely...)

So my question to the community is, what else can be done to secure websites and protect data?

I would greatly appreciate any insight into this matter. Thanks!
Jun 22 '11 #1

✓ answered by Rabbit

A lot of it is also because people get lazy and use the same password for everything. Or they use common passwords. Or words in the dictionary with minor modifications. Or short passwords.

Then there's social engineering. Calling someone up and saying you're in IT and you need some account information. A few of the attacks were because one e-mail got hacked and the hacker started e-mailing other people from that account pretending to be the owner of the account asking for sensitive information.

2 1666
Rabbit
12,516 Expert Mod 8TB
A lot of it is also because people get lazy and use the same password for everything. Or they use common passwords. Or words in the dictionary with minor modifications. Or short passwords.

Then there's social engineering. Calling someone up and saying you're in IT and you need some account information. A few of the attacks were because one e-mail got hacked and the hacker started e-mailing other people from that account pretending to be the owner of the account asking for sensitive information.
Jun 22 '11 #2
Dormilich
8,658 Expert Mod 8TB
Within a PHP/MySQL environment, I think most people know by now that […]
are you sure?
Jun 23 '11 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Aaron Harvey | last post by:
I don't know if anyone knows anything about programming C++ to do mysql database manipulation, but here it goes anyway ... I'm getting desperate to find a solution. I'm going absolutely freakin...
2
by: Useko Netsumi | last post by:
Is there any XML Specifications for Arts especially for Paintings, Furnitures, and Decorative Arts? Thanks
6
by: Jupiter5F | last post by:
You're probably going to tell me this is off topic but, I suspect my system is being invaded by other users using spying software etc.. I received a few emails where something clearly downloaded...
18
by: happyvalley | last post by:
a silly question. when linking a program, the path to include files and library files are given already (-I, -L), why still need to give the names of some library by -l , say -lm for math...
12
by: chris.thomson | last post by:
Hi, Thanks in advance for any assistance regarding my question. I have setup a database with a WIF containing the usernames and p/words of several unique data entry operators who will be...
12
by: Odalrick | last post by:
I need to draw visible lines on pictures with wxPython. That means I can't simply use, for instance, a black line since it wont be visible on a black or dark picture. Painting applications like...
13
by: blangela | last post by:
I have a former student who came to me and asked if I had any idea the types of C++ questions that EA asks potential new hires to evaluate their C++ knowledge/skills. I do not, but I thought...
0
by: anishshrestha56 | last post by:
Arts and entertainment Share your thoughts , videos , webpages , photos and make friends through a new powerful website. It's http://goodtolove.com . You will really enjoy surfing it.As well the...
2
by: zensunni | last post by:
I'm looking to make a few asp functions to defend against attacks. The function will loop through an array, checking each item against the incoming statement. So, my question is, what are all the...
2
by: zubair1 | last post by:
Hi, I just recently downloaded Dark GDK from Microsoft's Website i was using Visual Studio 2005 when i was installing the Dark GDK it said it didn't find the C++ Compiler and asked me if i want...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.