Skip to main content

Posts

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...

Closing PPTP on 1723

To know about PPTP go to : http://en.wikipedia.org/wiki/Point-to-Point_Tunneling_Protocol  Basically PPTP is used as method to connect and implement VPN (Virtual Private Networks). There have been other protocols as well for example, IPSec. PPTP has been often criticized for its well known vulnerabilities, like weak encryption etc. But I am not concerned with all these, my challenge was to explore the ways to close the PPTP(Port 1723) on a machine (Windows XP). I did a lot of googling around on the web for hours but was unable to find any satisfying solution. Most results were related to how to setup a VPN connection using PPTP on a Windows client machine. But my question was how to close port 1723 (PPTP), if already your machine is acting as VPN server? So, I started other way round. I setup my machine as a VPN server. Steps are very simple: 1. Go to Network connections 2. Click on "Create a new connection" wizard 3. Select "Set up an advanced connection...

Breaking Excel password protection

If you came across an excel sheet asking for password for allowing to make any changes into it, you may want to unprotect it. All we need to do is to edit the xml file which comes intrinsically packaged with Excel 2007 or 2010. But what about Excel 2003? For that, open the Excel 2003 file within Excel 2007, save it as xlsx file. So, keep in mind all the Excel files below 2007 version, you need to convert them as Excel 2007 with extension .xlsx. Now here are the steps for doing that: 1. Open the Excel 2003 file (e.g. Secret.xlsx) and save it as .xlsx (Excel 2007) format. If you already have Excel 2007 file, then no need for any conversion. 2. Now change the extension of the above file to .zip and extract the zipped file. Browse through the file in the extracted folder and go to: <LocalPath>\Secret\xl\worksheets.   3. Now open the sheet/ sheets you want to remove protection in any xml editor. Look for keywords such as 'sheetProtection' or 'workbo...