<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1486421999184843428</id><updated>2012-02-16T20:02:57.094-08:00</updated><category term='First timer'/><title type='text'>Gunwant Singh</title><subtitle type='html'>There are no secrets better kept than the secrets that everybody guesses. ~ George Bernard Shaw</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://gunwantsingh.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1486421999184843428/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://gunwantsingh.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Gunwant Singh</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>15</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1486421999184843428.post-8489303607668839451</id><published>2010-06-19T09:08:00.000-07:00</published><updated>2010-06-19T07:13:51.695-07:00</updated><title type='text'>Securing Web.Config through Encryption</title><content type='html'>&lt;span style="font-family:verdana;font-size:100%;"&gt;&lt;br /&gt;This write-up is effectual for ASP.NET 2.0.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div style="TEXT-ALIGN: justify;font-family:verdana;" &gt;&lt;span style="font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="TEXT-ALIGN: justify;font-family:verdana;" &gt;&lt;span style="font-size:100%;"&gt;The Web.config is a .NET configuration file which contains sensitive configuration data like connection strings, SMTP information, user credentials, etc.&lt;/span&gt;&lt;span style="font-size:100%;"&gt; If you try to access Web.config directly from the web browser, you will get the error message “This type of page is not served”. The ASP.NET Engine does not allow the end-user to access Web.config, which is a good security feature in the .NET Framework. However, if the attacker has already compromised the file system of the server, he can access Web.config with no trouble . Therefore, it is highly advocated to encrypt sensitive areas of Web.config. The idea is if the hacker possesses your application's Web.config file, he should not be able to de-scramble the encrypted sections and when an ASP.NET page on the web server requests information from the encrypted configuration file, the data must be decrypted to be used legitimately (and this happens without you needing to write any code in your application).&lt;br /&gt;&lt;/div&gt;&lt;/span&gt;&lt;span style="font-family:verdana;font-size:100%;"&gt;&lt;br /&gt;There are two ways to encrypt Web.config:&lt;br /&gt;&lt;br /&gt;- Programmatically&lt;br /&gt;- Manually using the aspnet_regiis.exe command-line utility&lt;br /&gt;&lt;br /&gt;There are few things to keep in mind before you deal with encryption mechanisms for your Web.config file: &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="TEXT-ALIGN: justify;font-family:verdana;" &gt;&lt;span style="font-size:100%;"&gt;1. The portions in Web.config that should be encrypted include connections strings, appsettings, portions with SMTP server connection information, user credentials, etc.&lt;br /&gt;2. Encrypting and decrypting configuration sections carry a performance cost. Therefore, only encrypt the configuration sections that contain sensitive information. There's likely no need to encrypt, say, the 'compilation' section or the 'authorization' configuration sections.&lt;br /&gt;3. The programmatic encryption technique can not be used to encrypt the following configuration sections:&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family:verdana;font-size:100%;"&gt;&lt;br /&gt;- process model&lt;br /&gt;- runtime&lt;br /&gt;- mscorlib&lt;br /&gt;- startup&lt;br /&gt;- system.runtime.remoting&lt;br /&gt;- configProtectedData&lt;br /&gt;- satelliteassemblies&lt;br /&gt;- cryptographySettings&lt;br /&gt;- cryptoNameMapping&lt;br /&gt;- cryptoClasses&lt;br /&gt;&lt;br /&gt;In order to encrypt these configuration sections you must encrypt the value and store it in the registry. There's an aspnet_setreg.exe command-line tool to help along with this process (for ASP.NET v1.0).&lt;br /&gt;&lt;br /&gt;4. The .NET Framework 2.0 ships with two built-in providers for protecting configuration sections:&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="TEXT-ALIGN: justify;font-family:verdana;" &gt;&lt;span style="font-size:100%;"&gt;1) The Windows Data Protection API Provider (DataProtectionConfigurationProvider): This provider uses the built-in cryptography capabilities of Windows to encrypt and decrypt the configuration sections. By default this provider uses the machine's key. You can also use user keys, but that requires a bit more customization. Since the keys are machine- or userspecific, the DPAPI provider does not work in settings where you wan to deploy the same encrypted configuration file to multiple servers. For more info: http://msdn.microsoft.com/library/default.asp?url=/library/enus/&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;dnpag2/html/paght000005.asp.&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="TEXT-ALIGN: justify;font-family:verdana;" &gt;&lt;span style="font-size:100%;"&gt;2) RSA Protected Configuration Provider (RSAProtectedConfigurationProvider) : This provider uses RSA public key encryption to encrypt/decrypt the configuration sections. With this provider you need to create key containers that hold the public and private keys used for encrypting and decrypting the configuration information. You can use RSA in a multi-server scenario by creating exportable key containers. For more info: http://msdn.microsoft.com/library/default.asp?url=/library/enus/dnpag2/html/paght000006.asp.&lt;/span&gt;&lt;span style="font-size:100%;"&gt; &lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="TEXT-ALIGN: justify;font-family:verdana;" &gt;&lt;span style="font-size:100%;"&gt;5. In this article we'll only explore using the DPAPI provider using machine-level keys. This is, by far, the simplest approach since it doesn't require creating any keys or key containers, or ensuring access and permission rights to user-level keys. Of course, it has the downside that an encrypted configuration file can only be used on the web server that performed the encryption in the first place. Furthermore, using the machine key would allow the encrypted &lt;/span&gt;&lt;span style="font-size:100%;"&gt;text to be decrytable by any website on the web server.&lt;br /&gt;&lt;br /&gt;Now, let us explore the 2 methods to encrypt Web.config elements:&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="FONT-WEIGHT: bold"&gt;I. Programmatic way of encryption&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;1: Create a file test.aspx (for example).&lt;br /&gt;2: In the aspx file, create 2 buttons. One for encrypt and the other one for decrypt.&lt;br /&gt;3: In the code-behind page, create 2 functions. One for encrypt and the other one for decrypt.&lt;br /&gt;4: Create 2 more functions for each onClick event of the two buttons created earlier.&lt;br /&gt;5: Now there will be four functions. See the screenshots below.&lt;br /&gt;&lt;br /&gt;Web.config portion to encrypt: &lt;/span&gt;&lt;/div&gt;&lt;div style="TEXT-ALIGN: justify;font-family:verdana;" &gt;&lt;/div&gt;&lt;div style="TEXT-ALIGN: center;font-family:verdana;" &gt;&lt;span style="font-size:100%;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_5puM2DK_iDw/TATPlqNeAxI/AAAAAAAAAIU/pPvTQSJw4OA/s1600/1.bmp"&gt;&lt;img style="WIDTH: 400px; HEIGHT: 145px; CURSOR: pointer" id="BLOGGER_PHOTO_ID_5477731292682257170" border="0" alt="" src="http://3.bp.blogspot.com/_5puM2DK_iDw/TATPlqNeAxI/AAAAAAAAAIU/pPvTQSJw4OA/s400/1.bmp" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;/span&gt;&lt;div style="TEXT-ALIGN: left;font-family:verdana;" &gt;&lt;span style="font-size:100%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="TEXT-ALIGN: left;font-family:verdana;" &gt;&lt;span style="font-size:100%;"&gt;Test.aspx (ASP.NET Page):&lt;br /&gt;&lt;/div&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_5puM2DK_iDw/TATRTW3PCJI/AAAAAAAAAIk/X3HoBYBWm2s/s1600/2.bmp"&gt;&lt;img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 400px; DISPLAY: block; HEIGHT: 126px; CURSOR: pointer" id="BLOGGER_PHOTO_ID_5477733177274337426" border="0" alt="" src="http://3.bp.blogspot.com/_5puM2DK_iDw/TATRTW3PCJI/AAAAAAAAAIk/X3HoBYBWm2s/s400/2.bmp" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;Test.aspx.cs (Code-behind Page):&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_5puM2DK_iDw/TBzKiwqgvLI/AAAAAAAAAI0/Rwd8hx8LPaY/s1600/Test-aspx-cs.bmp"&gt;&lt;img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 370px; DISPLAY: block; HEIGHT: 450px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5484481144757992626" border="0" alt="" src="http://2.bp.blogspot.com/_5puM2DK_iDw/TBzKiwqgvLI/AAAAAAAAAI0/Rwd8hx8LPaY/s400/Test-aspx-cs.bmp" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-size:100%;"&gt;&lt;div style="TEXT-ALIGN: justify" face="verdana"&gt;6: Access test.aspx in the browser and click the 'Encrypt Web.config' button.&lt;br /&gt;7: View Web.config section. The encrypted portion will look as shown below.&lt;br /&gt;&lt;br /&gt;Encrypted Web.config portion:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_5puM2DK_iDw/TBzO0S3slqI/AAAAAAAAAI8/Ucg_EO5-MJ8/s1600/encrypted-strings.bmp"&gt;&lt;img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 400px; DISPLAY: block; HEIGHT: 345px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5484485844044388002" border="0" alt="" src="http://4.bp.blogspot.com/_5puM2DK_iDw/TBzO0S3slqI/AAAAAAAAAI8/Ucg_EO5-MJ8/s400/encrypted-strings.bmp" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="TEXT-ALIGN: justify; FONT-FAMILY: verdana"&gt;&lt;span style="FONT-WEIGHT: bold;font-size:100%;" &gt;Note:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;1. Similarly if you want to encrypt another portion of Web.config like the 'appsettings' portion, mention the value 'appsettings' when calling functions Protectsection() and Unprotectsection() in the examples above.&lt;br /&gt;2. After encryption, the file (test.aspx in this case) must not be accessible by the attacker. It is recommended to delete/move the file after use.&lt;br /&gt;3. Test all the steps on a dummy application before doing it on production/development environment.&lt;br /&gt;&lt;br /&gt;&lt;span style="FONT-WEIGHT: bold"&gt;II. Manual way of Encryption (Using aspnet_regiis.exe)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The utility aspnet_regiis.exe is an IIS registration tool primarily used to register an ASP.NET 2.0 application with the IIS web server. Additionally it can also be used to encrypt/decrypt configuration sections in Web.config. The location of the file is:&lt;br /&gt;&lt;br /&gt;C:\WINNT\Microsoft.NET\Framework\v2.0.50727\&lt;br /&gt;&lt;br /&gt;Note: The location may exist in the WINDOWS directory of the server.&lt;/div&gt;&lt;br /&gt;&lt;div style="TEXT-ALIGN: justify" face="verdana"&gt;The general syntax to &lt;span style="FONT-WEIGHT: bold"&gt;encrypt&lt;/span&gt; a configuration section is:&lt;br /&gt;aspnet_regiis -pef &lt;section&gt;&lt;physical&gt;-prov &lt;provider&gt;&lt;br /&gt;&lt;br /&gt;The general syntax to &lt;span style="FONT-WEIGHT: bold"&gt;decrypt&lt;/span&gt; a configuration section:&lt;br /&gt;aspnet_regiis -pdf &lt;section&gt;&lt;physical&gt;&lt;br /&gt;&lt;br /&gt;- The 'section' field refers to the configuration section like connectionStrings, appsettings, etc. that you want to encrypt.&lt;br /&gt;- The 'physical directory' field refers to the full physical path on the system to the root directory of the web application.&lt;br /&gt;-The 'provider' field refers to the name of the protected configuration provider to use such as DataProtectionConfigurationProvider or RSAProtectedConfigurationProvider.&lt;br /&gt;&lt;br /&gt;&lt;span style="FONT-WEIGHT: bold"&gt;Example:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;C:\&lt;br /&gt;C:\cd C:\WINNT\Microsoft.NET\Framework\v2.0.50727\&lt;br /&gt;C:\WINNT\Microsoft.NET\Framework\v2.0.50727\&lt;br /&gt;&lt;br /&gt;&lt;span style="FONT-WEIGHT: bold"&gt;Encryption:&lt;br /&gt;&lt;/span&gt;C:\WINNT\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -pef "connectionStrings" "C:\Websites\Myapp" -prov "DataProtectionConfigurationProvider"&lt;br /&gt;&lt;br /&gt;&lt;span style="FONT-WEIGHT: bold"&gt;Decryption:&lt;/span&gt;&lt;br /&gt;C:\WINNT\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -pdf "connectionStrings" "C:\Websites\Myapp"&lt;br /&gt;&lt;br /&gt;&lt;span style="FONT-WEIGHT: bold"&gt;Note:&lt;/span&gt;&lt;br /&gt;&lt;span style="FONT-WEIGHT: bold"&gt;&lt;span style="FONT-WEIGHT: bold"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="FONT-WEIGHT: bold"&gt;&lt;/span&gt;&lt;/span&gt;1. The encryption using the manual technique is server-specific. If you encrypt Web.config on your development server and then copy the file to the production server, the production server would not be able to decrypt it.&lt;br /&gt;&lt;br /&gt;2. In the above examples, we have used the "DataProtectionConfigurationProvider" provider. That is why the encryption is server-specific. This is the limitation of this provider. The RSA provider discussed earlier does not have this limitation as it is possible to export the RSA keys to another machine.&lt;span style="font-family:Verdana;font-size:9;"&gt;&lt;?xml:namespace prefix = o /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/physical&gt;&lt;/section&gt;&lt;/provider&gt;&lt;/physical&gt;&lt;/section&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1486421999184843428-8489303607668839451?l=gunwantsingh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1486421999184843428/posts/default/8489303607668839451'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1486421999184843428/posts/default/8489303607668839451'/><link rel='alternate' type='text/html' href='http://gunwantsingh.blogspot.com/2010/05/this-write-up-is-only-effectual-for-asp.html' title='Securing Web.Config through Encryption'/><author><name>Gunwant Singh</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_5puM2DK_iDw/TATPlqNeAxI/AAAAAAAAAIU/pPvTQSJw4OA/s72-c/1.bmp' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-1486421999184843428.post-3752517585507124845</id><published>2010-01-28T00:32:00.000-08:00</published><updated>2010-01-28T08:55:34.204-08:00</updated><title type='text'>The Prevailing Insecurity: Side Channel Attacks</title><content type='html'>&lt;div align="right"&gt;&lt;span style=";font-family:verdana;font-size:100%;"  &gt;&lt;em&gt;&lt;br /&gt;&lt;/em&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style=";font-family:verdana;font-size:100%;"  &gt;&lt;em&gt;“The greatest enemy will hide in the last place you would ever look.” &lt;/em&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=";font-family:verdana;font-size:100%;"  &gt;&lt;em&gt;&lt;/em&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=";font-family:verdana;font-size:100%;"  &gt;&lt;em&gt;~Julius Caesar 75 BC&lt;/em&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style=";font-family:verdana;font-size:100%;"  &gt; &lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;span style=";font-family:verdana;font-size:100%;"  &gt;&lt;div align="justify"&gt;We are well aware of the fact that the security systems protect different types of our raw data and processed information. In a world like todays, it is utmost critical to keep up with the latest software patches, properly configured network devices and the newest hardware infrastructure to ensure the protection of organizations’ assets. Whenever we talk about security, for most of that time we talk about digital security or the software perspective of security. In other words, we talk about anti-virus utilities, updating the desktop applications, patching the vulnerabilities of a system or a network, etc. I see no problem with such a viewpoint but what we do not realize is that by emphasizing on one or two perspectives it will not defend us completely from risks. We need to focus on all the viewpoints of a security posture. And, that gives me an opportunity to talk about the disregarded ‘Side Channel attacks’.&lt;br /&gt;&lt;br /&gt;The research on Security (and Insecurity) has gone to a substantial depth and researchers have uncovered several serious threats to the involved resources. They have rightly justified the fact that the information we are dealing with on a daily basis is greatly vulnerable most of the time. Side channel attacks are the attacks that exploit the physical implementation of a system. For example: It is positive to use strong cryptographic algorithms, or implement stringent access controls for classified data but what if the attacker is concerned about monitoring the keystrokes of your keyboard rather than trying endlessly to break a 512-bit algorithm. In another scenario, the attacker may observe your monitor or keyboard from a distance with a telescope mounted with a recording device. Notwithstanding, it may sound ridiculous but he may also remotely monitor the LCD image of your screen that is reflected in the eye or the eyeglasses you wear or a tea pot, spoon, or a plastic bottle placed intentionally by the attacker right on your desk. These are just basic examples of Side channel attacks. Let us discuss some real attacks technically in a little bit more detail.&lt;br /&gt;&lt;br /&gt;The timing side-channel attack analyzes the time taken by the system processor to execute operations. We know that the time taken to produce an output differs by varying inputs. Now, an attacker can calculate the time taken for different calculations and therefore gain sensitive information about the system. How? You may be wondering. As a practical example, UNIX Operating System used to use a software-function for converting an 8-character password into an 11-character string. UNIX executed this function only if the entered username was correct, irrespective of the password’s validity. So if the username was correct, it took more time to process than if it was incorrect. By exploiting the timing factor, an attacker could gather all valid usernames of a system. He could later use them to brute-force for the passwords. UNIX fixed the issue later by always executing the function to avoid revealing valid login names.&lt;br /&gt;&lt;br /&gt;In another attack, an attacker analyzes the variations in the power lines of a hardware device while it is performing different operations. Such attacks are categorized as power monitoring attack. As an instance, the CPU of a system consumes different power-units for different calculations. An attacker sitting in a different room can easily use a standard digital oscilloscope to read power-traces of a system CPU. In an experiment, it was verified that the power profiles for operations like squaring, multiplication, etc can be clearly distinguished thereby allowing an attacker to compute the secret key of an algorithm.&lt;br /&gt;&lt;br /&gt;Interestingly, acoustic side-channel attacks exploit the sound (audible or not) which is produced during an operation. In 2004, Dmitri Asonov and Rakesh Agrawal of the IBM Research Center proclaimed that computer keyboards and keypads used on telephones and ATMs are vulnerable to attacks based on different sounds produced by different keys. By analyzing recorded sounds, they were able to recover the text of data being entered. This was demonstrated by placing a high intensity recording device in a near-by location. Also in 2004, researchers demonstrated that it may be possible to conduct timing attacks by carefully examining different humming noises made by the processor for different operations.&lt;br /&gt;&lt;br /&gt;By exploiting the aforementioned physical leakage from the power lines, attackers have also learnt to exploit the heat radiations generated by the electronic devices. The surface of the CPU chip can be monitored for infrared images that can provide information about the code being executed internally. Such an attack is known as thermal imaging attack.&lt;br /&gt;&lt;br /&gt;Lastly but not at all the least one, some researchers have found that by intentionally exposing a security system to situations where it induces faults can reveal the internal state of its workings. As an instance, a smartcard’s processor might be subjected to high temperature, irregular voltage or current supply, excessively high overclocking, etc. so it may begin to output incorrect results which may help the bad guy to deduce the instructions that the processor is running, or what its internal data state is.&lt;br /&gt;&lt;br /&gt;Countermeasures: Because side-channel attacks rely on emissions or physical leakage of information, so the trick is to limit such leakages. This is possible by adding noise to the emitting channels, using data-independent processing techniques, shielding devices with opaque material, etc. And above all, user awareness is required. Who knows if someone cracks these countermeasures in the near future? So stay in touch and keep discussing.&lt;br /&gt;&lt;br /&gt;Thank you.&lt;br /&gt;&lt;br /&gt;-Gunwant Singh&lt;br /&gt;&lt;br /&gt;References: &lt;/div&gt;&lt;div align="justify"&gt;[1]&lt;a href="http://en.wikipedia.org/wiki/Side_channel_attack"&gt;http://en.wikipedia.org/wiki/Side_channel_attack&lt;/a&gt;&lt;br /&gt;[2]&lt;a href="http://www.discretix.com/PDF/Introduction%20to%20Side%20Channel%20Attacks.pdf"&gt;http://www.discretix.com/PDF/Introduction%20to%20Side%20Channel%20Attacks.pdf&lt;/a&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;/div&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1486421999184843428-3752517585507124845?l=gunwantsingh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1486421999184843428/posts/default/3752517585507124845'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1486421999184843428/posts/default/3752517585507124845'/><link rel='alternate' type='text/html' href='http://gunwantsingh.blogspot.com/2010/01/prevailing-insecurity-side-channel.html' title='The Prevailing Insecurity: Side Channel Attacks'/><author><name>Gunwant Singh</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1486421999184843428.post-2783395225035795846</id><published>2009-09-14T04:49:00.000-07:00</published><updated>2009-09-21T07:37:08.498-07:00</updated><title type='text'>Application Security Logging Mechanisms</title><content type='html'>&lt;p align="justify"&gt;&lt;span style=";font-family:verdana;font-size:100%;"  &gt;In this composition, we will discourse about the need and effective use of logging for web applications from a security standpoint. We know logging can be used on varying levels. For example: the logs are maintained on network level (on routers, firewalls, switches, etc.) and then the logs are also asserted on the host level (the windows logs or the web server logs on which the application is hosted). Besides all these different levels, the application must also maintain its own logs that contends against the repudiation attacks. As an instance, say an application user escalates his privileges in an unauthorized manner. None of the logs but application logs would be able to detect the assault or the misuse against a web application. Notwithstanding the web/application administrator must insure about what all information should be logged. [1] Logs are typically properly generated by web and other server software but it is not so common to find applications that properly log their actions to a log and, when they do, the main intention of the application logs is to produce debugging output that could be used by the programmer to analyze a particular error.&lt;br /&gt;&lt;br /&gt;It is crucial to ascertain what security events and user information should be logged. Elucidating the fact of what information is to be logged, here is a compiled list of the same:&lt;br /&gt;&lt;br /&gt;- All user account management activity&lt;br /&gt;- Addition/deletion of user accounts&lt;br /&gt;- Changes in security attributes (access-levels, login intervals, terminal login restrictions, connection interface)&lt;br /&gt;- User account suspensions/reactivations&lt;br /&gt;- Administrative password resets&lt;br /&gt;- Every access control related event&lt;br /&gt;- Successful and failed logon/logoff events&lt;br /&gt;- Account lockout events (Invalid password, Inactive session, access from un-allowed interfaces, login attempts out of valid intervals, max. concurrent session limit violations)&lt;br /&gt;- Password changes&lt;br /&gt;- Changes to application configuration settings&lt;br /&gt;- Change to critical functional settings (eg. interest rates, service charges, grace period)&lt;br /&gt;- System parameters (e.g. max. no. of concurrent connections per user, Password length)&lt;br /&gt;- Access attempts to application and underlying system resources&lt;br /&gt;- Changes to cryptographic keys&lt;br /&gt;- Startup/stops of application processes&lt;br /&gt;- Abnormal application exits&lt;br /&gt;- Failed database connection attempts&lt;br /&gt;- Attempts to modify critical registry keys&lt;br /&gt;- Login/logoff for Maintenance&lt;br /&gt;- Failed integrity checks for application data, executables and audit log&lt;br /&gt;- Abnormal application exits&lt;br /&gt;- Failed database connection attempts&lt;br /&gt;- Attempts to modify critical registry keys&lt;br /&gt;&lt;br /&gt;In general logs have levels i.e. the level of the details about the information. For example: If the management decides to log the password-changes attempts, then the question is to what level the information should be logged, say the username, timestamp, IP address, etc. The logs should be captured with enough level of detail that is actually called for, for a later analysis while equilibrating the need to NOT adversely impact performance. For each event, the following are important to record:&lt;br /&gt;&lt;br /&gt;- A Unique event ID and type&lt;br /&gt;- Timestamp of the event&lt;br /&gt;- Error message incurred&lt;br /&gt;- Success or failure of event&lt;br /&gt;- IP address of the client&lt;br /&gt;- User ID instigating the event&lt;br /&gt;- Resources accessed&lt;br /&gt;- Application Interface used by user&lt;br /&gt;- Co-relation with audit trail entries&lt;br /&gt;&lt;br /&gt;A sensible security practice is NOT to log the users’ passwords. The question is "Why"? Besides the resources like configuration data, files, information, etc that get compromised, logs may also get compromised. In case users’ passwords were being logged in the first place it would levy serious threat to the organization.&lt;br /&gt;&lt;br /&gt;Withal these considerations are assistive to the web administrators, this is not enough. The testing of the logging mechanism must also be performed. From a tester viewpoint, one must see to it that the logs themselves must not violate the security compliance procedures and practices. Here are a few recommendations.&lt;br /&gt;&lt;br /&gt;- Design the application so to save the logs to a different system. This will provide a secure modular structure. Else, once the web/application server is compromised, the logs themselves will be exposed to the assaulter.&lt;br /&gt;- Secure the system on which the logs are stored. I mean server hardening.&lt;br /&gt;- Limit access to logs on a need-to-know basis.&lt;br /&gt;- Do not log sensitive information like PIN, encryption keys, crucial hashes and of course passwords.&lt;br /&gt;- Implementation of alert mechanisms to the authoritative person if logging system malfunctions or shuts down.&lt;br /&gt;- The security logs should be archived periodically.&lt;br /&gt;- The application should provide a log analysis console to view the logs and/or analyze them.&lt;br /&gt;- Check if the usage of logging mechanisms can inflict a DoS situation? For example: providing wrong credentials a number of times (say a million times).&lt;br /&gt;- How are they upheld? Are logs kept for the adequate time?&lt;br /&gt;- How about the privileges of accessing/analyzing the logs and the methods used for the analysis?&lt;br /&gt;- How the management of log backups is done? Securing the backup server!&lt;br /&gt;- Is the data “validated” before being logged in the logs? Filtering the strings like %0d %0a etc to prevent the ‘Log spoofing’.&lt;br /&gt;&lt;br /&gt;Let us hash out a few things that relate to the best security logging practices mentioned above.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color: rgb(255, 255, 0);"&gt;Sensitive Information in Logs:&lt;/span&gt;&lt;/strong&gt; In order to be compliant with the data protection laws, organizations do ascertain of NOT storing clear text sensitive information anywhere. With an objective to be amenable to such restrictions, they store hashes instead of clear text passwords in the back-end databases and also use one time tokens in some cases. In case of logging if the application stores clear text passwords (or even personal data); it violates the data protection act, thereby stimulating heavy penalties to an organization. Not to blank out, some applications use GET request for sending usernames and passwords (Ex: http://www.vulnerable.com/ authenticate.php?username=admin&amp;amp;pass=admin123) and such requests gets logged in the log files. So even if the logging mechanism does not store the user private data in the log files, it WILL – unintentionally.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color: rgb(255, 255, 0);"&gt;Log location:&lt;/span&gt;&lt;/strong&gt; Visualize a scenario wherein an attacker has compromised a web server that implements logging mechanisms on the same server. He is now able to manipulate the logs on the server. Imagine how an attacker can easily delete/edit the logs inciting repudiation attacks. So an administrator would never come to know who attacked/compromised the server. Wouldn’t it be sensible to store the logs on a different server? In that case, if the attacker compromised the web server, he has to put some extra effort that may or may not compromise the log server. Importantly, this also makes it easier to aggregate (and/or segregate) logs from different sources and it also makes it easier to do log analysis (which can be CPU intensive) without affecting the server itself.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color: rgb(255, 255, 0);"&gt;Log Storage:&lt;/span&gt;&lt;/strong&gt; Envision a scenario of an attack on a web server that has logging mechanism implemented on the same server and on the same partition as the system folder. The attacker repeats some malicious actions (like unsuccessful login attempts, password changes, instigating an error) that gets logged in the log files. Now by repeating such actions (say) a million times, it will fill up huge storage space on the server itself. If the log files reside on the same partition as the system files are, it may create a Denial-of-Service situation. Mitigation: Choose a different partition (preferably a different server and a different partition), monitor and monitor.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color: rgb(255, 255, 0);"&gt;Log Rotation:&lt;/span&gt;&lt;/strong&gt; This refers to the fact that servers compress and move the log files to a different location/server after they are administratively NOT required. This also helps in freeing up the space for new logs. A penetration tester needs to check a few things:&lt;br /&gt;&lt;br /&gt;- Logs must be compressed before they are stored on a different server.&lt;br /&gt;- The rotation must be done after a specific event like the log file reaches a certain size or after a fixed amount of time. No more, no less.&lt;br /&gt;- He also needs to check if an attacker can forcibly cause the log rotation to hide the malicious actions.&lt;br /&gt;- Nonetheless, the permissions of the compressed files must be stricter. The active log files need write permissions but the compressed ones do not.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color: rgb(255, 255, 0);"&gt;Log Analysis:&lt;/span&gt;&lt;/strong&gt; The analysis of logs is a necessity to detect an intrusion or compromise. The analysis should accentuate on the following errors:&lt;br /&gt;&lt;br /&gt;- 40x (not found) error messages: a large no. of such error messages may be an evidence/indication of an attack.&lt;br /&gt;- 50x (server error) messages: An indication of SQL injection queries or injection of invalid characters in the form fields.&lt;br /&gt;- Constantly trying to retrieve a file that does not really exist&lt;br /&gt;- Continuous unsuccessful login attempts&lt;br /&gt;- SQL Injection queries/ XSS scripts/ Invalid strings or characters etc.&lt;br /&gt;- Access of admin (sensitive) files/ application configuration files&lt;br /&gt;- Upload/Download of rogue files [big files/malicious files like exe, aspx, asp, etc]&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Log analysis/review must not be done on the same server – both from a security and functionality point of view.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color: rgb(255, 255, 0);"&gt;Log Spoofing:&lt;/span&gt;&lt;/strong&gt; Let us take an example. A malicious user tries to bypass the authentication module as cited below.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;Username: admin&lt;br /&gt;Password: admin123&lt;br /&gt;&lt;/em&gt;&lt;br /&gt;Now if a user enters admin/admin123 (guessing the password), the log files will exhibit the following log entry:&lt;br /&gt;&lt;br /&gt;&lt;em&gt;Login failed for the username: admin&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;The hacker would manipulate or poison the log files using an out-of-the-box technique. How about entering the following username?&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="text-align: left;"&gt;&lt;span style=";font-family:verdana;font-size:100%;"  &gt;&lt;em&gt;Username: admin%0d %0aLogin succeeded for the username: admin%0d%0a&lt;/em&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:verdana;font-size:100%;"  &gt;&lt;em&gt;Password: admin123&lt;/em&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;p align="justify"&gt;&lt;span style=";font-family:verdana;font-size:100%;"  &gt;&lt;br /&gt;The log files would now say the following:&lt;br /&gt;&lt;br /&gt;&lt;em&gt;Login failed for the username: admin&lt;br /&gt;Login succeeded for the username: admin&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;The %0d %0a strings are the line-feed and carriage-return functions that will modify the logs to what the attacker wants. By using the following technique, the attacker can not only modify the logs but s/he can use it to hide his/her malicious actions.&lt;br /&gt;&lt;br /&gt;That is all from my side on ‘Logging’. Hope this composition proved helpful. I seek any feedback/suggestion on this if you have time. Have a ball!&lt;br /&gt;&lt;br /&gt;Thank you.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color: rgb(255, 255, 0);"&gt;References:&lt;/span&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;[1] Section 4.3.4 - Application Configuration Management Testing: Logging, OWASP Testing Guide v3.&lt;br /&gt;&lt;br /&gt;[2] Palisade article: &lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;a href="http://palisade.plynt.com/issues/2004Oct/security-logging/"&gt;&lt;span style="font-family:verdana;"&gt;http://palisade.plynt.com/issues/2004Oct/security-logging/&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span style=";font-family:verdana;font-size:100%;"  &gt;&lt;br /&gt;&lt;br /&gt;[3] Hyperlink: &lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;a href="http://www.infosecwriters.com/text_resources/pdf/top5-log-analysis-mistakes.pdf"&gt;&lt;span style="font-family:verdana;"&gt;http://www.infosecwriters.com/text_resources/pdf/top5-log-analysis-mistakes.pdf&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span style=";font-family:verdana;font-size:100%;"  &gt;&lt;br /&gt;&lt;br /&gt;[4] Article: Application logs – Security best practices By Dipesh Rawal&lt;br /&gt;&lt;br /&gt;[5] &lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;a href="http://www.owasp.org/index.php/How_to_add_a_security_log_level_in_log4j"&gt;&lt;span style="font-family:verdana;"&gt;http://www.owasp.org/index.php/How_to_add_a_security_log_level_in_log4j&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span style=";font-family:verdana;font-size:100%;"  &gt; (I did not read this one thoroughly but is surely helpful for application developers, so I thought of mentioning it here)&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1486421999184843428-2783395225035795846?l=gunwantsingh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1486421999184843428/posts/default/2783395225035795846'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1486421999184843428/posts/default/2783395225035795846'/><link rel='alternate' type='text/html' href='http://gunwantsingh.blogspot.com/2009/09/application-security-logging-mechanisms.html' title='Application Security Logging Mechanisms'/><author><name>Gunwant Singh</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1486421999184843428.post-6816460838636470530</id><published>2009-06-01T09:45:00.000-07:00</published><updated>2009-06-01T09:50:30.690-07:00</updated><title type='text'>OWASP Presentation: May 2009</title><content type='html'>&lt;iframe src='http://docs.google.com/EmbedSlideshow?id=dhbbw4sj_131fgrvvhdt' frameborder='0' width='410' height='342'&gt;&lt;/iframe&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1486421999184843428-6816460838636470530?l=gunwantsingh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1486421999184843428/posts/default/6816460838636470530'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1486421999184843428/posts/default/6816460838636470530'/><link rel='alternate' type='text/html' href='http://gunwantsingh.blogspot.com/2009/06/owasp-presentation-may-2009.html' title='OWASP Presentation: May 2009'/><author><name>Gunwant Singh</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1486421999184843428.post-5860734865627373511</id><published>2009-03-11T08:59:00.000-07:00</published><updated>2009-03-11T10:14:28.313-07:00</updated><title type='text'>Scrutinizing Full Trust in .NET applications</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;br /&gt;In this write-up, I will try to elucidate the so called ‘Full Trust’ configuration in the .NET applications. Now I must make it clear that the ‘Full Trust’ configuration is the default (insecure) configuration which is to a certain extent notorious amongst the web developers and administrators. Some who know about it have no idea on how to configure it appropriately.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Sometimes applications do require ‘Full Trust’ for the functioning of their applications so the trust level must be chosen carefully depending on the requirement and scope of the application. This is done only by a profound critique of your application. Let us first understand what ‘Full Trust’ means with respect to .NET applications. Take for example, a .NET application is hosted and can be accessed using the URL: http://www.test.com and legitimate users can download various reports from the server using the following URL: http://www.test.com/download.aspx?file=report.pdf. Now an adversary can exploit the application by manipulating the URL in the following way: http://www.test.com/download.aspx?file=../../../../../../../windows/repair/sam. Notably the ‘sam’ file contains highly sensitive information. The point is, the attacker has used the application script to access resources that are outside the scope of the application. In other words, it is exactly equivalent to having full trust in the local machine zone or trust outside the application root. The situation becomes highly risky wherein multiple applications are hosted on the same web server. In order to bring down the risk, appropriate trust level can be configured.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;There are five levels of trust that can be used for a .NET application which can be configured via web.config in the following way.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_5puM2DK_iDw/SbfukkgMbEI/AAAAAAAAAF4/o52Pb3U-hFE/s1600-h/7.bmp"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 320px; height: 88px;" src="http://4.bp.blogspot.com/_5puM2DK_iDw/SbfukkgMbEI/AAAAAAAAAF4/o52Pb3U-hFE/s320/7.bmp" alt="" id="BLOGGER_PHOTO_ID_5311976597548198978" border="0" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;configuration&gt;&lt;br /&gt;&lt;system.web&gt;&lt;br /&gt;&lt;securitypolicy&gt;&lt;br /&gt; &lt;trust level="Full|High|Medium|Low|Minimal"&gt;&lt;/trust&gt;&lt;/securitypolicy&gt;&lt;/system.web&gt;&lt;br /&gt;&lt;br /&gt;You can see trust levels as permissions of your .NET code.&lt;br /&gt;&lt;br /&gt;&lt;/configuration&gt;&lt;div style="text-align: justify;"&gt;&lt;configuration&gt;- Full trust: your code can do anything that the account running it can do.&lt;/configuration&gt;&lt;br /&gt;&lt;configuration&gt;- High trust: same as above except your code cannot call into unmanaged code. i.e. Win32 APIs, COM interop.&lt;/configuration&gt;&lt;br /&gt;&lt;configuration&gt;- Medium trust: same as above except your code cannot see any part of the file system except its application directory.&lt;/configuration&gt;&lt;br /&gt;&lt;configuration&gt;- Low trust: same as above except your code cannot make any out-of-process calls. i.e. calls to a database, network, etc.&lt;/configuration&gt;&lt;br /&gt;&lt;configuration&gt;- Minimal trust: code is restricted from anything but the most trivial processing (calculating algorithms).&lt;/configuration&gt;&lt;br /&gt;&lt;configuration&gt;&lt;/configuration&gt;&lt;/div&gt;&lt;configuration&gt;&lt;br /&gt;The following example [SRC: MSDN] shows the mapping of trust levels to different policy files.&lt;br /&gt;&lt;br /&gt;&lt;system.web&gt;&lt;/system.web&gt;&lt;/configuration&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_5puM2DK_iDw/SbfuksC9pXI/AAAAAAAAAFw/emkit5eF5CY/s1600-h/6.bmp"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 320px; height: 115px;" src="http://1.bp.blogspot.com/_5puM2DK_iDw/SbfuksC9pXI/AAAAAAAAAFw/emkit5eF5CY/s320/6.bmp" alt="" id="BLOGGER_PHOTO_ID_5311976599573079410" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;configuration&gt;&lt;system.web&gt;&lt;securitypolicy&gt;&lt;br /&gt;&lt;trustlevel name="Full" policyfile="internal"&gt;&lt;br /&gt;&lt;trustlevel name="High" policyfile="web_hightrust.config"&gt;&lt;br /&gt;&lt;trustlevel name="Medium" policyfile="web_mediumtrust.config"&gt;&lt;br /&gt;&lt;trustlevel name="Low" policyfile="web_lowtrust.config"&gt;&lt;br /&gt;&lt;trustlevel name="Minimal" policyfile="web_minimaltrust.config"&gt;&lt;br /&gt;&lt;/trustlevel&gt;&lt;/trustlevel&gt;&lt;/trustlevel&gt;&lt;/trustlevel&gt;&lt;/trustlevel&gt;&lt;/securitypolicy&gt;&lt;/system.web&gt;&lt;/configuration&gt;&lt;div style="text-align: justify;"&gt;&lt;configuration&gt;&lt;system.web&gt;&lt;securitypolicy&gt;&lt;trustlevel name="Full" policyfile="internal"&gt;&lt;trustlevel name="High" policyfile="web_hightrust.config"&gt;&lt;trustlevel name="Medium" policyfile="web_mediumtrust.config"&gt;The policyFile parameters above point to the configuration files which are stored in the framework configuration directory (C:\WINDOWS\Microsoft.NET\Framework\version\CONFIG).&lt;/trustlevel&gt;&lt;/trustlevel&gt;&lt;/trustlevel&gt;&lt;/securitypolicy&gt;&lt;/system.web&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration&gt;&lt;system.web&gt;&lt;securitypolicy&gt;&lt;trustlevel name="Full" policyfile="internal"&gt;&lt;trustlevel name="High" policyfile="web_hightrust.config"&gt;&lt;trustlevel name="Medium" policyfile="web_mediumtrust.config"&gt;&lt;/trustlevel&gt;&lt;/trustlevel&gt;&lt;/trustlevel&gt;&lt;/securitypolicy&gt;&lt;/system.web&gt;&lt;/configuration&gt;&lt;/div&gt;&lt;configuration&gt;&lt;system.web&gt;&lt;securitypolicy&gt;&lt;trustlevel name="Full" policyfile="internal"&gt;&lt;trustlevel name="High" policyfile="web_hightrust.config"&gt;&lt;trustlevel name="Medium" policyfile="web_mediumtrust.config"&gt;&lt;br /&gt;&lt;/trustlevel&gt;&lt;/trustlevel&gt;&lt;/trustlevel&gt;&lt;/securitypolicy&gt;&lt;/system.web&gt;&lt;/configuration&gt;&lt;div style="text-align: justify;"&gt;&lt;configuration&gt;&lt;system.web&gt;&lt;securitypolicy&gt;&lt;trustlevel name="Full" policyfile="internal"&gt;&lt;trustlevel name="High" policyfile="web_hightrust.config"&gt;&lt;trustlevel name="Medium" policyfile="web_mediumtrust.config"&gt;Does that seem interesting? Particularly just by configuring a restrictive level of trust will not solve the issue. Some of the application components may require a higher level of trust. I have seen a few cases akin to that, for example, there was this application which when configured from a ‘Full Trust’ to ‘Partial Trust’ stopped functioning because there were some associated dll’s which required ‘Full Trust’ to run. So the developer had to design a custom policy to keep minimal permissions for users. If one wants to restrict the access to the resources outside the scope of your ASP.NET application, he has to specify which permissions your application and the associated resources needs for functioning. Such bespoke policies take considerable effort.&lt;/trustlevel&gt;&lt;/trustlevel&gt;&lt;/trustlevel&gt;&lt;/securitypolicy&gt;&lt;/system.web&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration&gt;&lt;system.web&gt;&lt;securitypolicy&gt;&lt;trustlevel name="Full" policyfile="internal"&gt;&lt;trustlevel name="High" policyfile="web_hightrust.config"&gt;&lt;trustlevel name="Medium" policyfile="web_mediumtrust.config"&gt;&lt;/trustlevel&gt;&lt;/trustlevel&gt;&lt;/trustlevel&gt;&lt;/securitypolicy&gt;&lt;/system.web&gt;&lt;/configuration&gt;&lt;/div&gt;&lt;configuration&gt;&lt;system.web&gt;&lt;securitypolicy&gt;&lt;trustlevel name="Full" policyfile="internal"&gt;&lt;trustlevel name="High" policyfile="web_hightrust.config"&gt;&lt;trustlevel name="Medium" policyfile="web_mediumtrust.config"&gt;&lt;br /&gt;Often developers configure the applications on a medium trust level. Running medium trust will have the following application permissions besides others:&lt;br /&gt;&lt;br /&gt;. Access to Microsoft SQL Server databases&lt;br /&gt;. No registry access,&lt;br /&gt;. No event log access,&lt;br /&gt;. No ability to use reflection.&lt;br /&gt;. Web access is limited to the network address that you define in the &lt;&lt;trust&gt;&gt; element&lt;br /&gt;. File system access is limited to the application's virtual directory hierarchy.&lt;br /&gt;&lt;br /&gt;If medium trust policy is too restrictive, you can create and use a custom policy file. The different permissions of different trust levels are shown below.&lt;br /&gt;&lt;br /&gt;High Trust:&lt;br /&gt;&lt;/trust&gt;&lt;/trustlevel&gt;&lt;/trustlevel&gt;&lt;/trustlevel&gt;&lt;/securitypolicy&gt;&lt;/system.web&gt;&lt;/configuration&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_5puM2DK_iDw/SbfriWZoKtI/AAAAAAAAAEo/pLgyiXIPc4Y/s1600-h/1.bmp"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 320px; height: 192px;" src="http://3.bp.blogspot.com/_5puM2DK_iDw/SbfriWZoKtI/AAAAAAAAAEo/pLgyiXIPc4Y/s320/1.bmp" alt="" id="BLOGGER_PHOTO_ID_5311973260867939026" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;configuration&gt;&lt;system.web&gt;&lt;securitypolicy&gt;&lt;trustlevel name="Full" policyfile="internal"&gt;&lt;trustlevel name="High" policyfile="web_hightrust.config"&gt;&lt;trustlevel name="Medium" policyfile="web_mediumtrust.config"&gt;&lt;trust&gt;Medium Trust:&lt;br /&gt;&lt;/trust&gt;&lt;/trustlevel&gt;&lt;/trustlevel&gt;&lt;/trustlevel&gt;&lt;/securitypolicy&gt;&lt;/system.web&gt;&lt;/configuration&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_5puM2DK_iDw/Sbfs-BG2kvI/AAAAAAAAAFQ/BQz9KUD7lSU/s1600-h/2.bmp"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 320px; height: 158px;" src="http://4.bp.blogspot.com/_5puM2DK_iDw/Sbfs-BG2kvI/AAAAAAAAAFQ/BQz9KUD7lSU/s320/2.bmp" alt="" id="BLOGGER_PHOTO_ID_5311974835700011762" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;configuration&gt;&lt;system.web&gt;&lt;securitypolicy&gt;&lt;trustlevel name="Full" policyfile="internal"&gt;&lt;trustlevel name="High" policyfile="web_hightrust.config"&gt;&lt;trustlevel name="Medium" policyfile="web_mediumtrust.config"&gt;&lt;trust&gt;&lt;br /&gt;Low Trust:&lt;br /&gt;&lt;/trust&gt;&lt;/trustlevel&gt;&lt;/trustlevel&gt;&lt;/trustlevel&gt;&lt;/securitypolicy&gt;&lt;/system.web&gt;&lt;/configuration&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_5puM2DK_iDw/Sbfs-ZXPSpI/AAAAAAAAAFg/7qQ_Tjl7uQA/s1600-h/4.bmp"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 320px; height: 82px;" src="http://2.bp.blogspot.com/_5puM2DK_iDw/Sbfs-ZXPSpI/AAAAAAAAAFg/7qQ_Tjl7uQA/s320/4.bmp" alt="" id="BLOGGER_PHOTO_ID_5311974842211191442" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;configuration&gt;&lt;system.web&gt;&lt;securitypolicy&gt;&lt;trustlevel name="Full" policyfile="internal"&gt;&lt;trustlevel name="High" policyfile="web_hightrust.config"&gt;&lt;trustlevel name="Medium" policyfile="web_mediumtrust.config"&gt;&lt;trust&gt;&lt;br /&gt;Minimal Trust:&lt;br /&gt;&lt;/trust&gt;&lt;/trustlevel&gt;&lt;/trustlevel&gt;&lt;/trustlevel&gt;&lt;/securitypolicy&gt;&lt;/system.web&gt;&lt;/configuration&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_5puM2DK_iDw/Sbfs-XBtFoI/AAAAAAAAAFo/k2rHkPbUgvk/s1600-h/5.bmp"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 320px; height: 39px;" src="http://4.bp.blogspot.com/_5puM2DK_iDw/Sbfs-XBtFoI/AAAAAAAAAFo/k2rHkPbUgvk/s320/5.bmp" alt="" id="BLOGGER_PHOTO_ID_5311974841583998594" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;configuration&gt;&lt;system.web&gt;&lt;securitypolicy&gt;&lt;trustlevel name="Full" policyfile="internal"&gt;&lt;trustlevel name="High" policyfile="web_hightrust.config"&gt;&lt;trustlevel name="Medium" policyfile="web_mediumtrust.config"&gt;&lt;trust&gt;&lt;br /&gt;&lt;/trust&gt;&lt;/trustlevel&gt;&lt;/trustlevel&gt;&lt;/trustlevel&gt;&lt;/securitypolicy&gt;&lt;/system.web&gt;&lt;/configuration&gt;&lt;div style="text-align: justify;"&gt;&lt;configuration&gt;&lt;system.web&gt;&lt;securitypolicy&gt;&lt;trustlevel name="Full" policyfile="internal"&gt;&lt;trustlevel name="High" policyfile="web_hightrust.config"&gt;&lt;trustlevel name="Medium" policyfile="web_mediumtrust.config"&gt;&lt;trust&gt;This ends the basic discussion on the trust levels in the .NET applications for now. In my next write-up, I will re-consider the same topic but I will come up with a more detailed explanation on the configuration of ‘Partial Trust’ and how to build your own policies for a flawless hosting of your application. So keep up a correspondence.&lt;/trust&gt;&lt;/trustlevel&gt;&lt;/trustlevel&gt;&lt;/trustlevel&gt;&lt;/securitypolicy&gt;&lt;/system.web&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;configuration&gt;&lt;system.web&gt;&lt;securitypolicy&gt;&lt;trustlevel name="Full" policyfile="internal"&gt;&lt;trustlevel name="High" policyfile="web_hightrust.config"&gt;&lt;trustlevel name="Medium" policyfile="web_mediumtrust.config"&gt;&lt;trust&gt;&lt;/trust&gt;&lt;/trustlevel&gt;&lt;/trustlevel&gt;&lt;/trustlevel&gt;&lt;/securitypolicy&gt;&lt;/system.web&gt;&lt;/configuration&gt;&lt;/div&gt;&lt;configuration&gt;&lt;system.web&gt;&lt;securitypolicy&gt;&lt;trustlevel name="Full" policyfile="internal"&gt;&lt;trustlevel name="High" policyfile="web_hightrust.config"&gt;&lt;trustlevel name="Medium" policyfile="web_mediumtrust.config"&gt;&lt;trust&gt;&lt;br /&gt;Thank you.&lt;br /&gt;&lt;br /&gt;&lt;/trust&gt;&lt;/trustlevel&gt;&lt;/trustlevel&gt;&lt;/trustlevel&gt;&lt;/securitypolicy&gt;&lt;/system.web&gt;&lt;/configuration&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1486421999184843428-5860734865627373511?l=gunwantsingh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1486421999184843428/posts/default/5860734865627373511'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1486421999184843428/posts/default/5860734865627373511'/><link rel='alternate' type='text/html' href='http://gunwantsingh.blogspot.com/2009/03/scrutinizing-full-trust-in-net.html' title='Scrutinizing Full Trust in .NET applications'/><author><name>Gunwant Singh</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_5puM2DK_iDw/SbfukkgMbEI/AAAAAAAAAF4/o52Pb3U-hFE/s72-c/7.bmp' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-1486421999184843428.post-5894847127231678541</id><published>2009-02-05T09:54:00.000-08:00</published><updated>2009-03-16T10:06:41.719-07:00</updated><title type='text'>OWASP Presentation Delhi Chapter - January</title><content type='html'>&lt;iframe src='http://docs.google.com/EmbedSlideshow?docid=dhbbw4sj_773wh3kxjn' frameborder='0' width='410' height='342'&gt;&lt;/iframe&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1486421999184843428-5894847127231678541?l=gunwantsingh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1486421999184843428/posts/default/5894847127231678541'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1486421999184843428/posts/default/5894847127231678541'/><link rel='alternate' type='text/html' href='http://gunwantsingh.blogspot.com/2009/02/blog-post.html' title='OWASP Presentation Delhi Chapter - January'/><author><name>Gunwant Singh</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1486421999184843428.post-3850860377676613240</id><published>2008-12-18T23:00:00.000-08:00</published><updated>2008-12-20T11:01:35.471-08:00</updated><title type='text'>Putting salted MD5 hashing into action</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;br /&gt;In the preceding OWASP Delhi meet-up, I discussed the salted MD5 hashing technique. It is straight-forward to understand and identify the workings of the method; however it is not that easy to implement it in your web application. I will try to explain that how we can programmatically implement this technique in our applications.&lt;br /&gt;&lt;br /&gt;As a reminder, the following slide shows the working of salted MD5 hashing.&lt;br /&gt;&lt;br /&gt;&lt;img style="width: 397px; height: 223px;" src="http://lh6.ggpht.com/_5puM2DK_iDw/SUvt6VfVKPI/AAAAAAAAACI/NdwO6KhzNXQ/smd5hash.jpg" /&gt;&lt;br /&gt;&lt;br /&gt;There can be a number of ways by which the above shown system can be implemented but I identified the following execution flow to put it forward to your application so to successfully implement this system.&lt;br /&gt;&lt;br /&gt;&lt;img style="width: 393px; height: 105px;" src="http://lh4.ggpht.com/_5puM2DK_iDw/SUvvlrQWr0I/AAAAAAAAACQ/mww2TmdLu_E/s720/program-flow.jpg" /&gt;&lt;br /&gt;&lt;br /&gt;1. The file random.php generates a highly random number at the server side which can be used as a salt for a particular instance.&lt;br /&gt;&lt;br /&gt;2. The random.php file is included in the login.php file and then it (login.php) is sent to the user. The login.php file is served to the user along with the salt, md5.js JavaScript file and the HTML code.&lt;br /&gt;&lt;br /&gt;3. The user provides his username and password to the file and clicks the ‘Submit’ button. The password is first converted into an MD5 hash and is then concatenated with the salt. The ensuing string is again keyed in to the MD5 function.&lt;br /&gt;&lt;br /&gt;4. The final result is presented to the authenticate.php which actually compares it with the string calculated at the server side.&lt;br /&gt;&lt;br /&gt;5. This technique assumes that the passwords on the database server are already stored in the MD5 hashed form (which provides an extra layer of security for obvious reasons).&lt;br /&gt;&lt;br /&gt;6. To compute the string at the server side, the authenticate.php file picks up the password from the database and concatenates the same salt (which was sent to the user in the first place) to it and then hashes into the MD5 form.&lt;br /&gt;&lt;br /&gt;7. If the result sent from the client to the server is same as calculated at the server side, the user is granted access to the application resources.&lt;br /&gt;&lt;br /&gt;The code follows:&lt;br /&gt;- &lt;span style="color: rgb(255, 0, 0);"&gt;The &lt;&gt; tags have been changed to ()&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;[ random.php ]&lt;/span&gt;&lt;br /&gt;&lt;meta equiv="Content-Type" content="text/html; charset=utf-8"&gt;&lt;meta name="ProgId" content="Word.Document"&gt;&lt;meta name="Generator" content="Microsoft Word 10"&gt;&lt;meta name="Originator" content="Microsoft Word 10"&gt;&lt;link rel="File-List" href="file:///C:%5CDOCUME%7E1%5CGunnu%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.xml"&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:worddocument&gt;   &lt;w:view&gt;Normal&lt;/w:View&gt;   &lt;w:zoom&gt;0&lt;/w:Zoom&gt;   &lt;w:compatibility&gt;    &lt;w:breakwrappedtables/&gt;    &lt;w:snaptogridincell/&gt;    &lt;w:applybreakingrules/&gt;    &lt;w:wraptextwithpunct/&gt;    &lt;w:useasianbreakrules/&gt;    &lt;w:usefelayout/&gt;   &lt;/w:Compatibility&gt;   &lt;w:browserlevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;  &lt;/w:WordDocument&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;style&gt;&lt;/style&gt;&lt;br /&gt;&lt;p style="font-style: italic;" class="MsoNormal"&gt;  &lt;/p&gt;&lt;p style="font-style: italic;" class="MsoNormal"&gt;&lt;/p&gt;&lt;p style="font-style: italic;" class="MsoNormal"&gt;&lt;/p&gt;&lt;p style="color: rgb(255, 255, 153); font-style: italic;" class="MsoNormal"&gt;(?php&lt;/p&gt;&lt;p style="color: rgb(255, 255, 153); font-style: italic;" class="MsoNormal"&gt;session_start();&lt;/p&gt;  &lt;p style="color: rgb(255, 255, 153); font-style: italic;" class="MsoNormal"&gt;$nonce = md5( rand( 0, 65337 ) . time() );     &lt;span style=""&gt;       &lt;/span&gt;//generates the salt&lt;/p&gt;  &lt;p style="color: rgb(255, 255, 153); font-style: italic;" class="MsoNormal"&gt;$_SESSION['nonce'] = $nonce;&lt;span style=""&gt;       &lt;/span&gt;//stored in the session object&lt;span style=""&gt;     &lt;/span&gt;&lt;/p&gt;  &lt;p style="color: rgb(255, 255, 153); font-style: italic;" class="MsoNormal"&gt;?)&lt;/p&gt;  &lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;[ login.php ]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;(?php&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;session_start();&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;include('random.php');            //salt is included in the login.php file&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;$salt=$_SESSION['nonce'];            //stored in a variable&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;?)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;(html)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;(body)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;(script language="javascript" src="scripts/md5.js")&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;(/script)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;(script)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;var nonce = "";            //php variable stored in a JS variable nonce&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;  function hash()                 //function to calculate the salted hash&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;      {&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;          var temp=md5(document.a.password.value);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;          var temptwo=temp+nonce;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;          document.a.password.value=md5(temptwo);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;          document.a.submit();&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;      }&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;(/script)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;  (form name="a" autocomplete="off" action="authenticate.php" method="POST")&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;      Username: (input type="text" name="username" /)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;      Password: (input type="password" name="password"/)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;      (input type="button" value="Login" onclick="hash();"/)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;  (/form)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;(/body)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;(/html)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;meta equiv="Content-Type" content="text/html; charset=utf-8"&gt;&lt;meta name="ProgId" content="Word.Document"&gt;&lt;meta name="Generator" content="Microsoft Word 10"&gt;&lt;meta name="Originator" content="Microsoft Word 10"&gt;&lt;link style="font-style: italic;" rel="File-List" href="file:///C:%5CDOCUME%7E1%5CGunnu%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.xml"&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:worddocument&gt;   &lt;w:view&gt;Normal&lt;/w:View&gt;   &lt;w:zoom&gt;0&lt;/w:Zoom&gt;   &lt;w:compatibility&gt;    &lt;w:breakwrappedtables/&gt;    &lt;w:snaptogridincell/&gt;    &lt;w:applybreakingrules/&gt;    &lt;w:wraptextwithpunct/&gt;    &lt;w:useasianbreakrules/&gt;    &lt;w:usefelayout/&gt;   &lt;/w:Compatibility&gt;   &lt;w:browserlevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;  &lt;/w:WordDocument&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;style&gt; &lt;!--  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-parent:""; 	margin:0cm; 	margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:12.0pt; 	font-family:"Times New Roman"; 	mso-fareast-font-family:"Times New Roman"; 	mso-fareast-language:EN-US;} @page Section1 	{size:612.0pt 792.0pt; 	margin:72.0pt 90.0pt 72.0pt 90.0pt; 	mso-header-margin:36.0pt; 	mso-footer-margin:36.0pt; 	mso-paper-source:0;} div.Section1 	{page:Section1;} --&gt; &lt;/style&gt;&lt;!--[if gte mso 10]&gt; &lt;style&gt;  /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:"Table Normal"; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-parent:""; 	mso-padding-alt:0cm 5.4pt 0cm 5.4pt; 	mso-para-margin:0cm; 	mso-para-margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	font-family:"Times New Roman"; 	mso-fareast-font-family:"Times New Roman";} &lt;/style&gt; &lt;![endif]--&gt;  &lt;/div&gt;&lt;p style="color: rgb(255, 0, 0); text-align: justify; font-style: italic;" class="MsoNormal"&gt;  &lt;/p&gt;&lt;div style="text-align: justify; font-style: italic;"&gt;&lt;meta equiv="Content-Type" content="text/html; charset=utf-8"&gt;&lt;meta name="ProgId" content="Word.Document"&gt;&lt;meta name="Generator" content="Microsoft Word 10"&gt;&lt;meta name="Originator" content="Microsoft Word 10"&gt;&lt;link rel="File-List" href="file:///C:%5CDOCUME%7E1%5CGunnu%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.xml"&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:worddocument&gt;   &lt;w:view&gt;Normal&lt;/w:View&gt;   &lt;w:zoom&gt;0&lt;/w:Zoom&gt;   &lt;w:compatibility&gt;    &lt;w:breakwrappedtables/&gt;    &lt;w:snaptogridincell/&gt;    &lt;w:applybreakingrules/&gt;    &lt;w:wraptextwithpunct/&gt;    &lt;w:useasianbreakrules/&gt;    &lt;w:usefelayout/&gt;   &lt;/w:Compatibility&gt;   &lt;w:browserlevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;  &lt;/w:WordDocument&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;style&gt; &lt;!--  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-parent:""; 	margin:0cm; 	margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:12.0pt; 	font-family:"Times New Roman"; 	mso-fareast-font-family:"Times New Roman"; 	mso-fareast-language:EN-US;} @page Section1 	{size:612.0pt 792.0pt; 	margin:72.0pt 90.0pt 72.0pt 90.0pt; 	mso-header-margin:36.0pt; 	mso-footer-margin:36.0pt; 	mso-paper-source:0;} div.Section1 	{page:Section1;} --&gt; &lt;/style&gt;&lt;!--[if gte mso 10]&gt; &lt;style&gt;  /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:"Table Normal"; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-parent:""; 	mso-padding-alt:0cm 5.4pt 0cm 5.4pt; 	mso-para-margin:0cm; 	mso-para-margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	font-family:"Times New Roman"; 	mso-fareast-font-family:"Times New Roman";} &lt;/style&gt; &lt;![endif]--&gt;  &lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-weight: bold;"&gt;[ authenticate.php ]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;(?php&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;   session_start();&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;   $user=$_POST['username'];&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;   $pass=$_POST['password'];&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;   $con = mysql_connect("localhost","root","password");    //insecure&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;   $salt=$_SESSION['nonce'];&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;   unset($_SESSION['nonce']);            //unset the salt session variable&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;       if (!$con)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;        {&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;        die('Could not connect: Please retry. ');&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;          }&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;       else { }&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;mysql_select_db("gunwant", $con);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;$result = mysql_query("SELECT * FROM users");&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;$bt=0;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;while($row = mysql_fetch_array($result))        //fetch the credentials from the DB&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;     {&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;        $temp=($row['password'].$salt);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;         if (($user == $row['name']) &amp;amp;&amp;amp; ($pass == md5($temp)))&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;       {&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;         $_SESSION['username'] = $row['name'];&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;         $_SESSION['role'] = $row['role'];&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;     if ($_SESSION['role']=='admin') {header('Location: admin/welcome.php');}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;     if ($_SESSION['role']=='power') {header('Location: power/welcome.php');}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;     if ($_SESSION['role']=='user') {header('Location: user/welcome.php');}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;         $bt=1;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;        }&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;     } //while ends&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;if ($bt == 0)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;   {&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;   echo "\nIncorrect username/password. Please try again.";&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;   include('login.php');&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;   }&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;mysql_close($con);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;?)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;(html)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;(/html)&lt;/span&gt;&lt;br /&gt;&lt;meta equiv="Content-Type" content="text/html; charset=utf-8"&gt;&lt;meta name="ProgId" content="Word.Document"&gt;&lt;meta name="Generator" content="Microsoft Word 10"&gt;&lt;meta name="Originator" content="Microsoft Word 10"&gt;&lt;link style="color: rgb(255, 255, 153); font-style: italic;" rel="File-List" href="file:///C:%5CDOCUME%7E1%5CGunnu%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.xml"&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:worddocument&gt;   &lt;w:view&gt;Normal&lt;/w:View&gt;   &lt;w:zoom&gt;0&lt;/w:Zoom&gt;   &lt;w:compatibility&gt;    &lt;w:breakwrappedtables/&gt;    &lt;w:snaptogridincell/&gt;    &lt;w:applybreakingrules/&gt;    &lt;w:wraptextwithpunct/&gt;    &lt;w:useasianbreakrules/&gt;    &lt;w:usefelayout/&gt;   &lt;/w:Compatibility&gt;   &lt;w:browserlevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;  &lt;/w:WordDocument&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;style&gt; &lt;!--  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-parent:""; 	margin:0cm; 	margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:12.0pt; 	font-family:"Times New Roman"; 	mso-fareast-font-family:"Times New Roman"; 	mso-fareast-language:EN-US;} @page Section1 	{size:612.0pt 792.0pt; 	margin:72.0pt 90.0pt 72.0pt 90.0pt; 	mso-header-margin:36.0pt; 	mso-footer-margin:36.0pt; 	mso-paper-source:0;} div.Section1 	{page:Section1;} --&gt; &lt;/style&gt;&lt;!--[if gte mso 10]&gt; &lt;style&gt;  /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:"Table Normal"; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-parent:""; 	mso-padding-alt:0cm 5.4pt 0cm 5.4pt; 	mso-para-margin:0cm; 	mso-para-margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	font-family:"Times New Roman"; 	mso-fareast-font-family:"Times New Roman";} &lt;/style&gt; &lt;![endif]--&gt;  &lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-weight: bold;"&gt;[ welcome.php ]&lt;/span&gt;&lt;style&gt;&lt;/style&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;&lt;br /&gt;&lt;br /&gt;(? php&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;    session_start();&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;    header("Cache-Control: no-cache,no-store", true);        //prevent caching&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;    header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;    if ($_SESSION['role']!= 'admin') {header('Location: ../logout.php');}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;    if((isset($_SESSION['username'])) &amp;amp;&amp;amp; ($_SESSION['role']=='admin'))&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;          {&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;    echo "Welcome ".$_SESSION['username']." ! Your role is ".$_SESSION['role'];&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;        }&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;    else&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;          { }&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;?)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;(html)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;Click (a href="../logout.php")here(/a) to logout.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-style: italic;"&gt;(/html)&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(204, 204, 255);"&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153);"&gt;Points to note:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153);"&gt;1. The salt is generated at the server side.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153);"&gt;2. The salt should be highly random.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153);"&gt;3. The salt should not be involved in the transit from client to server.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153);"&gt;4. Once the results are compared, the salt should be unset (disabled) for that instance.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153);"&gt;5. The code shown above may not be the best code written so I seek your feedback on ways to improve it.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153);"&gt;6. To be done:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153);"&gt;- Implementation of SSL&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153);"&gt;- Setting the value of “form.password.value” to “ “ (NIL) so it does not get stored &lt;/span&gt;&lt;span style="color: rgb(255, 255, 153);"&gt;in the browser memory.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153);"&gt;- CAPTCHA implementation on the login page to prevent brute force attacks.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153);"&gt;- Something to be done to secure the hardcoded DB credentials&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153);"&gt;- DB hardening&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153);"&gt;Thank you.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1486421999184843428-3850860377676613240?l=gunwantsingh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1486421999184843428/posts/default/3850860377676613240'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1486421999184843428/posts/default/3850860377676613240'/><link rel='alternate' type='text/html' href='http://gunwantsingh.blogspot.com/2008/12/putting-salted-md5-hashing-into-action.html' title='Putting salted MD5 hashing into action'/><author><name>Gunwant Singh</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh6.ggpht.com/_5puM2DK_iDw/SUvt6VfVKPI/AAAAAAAAACI/NdwO6KhzNXQ/s72-c/smd5hash.jpg' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-1486421999184843428.post-3311393995028858128</id><published>2008-12-04T00:26:00.000-08:00</published><updated>2008-12-18T08:11:20.662-08:00</updated><title type='text'>‘HTTP Response Splitting’ in plain words...</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;br /&gt;Although, there are many articles/documents/whitepapers on this topic, professionals do not have a firm understanding of the basics of this vulnerability. Many of my friends have asked me to shed some light on this topic. This write-up is an attempt to make this subject matter more comprehensible.&lt;br /&gt;&lt;br /&gt;Some people say it’s a web-server level attack but actually it’s a pure application level attack. I will try to explain this attack in simple words - how it works and how to safeguard the applications against this. The explanation is based on the interception of the requests and replies via the Burp-proxy, a web proxy/interceptor available at http://portswigger.net/proxy.&lt;br /&gt;&lt;br /&gt;To understand the underlying vulnerability, configure your web browser so the requests and replies get intercepted in Burp-Proxy. For example,&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;1. A user navigates to the URL http://testingHRS.com/somefile.php?someparam=123 and intercepts the first request as shown.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; font-weight: bold; color: rgb(255, 255, 153);"&gt;GET &lt;span style="color: rgb(255, 0, 0);"&gt;/somefile.php?someparam=123&lt;/span&gt; HTTP/1.1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; font-weight: bold; color: rgb(255, 255, 153);"&gt;Host: www.testingHRS.com&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; font-weight: bold; color: rgb(255, 255, 153);"&gt;User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6)Gecko/20050317 Firefox/1.0.2&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; font-weight: bold; color: rgb(255, 255, 153);"&gt;Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; font-weight: bold; color: rgb(255, 255, 153);"&gt;Accept-Language: en-us,en;q=0.5&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; font-weight: bold; color: rgb(255, 255, 153);"&gt;Accept-Encoding: gzip,deflate&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; font-weight: bold; color: rgb(255, 255, 153);"&gt;Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; font-weight: bold; color: rgb(255, 255, 153);"&gt;Keep-Alive: 300&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; font-weight: bold; color: rgb(255, 255, 153);"&gt;Connection: keep-alive&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;2. When he forwards the request in the Burp-proxy, he sees the first reply that gets intercepted as shown below.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic; color: rgb(255, 255, 153);"&gt;HTTP/1.1 302 Found&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic; color: rgb(255, 255, 153);"&gt;Date: Tue, 12 Apr 2005 21:00:28 GMT&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic; color: rgb(255, 255, 153);"&gt;Server: Apache/1.3.29 (Unix) mod_ssl/2.8.16 OpenSSL/0.9.7c&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic; color: rgb(255, 255, 153);"&gt;Location: &lt;span style="color: rgb(255, 0, 0);"&gt;http://www.testingHRS.com/somefile.php?someparam=123&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic; color: rgb(255, 255, 153);"&gt;Keep-Alive: timeout=15, max=100&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic; color: rgb(255, 255, 153);"&gt;Connection: Keep-Alive&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic; color: rgb(255, 255, 153);"&gt;Transfer-Encoding: chunked&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic; color: rgb(255, 255, 153);"&gt;Content-Type: text/html&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Note the reply is 302-type which means it will redirect the browser to another location. That location (highlighted above) is the same as it is in the ‘Location’ header directive.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Importantly, in Step 1 whatever URL the user types in (requests), gets returned to the requesting user by being included in the 'Location' directive of the 302-reply. Here lies the vulnerability.&lt;br /&gt;&lt;br /&gt;'What’s wrong', you ask. The answer is that the input from the user is not validated at the server-end and is directly included in the ‘Location’ header directive or some other directive. Therefore, to exploit this, an attacker would try to include some malicious data in the response header. Here is how it is done.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Exploitation:&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Consider the same example again. Say an attacker crafts the URL (below in black and red) and sends it to the legitimate user. The attacker uses social-engineering against the user to persuade him to click on the URL link.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic; color: rgb(255, 0, 0);"&gt;http://testingHRS.com/somefile.php?someparam=123%0d%0aContent-Type:%20text/html%0d%0aHTTP/1.1%20200%20OK%0d%0aContent-Type:%20text/html%0d%0a%0d%0a%3Chtml%3E%3Cfont%20 color=red%3EThis%20 is%20malicious%3C/font%3E%3C/html%3E&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;We know,&lt;br /&gt;&lt;br /&gt;CR (carriage return) = \r = %0d&lt;br /&gt;LF (Line Feed) = \n = %0a&lt;br /&gt;&lt;br /&gt;1. So the request will now become:&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 153); font-weight: bold; font-style: italic;"&gt;GET /somefile.php?someparam=123&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold; font-style: italic;"&gt;%0d%0aContent-type:%20text/html %0d%0aHTTP/1.1 %20200%20OK%0d%0aContent-Type:%20text/html %0d%0a%0d%0a%3Chtml%3E%3Cfont%20color=red %3EThis%20is %20malicious %3C/font%3E%3C/html%3E &lt;/span&gt;&lt;span style="font-weight: bold; font-style: italic; color: rgb(255, 255, 153);"&gt;HTTP/1.1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic; color: rgb(255, 255, 153);"&gt;Host: www.testingHRS.com&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic; color: rgb(255, 255, 153);"&gt;User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic; color: rgb(255, 255, 153);"&gt;Gecko/20050317 Firefox/1.0.2&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic; color: rgb(255, 255, 153);"&gt;Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/pla&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic; color: rgb(255, 255, 153);"&gt;in;q=0.8,image/png,*/*;q=0.5&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic; color: rgb(255, 255, 153);"&gt;Accept-Language: en-us,en;q=0.5&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic; color: rgb(255, 255, 153);"&gt;Accept-Encoding: gzip,deflate&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic; color: rgb(255, 255, 153);"&gt;Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic; color: rgb(255, 255, 153);"&gt;Keep-Alive: 300&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic; color: rgb(255, 255, 153);"&gt;Connection: keep-alive&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;2. And the 302-reply will now become:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; font-weight: bold; color: rgb(255, 255, 153);"&gt;HTTP/1.1 302 Found&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; font-weight: bold; color: rgb(255, 255, 153);"&gt;Date: Tue, 12 Apr 2005 21:00:28 GMT&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; font-weight: bold; color: rgb(255, 255, 153);"&gt;Server: Apache/1.3.29 (Unix) mod_ssl/2.8.16 OpenSSL/0.9.7c&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; font-weight: bold; color: rgb(255, 255, 153);"&gt;Location: http://testingHRS.com/somefile.php?someparam=123&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic; color: rgb(255, 0, 0);"&gt;Content-Type: text/html&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic; color: rgb(255, 0, 0);"&gt;HTTP/1.1 200 OK&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic; color: rgb(255, 0, 0);"&gt;//Second New response created by attacker&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic; color: rgb(255, 0, 0);"&gt;Content-Type: text/html&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic; color: rgb(255, 0, 0);"&gt;This is malicious&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic; color: rgb(255, 0, 0);"&gt;…&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;So there will be two replies (Splitted response) – One will be the application generated response and the second one will be the attacker controlled response (HTML). The attacker generated code can be another HTML or it can be something that sets a cookie at the client side, etc.&lt;br /&gt;&lt;br /&gt;It is up to the imagination and skill of an attacker what code he wants to incorporate into that HTML page. The initial crafted URL can be sent to the user via email/chat/etc. Some social engineering is definitely needed so he can convince the user to access that URL.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Some points to note:&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;1. It is definitely not essential that the application will include the user input in the ‘Location’ directive only. I have seen many applications that includes the user input in ‘Cookie’ directive or some other directive. The URL needs to be customized depending upon where the application includes the user input.&lt;br /&gt;&lt;br /&gt;2. It is also not mandatory to have the user input included in the 302-type reply, but any type of reply (200,404, etc) is equally vulnerable if the user input is included without validation.&lt;br /&gt;&lt;br /&gt;Attacks like XSS, CSRF, Cross-user defacement, web-cache poisoning, and all client-side attacks are possible. This is quite serious!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Obvious Mitigation&lt;/span&gt;: Validate the user-input before including it in the Response header. One type of validation that will alleviate most HTTP Response Splitting attacks is to not allow any CR and LF strings.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1486421999184843428-3311393995028858128?l=gunwantsingh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1486421999184843428/posts/default/3311393995028858128'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1486421999184843428/posts/default/3311393995028858128'/><link rel='alternate' type='text/html' href='http://gunwantsingh.blogspot.com/2008/12/http-response-splitting-in-plain-words.html' title='‘HTTP Response Splitting’ in plain words...'/><author><name>Gunwant Singh</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1486421999184843428.post-3288042670006912822</id><published>2008-11-22T00:13:00.000-08:00</published><updated>2008-12-04T00:37:47.459-08:00</updated><title type='text'>OWASP Delhi Chapter Meet-up: Nov 29 2008</title><content type='html'>&lt;div style="text-align: justify;"&gt;Hi all,&lt;br /&gt;&lt;br /&gt;I feel very happy to host another session on the 29 of this month on 'DeMystifying Authentication attacks'. I discussed these issues with one of my ex-client some time back, however there are a lot more interesting facts that I collated some time ago. Issues like improper 'Forgot Password' implementation, improper 'Reset password' Implementation, CAPTCHA issues, advanced SQL Injection, Replay attacks, etc. will be discussed. I would appreciate if you want to take this discussion further so we can learn more.&lt;br /&gt;&lt;br /&gt;See you there. For details, check it out &lt;a href="http://www.owasp.org/index.php/delhi"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1486421999184843428-3288042670006912822?l=gunwantsingh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1486421999184843428/posts/default/3288042670006912822'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1486421999184843428/posts/default/3288042670006912822'/><link rel='alternate' type='text/html' href='http://gunwantsingh.blogspot.com/2008/11/hi-all-i-feel-very-happy-to-host.html' title='OWASP Delhi Chapter Meet-up: Nov 29 2008'/><author><name>Gunwant Singh</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1486421999184843428.post-8390321155163356697</id><published>2008-11-11T01:57:00.000-08:00</published><updated>2008-11-11T07:40:58.552-08:00</updated><title type='text'>CAPTCHA issues !</title><content type='html'>&lt;p style="text-align: justify;"&gt;&lt;br /&gt;ok, CAPTCHAs! A way to tell computers and Humans apart. That's  what CAPTCHA vendors think. However, there can be some serious  weaknesses  in  the CAPTCHAs that can put these mechanisms to a place that involves critical threat to  your applications. Its interesting to talk about these vulnerabilities not just about  how  they should  be implemented  but  also  how  anyone  can  write  a code that can crack some  complex CAPTCHAs. I read some articles that described about what CAPTCHA types are  safe  to implement and how &amp;amp; why they should be implemented.&lt;br /&gt;&lt;br /&gt;This write-up is an attempt  to  discuss CAPTCHA issues that  were  unexplored to a required extent uptil yet but also to  egg  on for further research in this area. I would like  to  share knowledge that  I  gained  while  auditing  web  applications involving CAPTCHAs. I will consider five scenarios to describe the CAPTCHA issues.&lt;br /&gt;&lt;br /&gt;Firstly, consider an application wherein there is a page with a form and a  CAPTCHA. The   developer  has   some  saved  CAPTCHA  images  (say 10, 20, 30 ... whatever is countable) on the server and  the application  code  is  validating  each  displayed CAPTCHA image with the respective value of that specific image. How can an  attacker exploit this scenario? An attacker can explore the application for all images stored on the server to get the corresponding values  of  all  those  images  stored on the server just by visiting the page a number of times. And then, he can write a code to submit the form by throwing  all  the  collected  values  one  by  one  through  the application. One of them obviously will be the correct value for a particular image. This way the attacker has automated the process of submitting forms, although  a bit slow. An attacker can write a script that can  run  consistently comparing all values each time it submits the form to the server - thereby creating a DoS situation. Obvious mitigation: One should rely on a highly random CAPTCHA and not the fixed/stored ones.&lt;br /&gt;&lt;br /&gt;Secondly, consider the same application with a random CAPTCHA each time the page is visited. An attacker checks  the  web page and submits  the  form  in  a  legitimate manner. He  sees  that  when  he  clicks  the 'Back'  button on the browser and hits 'submit' button again, the form values get submitted again with no problem. Now what if he writes a script to submit the same form values and same CAPTCHA value a no. of times..probably a million times or may be more? Thats another issue that needs to be addressed. Mitigation: What I think of is to generate random CAPTCHA with each visit of the  page. Also, at  the  server  side, application must not accept same value of CAPTCHAs  more  than  once. Caching and history control mechanisms would be helpful. Any other thoughts..??&lt;br /&gt;&lt;/p&gt;&lt;p style="text-align: justify;"&gt;Thirdly, an application with sequential CAPTCHA values. Funny enough to discuss! Refresh the page and the CAPTCHA value will change  sequentially. Easy to fool the application. Mitigation: Make  the  CAPTCHA  implementation  highly random.&lt;br /&gt;&lt;br /&gt;Fourthly, it does not matter whatever the CAPTCHA value is - it is not validated  at the server side. There was  this  application  which I audited a long time  back and there was high randomness of the CAPTCHA at the client side but what I found out was there was no validation at the server side or may be there  was but improper. So I strongly recommend to have a proper validation of the CAPTCHA value at  the server side.&lt;br /&gt;&lt;br /&gt;Lastly, I read an article on http://ha.ckers.org that discussed  about  MITM (Man in the Middle) attacks. I totally agree with the idea described there and I think  this is possible. What that  article said was if an attacker hosts a high traffic website and  he writes a code that picks the CAPTCHA  image  from  the  target  website  and displays it on his web site to ask the   users  to  solve  it and then post back the answer back to the target site. This way he can postback the form in an automated way against the target website using a script.&lt;br /&gt;&lt;br /&gt;Moreover I have heard about some people sitting remotely can manually solve CAPTCHAs like solving a few thousands CAPTCHAs for  a  few  dollars (Human  solvers). This is crazy! Practically this can surely be done to launch a DoS/DDoS attack  for some big amount of money. Nonetheless, we  have  3D CAPTCHAs. Interesting! Another  challenge for crackers to crack. Check out an article here: http://spamfizzle.com/CAPTCHA.aspx. Have you  heard  of  PWNTCHA? PWNTCHA  is  an  application that  decodes  different  vendors' CAPTCHAs, to  varying degrees  of accuracy, producing evidence for the case that CAPTCHAs don't do a great job of keeping bad guys out nor of letting good  guys in - LOL. PWNTCHA  stands  for  "Pretend  We're  Not  a  Turing  Computer  but a  Human Antagonist" ha ha. The goal of this project is to demonstrate the inefficiency of many CAPTCHA implementations. Good to know!&lt;br /&gt;&lt;br /&gt;Hopefully this write-up made you understand  of  the  issues that can be critical to even a complex CAPTCHA implementation. There can be more issues which must  also  be considered. These issues are the ones  which  I  found  while  auditing  applications myself - so don't rely just on the ones mentioned here. Please do let me know if you want to further discuss/talk about any CAPTCHA  (or any Security) issue(s) at all. I would be happy to do that. Pleasure is always mine.&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1486421999184843428-8390321155163356697?l=gunwantsingh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1486421999184843428/posts/default/8390321155163356697'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1486421999184843428/posts/default/8390321155163356697'/><link rel='alternate' type='text/html' href='http://gunwantsingh.blogspot.com/2008/11/captcha-issues.html' title='CAPTCHA issues !'/><author><name>Gunwant Singh</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1486421999184843428.post-8774175682319393940</id><published>2008-11-01T15:17:00.000-07:00</published><updated>2008-11-11T02:30:15.387-08:00</updated><title type='text'>Some nice Windows shortcuts</title><content type='html'>&lt;div style="text-align: justify;"&gt;I got this nice info from windowsinternals.com. These are just some good windows shortcuts. Either run from the dos prompt or run prompt in windows (Start &gt; Run).&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;u&gt;Management console shortcuts:&lt;/u&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;Computer Management              compmgmt.msc&lt;br /&gt;Disk Management                  diskmgmt.msc&lt;br /&gt;Device Manager                   devmgmt.msc&lt;br /&gt;Disk Defrag                      dfrg.msc&lt;br /&gt;Event Viewer                     eventvwr.msc&lt;br /&gt;Group Policies                   gpedit.msc&lt;br /&gt;Shared Folders                   fsmgmt.msc&lt;br /&gt;Local Users and Groups           lusrmgr.msc&lt;br /&gt;Performance Monitor              perfmon.msc&lt;br /&gt;Resultant Set of Policies        rsop.msc&lt;br /&gt;Local Security Settings          secpol.msc&lt;br /&gt;Services                         services.msc&lt;br /&gt;Component Services               comexp.msc&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;u&gt;Control Panel Shortcuts:&lt;/u&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Security Center                   wscui.cpl&lt;br /&gt;Display Properties                desk.cpl&lt;br /&gt;Firewall Settings                 firewall.cpl&lt;br /&gt;Internet Options                  inetcpl.cpl&lt;br /&gt;Network Connections               ncpa.cpl&lt;br /&gt;Sound and Audio                   mmsys.cpl&lt;br /&gt;User Accounts                     nusrmgr.cpl&lt;br /&gt;Power Options                     powercfg.cpl&lt;br /&gt;System Properties                 sysdm.cpl&lt;br /&gt;Add/Remove Programs               appwiz.cpl&lt;br /&gt;Automatic Updates Configuration   wuaucpl.cpl&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1486421999184843428-8774175682319393940?l=gunwantsingh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1486421999184843428/posts/default/8774175682319393940'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1486421999184843428/posts/default/8774175682319393940'/><link rel='alternate' type='text/html' href='http://gunwantsingh.blogspot.com/2008/11/i-got-this-nice-info-from.html' title='Some nice Windows shortcuts'/><author><name>Gunwant Singh</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1486421999184843428.post-5898495378911946411</id><published>2008-10-18T10:48:00.000-07:00</published><updated>2008-11-28T01:58:51.819-08:00</updated><title type='text'>OWASP Delhi Chapter Meeting held today</title><content type='html'>&lt;div style="text-align: justify;"&gt;It was absolute fun.&lt;br /&gt;&lt;br /&gt;Pics: http://picasaweb.google.com/pukhraj/OWASPDelhiConferenceOctober182008&lt;br /&gt;&lt;br /&gt;Guys I am really thankful to all of you who've taken participation in the chapter meeting and have appreciated all of us presenters. I am also thankful to the organisers especially Dhruv and Puneet who've given me such an excellent oppurtunity to share my work with all of you. I really enjoyed the other two presentations and ofcourse the company of all you guys. I hope there will be more such knowledge sharing sessions in future that will help us in all ways and I hope you will support the same way in future as well.&lt;br /&gt;&lt;br /&gt;You can download the presentations here:&lt;br /&gt;http://www.owasp.org/index.php/OWASP_Delhi_Meeting_October_18th_2008#Event_Presentations&lt;br /&gt;&lt;br /&gt;Any queries, buzz me at (gunwant dot s at gmail dot com). I will also try to add more research work here as I get time.&lt;br /&gt;&lt;br /&gt;Thank you all.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1486421999184843428-5898495378911946411?l=gunwantsingh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1486421999184843428/posts/default/5898495378911946411'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1486421999184843428/posts/default/5898495378911946411'/><link rel='alternate' type='text/html' href='http://gunwantsingh.blogspot.com/2008/10/owasp-delhi-chapter-meeting-held-today.html' title='OWASP Delhi Chapter Meeting held today'/><author><name>Gunwant Singh</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1486421999184843428.post-3585601590535902288</id><published>2008-10-14T22:10:00.000-07:00</published><updated>2008-11-11T02:29:03.608-08:00</updated><title type='text'>OWASP Delhi Chapter meeting 2008</title><content type='html'>Hey,&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;So there is another meeting in 2008 after the big OWASP AppSec Conference in Delhi. I will be speaking on XSS, CSRF , some infamous attacks (Cross site tracing, Cross site cooking) and a few XSS variants. There are guys who will be speaking on Client side attacks , Web services and things like that. Seems interesting! Hope to see you all there.&lt;br /&gt;&lt;br /&gt;Cheers.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1486421999184843428-3585601590535902288?l=gunwantsingh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1486421999184843428/posts/default/3585601590535902288'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1486421999184843428/posts/default/3585601590535902288'/><link rel='alternate' type='text/html' href='http://gunwantsingh.blogspot.com/2008/10/owasp-delhi-chapter-meeting-2008.html' title='OWASP Delhi Chapter meeting 2008'/><author><name>Gunwant Singh</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1486421999184843428.post-1018164505026641550</id><published>2008-06-23T09:58:00.000-07:00</published><updated>2008-11-11T02:30:30.770-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='First timer'/><title type='text'>Information Security</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;span style="font-family:verdana;"&gt;Hi,&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;Welcome to my blog spot. This is the first time I am on blog spot. I will add posts on application security, network security and other topics of information security. I am building this up as I get time. Please bear with me.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;Thanks.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1486421999184843428-1018164505026641550?l=gunwantsingh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1486421999184843428/posts/default/1018164505026641550'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1486421999184843428/posts/default/1018164505026641550'/><link rel='alternate' type='text/html' href='http://gunwantsingh.blogspot.com/2008/06/perl-programmming.html' title='Information Security'/><author><name>Gunwant Singh</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1486421999184843428.post-4890643952604736755</id><published>2008-01-27T09:00:00.000-08:00</published><updated>2011-06-04T00:00:43.350-07:00</updated><title type='text'>Gunwant.PublicKey</title><content type='html'>-----BEGIN PGP PUBLIC KEY BLOCK-----&lt;br /&gt;Version: GnuPG v2.0.14 (GNU/Linux)&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;mQENBE3p1goBCADpq/3FQFm9RoODYdZvA7ClLHKZbmYktXSa3OJdNQI9VxX44bgF&lt;br /&gt;aQE9HgzteX7OlucVX6A1bD9/8pjg+erjjzNzi9ldtv9TYErjbri3XMNYOwSBlZA4&lt;br /&gt;WF+xiZwtJ2ziJE21GfnQBhEBikFxp1Z30VUJBqVAia2v7gJd2LIqTJRuOgAJSzzB&lt;br /&gt;/K3WUGwFQ62foXesgWuYCntXdG0YpVku8yrOpKhvilkAtj38byxAFZSjbp/3oz34&lt;br /&gt;H0FTRJhRo+YiIhu4+e5SzJGB2QHJVOfOA5GtYqWtbizIpXfAD1jP8dQyowh/7H2z&lt;br /&gt;OzuO1WPHZ5wq28Cpq2SmTIs1MUq0lOqRzgk9ABEBAAG0I0d1bndhbnQgU2luZ2gg&lt;br /&gt;PGd1bndhbnQuc0BnbWFpbC5jb20+iQE4BBMBAgAiBQJN6dYKAhsDBgsJCAcDAgYV&lt;br /&gt;CAIJCgsEFgIDAQIeAQIXgAAKCRBX8R76Z8PnZUKiCACvHb14v3XI7ieGWLSDC8+f&lt;br /&gt;xiXjYw6G9sa2qacAJiYqeqJGDikr0oghMYC1FwsR5yChH0U6m/0RpgesFutsMUu+&lt;br /&gt;ZbMD1vdzkX+RILG3ziR8LEErgUuNOf7gno0W3oS5hiAXWRYGxs49cDALhqm/wbkW&lt;br /&gt;gqQtVY0MLORwBNn+NCgs40j0DvYWxmA+FAIBtZj38YzRDGFtWyhcZtXYDmN00Qw3&lt;br /&gt;XcQqouTPrkPig2r8K0oIAuOPqoRGFZf6PUfStgpOvxmeGOil0i9iowUCgNrtULyM&lt;br /&gt;Ks+FXcH2VUIMfVrunw2/a+XbulzHdNTo8bZuld/NHhRirk0hbSv0RLP72FdGwOjV&lt;br /&gt;uQENBE3p1goBCADEtAPuvEGTl4ZW1vJKkjP4ShKz2q6IOTIbQ8Egco+XVs+XoAGp&lt;br /&gt;hgnkdy6B7C7mv3kYDUoKc/IwkJu8gozee2FDBw42uFEgrUav4JNXlgjsp1ZcnG3i&lt;br /&gt;TaM8zbthc0f/MPXv0d8e6kNTt6eSfAVzblJ4qKC1pCRlJKyTHttVCdeglXPT90WQ&lt;br /&gt;i8NWDfNYSc7F/ep32QfWfWB+WzuoHtBefw7LDaPbW4umu+IHdAYqek72nKrD1ojc&lt;br /&gt;er4B+v+NELdGybIc0it99F2TfAUNE+fa4TrPBFgOd4clxhRJRj23W+tTmnP4CEeL&lt;br /&gt;rBq62fefDIpbuEUtBlhkr038FVpcW7SoRABJABEBAAGJAR8EGAECAAkFAk3p1goC&lt;br /&gt;GwwACgkQV/Ee+mfD52UO1wf/XBQOocQC8iyZb4pJWdm16SNSXO7WZxdD4wuNmqgL&lt;br /&gt;7L1FFREjIZr+qxsRhuhZwb+sxd1DYJpe6NreQVAIX+MKXWkZAfC4CiJnTEwdlome&lt;br /&gt;cwdD7QBR3f09SXo8hG0GJLzm27353Co/vu/c052Ld3/Rql+13AH9Yrjh+uEdN+2L&lt;br /&gt;+nemgCIj/xHlqtJ1AYq+RngSuzNGBuZ6mZtU+mzxffaRQxAT9iA7uV3HwrClaJag&lt;br /&gt;4hPSJgPCCPBgwoOEwSJzMpkCWU6pVK+6zW/rWzMdr9ckI2H4pwVdlbdr2U0hwSNI&lt;br /&gt;hzQ+5SdSzihbOyI2msiTMBAcOh52KCaTWbAOMSJVqa12cA==&lt;br /&gt;=aFkC&lt;br /&gt;&lt;/div&gt;-----END PGP PUBLIC KEY BLOCK-----&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1486421999184843428-4890643952604736755?l=gunwantsingh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1486421999184843428/posts/default/4890643952604736755'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1486421999184843428/posts/default/4890643952604736755'/><link rel='alternate' type='text/html' href='http://gunwantsingh.blogspot.com/2008/01/gunwantpublickey.html' title='Gunwant.PublicKey'/><author><name>Gunwant Singh</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry></feed>
