Welcome Guest ( Log In | Register )

Outline · [ Standard ] · Linear+

 decompile APK C++ android studio, Pro decompiler are most welcome

views
     
TStest.php
post Aug 2 2017, 10:28 AM, updated 7y ago

Getting Started
**
Junior Member
55 posts

Joined: Oct 2016
From: Programming for beginner island
I made a simple APK project that include c++ support

i put a, std::string hello = "xxxxxx";

is it possible to decode the APK to get, std::string hello = " <this part> "



attached is my .apk , apk.rar , apk decompiler online

https://files.fm/u/vddyhhzj



please mention the "<This part>" in comments if manage decode. TQ!
TStest.php
post Aug 3 2017, 10:29 AM

Getting Started
**
Junior Member
55 posts

Joined: Oct 2016
From: Programming for beginner island
anyluck?
xDragonZ
post Aug 13 2017, 01:29 AM

On my way
****
Senior Member
553 posts

Joined: Jul 2008
From: Just behide you !

Its not that "pizza hut 1234567890 @@@@@" right?
TStest.php
post Aug 14 2017, 03:19 PM

Getting Started
**
Junior Member
55 posts

Joined: Oct 2016
From: Programming for beginner island
QUOTE(xDragonZ @ Aug 13 2017, 01:29 AM)
Its not that "pizza hut 1234567890 @@@@@" right?
*
yes is that. but did u install apk to get that. or u use some decompiler program? if yes what did u use. ty!
xDragonZ
post Aug 15 2017, 12:15 AM

On my way
****
Senior Member
553 posts

Joined: Jul 2008
From: Just behide you !

QUOTE(test.php @ Aug 14 2017, 03:19 PM)
yes is that. but did u install apk to get that. or u use some decompiler program? if yes what did u use. ty!
*
Just open the .so file with hex editor or any text editor
SUSRaymondReddington
post Aug 17 2017, 11:42 AM

Getting Started
**
Junior Member
91 posts

Joined: Apr 2016
Next time just use a base64 decode function on a text string which you encode first using any online website base64 encoder.

This is the fastest/easiest way to hide text strings in your binary.
TStest.php
post Aug 18 2017, 11:27 AM

Getting Started
**
Junior Member
55 posts

Joined: Oct 2016
From: Programming for beginner island
QUOTE(xDragonZ @ Aug 15 2017, 12:15 AM)
Just open the .so file with hex editor or any text editor
*
weird. i tried all the .so file didnt see it. may i ask which .so u open at which path location?
TStest.php
post Aug 18 2017, 11:34 AM

Getting Started
**
Junior Member
55 posts

Joined: Oct 2016
From: Programming for beginner island
QUOTE(RaymondReddington @ Aug 17 2017, 11:42 AM)
Next time just use a base64 decode function on a text string which you encode first using any online website base64 encoder.

This is the fastest/easiest way to hide text strings in your binary.
*
correct me if im wrong,

so take the string. encode it on the website base 64 encoder (utf-8, ASCll, ect ect) then put back into the program(source code)?







SUSRaymondReddington
post Aug 18 2017, 12:44 PM

Getting Started
**
Junior Member
91 posts

Joined: Apr 2016
QUOTE(test.php @ Aug 18 2017, 11:34 AM)
correct me if im wrong,

so take the string. encode it on the website base 64 encoder (utf-8, ASCll, ect ect) then put back into the program(source code)?
*
Yes, use this class to decode the string.

https://developer.android.com/reference/jav...64.Decoder.html


RNM
post Aug 19 2017, 11:01 AM

Getting Started
**
Junior Member
187 posts

Joined: Jul 2017
Base64 is reversible. Try to add XOR, make it difficult to rce
TStest.php
post Aug 22 2017, 09:46 AM

Getting Started
**
Junior Member
55 posts

Joined: Oct 2016
From: Programming for beginner island
QUOTE(RNM @ Aug 19 2017, 11:01 AM)
Base64 is reversible.  Try to add XOR,  make it difficult to rce
*
hmm i dont really understand. any example?

i check google i got this. is this what u mean?

import sun.misc.BASE64Decoder;
import sun.misc.BASE64Encoder;
import java.io.IOException;

public class StringXORer {

public String encode(String s, String key) {
return base64Encode(xorWithKey(s.getBytes(), key.getBytes()));
}

public String decode(String s, String key) {
return new String(xorWithKey(base64Decode(s), key.getBytes()));
}

private byte[] xorWithKey(byte[] a, byte[] key) {
byte[] out = new byte[a.length];
for (int i = 0; i < a.length; i++) {
out[i] = (byte) (a[i] ^ key[i%key.length]);
}
return out;
}

private byte[] base64Decode(String s) {
try {
BASE64Decoder d = new BASE64Decoder();
return d.decodeBuffer(s);
} catch (IOException e) {throw new RuntimeException(e);}
}

private String base64Encode(byte[] bytes) {
BASE64Encoder enc = new BASE64Encoder();
return enc.encode(bytes).replaceAll("\\s", "");

}
}

RNM
post Aug 22 2017, 11:36 AM

Getting Started
**
Junior Member
187 posts

Joined: Jul 2017
QUOTE(test.php @ Aug 22 2017, 09:46 AM)
hmm i dont really understand. any example?

i check google i got this. is this what u mean?

import sun.misc.BASE64Decoder;
import sun.misc.BASE64Encoder;
import java.io.IOException;

public class StringXORer {

    public String encode(String s, String key) {
        return base64Encode(xorWithKey(s.getBytes(), key.getBytes()));
    }

    public String decode(String s, String key) {
        return new String(xorWithKey(base64Decode(s), key.getBytes()));
    }

    private byte[] xorWithKey(byte[] a, byte[] key) {
        byte[] out = new byte[a.length];
        for (int i = 0; i < a.length; i++) {
            out[i] = (byte) (a[i] ^ key[i%key.length]);
        }
        return out;
    }

    private byte[] base64Decode(String s) {
        try {
            BASE64Decoder d = new BASE64Decoder();
            return d.decodeBuffer(s);
        } catch (IOException e) {throw new RuntimeException(e);}
    }

    private String base64Encode(byte[] bytes) {
        BASE64Encoder enc = new BASE64Encoder();
        return enc.encode(bytes).replaceAll("\\s", "");

    }
}
*
Yes, use the XOR.

kazarboys
post Aug 23 2017, 12:37 PM

On my way
****
Senior Member
537 posts

Joined: Nov 2008


I also want know about this.

 

Change to:
| Lo-Fi Version
0.0126sec    0.63    5 queries    GZIP Disabled
Time is now: 29th March 2024 - 10:14 AM