ringzer0team.com • Try the 1st and 2nd JavaScript challenges • We did we learn: • Security through obscurity alone isn’t any security at all • Security by design • Open security
system (usually the user) • Integrity unknown • Intent may be malicious • Data may include attacks such as: • SQL injection • cross site scripting (XSS)
= getRequestString("UserPass"); q="SELECT * FROM Users WHERE Name ='" + uName + "' AND Pass ='" + uPass + "'" • Go to ringzer0team.com/challenges and try out the 2nd SQL challenge • And the 3rd SQL challenge!
queries • With an ORM check and ensure that it sanitizes untrusted data • Use built in framework methods and techniques, do not write your own sanitisation • Use a restricted privilege database account • Avoid disclosing error information
• Reflect to SCREEN the way it was entered, not the markup: • <script>alert(‘xss’)</script> • HTML encode: <script>alert('xss')</script> • JavaScript encode (hexadecimal): \x3C\x73\x63\x72\x69\x70\x74\x3E\x61\x6C\x65\x72\x74\x28\x27\x 78\x73\x73\x27\x29