What is meant by a SQL injection attack? How can you prevent them from occurring in your application? 

1 Answer

Answer :

SQL injection attacks occur when a malicious user attempts to execute SQL code by passing a SQL string to the application through user input. You can guard against SQL injection attacks by validating the format of all strings derived from user input that are used to form ad hoc SQL statements.

Related questions

Description : . Which attack is an HTTP attack which allows attackers to access restricted directories and execute commands outside the web servers root directory? a. XSS attack b. Path Traversal attack c. MITM attack d. SQL Injection attack

Last Answer : d. SQL Injection attack

Description : In Visual Basic .NET or Visual C# programming, when would you use Structured Query Language (SQL)? How are they executed? 

Last Answer : ADO.NET handles most of the database communication for you behind-thescenes. You would only use SQL statements when generating ad-hoc queries for the database. You execute SQL statements by ... returning statements, such as DELETE, INSERT INTO, or UPDATE statements, use the ExecuteNonQuery method.

Description : What are the four major parts of a SQL SELECT statement? Briefly describe each one.

Last Answer : The four major parts of a SELECT statement are SELECT, FROM, WHERE, and ORDER BY. SELECT specifies the fields to be retrieved. FROM specifies the table from which the records are to be retrieved. WHERE ... the records to be retrieved, and ORDER BY allows you to specify a sort order for the records.

Description : Between Windows Authentication and SQL Server Authentication, which one is trusted and which one is untrusted?

Last Answer : Windows Authentication is trusted because the username and password are checked with the Active Directory, the SQL Server authentication is untrusted, since SQL Server is the only verifier participating in the transaction.

Description : What connections does Microsoft SQL Server support? 

Last Answer : Windows Authentication (via Active Directory) and SQL Server authentication (via Microsoft SQL Server username and password). 

Description : What is the wildcard character in SQL?

Last Answer : Let’s say you want to query database with LIKE for all employees whose name starts with La. The wildcard character is %, the proper query with LIKE would involve ‘La%’. 

Description : Between Windows Authentication and SQL Server Authentication, which one is trusted and which one is untrusted?

Last Answer : Windows Authentication is trusted because the username and password are checked with the Active Directory, the SQL Server authentication is untrusted, since SQL Server is the only verifier participating in the transaction.

Description : What connections does Microsoft SQL Server support?

Last Answer : Windows Authentication (via Active Directory) and SQL Server authentication (via Microsoft SQL Server username and password).

Description : What is the wildcard character in SQL? 

Last Answer : Let’s say you want to query database with LIKE for all employees whose name starts with La. The wildcard character is %, the proper query with LIKE would involve ‘La%’.

Description : Will SQL training teach me how to do SQL injection on websites?

Last Answer : No, it will not. SQL injections are primarily used for malicious purposes, and will not be specifically taught in a legitimate SQL training course. You would, however, probably gain the knowledge ... how to deal with SQL databases with websites. You will also learn how to design databaseses.

Description : Describe what is meant by field-level validation and form-level validation.

Last Answer : Field-level validation is the process of validating each individual field as it is entered into a form. Form-level validation describes the process of validating all of the data on a form before submitting the form.

Description : Briefly explain what is meant by a reference type and a value type.

Last Answer : A value type holds all of the data represented by the variable within the variable itself. A reference type contains a reference to a memory address that holds the data instead of the actual data itself. 

Description : Define what is meant by data encapsulation?

Last Answer : Data encapsulation also referred to as data hiding, is the mechanism whereby the implementation details of a class are kept hidden from the user. The user can only perform a restricted set of operations on the hidden members of the class by executing special functions called methods.

Description : Define what is meant by operators in c#?

Last Answer : An operator is a member that defines the meaning of applying a particular expression operator to instances of a class. Three kinds of operators can be defined: unary operators, binary operators, and conversion operators. All operators must be declared as public and static.

Description : Define what is meant by method overloading?

Last Answer : Method overloading permits multiple methods in the same class to have the same name as long as they have unique signatures. When compiling an invocation of an overloaded method, the compiler uses overload resolution to determine the specific method to invoke.

Description : Can you allow a class to be inherited, but prevent the method from being over-ridden?

Last Answer : Yes. Just leave the class public and make the method sealed. 

Description : Can you prevent your class from being inherited by another class?

Last Answer : Yes. The keyword “sealed” will prevent the class from being inherited. 

Description : Can you allow a class to be inherited, but prevent the method from being over-ridden?

Last Answer : Yes. Just leave the class public and make the method sealed. 

Description : Can you prevent your class from being inherited by another class? 

Last Answer : Yes. The keyword “sealed” will prevent the class from being inherited.

Description : Can you allow class to be inherited, but prevent the method from being overridden? 

Last Answer : Yes, just leave the class public and make the method sealed. 

Description : Can you prevent your class from being inherited and becoming a base class for some other classes?

Last Answer : Yes, that’s what keyword sealed in the class definition is for. The developer trying to derive from your class will get a message: cannot inherit from Sealed class WhateverBaseClassName. It’s the same concept as final class in Java.

Description : How would you ensure that all relevant registry entries were removed in the event that installation of your application failed?

Last Answer : You can ensure that registry entries are removed, as well as perform any other “clean-up” tasks, by creating an Installer class and writing the appropriate code in the Rollback event handler. Then create a new Custom Action and set the InstallerClass, and EntryPoint properties to appropriate values.

Description : What is the purpose of a bootstrapper application? When do you not need to create one?

Last Answer : A bootstrapper application automatically detects if Windows Installer is installed on the target machine. If Windows Installer is not present, it installs Windows Installer before proceeding with the rest ... Installer 1.5 already installed) or have had Microsoft Installer 1.5 installed previously.

Description : How do you enable your application to use .NET base class library members without referencing their fully qualified names?

Last Answer : Use the Imports keyword (Visual Basic .NET) or the using keyword (Visual C#) to make a .NET Framework namespace visible to your application. 

Description : How can you tell the application to look for assemblies at the locations other than its own install ?

Last Answer : Answer: Use the directive in the XML .config file for a given application.

Description : What is an application domain ?

Last Answer : An application domain (often AppDomain) is a virtual process that serves to isolate an application. All objects created within the same application scope (in other words, anywhere along the sequence ... (the runtime cannot guarantee isolation when unsafe code is loaded in an application domain).  

Description : What namespaces are necessary to create a localized application? 

Last Answer : System.Globalization and System.Resources.

Description : Can you change the value of a variable while debugging a C# application? 

Last Answer : Yes. If you are debugging via Visual Studio.NET, just go to Immediate window. 

Description : How do you debug an ASP.NET Web application?

Last Answer : Attach the aspnet_wp.exe process to the DbgClr debugger. 

Description : Explain the three services model commonly know as a three-tier application.

Last Answer : Presentation (UI), Business (logic and underlying code) and Data (from storage or other sources).

Description : Write a hello world console application. 

Last Answer : using System; namespace Console1 { class Class1 { [STAThread] // No longer needed static void Main(string[] args) { Console.WriteLine("Hello world"); } } }

Description : What namespaces are necessary to create a localized application?

Last Answer : System.Globalization and System.Resources. 

Description : Can you change the value of a variable while debugging a C# application? 

Last Answer : Yes. If you are debugging via Visual Studio.NET, just go to Immediate window. 

Description : How do you debug an ASP.NET Web application?

Last Answer : Attach the aspnet_wp.exe process to the DbgClr debugger.

Description : Explain the three services model commonly know as a three-tier application.

Last Answer : Presentation (UI), Business (logic and underlying code) and Data (from storage or other sources). 

Description : Define what is the difference between console and window application?

Last Answer : A console application, which is designed to run at the command line with no user interface. A Windows application, which is designed to run on a user’s desktop and has a user interface.

Description : What is the best way to get rid of wrinkles and do prevent them from occurring?

Last Answer : Prevention is always key, and the best way to prevent wrinkles and other signs of aging to by using sunscreen. To reduce the appearance of wrinkles you should first exfoliate which remove the layer of ... skin to grow. Another way to reduce wrinkles is by increasing the collagen level of your skin.

Description : How do I stop a panic attack from occurring?

Last Answer : Speaking with a therapist will help you overcome your panic attacks. Medication can also help with this affliction. Panicattack.org has several tips for helping a panic attack work its course.

Description : to prevent an overuse injury from occurring, a person should -General Knowledge

Last Answer : To prevent an overuse injury from occurring, a person should vary his or her exercises from day to day and season to season.

Description : Where can I find recipes for foods that would help prevent acid reflux from occurring?

Last Answer : Tips for preventing acid reflux can be found on acid reflux.com. Foods that should be avoided are foods high in fat, high in sugar and greasy foods. Recipes can also be found on acid reflux.com.

Description : Which of the following interventions is the single most important aspect for the patient at risk for anaphylaxis? a) Prevention People who have experienced food, medication, idiopathic, or ... alert bracelet will assist those rendering aid to the patient who has experienced an anaphylactic reaction

Last Answer : a) Prevention People who have experienced food, medication, idiopathic, or exerciseinduced anaphylactic reactions should always carry an emergency kit containing epinephrine for injection to prevent the onset of the reaction upon exposure.

Description : The injection of anti-toxin is given to prevent (1) Tetanus (2) Tuberculosis (3) Typhoid (4) Filariasis

Last Answer : (1) Tetanus

Description : Before accepting an audit engagement, a successor auditor should make specific inquiries of the predecessor auditor regarding the predecessor's a. Evaluation of all matters of continuing accounting ... . Opinion of any subsequent events occurring since the predecessor's audit report was issued

Last Answer : Understanding as to the reasons for the change of auditors

Description : What command would you use to encrypt a PL/SQL application?

Last Answer : WRAP

Description : Google cloud SQL Features a) Lets your application read files from and write files to buckets in Google cloud storage b) A Fully -managed web service that allows you to create , ... large applications into logical components that can be share stateful services and communicate in secure fashion.

Last Answer : A Fully –managed web service that allows you to create , configure , and use relational databases that live in Google’s cloud

Description : What si the difference between interface and abstractclass Select Answer:  1. interface contain only methods  2. we can't declare a variable for interface  3. interface contain only events  4. None  5. All

Last Answer : Ans : 2 The only Difference between Interface and Abstract class is we can declare a variable in abstract class but we can't declare in variable interface

Description : What is the lifespan for items stored in ViewState? Select Answer:  1. Item stored in ViewState exist for the life of the current page  2. Item stored in ViewState exist for the life ... of the current Applicaiton  4. Item stored in ViewState exist for the life of the current configuration

Last Answer : 1. Item stored in ViewState exist for the life of the current page AS any web application works on request and response basis ,so on every post backs, The data in control gets lost. To retain page ... control with data. The life cycle of the view state exist for life of current running page only. 

Description : Which one of the following tools is used to view the metadata information contained in a .NET assembly? Select Answer:  1. al.exe  2. ilasm.exe  3. vbx.exe  4. csc.exe  5. ildasm.exe

Last Answer :  5. ildasm.exe

Description : Describe a general strategy for creating a setup project that terminates installation if a specific file is not already installed on the target machine.

Last Answer : First, create a file search to search the file system for the specific file. Then create a launch condition to evaluate the results of the search. You can connect the launch condition to ... in the search's Property property in the expression specified by the launch condition's Condition property. 

Description : What is a native image? How do you create one?

Last Answer : A native image is a precompiled version of a .NET assembly. You can create a native image of your application by using the Ngen.exe utility.