Offensive and defensive world mobile easy-apk

The first apk question I did.
Source of the topic: Offensive and defensive world. After
getting the apk file, decompress it. If there is no lib, analyze the Java source code

Insert picture description here
I found MainActivity, which looks like base64, but this new makes people feel that it doesn't look right. After trying it, I found that it is garbled, and it is not the original base64 algorithm.
Insert picture description here
Let’s analyze a wave of base64new code. I don’t know Java very well. After reading it for a while, it seems to have changed the base64 table. Then I wrote the code myself and decrypted it to get the flag.
Insert picture description here

table2=[118, 119, 120, 114, 115, 116, 117, 111, 112, 113, 51, 52, 53, 54, 55, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 121, 122, 48, 49, 50, 80, 81, 82, 83, 84, 75, 76, 77, 78, 79, 90, 97, 98, 99, 100, 85, 86, 87, 88, 89, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 56, 57, 43, 47]
table1='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
b='5rFf7E2K6rqN7Hpiyush7E6S5fJg6rsi5NBf6NGT5rs'
j=0
base_str=''
while j<=42:
    i=0
    while i<=63:
        if table2[i]==ord(b[j]):
            base_str+=table1[i]
            break
        i=i+1
    j=j+1
print(base_str)

Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_45677731/article/details/104420449