Welcome Guest ( Log In | Register )

Bump TopicReply to this topicRSS feed Start new topic Start Poll

Outline · [ Standard ] · Linear+

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

test.php
post Aug 2 2017, 10:28 AM, updated 4 months ago

Getting Started
**
Group: Junior Member
Posts: 53

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!
test.php
post Aug 3 2017, 10:29 AM

Getting Started
**
Group: Junior Member
Posts: 53

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

Casual
***
Group: Junior Member
Posts: 462

Joined: Jul 2008
From: Just behide you !

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

Getting Started
**
Group: Junior Member
Posts: 53

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

Casual
***
Group: Junior Member
Posts: 462

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
RaymondReddington
post Aug 17 2017, 11:42 AM

Getting Started
**
Group: Junior Member
Posts: 91

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.
test.php
post Aug 18 2017, 11:27 AM

Getting Started
**
Group: Junior Member
Posts: 53

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?
test.php
post Aug 18 2017, 11:34 AM

Getting Started
**
Group: Junior Member
Posts: 53

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)?







RaymondReddington
post Aug 18 2017, 12:44 PM

Getting Started
**
Group: Junior Member
Posts: 91

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
**
Group: Junior Member
Posts: 95

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

Getting Started
**
Group: Junior Member
Posts: 53

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
**
Group: Junior Member
Posts: 95

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
****
Group: Senior Member
Posts: 507

Joined: Nov 2008


I also want know about this.

Bump TopicReply to this topicTopic OptionsStart new topic
 

Switch to:
| Lo-Fi Version
0.0689sec    4.53    5 queries    GZIP Disabled
Time is now: 22nd November 2017 - 01:23 PM