Skip to main content

Posts

My article in Hakin9

I am very pleased to inform that my article "SSLStrip on Windows" got published in a prominent magazine-Hakin9. I am bit excited because it's my first ever publication. I am encouraged to write more. Click here to download the July issue of the magazine.

SSLStrip Video

SSLStrip is still haunting me ;). In my organization I was told to make a video of it. I know its a very old concept now but I have to comply by the instructions. So I made it and thought to place on my blog. There won't be any audio with it. So if you are unaware of what the tool does or how it does please refer to my previous post . Caution : The video may not be so professional and finishing touch. Inconvenience is regretted! :)

XSS and WAF

Many people depend on Web Application Firewall to protect their applications without applying security on the application itself. They assume that it can make them secure automatically as it will thwart a lot of attacks. They also argue in favor of that. I don't say that WAFs are ineffective. I argue that your application should be secure itself in first place irrespective of WAF is deployed or not deployed. WAFs are also vulnerable and can be bypassed then its only your application security mechanism can thwart the attacks. Lots of time researchers have shown how to bypass WAFs. But recently I came across a nice post by Sando Gauci of EnableSecurity in which he exploited the XSS in admin interface of a WAF and disabled the WAF completely. So the application behind can be reached without any restriction! I found it very useful to teach people and to stress on application security. Here is the attack in action. Demo of a cross site scripting in dotDefender's admin interface fr...

NULL Prefix attack against SSL certificates

I was show casing the SSLStrip tool in my office. Everybody was asking how it works. Security Researcher Moxie had released two tools SSLSniff and SSLStrip during Black Hat 2009. These tools were capable of doing MITM on SSL connection. They exploited a weakness in signing the certificates. SSL heavily rely on X509 certificate structure to prove authenticity. For the SSL it is the 'common name field' of the X509 certificate that is used to identify authentic servers. For example, Paypal will used 'www.paypal.com' in the common name field. The signing process heavily relies on the above convention. The Certificate Authorities will sign 'www.paypal.com', they don't care whether you are requesting for 'anything.paypal.com' or 'anything1.anything.paypal.com'- as long as you prove that you are paypal .com. The Trick: X509 certificates are commonly formatted using ASN .1 notation. ASN .1 supports many string types but all of them are repr...

Holistic Approach to Code Review

These days I am doing code review. Good, I am learning one more new thing apart from Network scanning and Server security assessment. Code review is a very complex process. You have to be familiar with at least one language, rest of languages you will automatically learn as time passes. Automated code review is a process where you run the scanning tools like Fortify on the code base followed by manual auditing of them. The scanner flags the whole code base with vulnerabilities based on its perception. Now its job of the auditor to differentiate between real issues and false positives. Here the real pain starts. You don't have command over each and very language. So taking help of the language specific resources is required. Now the situation is I have got familiar with almost all major language ( .NET, Java, PHP) specific vulnerabilities. Doing Black box assessment you never come to know , where the real problem lies. But Code review gives you the complete picture of the vulnerabi...

DoS with LIKE query

I was assessing an application. The application was properly sanitizing all the characters which have special meaning for SQL Injection attack. So SQL Injection was not possible in the application. But then again I came across few search modules in the application where it was taking input of part numbers to proceed. I entered single quote(') and the application was perfectly filtering it returning "Parts can't be found". Then out of curiosity I entered '%' character and observed the response. Now the application stuck into the loop of the search continuously searching.The two things I deduced from it: 1. The application was using LIKE query to search matching terms. 2. This can be used to perform a DoS by overloading the database. The % and _ qualifier is often overlooked by developers to filter as its not so devastating as other characters. They are used for matching 0 or more characters and single character respectively. $ searhterm = mysql _real_escape...

Secure Network Architecture Desing

Few days back I was going through an article on "Managing Network Security". Although it was a bit technical, it presented some fundamental idea about designing secure network architecture of an organization. I just picked up few points from the article easy-to-grasp, left the detailed and technical ones. Design a secure network architecture: 1. Make sure hosts are not permitted to access the Internet directly. They should access it through content filtering proxies capable of scanning the packets for malicious code. If they need to be connected by a NAT rule on the firewall, ensure that the necessary network and security controls (such as desktop firewall, antivirus and antispyware tools) are present on the host. 2. All emails should pass through a secure mail gateway that is capable of filtering email threats. 3. Implement strong authentication for accessing networked resources. 4. Host hardening lowers the chances of system compromise or exploitation. Stick to best practic...