SlideShare une entreprise Scribd logo
1  sur  16
Writing Secure J2EE Code
     AppSec USA - 23-26 October, 2012
Get a Big Scoop of Java
        Security
2 Days of Hands-on J2EE Security Code
Training.

How Data Breaches Happen And How to
Prevent Them.

J2EE Security Architecture Best Practices.

Introduction to Secure Code Review for J2EE
Applications.
RESERVE YOUR SEAT NOW


Reserve Your Seat
and Register at:
http://www.appsecusa.org/schedule/traini
ngs/writing-secure-j2ee-code/
YOU CAN EVEN WIN YOUR SEAT



• No Budget?

• No Problem...
Here Are The Rules
WIN a Free Seat at Writing Secure J2EE Code Class

                         IF

You could answer the 3 questions in the following 3
slides

                       AND

You Could Help Us Spread the Word About this
Awesome Event!
THE JAVA CHALLENGE!
Question 1:

What will happen when you attempt to compile and run the following code?

public class MyClass
{
   static
   {
      int one = 5;
   }
   static int one,two;
   public static void main(String args[])
   {
      one--;
      operate();
      System.out.println(one + two + ++one);
   }
   public static void operate()
   {
       two = one++ + ++one;
   }
}
A. Compile-time error
B. Run-time error
C. prints : 2
D. prints : 3
E. prints : 5
F. prints : 7
Question 2:

What is the result when you compile and run the following code?

public class MyClass
{
  static void operate()
  {
     System.out.println("Inside operate().");
     throw new IllegalAccessException("BAD!");
  }

 public static void main(String args[])
 {
   try
   {
       operate();
   }
   catch (IllegalAccessException e)
   {
       System.out.println("Caught " + e);
   }
 }
}
A. Compilation error
B. Runtime error
C. Compile successfully, nothing is printed.
D. Inside operate(). followed by caught: java.lang.IllegalAccessExcption: BAD!
Question 3:
What will happen when you attempt to compile and run the following code (there are two correct answers)?

public class MyClass extends Thread
{
   String myVar;
   MyThread(String name)
   {
      myVar = name;
   }
   public void run()
   {
      for(int i=0; i<50;i++)
      {
         System.out.println(myVar);
      }
   }
   public static void main(String args[])
   {
      try
      {
         MyThread t1 = new MyThread("t1");
         MyThread t2 = new MyThread("t2");
         t1.start();
         // Position1
         t2.start();
      }
      catch(InterruptedException ex)
      {
      }
   }
}
A. The above code in its current condition will not compile.
B. In order to make the MyThread class prints "t1" (50 times) followed by "t2" (50 times), t1.join(); can be placed at //Position1 position.
C. In order to make the MyThread class prints "t1" (50 times) followed by "t2" (50 times), t1.sleep(50); can be placed at //Position1 position.
D. In order to make the MyThread class prints "t1" (50 times) followed by "t2" (50 times), t1.run(); can be placed at //Position1 position.
E. In order to make the MyThread class prints "t1" (50 times) followed by "t2" (50 times), there is no need to write any code.
THE “OTHER CHALLENGE”
SPREAD THE WORD
• Tweet the following:

  “How Good of a Java Developer are You?
http://www.slideshare.net/skoussa/how-good-
         of-a-java-developer-are-you”

• Facebook and LinkedIn counts

• You win if you could get the most number of
 Retweets, Facebook likes, LinkedIn Likes
TO WIN
Send the answers plus your Twitter handle
(Facebook or LinkedIn if you used them) to:

         sherif.koussa@owasp.org

                    by

               October 2nd.
Helpful Tips!
• START EARLY!

• Remember it does not matter how big is your network,
  as much as how early you start.

• Send as many updates on Twitter, Facebook and
  LinkedIN as possible. Everything counts!

• Be innovative with your updates!

• Good Luck :)
• Follow @skoussa andor @appsecusa and
 the winner will be announced on


         October 5th, 2012
                 Good Luck

Contenu connexe

Similaire à How Good of a Java Developer are You?

Dot Net Accenture
Dot Net AccentureDot Net Accenture
Dot Net Accenture
Sri K
 
JavaProgrammingForBeginners-Presentation.pdf
JavaProgrammingForBeginners-Presentation.pdfJavaProgrammingForBeginners-Presentation.pdf
JavaProgrammingForBeginners-Presentation.pdf
Sathwika7
 
Build tic tac toe with javascript (3:28)
Build tic tac toe with javascript (3:28)Build tic tac toe with javascript (3:28)
Build tic tac toe with javascript (3:28)
Thinkful
 
Making Your Own Static Analyzer Using Freud DSL. Marat Vyshegorodtsev
 Making Your Own Static Analyzer Using Freud DSL. Marat Vyshegorodtsev Making Your Own Static Analyzer Using Freud DSL. Marat Vyshegorodtsev
Making Your Own Static Analyzer Using Freud DSL. Marat Vyshegorodtsev
Yandex
 

Similaire à How Good of a Java Developer are You? (20)

Tdd is not about testing (OOP)
Tdd is not about testing (OOP)Tdd is not about testing (OOP)
Tdd is not about testing (OOP)
 
Devry CIS 355A Full Course Latest
Devry CIS 355A Full Course LatestDevry CIS 355A Full Course Latest
Devry CIS 355A Full Course Latest
 
Tdd is not about testing
Tdd is not about testingTdd is not about testing
Tdd is not about testing
 
Dot Net Accenture
Dot Net AccentureDot Net Accenture
Dot Net Accenture
 
Need 4 Speed FI
Need 4 Speed FINeed 4 Speed FI
Need 4 Speed FI
 
Testing, Learning and Professionalism — 20171214
Testing, Learning and Professionalism — 20171214Testing, Learning and Professionalism — 20171214
Testing, Learning and Professionalism — 20171214
 
JavaProgrammingForBeginners-Presentation.pdf
JavaProgrammingForBeginners-Presentation.pdfJavaProgrammingForBeginners-Presentation.pdf
JavaProgrammingForBeginners-Presentation.pdf
 
Build tic tac toe with javascript (3:28)
Build tic tac toe with javascript (3:28)Build tic tac toe with javascript (3:28)
Build tic tac toe with javascript (3:28)
 
Unit testing-patterns
Unit testing-patternsUnit testing-patterns
Unit testing-patterns
 
Сергей Больщиков "Protractor Tips & Tricks"
Сергей Больщиков "Protractor Tips & Tricks"Сергей Больщиков "Protractor Tips & Tricks"
Сергей Больщиков "Protractor Tips & Tricks"
 
DevSecCon SG 2018 Fabian Presentation Slides
DevSecCon SG 2018 Fabian Presentation SlidesDevSecCon SG 2018 Fabian Presentation Slides
DevSecCon SG 2018 Fabian Presentation Slides
 
Making Your Own Static Analyzer Using Freud DSL. Marat Vyshegorodtsev
 Making Your Own Static Analyzer Using Freud DSL. Marat Vyshegorodtsev Making Your Own Static Analyzer Using Freud DSL. Marat Vyshegorodtsev
Making Your Own Static Analyzer Using Freud DSL. Marat Vyshegorodtsev
 
Protect Your Payloads: Modern Keying Techniques
Protect Your Payloads: Modern Keying TechniquesProtect Your Payloads: Modern Keying Techniques
Protect Your Payloads: Modern Keying Techniques
 
Tdd is not about testing (C++ version)
Tdd is not about testing (C++ version)Tdd is not about testing (C++ version)
Tdd is not about testing (C++ version)
 
DevSecCon Singapore 2018 - Remove developers’ shameful secrets or simply rem...
DevSecCon Singapore 2018 -  Remove developers’ shameful secrets or simply rem...DevSecCon Singapore 2018 -  Remove developers’ shameful secrets or simply rem...
DevSecCon Singapore 2018 - Remove developers’ shameful secrets or simply rem...
 
Working Effectively With Legacy Code
Working Effectively With Legacy CodeWorking Effectively With Legacy Code
Working Effectively With Legacy Code
 
00_Introduction to Java.ppt
00_Introduction to Java.ppt00_Introduction to Java.ppt
00_Introduction to Java.ppt
 
JS Fest 2019. Виктор Турский. 6 способов взломать твое JavaScript приложение
JS Fest 2019. Виктор Турский. 6 способов взломать твое JavaScript приложениеJS Fest 2019. Виктор Турский. 6 способов взломать твое JavaScript приложение
JS Fest 2019. Виктор Турский. 6 способов взломать твое JavaScript приложение
 
unit_tests_tutorial
unit_tests_tutorialunit_tests_tutorial
unit_tests_tutorial
 
Programming in as3 the basics
Programming in as3 the basicsProgramming in as3 the basics
Programming in as3 the basics
 

Dernier

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Dernier (20)

Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 

How Good of a Java Developer are You?

  • 1. Writing Secure J2EE Code AppSec USA - 23-26 October, 2012
  • 2. Get a Big Scoop of Java Security
  • 3. 2 Days of Hands-on J2EE Security Code Training. How Data Breaches Happen And How to Prevent Them. J2EE Security Architecture Best Practices. Introduction to Secure Code Review for J2EE Applications.
  • 4. RESERVE YOUR SEAT NOW Reserve Your Seat and Register at: http://www.appsecusa.org/schedule/traini ngs/writing-secure-j2ee-code/
  • 5. YOU CAN EVEN WIN YOUR SEAT • No Budget? • No Problem...
  • 6. Here Are The Rules WIN a Free Seat at Writing Secure J2EE Code Class IF You could answer the 3 questions in the following 3 slides AND You Could Help Us Spread the Word About this Awesome Event!
  • 8. Question 1: What will happen when you attempt to compile and run the following code? public class MyClass { static { int one = 5; } static int one,two; public static void main(String args[]) { one--; operate(); System.out.println(one + two + ++one); } public static void operate() { two = one++ + ++one; } } A. Compile-time error B. Run-time error C. prints : 2 D. prints : 3 E. prints : 5 F. prints : 7
  • 9. Question 2: What is the result when you compile and run the following code? public class MyClass { static void operate() { System.out.println("Inside operate()."); throw new IllegalAccessException("BAD!"); } public static void main(String args[]) { try { operate(); } catch (IllegalAccessException e) { System.out.println("Caught " + e); } } } A. Compilation error B. Runtime error C. Compile successfully, nothing is printed. D. Inside operate(). followed by caught: java.lang.IllegalAccessExcption: BAD!
  • 10. Question 3: What will happen when you attempt to compile and run the following code (there are two correct answers)? public class MyClass extends Thread { String myVar; MyThread(String name) { myVar = name; } public void run() { for(int i=0; i<50;i++) { System.out.println(myVar); } } public static void main(String args[]) { try { MyThread t1 = new MyThread("t1"); MyThread t2 = new MyThread("t2"); t1.start(); // Position1 t2.start(); } catch(InterruptedException ex) { } } } A. The above code in its current condition will not compile. B. In order to make the MyThread class prints "t1" (50 times) followed by "t2" (50 times), t1.join(); can be placed at //Position1 position. C. In order to make the MyThread class prints "t1" (50 times) followed by "t2" (50 times), t1.sleep(50); can be placed at //Position1 position. D. In order to make the MyThread class prints "t1" (50 times) followed by "t2" (50 times), t1.run(); can be placed at //Position1 position. E. In order to make the MyThread class prints "t1" (50 times) followed by "t2" (50 times), there is no need to write any code.
  • 12. SPREAD THE WORD • Tweet the following: “How Good of a Java Developer are You? http://www.slideshare.net/skoussa/how-good- of-a-java-developer-are-you” • Facebook and LinkedIn counts • You win if you could get the most number of Retweets, Facebook likes, LinkedIn Likes
  • 14. Send the answers plus your Twitter handle (Facebook or LinkedIn if you used them) to: sherif.koussa@owasp.org by October 2nd.
  • 15. Helpful Tips! • START EARLY! • Remember it does not matter how big is your network, as much as how early you start. • Send as many updates on Twitter, Facebook and LinkedIN as possible. Everything counts! • Be innovative with your updates! • Good Luck :)
  • 16. • Follow @skoussa andor @appsecusa and the winner will be announced on October 5th, 2012 Good Luck