Wednesday, April 20, 2011

Paros Proxy: An application layer data interceptor

This post is about using Paros Proxy, an application layer proxy server which intercepts all the application layer traffic from a specified port and allows you to modify the content going and coming form different HTTP servers. It is a very useful tool for debuggers designing dynamic websites since it can be used to understand the data being passed. It is a much better tool than Wireshark if complete information about network packets is not needed. Paros is written in java (therefore can be easily used on any OS) and is simple to use. This article will talk about how to install and run Paros with a simple configuration change. Also an example of the potential use of Paros is demonstrated.

You can download Paros from here. Please note that Java Run Time Environment needs to be installed.

Basic Usage


Go to options menu and click on local proxy, specify the address as localhost and a port preferably larger than 1024 (else you will need to start the application with admin privileges). Now point your browser http,https proxy to localhost and port 8080.



Try to browse a website and check HTTP headers in Paros. Request tab displays all the HTTP requests made by the client while response tab displays all the corresponding responses. The more interesting feature is the trap tab which can intercept and 'hold' a page before passing it to a browser. So you can trap a request or a response page and make modifications, drop it or pass it by clicking on the continue button.

You can even send your own http requests by going to tools-->manual request editor. There are some other nice features such as encoding/decoding in base64 scheme tool. (spider) and session tracking






In HTTP there is a field user-agent which contains information about client's browser. Paros modifies this header with its own name. Some sites can flag this as as a request generated by a bot and may not let you enter the site. To prevent this you can change the parameters to run Paros with.  Right click on the Paros icon and click on properties. Append '-jar paros.jar -nouseragent' to Target.





Changing port:

Paros can be set up to listen at whichever port you want it to. The corresponding settings can be found at Tools-->Options-->Local Proxy



Finally here is a small video illustrating the potential use of Paros.





Important Links:
1. Download Paros Proxy
2. Download Java Runtime Environment (JRE)

Monday, February 28, 2011

Computer Foresnic tool: MDD & vulnerability in Putty

MDD also known as Memory Dump by ManTech is a forensic software tool used to take a snapshot or an image of a computer's memory. Nowadays with increasing loopholes in a system, software memory leaks have become common, programmers forget to deallocate dynamic memory or ensure that sensitive data is not left behind when a software exists. Since movement of data to and fro a regular memory is very high it becomes very difficult to store and map an accurate description of it. Fortunately MDD is a tool which is able to create a somewhat stable image. Tools such as MDD have very interesting applications.You will be amazed to see the amount of information which can be extracted from a memory dump. 

Installing and running MDD:


You can download MDD from this link. To run MDD open cmd in Windows and using administrator privileges and type the command
mdd.exe -o
Please make sure that your drive has sufficient drive space. Right now I will treat this 'dump' as a normal text file and therefore to read the output file you need a special kind of a text editor since normal text editors such as notepad/++ simply refuse to open such large files. I searched on the net and found LTF(large text file) viewer 5.2 which claims to open huge files within seconds. The memory dump, you will find, is full of interesting stuff. Although most of the file will appear as gibberish words there will be lines in clear ascii and you will be amazed to see the contents. I have provided a screenshot of my PCs memory dump.

Unfortunately searching is very slow in LTF and therefore I had to resort to good ol' cmd and command line interface to search. Use the find utility to search for keywords.

Usage:


find "[string]" [filename]

You will be amazed to see the amount of information available in the output file..
Hint: Try searching for some interesting words like password, username or your name.




Infact Putty has a small vulnerability which can be exploited using this tool. More about it in some future article.

 

Important Links:

Download MDD