SlideShare ist ein Scribd-Unternehmen logo
1 von 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!

Weitere ähnliche Inhalte

Was ist angesagt?

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
 

Was ist angesagt? (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)
 

Ähnlich wie 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é
 

Ähnlich wie 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
 

Kürzlich hochgeladen

Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...
Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...
Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...
lizamodels9
 
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 DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
lizamodels9
 
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Dipal Arora
 

Kürzlich hochgeladen (20)

Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...
Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...
Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...
 
Regression analysis: Simple Linear Regression Multiple Linear Regression
Regression analysis:  Simple Linear Regression Multiple Linear RegressionRegression analysis:  Simple Linear Regression Multiple Linear Regression
Regression analysis: Simple Linear Regression Multiple Linear Regression
 
Boost the utilization of your HCL environment by reevaluating use cases and f...
Boost the utilization of your HCL environment by reevaluating use cases and f...Boost the utilization of your HCL environment by reevaluating use cases and f...
Boost the utilization of your HCL environment by reevaluating use cases and f...
 
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 DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
 
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
 
VVVIP Call Girls In Greater Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
VVVIP Call Girls In Greater Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...VVVIP Call Girls In Greater Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
VVVIP Call Girls In Greater Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
 
Dr. Admir Softic_ presentation_Green Club_ENG.pdf
Dr. Admir Softic_ presentation_Green Club_ENG.pdfDr. Admir Softic_ presentation_Green Club_ENG.pdf
Dr. Admir Softic_ presentation_Green Club_ENG.pdf
 
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
 
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
 
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptx
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptxB.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptx
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptx
 
👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...
👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...
👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...
 
Cracking the Cultural Competence Code.pptx
Cracking the Cultural Competence Code.pptxCracking the Cultural Competence Code.pptx
Cracking the Cultural Competence Code.pptx
 
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
 
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
 
Ensure the security of your HCL environment by applying the Zero Trust princi...
Ensure the security of your HCL environment by applying the Zero Trust princi...Ensure the security of your HCL environment by applying the Zero Trust princi...
Ensure the security of your HCL environment by applying the Zero Trust princi...
 
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
 
Forklift Operations: Safety through Cartoons
Forklift Operations: Safety through CartoonsForklift Operations: Safety through Cartoons
Forklift Operations: Safety through Cartoons
 
Grateful 7 speech thanking everyone that has helped.pdf
Grateful 7 speech thanking everyone that has helped.pdfGrateful 7 speech thanking everyone that has helped.pdf
Grateful 7 speech thanking everyone that has helped.pdf
 
Monte Carlo simulation : Simulation using MCSM
Monte Carlo simulation : Simulation using MCSMMonte Carlo simulation : Simulation using MCSM
Monte Carlo simulation : Simulation using MCSM
 

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.