Skip to main content

Posts

Solving PIVAA part 1 : sql injection in android ٩(^ᴗ^)۶ (day 25)

Purposefully Insecure and Vulnerable Android Application (PIVAA) is an updated version of Damn Insecure Vulnerable Application and when I look at this application I think its really cool and I want to try to test it Sauce link: https://github.com/HTBridge/pivaa But in this post, we are going to focus on the database security and best practice part of the application. 1st challenge: Cleartext SQLite database The mobile application uses an unencrypted SQLite database. This database can be accessed by an attacker with physical access to the mobile device or a malicious application with root access to the device. The application should not store sensitive information in clear text. before we move on to the actual testing, I just want to say that I think this is actually rather a best practice not a vulnerability in android penetration testing. to solve this problem, first, I try to do some simple static analysis to find which class that contains string "SQLiteDatabase...

CTF Reverse Engineering (ó﹏ò。) (day 24)

It's been a few day since I try to learn reverse engineering again, so to put up the test for what i have been learn, I try to solve a ctf challenge Link: https://drive.google.com/open?id=1ikHJC97UzG26nYV8Lay4zFR-5FXHJLk6 the executable is an ELF executable with 32 bit architecture. So this is just to show what we are going up to. Now, load our executable to our radare tools, type: ~# r2 -A nix_5744af788e6cbdb29bb41e8b0e5f3cd5 for the radare2 analyse the executable for interesting function and, type: <r2 shell> afl for listing the function inside the executable As we can see from the result there are two function that caught our eyes, "sym.comp_key" and "main" ok before we deep dive to analyze the binary, for me i found three way to solve the CTF, if you are lazy just go to the end of this post to get the quickest method for obtaining the flag. Lets go to the main function: ~# s main (switch to main function) ~# VV (to chan...

Memory Manipulation using radare2 ( ͠° ͟ʖ ͡°) (day 23)

In this post, I will show you how to do some tinkering inside of memory in Linux binary. Before i start i just want to remind you this material is based on: PDF: https://www.gitbook.com/download/pdf/book/monosource/radare2-explorations Exercise: https://github.com/monosource/radare2-explorations-binaries (clone this repository to your local directory)   we are going to use the second binary name "xor". Now, once you clone the repository and inside the "tut2-memory" you need to build the executable using ~# make after that, the executable will be available inside the directory. Try to run it and as you can see the executable requires a password, we are going to find out what is the password. to examine the executable we need to open the binary using "debugging mode" in radare2. Debugging mode enables us to place a breakpoint and read/write memory, this is very effective when we want to dig deep in on how the executable is behaved. ...

OWASP crackme write up version 2 level 2 !(•̀ᴗ•́)و ̑̑ (day 24)

In this post, I'm going to show you how to solve the OWASP crackme challenge by patching the binary using radare2 and debugging it with gdbserver to get the secret string. To all of you who don't know about patching a binary, I have a post that talks about specifically about the overview of this technique. Link: https://court-of-testing-analysing.blogspot.com/2019/10/patching-binary-with-radare2-day-22.html Background: what is gdb? according to access.redhat.com " The GNU Debugger, commonly abbreviated as GDB , is a command-line tool that can be used to debug programs written in various programming languages. It allows you to inspect memory within the code being debugged, control the execution state of the code, detect the execution of particular sections of code, and much more. " why should we need to use GDB inside android? although Java or kotlin is a pretty popular programming language used in the android application. But both of the languages are not ...