Monday, October 19, 2009

Lab, 18th August 2009
This is a combine lab which Mr. Zaki decided to combined lab 4 and lab 5 in this lab which the first hour for lab 4 and the second hour for lab 5. Mr. Zaki taught us cryptography and web application security in this combine lab.
In the first hour, Mr. Zaki has given us some exercise for Caesar Cipher and Vignere Cipher. We also have learned the calculation for RSA algorithms. What is RSA algorithm? Here is some formula which related to the algorithms. Given n = p*q, where p and q are prime number, n is (public, calculated). For public chosen, e = gcd (O (n), e) = 1; 1
We then continue our lab 5 in the second hour of the lab section. Mr. Zaki discussed some of the vulnerabilities based on OWASP such as cross site scripting (XSS), injection flaws, and malicious site execution. Cross site scripting (XSS) happen when a web application accepts the input without validate the content. To prevent this, there are some steps which are input validation, strong output encoding, specify the output encoding, do not use "blacklist" validation, and watch out for canonicalization errors.
Injection Flaws like SQL injection is causing the web application to run an SQL code that will not intended by the application. Injection Flaws can manipulate the SQL statement with 'or 1 = 1-- OR 'or '1' = '1'--. It will return all the data from the table user. The following steps are taken to prevent injection flaws OWASP project.
- Input validation
- Use strong type parameterized query APIs
- Enforce least privilege
- Avoid detailed error messages
- Use stored procedures
- Do not use dynamic query interfaces
- Do not use dynamic query interfaces
- Do not use simple escaping functions
- Watch out for canonicalization errors

Malicious File Execution is another web application vulnerabilities caused by falling to control application input. The web application manipulated by this type of attack to become the attacker remote terminal to execute command line instruction. There are some steps to prevent this vulnerability, there are add firewall rules to prevent web connection to external website and internal systems and check user supplied files or filename cannot obviate other controls. For the PHP part, the steps are disable allow_url_fopen and allow_url_include in php, disable register_globals and use E_STRICT to find uninitialized variables, and ensure that all file and stream functions (stream_*) are carefully vetted.

No comments:

Post a Comment