CyberTalents National CTF 2020 - RE Challenges Writeup

CyberTalents National CTF 2020 - RE Challenges Writeup

Featured image

RE Challenge 1 - Isolation

isolation

Description: Developer think That the real Hacker Does not need any buttons to get the flag.

so lets open bytecode viewer and see the decompiled version of the app to see the main activity.

From

To

and compile it again so after running the new version we will see the flag.

Another Solution

my friend told me that we can run command from edb shell to call any activity like SecretBox which will give us the flag.

am start -n yourpackagename/.activityname

am start -n com.cybertalents.otherside/.SecretBox

RE Challenge 2 - Silver ASM

Description: the flag is the parameter of the function int he following format (“FLAG{0_%X_0}” % parmter)


mov     DWORD PTR [rbp-4], edi
mov     edx, DWORD PTR [rbp-4]

moves edi to edx.

mov     eax, edx
add     eax, eax
add     eax, edx

moves edx to eax and do 2 add operations which is equal to eax=3*eax.

sal     eax, 2

which is left shifting eax by to bits or multiplying eax by 4, eax = 4*eax.

sub     eax, 3571200
cmp     eax, 0


fx:
        push    rbp
        mov     rbp, rsp
        mov     DWORD PTR [rbp-4], edi
        mov     edx, DWORD PTR [rbp-4]
        mov     eax, edx
        add     eax, eax
        add     eax, edx
        sal     eax, 2
        sub     eax, 3571200
        cmp     eax, 0
        setbe   al
        movzx   eax, al
        pop     rbp
        ret