Skip to main content

Posts

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

AirPcap on BackTrack5

AirPcap Nx wireless adapter is compatible with BT5. I have heard about the difficulties of recognizing and connecting the AirPcap adapter with BT. But surprisingly for me, the driver is already loaded in BT5! So just connect the device and enjoy! carl9170 is the name of the driver already loaded into BT5. Starting the card into monitor mode: The monitor mode mon0 started: Enjoy!

Secure Forgot Password Implemantion

I got a message from Mae Bualat about secure implementation of forgot password mechanism. Although, his way also sounded secure to me, I suggested him more alternatives. It's always arguable the approaches, but these are my personal arguments as per my limited knowledge. Following is the communication between us: Hi Mr. Nilesh Kumar, I've come across your blog while looking for some references on the web for a secured password recovery scheme. I suppose, as a security specialist, you may have inputs to help me work on it. Am looking for a secure password recovery implementation. The process that I am looking into is this: user will need to supply email address used on account registration then birthday, then user will need to supply new password, then the system will send a verification link to his registered email to finalize and confirm the process.But aside from this, am still currently looking for some ways to securely implement this process. Any idea will be...

MHTML files

Today my colleague Surendra had a query regarding a weird popup coming up while he was trying to access a website. Although even, I was not very familiar with the kind of message he was getting. All we wanted to know, if it's really anything malicious! He was trying to access some page, and the website was making some weird request to the webserver in order to load some object (here it was a calender) from the server: mhtml:http://abc.com/resources/Calnder.mht The warning message was like this: Even I had not noticed like anything in the past, I did a little research on the topic. The browser was trying to load some MHTML page.MHTML is simply a MIME HTML format, used to combine all the external resources, which are generally loaded as external link, with HTML code into a single file. Generally this file has extension as .mht. So any .mht file contains mix of HTML code and other objects such as, Flash, images, applets, audio files etc. The content of .mht ...