SlideShare una empresa de Scribd logo
1 de 48
Web Security Mistakes ,[object Object]
Agenda ,[object Object],[object Object],[object Object],[object Object],[object Object]
Who Am I? ,[object Object],[object Object],[object Object],[object Object]
What is Client-Side Security? ,[object Object],[object Object],[object Object],[object Object],Specifically, what do  I  mean by it?
How many of these sites used JavaScript to “protect” themselves from SQL Injection?
OWASP Top 10 (2007) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],Is It  All  Bad? function validateEmpty(fld) { var error = ""; if (fld.value.length == 0) { fld.style.background = 'Yellow';  error = "The required field has not been filled in." } else { fld.style.background = 'White'; } return error;  }
Agenda ,[object Object],[object Object],[object Object],[object Object],[object Object]
Three Examples of Bad ,[object Object],[object Object],[object Object]
Real Life Bad Example #1 ,[object Object],Thanks, Garrett Gee!
“best of its kind” ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Breaking “the best” sub factor {  @F = ();  $num = shift;  foreach $i (97..122) {  last if ($num == 1);  if (!($num % $i)) {  $num /= $i;  push @F, chr($i);  redo ;  }  }return @F;} # thank you internet (and perl)sub perm{@_?map{my$e=$_[$_];map[$e,@{$_}],perm(@_[0..$_-1,$_+1..$#_])}0..$#_:[]}@SOL = factor($_);print "@$_" for  perm @SOL; Code by Seth Bromberger
Lessons Learned ,[object Object],[object Object]
Real Life Bad Example #2 ,[object Object],[object Object]
We have a page with some input boxes...
function ValidateDate(z) { var x = new Boolean(true); if (z != &quot;&quot;) { var DatePattern = /^({1,2})(|-)({1,2})({4})$/; // MM/DD/YYYY // Date Pattern var TempString = z.match(DatePattern); if (TempString == null) { x = false; } else { var dayLengths = [31,29,31,30,31,30,31,31,30,31,30,31]; var m = TempString[1], d = TempString[3], y = TempString[4];   if(!((y % 4 == 0 && y % 100 != 0) || y % 400 == 0)) {  dayLengths [1] = 28; } if (m <= 0 || m > 12 || d <= 0 || d > 31 || y <= 0 || dayLengths[m-1] < d) { x = false; } } } return x; } function validate(theForm) { if (!ValidateInt(theForm.NumberOfDays.value))  { alert(&quot;The number of days must be an integer value.&quot;); theForm.NumberOfDays.focus(); } else if (!ValidateDate(theForm.StartDate.value))  { alert(&quot;The start date must be entered in MM/DD/YYYY format.&quot;); theForm.StartDate.focus(); } else if (!ValidateDate(theForm.EndDate.value))  { alert(&quot;The end date must be entered in MM/DD/YYYY format.&quot;); theForm.EndDate.focus(); } else { theForm.submit(); }
Using a proxy (like WebScarab, TamperData, etc) the attacker can bypass any client-side validation steps: Great Job!
Agenda ,[object Object],[object Object],[object Object],[object Object],[object Object]
Adobe Flex/AIR ,[object Object],[object Object],[object Object]
Adobe AIR/Flex ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
No Checks? No Good! ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
 
Example 2: Lessons Learned ,[object Object],[object Object],[object Object]
Real Life Bad Example #3
I’ve got a blue ticket ,[object Object],[object Object],[object Object]
Where to start? ,[object Object],[object Object],[object Object],[object Object]
...those who forget the past ,[object Object],[object Object],[object Object]
Password Cracking 101 Keyspace Set of all possible keys that can be used to initialize a crypto algorithm Key length Size of a key used in a cryptographic algorithm Brute force attack Method of defeating a cryptographic scheme by trying a large number of possibilities. Sometimes known as “Incremental” Dictionary Attack Method of defeating a cryptographic scheme by using a list of words Rainbow Tables A pre-computed lookup table of a keyspace and key length offering a time-memory tradeoff for recovering plaintext
Step 1 - Hashes! ,[object Object],553:77c34ddea4adf4aa79c69ab471539847554:2476fee59de2c14f3bcc305f84c32209555:1d2863778fb0fe89c9e4c2929e437c14556:90fd53a2967995804bfb3ab639c9f6d0557:d6fdf20e7995d08c2ce75fe2dd943af0558:c47cbb4b92b68d4b9fe85fc0ea4e0042559:d31830730fd84233bdd1bfe1969cb24e560:eac8780bdd7c8d39bda71bb854425b21561:ac910361ffec9261802b907788d446a4562:852c6738e01803f64ac785abe3ae6659563:6e5d4f697d7aa4901460cd0257484176564:fcc66c568b7fd1f7cdde953628238ee1565:cf0c737b854ce6e97654542f200e0f42566:df2fe494621ae661d93e52190086c794567:3c65bb39ee7b2e8106e9cc375fac804a568:b61818555bc3740a368aa32b5c35a5e6
Step 2a - Get Crackin’ ,[object Object],[object Object],[object Object],[object Object],[object Object]
Maths Break ,[object Object],[object Object],[object Object],k = 69 l = 8 Cs = 30M 69 8  / 30M 60 285,443.54 minutes  (3.68 months) k = 69 l = 7 Cs = 30M 69 7  / 30M 60 4,136.86 minutes (69 hours) k = 69 l = 6 Cs = 30M 69 6  / 30M 60 59.95 minutes
Step 2b: Learnin’ ,[object Object],[object Object],[object Object],[object Object]
Pattern forming? YES! 0 8 - E - V F 0 1 0 8 - G - P C 2 6 0 0 8 - G - P C 1 8 9 0 8 - E - V F 0 1 0 8 - G - P C 2 6 0 0 8 - G - P C 1 8 9
Step 2c: Filterin’ ,[object Object],[Incremental:MW]File = $JOHN/lanman.chrMinLen = 7MaxLen = 7CharCount = 69[List.External:MW]void filter(){  int i, c;  i = 0;  while (c = word[i]) {  // If character is lower case, convert to upper  if (c >= 'a' && c <= 'z') word[i] &= 0xDF;  i++;  }  // We know the static filter 08-?-????  // Add or remove word[]s to fit the length  word[10] = word[6];  word[9] = word[5];  word[8] = word[4];  word[7] = word[3];  word[6] = word[2];  word[5] = word[1];  word[4] = '-';  word[3] = word[0];  word[2] = '-';  word[1] = '8';  word[0] = '0';}
Step 3: Smart Crackin’
Step 4: Tryin’
Example 3: Lessons Learned ,[object Object],[object Object],[object Object]
.NET/C# ViewState ,[object Object],[object Object],[object Object],[object Object]
Ruby On Rails 2.0 ,[object Object],[object Object],[object Object],[object Object],[object Object]
Solutions! ,[object Object],[object Object],[object Object],[object Object]
Agenda ,[object Object],[object Object],[object Object],[object Object],[object Object]
Web Single-SignOn ,[object Object],[object Object],[object Object],[object Object]
Metasploit NTLM Updates ,[object Object],[object Object],[object Object]
Why not SMB? ,[object Object],[object Object],[object Object]
Not entirely new... ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
 
URLs ,[object Object],[object Object],[object Object],[object Object],[object Object]
QUESTIONS? THANK YOU!

Más contenido relacionado

La actualidad más candente

4. Метапрограмиране
4. Метапрограмиране4. Метапрограмиране
4. Метапрограмиране
Stefan Kanev
 
Make Your SW Component Testable
Make Your SW Component TestableMake Your SW Component Testable
Make Your SW Component Testable
Li-Wei Cheng
 
Html basics 11 form validation
Html basics 11 form validationHtml basics 11 form validation
Html basics 11 form validation
H K
 
Building @Anywhere (for TXJS)
Building @Anywhere (for TXJS)Building @Anywhere (for TXJS)
Building @Anywhere (for TXJS)
danwrong
 

La actualidad más candente (13)

Security In PHP Applications
Security In PHP ApplicationsSecurity In PHP Applications
Security In PHP Applications
 
Retrofitting
RetrofittingRetrofitting
Retrofitting
 
Seam Glassfish Slidecast
Seam Glassfish SlidecastSeam Glassfish Slidecast
Seam Glassfish Slidecast
 
4. Метапрограмиране
4. Метапрограмиране4. Метапрограмиране
4. Метапрограмиране
 
OWASP Top 10 - DrupalCon Amsterdam 2019
OWASP Top 10 - DrupalCon Amsterdam 2019OWASP Top 10 - DrupalCon Amsterdam 2019
OWASP Top 10 - DrupalCon Amsterdam 2019
 
Make Your SW Component Testable
Make Your SW Component TestableMake Your SW Component Testable
Make Your SW Component Testable
 
Html basics 11 form validation
Html basics 11 form validationHtml basics 11 form validation
Html basics 11 form validation
 
[FDD 2017] Mark Seemann - Humane code
[FDD 2017] Mark Seemann - Humane code[FDD 2017] Mark Seemann - Humane code
[FDD 2017] Mark Seemann - Humane code
 
Java script
Java scriptJava script
Java script
 
Django - Framework web para perfeccionistas com prazos
Django - Framework web para perfeccionistas com prazosDjango - Framework web para perfeccionistas com prazos
Django - Framework web para perfeccionistas com prazos
 
Grddl In A Nutshell V1
Grddl In A Nutshell V1Grddl In A Nutshell V1
Grddl In A Nutshell V1
 
My app is secure... I think
My app is secure... I thinkMy app is secure... I think
My app is secure... I think
 
Building @Anywhere (for TXJS)
Building @Anywhere (for TXJS)Building @Anywhere (for TXJS)
Building @Anywhere (for TXJS)
 

Similar a Web Security Mistakes: Trusting The Client

12-security.ppt - PHP and Arabic Language - Index
12-security.ppt - PHP and Arabic Language - Index12-security.ppt - PHP and Arabic Language - Index
12-security.ppt - PHP and Arabic Language - Index
webhostingguy
 
Php Security3895
Php Security3895Php Security3895
Php Security3895
Aung Khant
 
OWASP Top 10 : Let’s know & solve
OWASP Top 10 : Let’s know & solveOWASP Top 10 : Let’s know & solve
OWASP Top 10 : Let’s know & solve
Harit Kothari
 
Php & Web Security - PHPXperts 2009
Php & Web Security - PHPXperts 2009Php & Web Security - PHPXperts 2009
Php & Web Security - PHPXperts 2009
mirahman
 
Avoiding Cross Site Scripting - Not as easy as you might think
Avoiding Cross Site Scripting - Not as easy as you might thinkAvoiding Cross Site Scripting - Not as easy as you might think
Avoiding Cross Site Scripting - Not as easy as you might think
Erlend Oftedal
 
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (3/3)
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (3/3)[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (3/3)
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (3/3)
Carles Farré
 

Similar a Web Security Mistakes: Trusting The Client (20)

12-security.ppt - PHP and Arabic Language - Index
12-security.ppt - PHP and Arabic Language - Index12-security.ppt - PHP and Arabic Language - Index
12-security.ppt - PHP and Arabic Language - Index
 
Security.ppt
Security.pptSecurity.ppt
Security.ppt
 
Php security3895
Php security3895Php security3895
Php security3895
 
PHP Security
PHP SecurityPHP Security
PHP Security
 
Concern of Web Application Security
Concern of Web Application SecurityConcern of Web Application Security
Concern of Web Application Security
 
PHPUG Presentation
PHPUG PresentationPHPUG Presentation
PHPUG Presentation
 
Php Security3895
Php Security3895Php Security3895
Php Security3895
 
Top 10 Web Security Vulnerabilities
Top 10 Web Security VulnerabilitiesTop 10 Web Security Vulnerabilities
Top 10 Web Security Vulnerabilities
 
OWASP Top 10 : Let’s know & solve
OWASP Top 10 : Let’s know & solveOWASP Top 10 : Let’s know & solve
OWASP Top 10 : Let’s know & solve
 
2009 Barcamp Nashville Web Security 101
2009 Barcamp Nashville   Web Security 1012009 Barcamp Nashville   Web Security 101
2009 Barcamp Nashville Web Security 101
 
JavaScript
JavaScriptJavaScript
JavaScript
 
Php & Web Security - PHPXperts 2009
Php & Web Security - PHPXperts 2009Php & Web Security - PHPXperts 2009
Php & Web Security - PHPXperts 2009
 
Avoiding Cross Site Scripting - Not as easy as you might think
Avoiding Cross Site Scripting - Not as easy as you might thinkAvoiding Cross Site Scripting - Not as easy as you might think
Avoiding Cross Site Scripting - Not as easy as you might think
 
Merb jQuery
Merb jQueryMerb jQuery
Merb jQuery
 
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (3/3)
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (3/3)[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (3/3)
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (3/3)
 
Developing and testing ajax components
Developing and testing ajax componentsDeveloping and testing ajax components
Developing and testing ajax components
 
Windows Azure - Cloud Service Development Best Practices
Windows Azure - Cloud Service Development Best PracticesWindows Azure - Cloud Service Development Best Practices
Windows Azure - Cloud Service Development Best Practices
 
Introduction to Prototype JS Framework
Introduction to Prototype JS FrameworkIntroduction to Prototype JS Framework
Introduction to Prototype JS Framework
 
10 Things You're Not Doing [IBM Lotus Notes Domino Application Development]
10 Things You're Not Doing [IBM Lotus Notes Domino Application Development]10 Things You're Not Doing [IBM Lotus Notes Domino Application Development]
10 Things You're Not Doing [IBM Lotus Notes Domino Application Development]
 
Migration testing framework
Migration testing frameworkMigration testing framework
Migration testing framework
 

Último

unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabiunwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
Abortion pills in Kuwait Cytotec pills in Kuwait
 
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
Sheetaleventcompany
 
Insurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usageInsurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usage
Matteo Carbone
 
0183760ssssssssssssssssssssssssssss00101011 (27).pdf
0183760ssssssssssssssssssssssssssss00101011 (27).pdf0183760ssssssssssssssssssssssssssss00101011 (27).pdf
0183760ssssssssssssssssssssssssssss00101011 (27).pdf
Renandantas16
 
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
dollysharma2066
 
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876
dlhescort
 

Último (20)

RSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors DataRSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors Data
 
John Halpern sued for sexual assault.pdf
John Halpern sued for sexual assault.pdfJohn Halpern sued for sexual assault.pdf
John Halpern sued for sexual assault.pdf
 
unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabiunwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
 
Business Model Canvas (BMC)- A new venture concept
Business Model Canvas (BMC)-  A new venture conceptBusiness Model Canvas (BMC)-  A new venture concept
Business Model Canvas (BMC)- A new venture concept
 
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRLMONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
 
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
 
BAGALUR CALL GIRL IN 98274*61493 ❤CALL GIRLS IN ESCORT SERVICE❤CALL GIRL
BAGALUR CALL GIRL IN 98274*61493 ❤CALL GIRLS IN ESCORT SERVICE❤CALL GIRLBAGALUR CALL GIRL IN 98274*61493 ❤CALL GIRLS IN ESCORT SERVICE❤CALL GIRL
BAGALUR CALL GIRL IN 98274*61493 ❤CALL GIRLS IN ESCORT SERVICE❤CALL GIRL
 
The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...
The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...
The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...
 
It will be International Nurses' Day on 12 May
It will be International Nurses' Day on 12 MayIt will be International Nurses' Day on 12 May
It will be International Nurses' Day on 12 May
 
Value Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and painsValue Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and pains
 
Cracking the Cultural Competence Code.pptx
Cracking the Cultural Competence Code.pptxCracking the Cultural Competence Code.pptx
Cracking the Cultural Competence Code.pptx
 
Call Girls Service In Old Town Dubai ((0551707352)) Old Town Dubai Call Girl ...
Call Girls Service In Old Town Dubai ((0551707352)) Old Town Dubai Call Girl ...Call Girls Service In Old Town Dubai ((0551707352)) Old Town Dubai Call Girl ...
Call Girls Service In Old Town Dubai ((0551707352)) Old Town Dubai Call Girl ...
 
Insurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usageInsurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usage
 
How to Get Started in Social Media for Art League City
How to Get Started in Social Media for Art League CityHow to Get Started in Social Media for Art League City
How to Get Started in Social Media for Art League City
 
0183760ssssssssssssssssssssssssssss00101011 (27).pdf
0183760ssssssssssssssssssssssssssss00101011 (27).pdf0183760ssssssssssssssssssssssssssss00101011 (27).pdf
0183760ssssssssssssssssssssssssssss00101011 (27).pdf
 
Mondelez State of Snacking and Future Trends 2023
Mondelez State of Snacking and Future Trends 2023Mondelez State of Snacking and Future Trends 2023
Mondelez State of Snacking and Future Trends 2023
 
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best ServicesMysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
 
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
 
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876
 
Pharma Works Profile of Karan Communications
Pharma Works Profile of Karan CommunicationsPharma Works Profile of Karan Communications
Pharma Works Profile of Karan Communications
 

Web Security Mistakes: Trusting The Client

  • 1.
  • 2.
  • 3.
  • 4.
  • 5. How many of these sites used JavaScript to “protect” themselves from SQL Injection?
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12. Breaking “the best” sub factor { @F = (); $num = shift; foreach $i (97..122) { last if ($num == 1); if (!($num % $i)) { $num /= $i; push @F, chr($i); redo ; } }return @F;} # thank you internet (and perl)sub perm{@_?map{my$e=$_[$_];map[$e,@{$_}],perm(@_[0..$_-1,$_+1..$#_])}0..$#_:[]}@SOL = factor($_);print &quot;@$_&quot; for perm @SOL; Code by Seth Bromberger
  • 13.
  • 14.
  • 15. We have a page with some input boxes...
  • 16. function ValidateDate(z) { var x = new Boolean(true); if (z != &quot;&quot;) { var DatePattern = /^({1,2})(|-)({1,2})({4})$/; // MM/DD/YYYY // Date Pattern var TempString = z.match(DatePattern); if (TempString == null) { x = false; } else { var dayLengths = [31,29,31,30,31,30,31,31,30,31,30,31]; var m = TempString[1], d = TempString[3], y = TempString[4]; if(!((y % 4 == 0 && y % 100 != 0) || y % 400 == 0)) { dayLengths [1] = 28; } if (m <= 0 || m > 12 || d <= 0 || d > 31 || y <= 0 || dayLengths[m-1] < d) { x = false; } } } return x; } function validate(theForm) { if (!ValidateInt(theForm.NumberOfDays.value)) { alert(&quot;The number of days must be an integer value.&quot;); theForm.NumberOfDays.focus(); } else if (!ValidateDate(theForm.StartDate.value)) { alert(&quot;The start date must be entered in MM/DD/YYYY format.&quot;); theForm.StartDate.focus(); } else if (!ValidateDate(theForm.EndDate.value)) { alert(&quot;The end date must be entered in MM/DD/YYYY format.&quot;); theForm.EndDate.focus(); } else { theForm.submit(); }
  • 17. Using a proxy (like WebScarab, TamperData, etc) the attacker can bypass any client-side validation steps: Great Job!
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.  
  • 23.
  • 24. Real Life Bad Example #3
  • 25.
  • 26.
  • 27.
  • 28. Password Cracking 101 Keyspace Set of all possible keys that can be used to initialize a crypto algorithm Key length Size of a key used in a cryptographic algorithm Brute force attack Method of defeating a cryptographic scheme by trying a large number of possibilities. Sometimes known as “Incremental” Dictionary Attack Method of defeating a cryptographic scheme by using a list of words Rainbow Tables A pre-computed lookup table of a keyspace and key length offering a time-memory tradeoff for recovering plaintext
  • 29.
  • 30.
  • 31.
  • 32.
  • 33. Pattern forming? YES! 0 8 - E - V F 0 1 0 8 - G - P C 2 6 0 0 8 - G - P C 1 8 9 0 8 - E - V F 0 1 0 8 - G - P C 2 6 0 0 8 - G - P C 1 8 9
  • 34.
  • 35. Step 3: Smart Crackin’
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42.
  • 43.
  • 44.
  • 45.
  • 46.  
  • 47.