Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Silkroad Online > SRO Private Server
You last visited: Today at 10:44

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Guid] How To Protect Your Web Site Prevent Sql Injection [Guid]

Discussion on [Guid] How To Protect Your Web Site Prevent Sql Injection [Guid] within the SRO Private Server forum part of the Silkroad Online category.

Closed Thread
 
Old   #1
 
Keyeight's Avatar
 
elite*gold: 844
Join Date: Oct 2010
Posts: 839
Received Thanks: 192
Lightbulb [Guid] How To Protect Your Web Site Prevent Sql Injection [Guid]

hello epvp members this tutorial original by me and im going to show you how to protect your site from sql injection let's start

question:What is Sql Injection !?

answer:A SQL injection attack attempts to compromise your database by creating SQL commands that are executed instead of, or in addition to, the commands that you have built into your application.


What Can Be Done to Prevent an SQL Injection !!



  1. Don’t use dynamic database queries.
  2. Don’t accept user input in queries.
1. Patch your SQL server regularly

Before we get into the coding part of the advice how to prevent an SQL injection, we need to start with the fundamental issues. SQL injections might be a frequent programming error but they aren’t the only way for a hacker to break into. If your underlying software – i.e. the database and the operating system have vulnerabilities, then your efforts to secure your code become obsolete. This is why you should always patch your system, especially your SQL server.
2. Limit the use of dynamic queries

As I already mentioned, dynamic queries are the door to SQL injections. Of course, it might not be realistic to expect that all dynamic queries can be trashed right away but some of the ways out are stored procedures, parameterized queries, and above all – prepared statements. The exact approaches vary from one programming language to the other but basically any programming language offers good substitutes of dynamic queries.
For instance, the PreparedStatement() with bind variables in Java, or the SqlCommand() and OleDbCommand() with bind variables in PHP, or strongly typed parameterized queries with bindParam() in PHP are all possibilities to explore.
3. Escape user input

The second biggest evil for SQL injections is user input. While you can’t always avoid user input completely, the next best thing is to escape it. Escaping user input doesn’t do as good job as limiting dynamic queries but still it can stop many SQL injection attacks. For instance, if you are using PHP, for GET and POST, use htmlspecialchars() to escape XSS characters and addslashes(), in case you using database. Alternatively, you can escape user input from inside your database but since the exact code varies from one database to the next, you should check with the docs of your database for the exact syntax to use.
4. Store database credentials in a separate file

In order to minimize the damage in case of an SQL injection attack, always store database credentials in a separate file. This way even if a hacker manages to break in, he or she won’t benefit much.
5. Use the principle of least privilege

The principle of least privilege is a security cornerstone and it applies to SQL injections as well. For instance, when you grant a user access only to the tables he or she needs rather to the whole database; this drastically reduces the damage potential.
6. Turn magic quotes off

Turning the magic_quotes_gpc variable off can also stop some SQL injection attacks. Unfortunately, this isn’t always a reliable measure because sometimes magic quotes might be off and you are unaware of this but still it is better than nothing. In any case, you need to have code to substitute quotes with slashes. Here is the simplest way to do it:
if (!get_magic_quotes_gpc()) {
$username = /*-!@#$%^&*=+($username);
$password = /*-!@#$%^&*=+($password);
}

7. Disable shells

Many databases offer shell access which essentially is what an attacker needs. This is why you need to close this door. Consult your DB’s documentation about how to disable shell access for your particular database.
8. Disable any other DB functionality you don’t need

In addition to the shells there are many other functions in a database you don’t need. While not all of them are a security risk, the general rule here is that less is more. Just remove or at least disable any functionality you can do without.
9. Test your code

Finally, the last step to ensure your code is SQL injections-proofed is to test it.


if you are good with hacking if you cant test it just quit

oh just to mention im who typed this tutorial so i dont need new noob come and say copy&past please

best regards

Mats0o0o0~aka~Volcan
Keyeight is offline  
Thanks
2 Users
Old 08/07/2012, 10:21   #2
 
elite*gold: 0
Join Date: Apr 2011
Posts: 5
Received Thanks: 0
thx my bro good jop <3
canuseemeM is offline  
Old 08/07/2012, 10:22   #3
 
elite*gold: 0
Join Date: Nov 2009
Posts: 1,163
Received Thanks: 1,161
Quote:
Originally Posted by mats0o0o0 View Post
oh just to mention im who typed this tutorial so i dont need new noob come and say copy&past please

best regards

Mats0o0o0~aka~Volcan



ღ ∂ Ropp is offline  
Thanks
12 Users
Old 08/07/2012, 10:23   #4
 
Keyeight's Avatar
 
elite*gold: 844
Join Date: Oct 2010
Posts: 839
Received Thanks: 192
are you sure it's not main !! cuz im pretty sure im who type it from long time at my old website
Keyeight is offline  
Old 08/07/2012, 10:24   #5
 
elite*gold: 0
Join Date: Nov 2009
Posts: 1,163
Received Thanks: 1,161
Your english, & the english in this thread are like.. 235892375 REGIONS apart.
Don't lie, you fail @ it pl0x...
ღ ∂ Ropp is offline  
Thanks
7 Users
Old 08/07/2012, 10:24   #6
 
Shane¸'s Avatar
 
elite*gold: 100
Join Date: May 2010
Posts: 1,948
Received Thanks: 1,635
Quote:
Originally Posted by mats0o0o0 View Post
are you sure it's not main !! cuz im pretty sure im who type it from long time at my old website
I'm also sure you typed this with your english "knowlage".
Shane¸ is offline  
Thanks
3 Users
Old 08/07/2012, 10:25   #7
 
Mirceagab's Avatar
 
elite*gold: 0
Join Date: May 2008
Posts: 1,623
Received Thanks: 478
More like a copy/paste typo...perhaps you typed the title.
Mirceagab is offline  
Thanks
2 Users
Old 08/07/2012, 10:27   #8
 
Keyeight's Avatar
 
elite*gold: 844
Join Date: Oct 2010
Posts: 839
Received Thanks: 192
Quote:
Originally Posted by ღ ∂ Ropp View Post
Your english, & the english in this thread are like.. 235892375 REGIONS apart.
Don't lie, you fail @ it pl0x...
just i wanna mention that's im not freak without friend's who can talk perfect english more than any kid here and they help me to translate my work
Keyeight is offline  
Old 08/07/2012, 10:28   #9
 
elite*gold: 0
Join Date: Nov 2009
Posts: 1,163
Received Thanks: 1,161
pl0x close request @ no credits
also request IP check on matsooo & canuseemeM
ღ ∂ Ropp is offline  
Old 08/07/2012, 10:28   #10
 
IceAmStiel's Avatar
 
elite*gold: 0
Join Date: Jul 2011
Posts: 1,058
Received Thanks: 1,118
At least it's now on the forum, that's what counts - I dun understand why you rewrote it completely though, you could've simply mentioned the link as a recommendation, kinda suspicious ;d
IceAmStiel is offline  
Thanks
1 User
Old 08/07/2012, 10:29   #11
 
r7slayer's Avatar
 
elite*gold: 0
Join Date: Apr 2008
Posts: 696
Received Thanks: 310
Quote:
Originally Posted by mats0o0o0 View Post


Consult your DB’s documentation about how to disable shell access for your particular database.


oh just to mention im who typed this tutorial so i dont need new noob come and say copy&past please

best regards

Mats0o0o0~aka~Volcan
Yea looking at the english in that bold text then the copy and paste statement just makes me laugh. And why would you say this? Your DB's documentation? Who the fck in SRO scene is going to have documentation? theyre not a proper business you know?
r7slayer is offline  
Thanks
1 User
Old 08/07/2012, 10:29   #12
 
Shane¸'s Avatar
 
elite*gold: 100
Join Date: May 2010
Posts: 1,948
Received Thanks: 1,635
Quote:
Originally Posted by mats0o0o0 View Post
just i wanna mention that's im not freak without friend's who can talk perfect english more than any kid here and they help me to translate my work
Then, please. PLEASE ! Ask them for help right now while you are trying to lie !
Shane¸ is offline  
Thanks
1 User
Old 08/07/2012, 10:29   #13
 
elite*gold: 0
Join Date: Mar 2011
Posts: 100
Received Thanks: 28
Quote:
Originally Posted by mats0o0o0 View Post
are you sure it's not main !! cuz im pretty sure im who type it from long time at my old website
Its BY TSVETI. Are you a ******* old white woman? Why you gotta lie when you're fasting. Allah is going to **** the **** outta you when you die..
Dicas is offline  
Thanks
7 Users
Old 08/07/2012, 10:32   #14
 
Keyeight's Avatar
 
elite*gold: 844
Join Date: Oct 2010
Posts: 839
Received Thanks: 192
Quote:
Originally Posted by r7slayer View Post
Yea looking at the english in that bold text then the copy and paste statement just makes me laugh. And why would you say this? Your DB's documentation? Who the fck in SRO scene is going to have documentation? theyre not a proper business you know?
well this topic not for the fck Sro this for everyone have website

Quote:
Originally Posted by ~ Shane View Post
Then, please. PLEASE ! Ask them for help right now while you are trying to lie !
and about you if you dont know me just go to zone-h and see my work maybe that make me good

im not lair

any way people like you must stop get into internet fast or it gonna destroyed
Keyeight is offline  
Old 08/07/2012, 10:33   #15
 
Shane¸'s Avatar
 
elite*gold: 100
Join Date: May 2010
Posts: 1,948
Received Thanks: 1,635
Quote:
Originally Posted by Dicas View Post
Its BY TSVETI. Are you a ******* old white woman? Why you gotta lie when you're fasting. Allah is going to **** the **** outta you when you die..


#request to close ( anyone can read this even if it's closed and there is google ( your best friend on the internet ) )
Shane¸ is offline  
Thanks
1 User
Closed Thread


Similar Threads Similar Threads
Lua GUID ?
01/06/2012 - World of Warcraft - 2 Replies
Hey, Ich bin grade dabei mich ins Addon Scripten einzuarbeiten, und Experimentiere etwas herrum mit der Lua Api usw.. Nun habe ich verständlicherweise noch ein parr Probleme und Fragen anhand einiger Befehle.. ich schaffe vieles was ich mir ausdenke leider garnicht weil es im Web leider zu wenig Informationen über die meißten Befehle gibt und bei vielen die mich interessieren garnicht angegeben ist wie man sie nutzt :confused: Wollte z.b im Addon eine Art Schleife einbauen damit es...
[ Guid How to 20k kills / Day ]
04/09/2011 - WarRock Trading - 17 Replies
Hallo Community, ich biete eine Guid an, wie ihr 20k kills am Tage machen könnt. Kosten: 25 € Paysafecard. Zahlungsmittel: Offline gekaufte Paysafecard Mfg //localhost
Hunter Guid
03/05/2011 - Shaiya Private Server - 1 Replies
#closed hat sich erledigt ...
Need Guid
12/05/2009 - Cabal Online - 0 Replies
Post Here some one How Do Gm comands or how uptade Cabal main Here is ppl want Cabalmain+Gmcommands. if Some One know It Post Please Guid .



All times are GMT +2. The time now is 10:44.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.