1 / 7

Security Attacks

Security Attacks. CS 795. Buffer Overflow Problem. Buffer overflow Analysis of Buffer Overflow Attacks. General Guidelines. For all user input, follow these guidelines: Use validation controls whenever possible to limit user input to acceptable values.

avel
Télécharger la présentation

Security Attacks

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Security Attacks CS 795

  2. Buffer Overflow Problem • Buffer overflow • Analysis of Buffer Overflow Attacks

  3. General Guidelines For all user input, follow these guidelines: • Use validation controls whenever possible to limit user input to acceptable values. • Always be sure that the value of the IsValid property is true before running your server code. A value of false means that one or more validation controls have failed a validation check. • Always perform server-side validation even if the browser is also performing client-side validation, to guard against users bypassing client-side validation. Do not use only client-side validation logic. • Always re-validate user input in the business layer of your application. Do not rely on the calling process to provide safe data.

  4. SQL Injection Attacks A SQL injection attack attempts to compromise your database (and potentially the computer on which the database is running) by creating SQL commands that are executed instead of, or in addition to, the commands that you have built into your application. • Stop SQL Injection Attacks Before They Stop You • SQL Injection attacks: Are you safe? • Manipulating Microsoft SQL Server Using SQL Injection To avoid SQL injection attacks, follow these guidelines: * Do not create SQL commands by concatenating strings together, especially strings that include input from users. Instead, use parameterized queries or stored procedures. * If you are creating a parameterized query, use parameter objects to establish the values for the parameters.

  5. Script Injection Attack • Script injection   A script injection attack attempts to send executable script to your application with the intent of having other users run it. A typical script injection attack sends script to a page that stores the script in a database, so that another user who views the data inadvertently runs the code. • Securing Data Access

  6. Script Injection To avoid script injection attacks, follow these guidelines: * Encode user input with the HtmlEncode method, which turns HTML into its text representation (for example, <b> becomes &ltb&gt;), and helps prevent the markup from being executed in a browser. * When using parameter objects to pass user input to a query, add handlers for the data source control's pre-query events and perform the encoding in those events. For example, handle the SqlDataSource control's Inserting event, and in the event, encode the parameter value before the query is executed. * If you are using the GridView control with bound fields, set the BoundField object's HtmlEncode property to true. This causes the GridView control to encode user input when the row is in edit mode. * For controls that can be put into edit mode, it is recommended that you use templates. For example, the GridView, DetailsView, FormView, DataList, and Login controls can display editable text boxes. However, except for the GridView control (see the previous point), the controls do not automatically validate or HTML-encode the user input. Therefore, it is recommended that you create templates for these controls, and in the template, include an input control such as a TextBox control and add a validation control. In addition, when extracting the value of the control, you should encode it.

  7. Cross-site Scripting Attack • Cross-Site Scripting Vulnerabilities • Cross site scripting / XSS - How to find & fix it

More Related