This is default featured slide 1 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions..

This is default featured slide 2 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions..

This is default featured slide 3 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions..

This is default featured slide 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions..

This is default featured slide 5 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions..

Showing posts with label hacking. Show all posts
Showing posts with label hacking. Show all posts

Tuesday, March 24, 2009

5 Security Considerations When Coding

1. Input Checking

Always check user input to be sure that it is what you expected. Make sure it doesn’t contain characters or other data which may be treated in a special way by your program or any programs called by your program.This often involves checking for characters such as quotes, and checking for unusual input characters such as non-alphanumeric characters where a text string is expected. Often, these are a sign of an attack of some kind being attempted.

2.Range Checking

Always check the ranges when copying data, allocating memory or performing any operation which could potentially overflow. Some programming languages provide range-checked container access (such as the std::vector::at() in C++, but many programmers insist on using the unchecked array index [] notation. In addition, the use of functions such as strcpy() should be avoided in preference to strncpy(), which allows you to specify the maximum number of characters to copy. Similar versions of functions such as snprintf() as opposed to sprintf() and fgets() instead of gets() provide equivalent length-of-buffer specification. The use of such functions throughout your code should prevent buffer overflows. Even if your character string originates within the program, and you think you can get away with strcpy() because you know the length of the string, that doesn’t mean to say that you, or someone else, won’t change things in the future and allow the string to be specified in a configuration file, on the command-line, or from direct user input. Getting into the habit of range-checking everything should prevent a large number of security vulnerabilities in your software.

3.Principle Of Least Privileges

This is especially important if your program runs as root for any part of its runtime. Where possible, a program should drop any privileges it doesn’t need, and use the higher privileges for only those operations which require them. An example of this is the Postfix mailserver, which has a modular design allowing parts which require root privileges to be run distinctly from parts which do not. This form of privilege separation reduces the number of attack paths which lead to root privileges, and increases the security of the entire system because those few paths that remain can be analysed critically for security problems.

4.Don’t Race

A race condition is a situation where a program performs an operation in several steps, and an attacker has the chance to catch it between steps and alter the system state. An example would be a program which checks file permissions, then opens the file. Between the permission check the stat() call and the file open the fopen() call an attacker could change the file being opened by renaming another file to the original files name. In order to prevent this, fopen() the file first, and then use fstat(), which takes a file descriptor instead of a filename. Since a file descriptor always points to the file that was opened with fopen(), even if the filename is subsequently changed, the fstat() call will be guaranteed to be checking the permissions of the same file. Many other race conditions exist, and there are often ways to prevent them by carefully choosing the order of execution of certain functions.

5.Register Error Handlers

Many languages support the concept of a function which can be called when an error is detected, or the more flexible concept of exceptions. Make use of these to catch unexpected conditions and return to a safe point in the code, instead of blindly progressing in the hope that the user input won’t crash the program, or worse!

Friday, March 20, 2009

Cyberspace Samurai's Art Of Hacking

If you acknowledge the foe and recognize yourself, you need not fear the result of a hundred battles. If you recognise yourself merely not the foeman, for every victory gained you volition also suffer a defeat. If you cognize neither the opposition nor yourself, you testament succumb in every battle." - Sun Tzu, The Art of War. Take the immortal words of Sun Tzu, cognise yourself. Or here, experience your computer code. Do you live however your codification wish react to an tone-beginning. Do you roll in the hay if your diligence or data is guarantee, or if at that place ar huge security measures holes. If your coating were under attempt, would you even love it. And what approximately make out the . Do you make love a hack bequeath approach your covering.

Do you sleep with what early warning signs to looking for, to detect once your applications being hacked. Have you ever looked at your lotion as a drudge would, and thought close to you would plan of attack it. As a professional cyber-terrorist, in this article, I leave guide you through the process hackers take to exploit applications and systems. I'm often asked, "What should I concern just about in my encode that hackers could exploit?" This is easy enough to answer for risks we get laid some nowadays, simply it doesn't address the real problem.

I tin Tell you roughly the most popular onslaught vectors for now's applications, just that only aid you . To truly assist you become more ensure, I need to Teach you what to expression for. I wish to enable you to do the analysis. This follows the old proverb, "Give a man a fish and he be able-bodied to eat ; Edward Teach a man to fish and he never go hungry." This is true for security system and your applications — well, not the whole fishing part, only the teaching part.

You get the idea. Trying to track a on the Internet is like nerve-racking to track the wild Abominable snowman in Nepal (I'm not sure in that location any tamed ...). But in any case, if the left no tracks, was silent, and hid where you weren't looking or in a place you didn't have existed. would you find him. If hackers tin can poke and prod your and potentially get access to sections of your encipher or data that you weren't expecting them to, you do it they thither.

Are you nerve-wracking to William Tell me that I toilet dodge bullets?" Morpheus: "No Neo, I'm stressful to distinguish you that you're ready, you won't have to." I could separate you more or less entirely the latest exploits and exactly what to facial expression for to fix your specific and make sure it's insure. We would talk around buffer-overflows, SQL injection, Cross-Site Script hacking, the list goes on and on. We would be essentially attempting to dodge the bullets; to headache or so each and every little incoming onset. Once you ready, one time you start thinking almost your applications and the environment in a holistic manner, and in one case you controller your applications to react the way you wishing them to or log the activity they don't, then you be to protect against attacks that haven't even been dreamt up yet. I'm not saying your be 100% assure, just that your ever be under your restraint.

You e'er be aware of what's going on and what your threats . That is the true nature of surety. It's totally most command. You need to be in mastery. Logs, coupled with a strong understanding of you may be attacked, is a huge step in the right direction.