applejack Posted April 26, 2023 Share Posted April 26, 2023 (edited) Sorry If this is off-topic, but I'm currently in search of somebody who can assist me in reverse engineering an Android APK. The primary goal is to rewrite an AES encryption function. It involves reverse engineering an APK (original app and decompiled code would be provided). These are the headers that I need a script to generate them locally: X-Book-Security-Token: 4d6a55774e5463304d7a45344e6a6730 X-Book-Identifier-Type: MZyGb/ylkFYYpEqgx5HAIw== X-Book-User-Identifier: EMBEQb01fnjUF9QzhSHU1TfdYXguyD2YPY8wmDlpZRo= The headers are somehow associated with each other, I suspect it has an ID or something appended to it during generation. I suspect the functions below handle the encryption process: public final String mo178266b(String str, String str2, String str3, String str4) { C75446pfv.m13004a((Object) str, ""); C75446pfv.m13004a((Object) str2, ""); C75446pfv.m13004a((Object) str3, ""); C75446pfv.m13004a((Object) str4, ""); try { SecretKeyFactory instance = SecretKeyFactory.getInstance(str4); char[] charArray = str3.toCharArray(); C75446pfv.m13022e((Object) charArray, ""); byte[] bytes = m187477d(m187475b(str2)).getBytes(pxn.f11244g); C75446pfv.m13022e((Object) bytes, ""); SecretKeySpec secretKeySpec = new SecretKeySpec(instance.generateSecret(new PBEKeySpec(charArray, bytes, 4096, 128)).getEncoded(), "AES"); byte[] decode = Base64.decode(str, 2); Cipher instance2 = Cipher.getInstance("AES/CBC/PKCS5Padding"); instance2.init(2, secretKeySpec, m187476c(m187475b(str2))); byte[] doFinal = instance2.doFinal(decode); C75446pfv.m13022e((Object) doFinal, ""); return new String(doFinal, pxn.f11244g); } catch (Exception e) { e.printStackTrace(); return ""; } } /* renamed from: a */ public final String mo178264a(byte[] bArr) { C75446pfv.m13004a((Object) bArr, ""); StringBuilder sb = new StringBuilder(); for (byte b : bArr) { String hexString = Integer.toHexString(b & UnsignedBytes.MAX_VALUE); C75446pfv.m13022e((Object) hexString, ""); if (hexString.length() == 1) { sb.append('0'); } sb.append(hexString); } String sb2 = sb.toString(); C75446pfv.m13022e((Object) sb2, ""); return sb2; } public final char[] mo178270d(String str, String str2, String str3, String str4) { C75446pfv.m13004a((Object) str, ""); C75446pfv.m13004a((Object) str2, ""); C75446pfv.m13004a((Object) str3, ""); C75446pfv.m13004a((Object) str4, ""); try { String c = mo178268c(str, str4, str2, str3); byte[] bytes = (str4 + "|" + c).getBytes(pxn.f11244g); C75446pfv.m13022e((Object) bytes, ""); String encodeToString = Base64.encodeToString(bytes, 2); C75446pfv.m13022e((Object) encodeToString, ""); char[] charArray = encodeToString.toCharArray(); C75446pfv.m13022e((Object) charArray, ""); return charArray; } catch (Exception e) { e.printStackTrace(); char[] charArray2 = "".toCharArray(); C75446pfv.m13022e((Object) charArray2, ""); return charArray2; } } The payment for this project is negotiable and will be determined based on the complexity of the task. If you have the expertise and are interested in working on this project, please feel free to reach out by commenting here or sending me a private message. Edited April 26, 2023 by applejack Link to comment Share on other sites More sharing options...
Sh4DoVV Posted April 27, 2023 Share Posted April 27, 2023 Hi Check your Message Inbox Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now