Questions tagged [java]

Java is an object-oriented language and runtime environment (JRE). Java programs are platform independent, because they are compiled to bytecode and their execution is handled by a Virtual Machine called the Java VM or JVM.

Filter by
Sorted by
Tagged with
2
votes
1answer
639 views

Correct reassembly of Java bytecode

I've been reverse engineering the Yikyak application, and I came across this function One particular function is used in order to verify the integrity of the API call. The decompiler failed to figure ...
2
votes
1answer
5k views

difference between two .class files

Could you tell me how to detect difference between (same) .class files? I have a java class compilated with Maven2 on my local computer => works good! I jave the same java class compilated with ...
2
votes
1answer
543 views

VerifyError after editingg class file with dirtJOE

I'm using dirtyJOE to edit a method of a class file. The original class file had some encryption method calls and such. I've changed the byte-code of the method ldc (byte-code: 12 1E) to load true ...
2
votes
0answers
122 views

Google Maps, Android serialisation format

I've come across an SQLite database (gmm_storage.db) used by Google Maps on Android, and I'm unsure as to how the data it contains is serialised. For example: I'm saying serialised, as from the ...
2
votes
0answers
138 views

How to reverse a java thread to get its origin

I was working on a java application which is run for the first couple of minutes & then application interface hangs. I had open the application in JMC & it shows later I create a thread dump ...
2
votes
0answers
417 views

Jar reversing: Can't open as zip file nor open it with common decompilers

I'm pentesting a JNLP application composed by several .jar files. I'm able to decompile with jd-gui every 3rd party library included in it, but the main .jar coded by my client. So after running JD-...
2
votes
0answers
192 views

Javascript equivalent of JEB

In case you already know, there is a full-feature decompiler for Java/Android called JEB (https://www.pnfsoftware.com/) Some of the most important features include the ability to rename identifiers ...
1
vote
2answers
611 views

Constant pool error

To debug a jar file, i tried to modify java bytecode using JByteMod tool and print some variable to standard output. The variable i'm trying to print is an ArrayList. Specifically, it's a public ...
1
vote
2answers
4k views

How to add code to compiled java class

I have java code that is compiled to a .class file. There is a function that gets few parameters and do some action (e.g. get int x and int y and do x+y) I want to add to this .class file code that ...
1
vote
2answers
196 views

J2ME games obfuscator - Spyro and Tekken 5

While reversing some J2ME games like Spyro or Tekken 5 Mobile I have encountered a weird obfuscation where all fields, methods and classes have names like A, a, B, b, Aa, Bb etc. It's really hard to ...
1
vote
2answers
487 views

exploit - Getting started with Java exploitation [duplicate]

I am looking to get started with Java exploitation. I have not found a good place start or even how to start, so I am asking here. What are the publicly available exploits for Java that one can study ?...
1
vote
1answer
349 views

How can I get classes from “protected” JAR file?

I'm trying to get classes from JAR file / actually running JVM machine but: When I'm trying to open JAR file using for example 7Zip I dont see any classes. After unzip Manifest file is empty too. When ...
1
vote
1answer
1k views

can't edit class file with recaf.0.9 without re-compile

I have this java code public class HelloWorld { public static void main(String[] args) { System.out.println("Hello World!"); } } I compile to class file, run it , and all fine. I ...
1
vote
1answer
229 views

Trying to reverse function to generate certain color strings from an HMAC signature - decompiled code LOOKS right, but my results differ

This might be a bit difficult to follow without context, but the gist of it is the following; I'm trying to reverse a certain application, and part of what I"m attempting to reverse in the app ...
1
vote
1answer
276 views

Going around finding a signature used in a .APK file

So I've decompiled an APK and I believe that I have now is the source code (most with a bunch of random variables and method names, but from what I've read this is completely normal) the app in ...
1
vote
1answer
139 views

Discrepancies in function declarations from decompilers?

An Android application I'm analyzing makes calls to a native library to generate a certain value. Here's an example of the native library function declaration from SMALI (Decompiled Java): .method ...
1
vote
1answer
842 views

Decrypt SSL/TLS traffic from a Java web applet

I am trying to reverse engineer the protocol of a chat written in java to implement my own client. The official client is a java applet embedded in the website so I thought it might use just https but ...
1
vote
1answer
267 views

cost, time and tools had Google reverse-engineered Java packages? [closed]

In the context of Oracle vs. Google: This is not a case where Google reverse-engineered Oracle’s Java packages to gain access to unprotected functional elements contained therein. page 48 ...
1
vote
1answer
72 views

How can I see when a library is being called in Android?

Apologies for a beginner-esque question, but I am reverse engineering an Android application, that is most probably using the libusbhost.so library to interface with USB devices via Java Native ...
1
vote
1answer
165 views

Dynamic analysis (Frida) reveals instance of a class that doesn't exist in the source code (dex2jar)

I have been diving into an apk's source code, doing both static analysis with Jadx (same as dex2jar) and dynamic analysis with Frida. I am trying to replicate the method that signs HTTP requests "...
1
vote
1answer
585 views

How to find the executable code of the native method in the library * .so? (Android)

I'm doing reverse engineering of a mobile application for android and I had a question how to find the executable code of the native method in the library * .so. From the code of the code, the native ...
1
vote
1answer
4k views

Anti-tampering techniques in Android APK's

I'm reverse engineering an Android app, and it has some kind of anti-tamper protection. The problem is that I can't find it anywhere in the smali files. Even if I just re-sign the official APK that I ...
1
vote
2answers
174 views

How to find the version number of Android Ad libraries from reverse engineered apps?

I am analysing Android ad libraries. I have downloaded apps from Google play and used dex2jar and JDGUI to recover the Java code of the app. As expected a lot of apps use ad libraries (such ad Google ...
1
vote
2answers
858 views

Patch a Java class inside a jar using C# [closed]

Being a beginner in C# I wonder if it is possible to patch a .class file inside a .jar? Since jar files tend to act like "zip" files, the approach I think might work is to decompress the jar, patch ...
1
vote
1answer
441 views

Does proper/easy editor exist for .class java files?

As you see from the title my problem is editing .class files. I've been trying to compile .java to .class, but no luck! I'm getting strange errors. (Using DJ Java compiler/decompiler). My question is ...
1
vote
1answer
117 views

How to decompile heavily obfuscated classes mixed with Arabic/Chinese/Korean characters?

I recently downloaded a jar file and was curious to see if it was malicious, so I ran it through FernFlower and it wasn't able to deobfuscate it. When I unzipped the jar, I looked inside it and saw ...
1
vote
1answer
57 views

Accessing Call String of CALLOTHER Pcode Instruction via Java API?

Is there a way to access the call string of a CALLOTHER Pcode instruction when iterating over the Pcode in Java? The listing below shows an example of what I mean: 048 ...
1
vote
1answer
169 views

Calling a method of a Java object passed as argument to hooked function in Frida

I am trying to obtain the SecretKey passed to the decryptAesCipherText function. I hooked the function in Frida to try to print out the arguments when the method is called but since SecretKey is an ...
1
vote
2answers
213 views

Working with strong obfuscated Java

I've got a jar file, that is strong obfuscated. When I tried to put it into decompilers such as bytecode-viewer and luyten I seen many lines of traps and Chinese letters. I tried to deobfuscate it ...
1
vote
1answer
176 views

Reverse Engineering Java - Deobfuscating symbols

I'm new to Java and working on cleaning up a fairly large Java .jar sample where the obfuscator has renamed symbols into invalid names. For example: import org.lib.00.0.2; public final class 90 ...
1
vote
1answer
550 views

Reversing a Java digest function, with known public key and source code

A Java application verifies that an XML string that came from a clearnet server (no SSL) has not been tampered, using a message digest. It does so with a public key stored locally, accessed with the ...
1
vote
1answer
183 views

Reverse Engineering Flat Data File

I'm writing a piece of software that will take positional data from a piece of software called Pyware and put it into a GUI so I can visualize the coordinates and assign each coordinate a color. ...
1
vote
2answers
309 views

Reverse engineer a ARM-v7a function

Currently I am trying to reverse engineer the following armeabi-v7a function: I already wrote the following Java code: static double getFunc(double param0, double param1, double param2, double ...
1
vote
1answer
984 views

explain java bytecode

I saw java bytecode that need to compare to var, if they equal return true, else ..... if(var1==var2) return true; else { ...} on bytecode aload 1 aload 2 if_acmpne 6 iconst 1 ireturn I ...
1
vote
1answer
114 views

Android Intercepts for log the Funtion Calls to javax

Im reversing an apk that uses a native library .so to make calls to some Java methods thru reflexion I know by analysing the app that exist the followings calls: import javax.crypto.Mac; import ...
1
vote
1answer
2k views

How to combine 2 dex files into a single dex file for more complete disassembly by IDA Pro

Most apk files, when disassembled, produces 2 dex files instead of one. However since IDA Pro only allows the loading of one dex file at a time,it may result in missing information as a result of the ...
1
vote
2answers
3k views

Renaming entitites in obfuscated java bytecode

I'm working with an SDK for developing apps that's distributed as an AAR, and has been obfuscated with ProGuard. I'm just trying to reverse a few things it does. The classes, methods and variables ...
1
vote
1answer
2k views

Decompiled Java classes span multiple files

I've been playing around with decompiling Android apps from dex/jar files to java source code, with varying success. I've tried the usual suspects - JD-GUI, procyon, cfr, krakatau and jadx. I'm having ...
1
vote
1answer
2k views

R.java to xml file

How does R.java work? In a compiled .apk file, does it contain all constants from the XML files prior to compilation? I've decompiled an app using several Java RE tools, and used apktool to extract ...
1
vote
0answers
84 views

JEB Decompiler - Signature recognition engine

I've been playing around with the JEB decompiler and Android reverse engineering suite. One interesting feature they have is deobfuscation by library code matching in which 3rd party libraries out ...
1
vote
0answers
245 views

Some obstacles in reversing a JNI Native library

I deleted my last question (it was not still answered and none's effort was wasted) as I got back and thought to re-read JNI documentation, to find I misinterpreted some bits. Things are now clearer ...
1
vote
1answer
84 views

DEX file referenced type is not defined in file

I am analyzing a dex file and to ease with reverse engineering, I converted it a jar so it could be decompiled. In the file android/support/v17/leanback/media/MediaControllerGlue.class, the following ...
1
vote
0answers
1k views

Obfuscated Config Files: EHI Files for HTTP Injector

So I have an ehi file, which is a configuration file for an Android App called HTTP Injector. Of course when I try to see it as a simple text, I just get random characters. What tool could I use to ...
1
vote
0answers
160 views

Calling functions of a shared object (.so) extracted from an APK

Decompiling a regular Android application I noticed that its code uses some native functions. So, unpacking the (.apk) file I found the usual "lib" folder and under that a series of folders for ...
1
vote
0answers
505 views

Debugging Ghidra Script [closed]

I want to write a new script for ghidra to extract variuous information from the binary and store it to an external file for future management. I need to perform the analyisis with Ghidra Headless in ...
1
vote
0answers
805 views

decompiled android application with only one class [DexProtector]

I'm trying to reverse engineering an android app and it's mostly for an experiment but I have a problem that I can't find a solution or even what is the problem. I decompiled an app with JADX-gui and ...
1
vote
0answers
154 views

Common practices for 'hiding' a class within an Android application?

I've recently gotten into Android reverse engineering, and I've been messing around with some apps lately for education/research purposes to see how some things are done with private (mobile) APIs. ...
1
vote
0answers
115 views

Intercept traffic from exe to my Java server

In Windows 10, I can easily intercept traffic of an application using Proxifier and route it to Charles proxy, so that I can inspect and edit the data. exe -> Proxifier (Socks proxy to localhost:...
1
vote
0answers
92 views

Is there any way to get value from bytecode under JDWP without access to source?

When I debug android app through jdwp using jdb, it seems I can't get anything from the bytecode level. I know normally it's fine as long as we have the source line info and use a decompiler, but the ...
1
vote
0answers
392 views

Java Bytecode edit

Hi, I would like to edit one compiled java class file & like to insert & edit a couple of lines. I'm trying to make a patch for a software & when I compare this two file the only change I ...