Skip to main content

Posts

SQL Injection in search field

Earlier I had written about performing SQL injection in search field and how to do a DoS attack and privilege escalation using 'Like' operators. Now another SQLi exploitation I came across recently. That too in the search field. This becomes important as lots of people don't pay much attention on the search forms/ fields in the application. My aim is to show that a search form can also be exploited with SQL Injection. The following queries are based on a real world exploitation. The steps and data are for just illustration purpose only. Suppose, the search form provides the details of users who have accessed the application some time and their login time details etc, we just need to provide their name in the search box provided. All the data were being going as Post request. So, to just fingerprint the database, I provide, 'nil'+'esh' in the search field and it successfully gives me the results. That means the database behind the application is conca...

Android Penetration Testing

Published in Hakin9 Extra Magazine.  " In this article we’ll discuss about steps involved in performing security assessment of an Android based application. We will see use of various tools and methodologies. There are various other methods and tools but steps are very common in nature..." It can be downloaded here .

Python script to mail merge with CC

Limitation of normal mail merge is that you can't insert Cc/Bcc fields into it. I have tried to overcome this by writing a small script. The script takes the recipients in To and recipients in Cc fields from an excel sheet . It reads the sheet one by one from both columns and send them emails reading on the contents from an external fields. Yes, it's simple, but what I was trying earlier was something else. I was trying to send 'personalized' emails with 'Cc' field in the mail. But the 'personalized' part is very difficult to implement, as I was not able to write the variable data to the body of the email. So, settled down with this fixed body contents being read from external file. Let me know if anybody is aware of how to send personalized body contents to respective users. I mean the some fields in the body of the mail should on user basis. In this case the body of the mail is general and fixed in nature. Code to read user lists from excel and s...

Nipper Download

The great open source Nipper tool, used for auditing infrastructure and network devices, has now become commercial. So visiting http://sourceforge.net/projects/nipper/ would give you the latest version (1.0) which is of little help, as it contains the stripped version. So, no use of it. Fortunately, my friends on Null suggested me few links from where still the older version (0.11-12) could be downloaded. One of such link is: http://tools.l0t3k.net/NETWORKutils/ , you can download  nipper-inone-0.12.6.zip. It's an exe and you can run it directly. Alternate method: Upgrade to BackTrack5 R2. The latest version includes the Nipper-ng tool. To update to the latest version: http://www.backtrack-linux.org/backtrack/upgrading-to-backtrack-5-r2/  Also, once upgraded you need to install Nipper on the new kernel: apt-get install nipper-ng Screenshot from BT5 R2:

Andorid Security Assessment

Recently I got a chance to do security assessment of an Android-based app. As the Internet is full of the methods of doing Android assessment, here I shall try to list down major steps to perform it. For Intercepting traffic: 1. Download the Android SDK tool from http://developer.android.com/sdk/index.html. It includes SDK and AVD (Android Virtual Device). They are necessary for creating the VM and installing emulator. 2. Once, emulator started, install the android app's .apk file on it.  3. Configure local web proxies, eg Burp, Paros to intercept the traffic by modifying the Internet setting in Android by Settings->Wirless & Network Settings-> Mobile Networks -> Access Point Names-> Proxy Name(PC's IP address) & Port. 4. Now we may perform the assessment as we do for normal web application. Code review of the app: 1. Rename the .apk file to .zip file and extract it. You'll find classes.dex file which can be converted into a jar file us...

My Article on Disk Forensics

Published in Hakin9 Extra Magazine. "Complete description of tools and their uses are out of scope of this article, we’ll be just using them for our forensics, as you may get a fair idea about them during our process. We shall be using BackTrack(BT) for our analysis. You could pretty much use any distro available as all have mostly common necessary tools. You could use any normal Linux _avors such as Fedora, RedHat, Ubuntu as well, but the advantage of using distros like BT is that they already have a fair collection of these tools, otherwise you may need to install them." Can be downloaded here .

Bypassing XSS filter in alert msg box

Chintan, Ronnie and I were discussing about one issue regarding how to bypass a specific XSS filter in alert message box. We were unable to breakout. Chintan's problem statement was: I am running into one issue with XSS and was interested if there is any way I can bypass it. Following the response code where user supplied input is embedded. Input is taken via a text box. <script type="text/javascript">alert(' No Information is found for the card 1 ');script> User supplied input 1 is highlighted in red. I am trying to break out of this alert box, however when a single quote is given as input, the output is escaped using a backslash. It is as follows: Input:      1' Output: < script type = "text/javascript" > alert(' No Information is found for the card 1\'' ); script > I am using IE 8 and tried using back ticks just to check if I can get around this limitation, however it did not work. Any sugg...