SQL injection is an example for a code injection attack. A server-side script constructs a SQL query for a back-end database server as a string put together from code fragments that should capture the query logic and from request parameters.
Malformed user input in request parameters can change the query logic or insert new database instructions. Note that a single quote terminates strings in SQL. The attacker could thus submit input containing a single quote followed by SQL clauses which would then become part of the query.
To defend against this attack we could either include suitable sanitization operators in the script that aim to detect and neutralize malformed inputs. This defence is located firmly within the application. Alternatively, we could modify the infrastructure so that it can protect its own execution integrity. Instead of constructing database queries as strings, queries are precompiled with placeholders for user input. The actual user input is substituted for these placeholders (bound parameters) at runtime.
Popular posts
-
विश्वविद्यालय लानुपर्ने प्रवेश परीक्षाको उत्तरपुस्तिका विश्वविद्यालयका पदाधिकारी र कलेजका सञ्चालक मिलेर काठमाडौँको होटलमा जाँचेको उजुरी परे...
-
साथमा न श्रीमान् नै छन् न त छोराछोरी । रात बिताउने कुटी भए पनि बिहान बेलुकाको आहारा जुटाउने खेतबारी पनि छैन । विवाह गरेको वर्ष दिन नबित्दै र...
-
Make better use of the XP login screen . If your system contains more than one user account, or if you've set up XP to require logins,...
-
EPIDEMIOLOGY Lung cancer, broadly divided into small cell lung cancer (SCLC) and non-small cell lung cancer (NSCLC), is the leading cause ...
-
Dear Friends, This is the space provided by the google at free of cost, i thought why don't i use it to get some help for the users who ...
-
Introduction Drugs are the cornerstone of modern therapeutics. Nevertheless, it is well recognized among physicians and in the lay communi...
-
Small cell lung cancer (SCLC) represents approximately 15% to 25% of lung cancers. SCLC is characterized by its high growth fraction, rapi...
-
EPIDEMIOLOGY Lung cancer, broadly divided into small cell lung cancer (SCLC) and non-small cell lung cancer (NSCLC), is the leading cause ...
-
One of the toughest challenges facing any designer is the web page. There are perhaps millions of pages in the World Wide Web all jostling ...
-
N cell launched wi-fi router for multiple users Ncell have just yesterday launched the wi-fi routers, it was quite intresteting topic and sh...
Jul 31, 2011
Subscribe to:
Post Comments (Atom)


