1 / 18

The Project of this year

The Project of this year. Mariano Ceccato FBK - Fondazione Bruno Kessler ceccato@fbk.eu. Obfuscation. Obfuscation transforms a program into a new program which: Has the same semantics Is harder to reverse engineer. 1 Student x1 = new Student(); 2 String x2 = “Mathematics”;

gregoriof
Download Presentation

The Project of this year

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. The Project of this year Mariano Ceccato FBK - Fondazione Bruno Kessler ceccato@fbk.eu The Project of this year

  2. Obfuscation • Obfuscation transforms a program into a new program which: • Has the same semantics • Is harder to reverse engineer The Project of this year

  3. 1 Student x1 = new Student(); 2 String x2 = “Mathematics”; 3 Course x3 = new Course(x2); 4 x1.apply(x3); 5 x3.run(); 6 x2.match(“Alice”); Example: Identifier Renaming 1 Student guy = new Student(); 2 String name = “Mathematics”; 3 Course course = new Course(name); 4 guy.apply(course); 5 course.run(); 6 name.match(“Alice”); The Project of this year

  4. Example: Identifier Renaming 1 Student guy = new Student(); 2 String name = “Mathematics”; 3 Course course = new Course(name); 4 guy.apply(course); 5 course.run(); 6 name.match(“Alice”); 1 y1 x1 = new y1(); 2 String x2 = “Mathematics”; 3 y2 x3 = new y2(x2); 4 x1.z1(x3); 5 x3.run(); 6 x2.match(“Alice”); The Project of this year

  5. Example: Identifier Renaming Some identifiers can not be changed: • Library class and method names (GUI, IO, …) • Names inherited from libraries (Thread.run, …) • Native types (int, String, …) • Operators (+, -, …) 1 y1 x1 = new y1(); 2 String x2 = “Mathematics”; 3 y2 x3 = new y2(x2); 4 x1.z1(x3); 5 x3.run(); 6 x2.match(“Alice”); The Project of this year

  6. The Project of this year

  7. External entities • Do not change identifiers that refer to external entities (to the library) interface Serializable { publicvoid writeObject(ObjectOutputStream out) ; publicvoid readObject(ObjectInputStream in) ; } class Student implements Serializable { publicvoid writeObject(ObjectOutputStream out) {…} publicvoid readObject(ObjectInputStream in) {…} } The Project of this year

  8. External entities • Do not change identifiers that refer to external entities (to the library) class Person { publicvoid getName( ) { return … } } class Student extends Person { publicvoid getName( ) { return … } } The Project of this year

  9. Internal entities • Change in the same way names that redefines each other The Project of this year

  10. Externally visible entities • Do not change identifiers that have to external visibility (main method) class StudentApplication { public static void main(String[] arg) {…} } The Project of this year

  11. Assignment • Develop a Txl transformation that applies identifier renaming. • Change manes of • Types (classes) • Methods • Fields • Local variables The Project of this year

  12. JSnapScreen 0.1 • http://sourceforge.net/projects/jsnapscreen • Open source java project (2k LoC) • It takes snapshoot of the current screen The Project of this year

  13. Resources • Java grammar for Txl • JSnapScreen code • Separated sources • All the sources in a single file (merged) • JSnapScreen class diagram The Project of this year

  14. Mandatory requirements • Work on the merged file • Change class names • Change method names (excluded main) • Change field names • Change local variable names • Use x1, x2, x3 … as new identifiers • Txl rules must be briefly commented • Deliver a “readme” describing how to run the obfuscator The Project of this year

  15. Optional requirements • Work on separated source files • Avoid changing names of those methods that refer to the library • Use a, b, c … as new identifiers • Reuse identifiers when possible • The changed code compiles • The changed code runs The Project of this year

  16. Delivery • The project must be delivered one week (7 days) before the date of the exam The Project of this year

  17. The rest of the course Txl Obfuscation Web Testing Txl Project Empirical Software Engineering Experiment 1 Experiment 2 The Project of this year

  18. Next classes • No class on April 1st and 4th • Next class on the April 8th The Project of this year

More Related