CS266 Software Reverse Engineering (SRE)Applying Anti-Reversing Techniques to Java Bytecode
Teodoro (Ted) Cipresso, teodoro.cipresso@sjsu.edu
Department of Computer Science
San José State University
Spring 2015
CS266 Software Reverse Engineering (SRE)Reversing and Patching Java Bytecode
Teodoro (Ted) Cipresso, teodoro.cipresso@sjsu.edu
Department of Computer Science
San José State University
Spring 2015
Core Java Online training is Offering at Glory IT Technologies Pvt. Ltd. which is an object oriented programming language is classified into three basic level of programming viz. core java programming, specialized java programming & advanced Java programming. Among these first basic level is called basic or core Java programming language & is the first step of mastering Java language.
These question are the basic questions for Interview based on Java language. These questions are able to crack the interview based on java language
Learn more at blog : --
https://solutionbyexpert.blogspot.com/2020/08/become-expert-secret-of-success-ii.html
#coding
#coding development skill program
#java
CS266 Software Reverse Engineering (SRE)Reversing and Patching Java Bytecode
Teodoro (Ted) Cipresso, teodoro.cipresso@sjsu.edu
Department of Computer Science
San José State University
Spring 2015
Core Java Online training is Offering at Glory IT Technologies Pvt. Ltd. which is an object oriented programming language is classified into three basic level of programming viz. core java programming, specialized java programming & advanced Java programming. Among these first basic level is called basic or core Java programming language & is the first step of mastering Java language.
These question are the basic questions for Interview based on Java language. These questions are able to crack the interview based on java language
Learn more at blog : --
https://solutionbyexpert.blogspot.com/2020/08/become-expert-secret-of-success-ii.html
#coding
#coding development skill program
#java
9 crucial Java Design Principles you cannot missMark Papis
Encapsulation, Polymorphism, Agreggation / Composition, Overloading, Inheritance vs Composition, DRY, Dependency Injection, Delagation, Law of demeter, Principle of leas knowledge,
Vibrant Technologies is headquarted in Mumbai,India.We are the best Java training provider in Navi Mumbai who provides Live Projects to students.We provide Corporate Training also.We are Best Java classes in Mumbai according to our students and corporators
Crack your Java interview by knowing all the questions that your interviewer may ask. Brush up your knowledge with this superb set of Java interview questions & answers prepared by BestOnlineTrainers
Architecting cloud-enabled applications using Spring-Integration 2.xEdson Yanaga
Minha apresentação no JavaOne Brasil 2011 em São Paulo/SP. Trata-se de uma introdução aos Enterprise Integration Patterns (EIPs) e à uma implementação de ESB, o Spring Integration 2.x
Java Craftsmanship: Lessons Learned on How to Produce Truly Beautiful Java CodeEdson Yanaga
Programming is a journey. To achieve effective, clean, easy-to-read, and beautiful Java code, you have to practice programming every day. This session shares some lessons collected along 15 years of Java programming. It includes live code examples of how to write truly object-oriented code; when to make a type (and how to use it on JPA providers); how to properly use encapsulation and polymorphism in "ifless" programming; how to properly take advantage of the enum power; and how to use some very useful open source libraries such as Google Guava and Joda-Time to achieve clean Java code.
Session presented at JavaOne Latin America 2012.
9 crucial Java Design Principles you cannot missMark Papis
Encapsulation, Polymorphism, Agreggation / Composition, Overloading, Inheritance vs Composition, DRY, Dependency Injection, Delagation, Law of demeter, Principle of leas knowledge,
Vibrant Technologies is headquarted in Mumbai,India.We are the best Java training provider in Navi Mumbai who provides Live Projects to students.We provide Corporate Training also.We are Best Java classes in Mumbai according to our students and corporators
Crack your Java interview by knowing all the questions that your interviewer may ask. Brush up your knowledge with this superb set of Java interview questions & answers prepared by BestOnlineTrainers
Architecting cloud-enabled applications using Spring-Integration 2.xEdson Yanaga
Minha apresentação no JavaOne Brasil 2011 em São Paulo/SP. Trata-se de uma introdução aos Enterprise Integration Patterns (EIPs) e à uma implementação de ESB, o Spring Integration 2.x
Java Craftsmanship: Lessons Learned on How to Produce Truly Beautiful Java CodeEdson Yanaga
Programming is a journey. To achieve effective, clean, easy-to-read, and beautiful Java code, you have to practice programming every day. This session shares some lessons collected along 15 years of Java programming. It includes live code examples of how to write truly object-oriented code; when to make a type (and how to use it on JPA providers); how to properly use encapsulation and polymorphism in "ifless" programming; how to properly take advantage of the enum power; and how to use some very useful open source libraries such as Google Guava and Joda-Time to achieve clean Java code.
Session presented at JavaOne Latin America 2012.
Eclipse Tips & Tricks - EclipseCon North America 2014Noopur Gupta
Eclipse provides a lot of powerful features and capabilities as an IDE. With so much functionality at your disposal, there is a lot of functionality that is very useful, but not easily discoverable. To be productive, mastering your IDE is as important as mastering your source code.
In this talk, I will unleash many invaluable tips and tricks that will allow you to better use the Eclipse IDE and make you more productive in your routine development tasks. During this talk you will have many "Ah, I didn't know Eclipse can do that!" moments.
Spring MVC - Wiring the different layersIlio Catallo
The presentation focuses on the problem of wiring the different layers of a Spring MVC Web application. More precisely, the presentation explains how to wire the presentation layer (made of Spring MVC controllers) with the service and persistence objects. To this end, the slides first explain how to create the so called back-end (a.k.a. root) container, which will host the persistence and the service objects. Second, the @Repository and @Service annotations are introduced, which permit the framework to auto-discover the application beans. Finally, it is discussed how to wire such beans, through the usage of either the Spring-specific @Autowired annotation or the JEE @Inject annotation.
Avoiding Java EE Application Design Traps to Achieve Effective Use of Cloud C...Dr. Spock
Cloud computing and the Java EE platform have evolved to provide a runtime environment for Java EE applications with minimal architectural interference. This evolution is addressing issues from the application server and cloud infrastructure point of view. However, design decisions and best practices for the conception of an architecture can influence the choice of a cloud environment. This session presents some tips and tricks for avoiding the traps that prevent effective use of a cloud infrastructure during development of a typical Java EE application. Each tip and trick is evaluated in terms of its impact on the performance, scalability, distribution, elasticity, and cost of some clouds on the market.
A presentation on core java. in this ppt there are all the basic informations on the core java suvh as-
Features of Java
Java Program Translation
Java Virtual Machine
Java system overview
Java Program-Development phase
Advantage of java
Disadvantage of java
Project
Applications have to be integrated – no matter which programming languages, databases or infrastructures are used. However, the realization of integration scenarios is a complex and time-consuming task. Over 10 years ago, Enteprise Integration Patterns (EIP) became the world wide defacto standard for splitting huge, complex integration scenarios into smaller recurring problems. These patterns appear in almost every integration project.
This session revisits EIPs and gives shows status quo. After giving a short introduction with several examples, the audience will learn which EIPs still have a „right to exist“, and which new EIPs emerged in the meantime. The end of the session shows different frameworks and tools which already implement EIPs and therefore help the architect to reduce efforts a lot.
How to choose the right Integration Framework - Apache Camel (JBoss, Talend),...Kai Wähner
Data exchanges between companies increase a lot. The number of applications which must be integrated increases, too. The interfaces use different technologies, protocols and data formats. Nevertheless, the integration of these applications shall be modeled in a standardized way, realized efficiently and supported by automatic tests.
Three integration frameworks are available in the JVM environment, which fulfil these requirements: Apache Camel, Spring Integration and Mule. They implement the well-known Enteprise Integration Patterns (EIP) and therefore offers a standardized, domain-specific language to integrate applications.
These Integration Frameworks can be used in almost every integration project within the JVM environment - no matter which technologies, transport protocols or data formats are used. All integration projects can be realized in a consistent way without redundant boilerplate code.
This session shows and compares the three alternatives and discusses their pros and cons. Besides, a recommendation will be given when to use a more powerful Enterprise Service Bus (ESB) instead of one of these frameworks.
Dynamic Multi Levels Java Code Obfuscation Technique (DMLJCOT)CSCJournals
Several obfuscation tools and software are available for Java programs but larger part of these
software and tools just scramble the names of the classes or the identifiers that stored in a
bytecode by replacing the identifiers and classes names with meaningless names. Unfortunately,
these tools are week, since the java, compiler and java virtual machine (JVM) will never load and
execute scrambled classes. However, these classes must be decrypted in order to enable JVM
loaded them, which make it easy to intercept the original bytecode of programs at that point, as if
it is not been obfuscated. In this paper, we presented a dynamic obfuscation technique for java
programs. In order to deter reverse engineers from de-compilation of software, this technique
integrates three levels of obfuscation, source code, lexical transformation and the data
transformation level in which we obfuscate the data structures of the source code and byte-code
transformation level. By combining these levels, we achieved a high level of code confusion,
which makes the understanding or decompiling the java programs very complex or infeasible.
The proposed technique implemented and tested successfully by many Java de-compilers, like
JV, CAVJ, DJ, JBVD and AndroChef. The results show that all decompiles are deceived by the
proposed obfuscation technique
Vskills Offering Certification in Core Java Developer. The Course is intended for professionals and graduates wanting to excel in their chosen areas. It is also well suited for those who are already working and would like to take certification for further career progression.
Earning VSkills Core Java Developer Certification can help candidate differentiate in today's competitive job market, broaden their employment opportunities by displaying their advanced skills, and result in higher earning potential. VSkills Core Java Developer Certification can also lead to increased job satisfaction. Certified individuals have increased competence, productivity, and credibility with their employers, co-workers, and clients.
Core Java Developer Certification helps demonstrate an individual's overall comprehension and expertise of Java programming language. VSkills Core Java Developer Certification holders have more than a working familiarity with Java programs—they are technically skilled to take advantage of the breadth of features efficiently and effectively.
http://www.vskills.in/certification/Certified-Core-Java-Developer
Vibrant Technologies is headquarted in Mumbai,India.We are the best Java training provider in Navi Mumbai who provides Live Projects to students.We provide Corporate Training also.We are Best Java classes in Mumbai according to our students and corporators
Do you have what it takes to ace a Java Interview? We are here to help you in consolidating your knowledge and concepts in Java. The following article will cover all the popular Java interview questions for freshers as well as experienced candidates in depth.
Go through all the questions to enhance your chances of performing well in the interviews. The questions will revolve around the basic and core fundamentals of Java.
So, let’s dive deep into the plethora of useful interview questions on Java.
In questa sessione verranno analizzate alcune pagine ASP.NET che verranno sottoposte a refactoring per aumentarne la modularità e comprensibilità del codice, nonchè favorire la testabilità delle funzioni core.
Si presenteranno techiche e strumenti che è possibile utilizzare in modo da avere un approccio più razionale ed 'ordinato' nella stesura del codice. Le pratiche ed i concetti illustrati sono di carattere generale, quindi liberamente applicabili ad ogni tipologia di applicazione.
We explained about important concepts such as OOPs, Data types, Variables, Constants, Constructors, Interfaces, Packages, Exceptional handling, Applets, Streams, Serialization, Multithreading, Collection Frameworks, Network Programming, Design Patterns, String handling and JVM.
Hire Java developers and programmers as per your needs. Our developers are familiar with the latest technology and frameworks. Contact us to find the perfect Java developers.
This program is designed for the use of Car Showroom System and its functioning Main Objective of this project to facilitate the transactions through use of electronic medium. We use java netbeans 6.5 software and Mysql to programming our project.
Java Attacks & Defenses - End of Year 2010 PresentationJames Hamilton
Decompilation is a problem for the software industry, with the global revenue loss due to software piracy estimated to be more than $50 billion in 2008. There are several Java decompilers available but none are 100% effective, and many are obsolete/unmaintained. We found Java Decompiler, JODE and Dava to be good Java decompilers but not perfect. Dava is particularily suited to aribtrary bytecode, while others are suited to javac generated bytecode.
Static watermarking techniques can be used to protect a program from being copied by giving the ability to easily identify the owner of such software. However, static watermarking techniques are higher susceptible to semantics-preserving transformations. We show that the majority of the current implementations of watermarking systems are based on static techniques are fail when attacked with obfuscations and optimisations. Further work will involve evaluating dynamic watermarking algorithms in a similar manner, and compare them to their static counterparts.
Techniques such as program slicing can be used to attack software watermarks, in subtractive attacks on software.
Similar to Applying Anti-Reversing Techniques to Java Bytecode (20)
Why z/OS is a Great Platform for Developing and Hosting APIsTeodoro Cipresso
z/OS Connect Enterprise Edition makes it possible to create new value by enabling the creation of APIs that bring together multiple, disparate, z subsystem assets.
CS266 Software Reverse Engineering (SRE)
Identifying, Monitoring, and Reporting Malware
Teodoro (Ted) Cipresso, teodoro.cipresso@sjsu.edu
Department of Computer Science
San José State University
Spring 2015
CS266 Software Reverse Engineering (SRE)
Reengineering and Reuse of Legacy Software
Teodoro (Ted) Cipresso, teodoro.cipresso@sjsu.edu
Department of Computer Science
San José State University
Spring 2015
Applying Anti-Reversing Techniques to Machine CodeTeodoro Cipresso
CS266 Software Reverse Engineering (SRE)Applying Anti-Reversing Techniques to Machine Code
Teodoro (Ted) Cipresso, teodoro.cipresso@sjsu.edu
Department of Computer Science
San José State University
Spring 2015
CS266 Software Reverse Engineering (SRE)Reversing and Patching Wintel Machine Code
Teodoro (Ted) Cipresso, teodoro.cipresso@sjsu.edu
Department of Computer Science
San José State University
Spring 2015
CS266 Software Reverse Engineering (SRE)
Introduction to Software Reverse Engineering
Teodoro (Ted) Cipresso, teodoro.cipresso@sjsu.edu
Department of Computer Science
San José State University
Spring 2015
Innovate 2014: Get an A+ on Testing Your Enterprise Applications with Rationa...Teodoro Cipresso
Today's exam: what's the difference between continuous testing of distributed apps and enterprise apps? If you're on the distributed side, you typically maintain suites of self-checking unit tests. Successful execution of these test suites gives you confidence in your code as you make fixes and deliver enhancements. If you're on the enterprise side (okay: mainframe), you have to factor in CPU time and try to minimize that. Minimize and continuous, however, are near contradictions. The IBM Rational Development and Test Environment for System z can change that. It provides an emulated z/OS environment on Intel or Intel compatible hardware, making continuous test of enterprise apps easy and affordable.
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
Keynote at DIGIT West Expo, Glasgow on 29 May 2024.
Cheryl Hung, ochery.com
Sr Director, Infrastructure Ecosystem, Arm.
The key trends across hardware, cloud and open-source; exploring how these areas are likely to mature and develop over the short and long-term, and then considering how organisations can position themselves to adapt and thrive.
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™UiPathCommunity
In questo evento online gratuito, organizzato dalla Community Italiana di UiPath, potrai esplorare le nuove funzionalità di Autopilot, il tool che integra l'Intelligenza Artificiale nei processi di sviluppo e utilizzo delle Automazioni.
📕 Vedremo insieme alcuni esempi dell'utilizzo di Autopilot in diversi tool della Suite UiPath:
Autopilot per Studio Web
Autopilot per Studio
Autopilot per Apps
Clipboard AI
GenAI applicata alla Document Understanding
👨🏫👨💻 Speakers:
Stefano Negro, UiPath MVPx3, RPA Tech Lead @ BSP Consultant
Flavio Martinelli, UiPath MVP 2023, Technical Account Manager @UiPath
Andrei Tasca, RPA Solutions Team Lead @NTT Data
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
Securing your Kubernetes cluster_ a step-by-step guide to success !KatiaHIMEUR1
Today, after several years of existence, an extremely active community and an ultra-dynamic ecosystem, Kubernetes has established itself as the de facto standard in container orchestration. Thanks to a wide range of managed services, it has never been so easy to set up a ready-to-use Kubernetes cluster.
However, this ease of use means that the subject of security in Kubernetes is often left for later, or even neglected. This exposes companies to significant risks.
In this talk, I'll show you step-by-step how to secure your Kubernetes cluster for greater peace of mind and reliability.
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionAggregage
Join Maher Hanafi, VP of Engineering at Betterworks, in this new session where he'll share a practical framework to transform Gen AI prototypes into impactful products! He'll delve into the complexities of data collection and management, model selection and optimization, and ensuring security, scalability, and responsible use.
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
Applying Anti-Reversing Techniques to Java Bytecode
1. CS266 Software Reverse Engineering (SRE)
Applying Anti-Reversing Techniques to Java Bytecode
Teodoro (Ted) Cipresso, teodoro.cipresso@sjsu.edu
Department of Computer Science
San José State University
Spring 2015
The information in this presentation is taken from the thesis “Software reverse engineering education”
available at http://scholarworks.sjsu.edu/etd_theses/3734/ where all citations can be found.
2. Applying Anti-Reversing Techniques to Java Bytecode
Introduction and Motivation for Anti-Reversing
If Java bytecode is not protected through obfuscation it’s straightforward for a
reverser to decompile the bytecode, make changes, and recompile.
If our software sells for money, then it’s natural to offer a trial version.
Trial versions employ guards to ultimately earn your business:
Time-bomb: stops working after n days.
Usage limit: stops working after n minutes or n operations.
Crippleware: Critical functionality is disabled (e.g, can’t save you work).
This is hard to get right without annoying a potential customer.
2
3. Applying Anti-Reversing Techniques to Java Bytecode
Introduction and Motivation for Anti-Reversing
Applying anti-reversing techniques to Java bytecode (or binaries in general)
can prevent a reverser from:
Removing trialware guards in software (types on previous slide).
Recovering algorithms that make the software valuable.
While anti-reversing techniques cannot completely prevent software from being
reversed, they act as a deterrent by increasing the challenge for the reverser.
[5] states “It is never possible to entirely prevent reversing” and “What is
possible is to hinder and obstruct reversers by wearing them out and making
the process so slow and painful that they give up.”
3
4. Applying Anti-Reversing Techniques to Java Bytecode
Introduction and Motivation for Anti-Reversing
Apply anti-reversing techniques to source code, machine code, or bytecode can
have adverse effects on a program's size, efficiency, and maintainability.
Therefore, it’s important to evaluate whether a particular program warrants
the cost of protecting it.
Anti-reversing techniques are meant to be applied post-production, after the
coding for an application is complete and tested.
These techniques obscure data and logic and therefore are difficult to
implement while also working on the functionality of the application.
Even worse than the general confusion of interleaving anti-reversing techniques
with regular coding is the possibility of creating a dependency between the
actual application logic and the anti-reversing techniques used.
4
5. Applying Anti-Reversing Techniques to Java Bytecode
Basic Anti-Reversing Techniques
Eliminating Symbolic Information: Render unrecognizable, all symbolic
information in machine code or bytecode because such information can be
quite useful to a reverse engineer.
Obfuscating the Program: Includes removing symbolic information but goes
much further. Care must be taken with the following techniques to ensure that
the original program functionality remains intact.
Modify the layout of a program (move things around).
Introducing confusing non-essential logic or control flow.
Storing data in difficult to interpret organizations or formats.
Obfuscate data structures, encrypt strings etc..
5
6. Applying Anti-Reversing Techniques to Java Bytecode
Basic Anti-Reversing Techniques
Embedding Antidebugger Code: Live analysis is how most reversers accomplish
their objective. Therefore it is common for developers to implement guards
against binary debuggers.
Live analysis of machine code is accomplished using an interactive
debugger-disassembler where you attach to a running programming and
step instructions to observe the program at points of interest.
Static analysis of machine code is usually carried out using a disassembler
and heuristic algorithms that attempt to understand the structure of the
program.
Interactive debugging of Java bytecode can be accomplished using
debugger interfaces implemented by the JVM per the Java Platform
Debugger Architecture (JPDA).
6
7. Applying Anti-Reversing Techniques to Java Bytecode
Java Bytecode Anti-Reversing Considerations
While it is most often the case that we cannot recover the original Java source
code from the bytecode, the results will be functionally equivalent.
When new features are added to the Java language, new bytecode instructions
are not always added or needed. For example:
Support for generics in collections is implemented by carrying additional
information (in the constants pool of the class) that describes the type of
object a collection should contain.
This information can then be used at execution time by the JVM to
validate the type of each object in the collection.
7
8. Applying Anti-Reversing Techniques to Java Bytecode
Java Bytecode Anti-Reversing Considerations
The strategy of having newer Java language constructs result in compatible
bytecode with optionally-utilized metadata provides the benefit of allowing
legacy Java bytecode to run on newer JVMs.
If a decompiler doesn't know to look for the metadata, some information is
lost. For example:
The fact that a program used generics would not be recovered and all
collections would be of type Object (with cast statements of course).
8
9. Applying Anti-Reversing Techniques to Java Bytecode
Java Bytecode Anti-Reversing Tools
Since Java bytecode is standardized there are many obfuscation tools available
on the Internet which perform transformations directly on the Java bytecode
instead of on the Java source code itself.
SandMark: A Tool for the Study of Software Protection Algorithms [27]
RetroGuard for Java Obfuscation [28] (defunct, CLI only)
ProGuard [29]
Zelix Klassmaster [26] (not free)
Extensive list of related or alternative tools
9
10. Applying Anti-Reversing Techniques to Java Bytecode
Eliminating Symbolic Information
Variable, class, and method names, are all left intact when compiling Java
source code to Java bytecode.
Oracle’s Java compiler javac provides an option to leave out debugging
information in Java bytecode: specifying javac -g:none will exclude information
on line numbers, the source file name, and local variables.
This option offers little to no help in fending off a reverser as none of the
remaining variable names, methods names, and constants are obfuscated.
[26] states that a high-level of protection can be achieved for Java bytecode by
applying three transformations: Name Obfuscation, String Encryption, and Flow
Obfuscation.
There does not appear to be a free anti-reversing tool that can perform all
three of these transformations to Java bytecode.
10
26. Applying Anti-Reversing Techniques to Java Bytecode
Obfuscating The Program
One of the most popular, and fragile, techniques for preventing decompilation
involves the use of opaque predicates:
By introducing false ambiguities into the control flow of a program we may
trick a decompiler into traversing garbage bytes that are masquerading as
logic contained in an else clause.
if ( 1 == 1 ) and if ( 1 == 2 ) are opaque predicates because the first
always evaluates to true, and the second always to false.
“Branches that appear to be conditional but are really not.” [5]
The key to preventing decompilation with opaque predicates is to insert
invalid instructions in the else branch of an always-true predicate or the
if-body of an always false predicate.
26
27. Applying Anti-Reversing Techniques to Java Bytecode
Obfuscating The Program - Opaque Predicates
Since the invalid instructions will never be reached during normal operation
of the program there is no impact on the program's operation.
A naïve decompiler will evaluate both possibilities of an opaque predicate
and fail on attempting to decompile the invalid, unreachable “instructions”.
27
28. Applying Anti-Reversing Techniques to Java Bytecode
Obfuscating The Program – Java Bytecode Verifier
Unfortunately, opaque predicates, often used in protecting machine code from
disassembly, cannot be used with Java bytecode because of the presence of the
Java Bytecode Verifier in the JVM.
The JVM verifies bytecode before execution via single-pass static analysis.
Therefore invalid instructions/garbage bytes are likely to be caught.
[31] documents the following checks made by the Java Bytecode Verifier:
Type correctness: arguments of an instruction, whether on the stack or in
registers, should always be of the type expected by the instruction.
No stack overflow or underflow: instructions which remove items from the
stack should not do so when the stack is empty. Also, instructions should
not attempt to push items on the stack when the stack is full.
28
29. Applying Anti-Reversing Techniques to Java Bytecode
Obfuscating The Program – Java Bytecode Verifier
Register initialization: Within a single method any use of a register must
come after the initialization of that register. That is, there should be at least
one store operation to that register before a load operation on that register.
Object initialization: Creation of object instances must always be followed
by a call to one of the possible initialization (constructor) methods for that
object before it can be used.
Access control: Method calls, field accesses, and class references must
always adhere to the Java visibility policies for that method, field, or
reference (e.g., private, protected, public).
Recall that bytecode targeted to run on a JVM may have been generated by
something other than the accompanying Java compiler (even dynamically).
This actuality highlights the need for bytecode verification.
29
30. Applying Anti-Reversing Techniques to Java Bytecode
Obfuscating The Program - Opaque Predicates
Opaque predicates do remain viable for machine code, though there is some
evidence that good disassemblers, such as IDA Pro, do check for rudimentary
opaque predicates [5].
SandMark‘s creators claim that the presence of opaque predicates in bytecode,
without garbage bytes of course, makes decompilation more difficult.
SandMark implements several different algorithms for sprinkling opaque
predicates throughout bytecode.
For example, the opaque branch insertion obfuscation claims to “insert
jumps into a method via opaque predicates so that the control flow graph is
irreducible. This inhibits decompilation.”
30