Ethical Hacking Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package. | Computer Forensics Training at InfoSec Institute Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors. |

| Subject: | Java -noverify PoC |
|---|---|
| Date: | Thu, 04 May 2006 03:45:37 +0100 |
-------------
Test environment: Mac OS X10.4.6
java -version
java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-112) Java HotSpot(TM) Client VM (build 1.5.0_06-64, mixed mode, sharing)
Step by Step description of test:
Start by creation the File: publicPrivate.java
******************
class publicPrivate {
public static void main(String[] args)
{
System.out.println("Hello World!"); //Display the string.
externalClass.publicMethod();
externalClass.publicMethod();
}}
class externalClass
{
public static void publicMethod()
{
System.out.println("Inside the Public Method");
} private static void privateMethod()
{
System.out.println("Inside the Private Method");
}
}
******************execute java publicPrivate and you will get
Hello World! Inside the Public Method Inside the Public Method
Note that if I change on the publicPrivate.java file the lines
externalClass.publicMethod();
externalClass.publicMethod();to
externalClass.publicMethod();
externalClass.privateMethod();I will get the following compilation error:
java -jar jasmin-2.2/jasmin.jar PublicPrivate.j
Generated: publicPrivate.class
Executing java publicPrivate shows:
Hello World!- After Oolong disassemble Inside the Public Method Inside the Public Method
Now, in jEdit, on the publicPrivate.j file, I make the following change
Then save it and run jasmin again
java -jar jasmin-2.2/jasmin.jar PublicPrivate.j
Generated: publicPrivate.class
execute java publicPrivate and:
Hello World!- After Oolong disassemble Inside the Public Method Inside the Private Method
Bingo! We successfully invoked the private method.
java -noverify publicPrivate (produces the same result)
Hello World!- After Oolong disassemble Inside the Public Method Inside the Private Method
java -verify publicPrivate (throws an verification error)
Thanks
Best regards
Dinis Cruz Owasp .Net Project www.owasp.net
------------------------------------------------------------------------- Sponsored by: Watchfire
https://www.watchfire.com/securearea/whitepapers.aspx?id=701300000007t9r --------------------------------------------------------------------------
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [WEB SECURITY] Java -noverify PoC, Stephen de Vries |
|---|---|
| Next by Date: | Re: [WEB SECURITY] Re: [Owasp-dotnet] Review of Owasp-London Chapter meeting on WAF (Web Application Firewalls), Dinis Cruz |
| Previous by Thread: | ual Factor/Adaptive Authentication, Casey DeBerry |
| Next by Thread: | Re: [WEB SECURITY] Java -noverify PoC, Stephen de Vries |
| Indexes: | [Date] [Thread] [Top] [All Lists] |