<?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>Neohaxor.org</title>
	<atom:link href="http://www.neohaxor.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.neohaxor.org</link>
	<description>InfoSec / Critical Thinking / Misc Crap</description>
	<lastBuildDate>Sat, 12 Dec 2009 19:53:59 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Enumerating Dropbox Resources</title>
		<link>http://www.neohaxor.org/2009/12/11/enumerating-dropbox-resources/</link>
		<comments>http://www.neohaxor.org/2009/12/11/enumerating-dropbox-resources/#comments</comments>
		<pubDate>Fri, 11 Dec 2009 20:09:53 +0000</pubDate>
		<dc:creator>Nathan Hamiel</dc:creator>
				<category><![CDATA[Application Security]]></category>
		<category><![CDATA[cloud application]]></category>
		<category><![CDATA[cloud storage]]></category>
		<category><![CDATA[dropbox]]></category>
		<category><![CDATA[enumerating]]></category>
		<category><![CDATA[resource enumeration]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[vulnerability]]></category>

		<guid isPermaLink="false">http://www.neohaxor.org/?p=225</guid>
		<description><![CDATA[
Ok, first order of business, I love Dropbox. If you are unfamiliar with Dropbox it is a popular cloud based syncing / storage / sharing application for your files. It allows you to store files, roll back changes, etc. You can get more familiar with them by visiting their site https://www.getdropbox.com
Now that I am done [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img src="http://farm5.static.flickr.com/4048/4175012762_56fb9c40dc_m.jpg" alt="Dropbox Logo" /></p>
<p>Ok, first order of business, I love <a href="https://www.getdropbox.com">Dropbox</a>. If you are unfamiliar with <a href="https://www.getdropbox.com">Dropbox</a> it is a popular cloud based syncing / storage / sharing application for your files. It allows you to store files, roll back changes, etc. You can get more familiar with them by visiting their site <a href="https://www.getdropbox.com">https://www.getdropbox.com</a></p>
<p>Now that I am done singing the praises of Dropbox, it&#8217;s time to get to the nitty gritty. This issue isn&#8217;t necessarily devastating for Dropbox, but could lead to some larger issues with other cloud based providers. The reason I am writing about this issue is because I think it can aid other individuals in the design of their applications. Let&#8217;s face it, cloud based applications and storage aren&#8217;t going anywhere.</p>
<h3>What You Should Notice</h3>
<p style="text-align: left;">One of the first things you should notice after installing Dropbox is that it sets up some files and folder structure for you.<br />
<img class="aligncenter" src="http://farm3.static.flickr.com/2694/4176774670_50305e7038_o.png" alt="Dropbox1" width="547" height="429" /></p>
<p style="text-align: left;">A few of the folders are <strong>Documents</strong>, <strong>Photos</strong>, and <strong>Public</strong>. A couple of files that show up are <strong>This is your Dropbox.txt</strong> and if you have installed the iPhone app you get the <strong>iPhone intro.pdf</strong>. Your Public folder is where you can put files that you want to share with via a public URL.</p>
<p style="text-align: center;"><img class="aligncenter" src="http://farm3.static.flickr.com/2686/4176014629_476ca0acdd_o.png" alt="Dropbox Public" width="538" height="384" /></p>
<p style="text-align: left;">So by default you get a Public folder with a public file that is shared called &#8220;Top Secret.txt&#8221;. If you go to the Dropbox menu you can obtain a link for the public file that has the following structure:</p>
<p style="text-align: left;"><span style="color: #3366ff;">http://dl.dropbox.com/u/<span style="color: #ff0000;">{acct number}</span>/Top%20Secret.txt</span></p>
<p style="text-align: left;">So now you have a known resource  with a known location. By simply requesting this resource and changing the account number you can enumerate through valid accounts. In doing this it will become apparent relatively quickly that account numbers are sequential. You would also notice that most people do not delete any of pre-installed default files even though they are unnecessary. These files are Dropbox&#8217;s way of communicating with you about what the folder should be for or about something the application does.</p>
<p style="text-align: left;">It is fairly simple to enumerate through account numbers and come up with a list of valid users, you could do this in just a couple of lines of <a href="http://python.org">Python</a> code:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">#!/usr/bin/env python</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">httplib</span>
&nbsp;
f = <span style="color: #008000;">open</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;dropbox_accts.txt&quot;</span>, <span style="color: #483d8b;">&quot;w&quot;</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">for</span> num <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: #008000;">range</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">1440000</span>, <span style="color: #ff4500;">1450000</span><span style="color: black;">&#41;</span>:
    request_string = <span style="color: #483d8b;">&quot;/u/{0}/Top%20Secret.txt&quot;</span>.<span style="color: black;">format</span><span style="color: black;">&#40;</span>num<span style="color: black;">&#41;</span>
    conn = <span style="color: #dc143c;">httplib</span>.<span style="color: black;">HTTPConnection</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;dl.dropbox.com&quot;</span><span style="color: black;">&#41;</span>
    conn.<span style="color: black;">request</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;GET&quot;</span>, request_string<span style="color: black;">&#41;</span>
    req = conn.<span style="color: black;">getresponse</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">if</span> req.<span style="color: black;">status</span> == <span style="color: #ff4500;">200</span>:
        <span style="color: #ff7700;font-weight:bold;">print</span><span style="color: black;">&#40;</span>req.<span style="color: black;">status</span><span style="color: black;">&#41;</span>
        f.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;{0}<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>.<span style="color: black;">format</span><span style="color: black;">&#40;</span>num<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></pre></div></div>

<p style="text-align: left;">What this does is enumerate through account numbers from 1440000 to 1450000, and if there is a return on Top Secret.txt, it records the number in to a file called dropbox_accts.txt.</p>
<h3>Why This Is A Problem</h3>
<p>This is a problem for multiple reasons. First of all, it allows an attacker to determine valid accounts on the system. This gives an attacker a starting point for an attack on an account. Another thing to note is that it shows accounts are created sequentially which could lead to other issues.</p>
<p>Working on account enumeration it would be possible for an attacker or someone tracking Dropbox to determine how many new users they have per a certain period of time just by starting where they left off with their previous enumeration activities.</p>
<p>The issue might allow an attacker to try to obtain some information about a particular user through sifting through their public files, if they were guessed. Yes, an attacker would have to guess the name of a valid file but we as humans tend to name files descriptively, so it may be easier than it seems. There is no randomness attached to the filename /URI that would deter this type of activity. After sifting through this data it may be possible to determine the name of the individual who owns the account. Another thing you might find from this activity is an email address associated with the login of the account. If they were to obtain the email they would have the login (email), account number, and the person&#8217;s real name. It would not completely out of the question to find something like resume.doc in a user&#8217;s Public folder. This is a lot more than an attacker should have.</p>
<p>Now this shouldn&#8217;t be a huge deal because it is a &#8220;public&#8221; folder, it should be assumed that everything in there could be accessed by anyone, but people don&#8217;t always make the best choices when it comes to sharing. Many people who use Dropbox use this folder to share things with their friends, not the entire world.</p>
<p>Probably most important, is that they are using known resources and locations. This can be a particularly bad issue for cloud based applications due to their public nature. Every Dropbox account has several folders set up by default along with several files added. These rarely get changed and just get utilized by users. Giving an attacker known resources and locations goes a long way to a successful attack. It allows an attacker to gauge success or failure of a given attack and gives them ready-made resources on which to focus their attacks.</p>
<p>Dropbox uses these files in their private directory structure as well, which opens the doors for some interesting possibilities. I have not really dug in to their API or too much in to their web interface to really say where this might be an issue, but the groundwork can be done in relatively small period of time.</p>
<p>Without having any kind of knowledge how the back end of Dropbox works, it&#8217;s hard to tell whether any of the information (ie Account Number) that can be be enumerated can be used to attack user files at rest. It may be hugely important or totally innocuous. I am assuming they have probably thought of this, but you never know.</p>
<h3>What&#8217;s The Takeaway</h3>
<p>People designing cloud based applications and storage should be aware that creating items with known locations could increase their attack surface by giving attackers something to work with. This should be kept to a minimum. Users should be defining the structure of their storage and setting up names for their resources. If you need to communicate with users, it should be done in a message format vs leaving a standard named file in a known location.</p>
<p>Public resources, even though they are public should have some form of randomness added to their resource locations. This way, it is not extremely easy for an attacker to enumerate resources and gain information about the application and its users. It would be a better idea to take the approach that <a href="http://www.flickr.com">Flickr</a> does with it&#8217;s randomized URLs for photos. That way it is not easy to map a resource to a given user or account number.</p>
<p>When numbers associated with accounts are exposed, they should take on some form of randomness or there should at least not be any exposed method that would allow someone to enumerate through them easily.</p>
<p>Threat modeling should be done on the application during the design phase allowing for the identification of issues before they get worked in to production. Always think about how the application could be abused. You would think this would be second nature by now, but so many organizations are not doing this.</p>
<p>If you are Dropbox user you should delete the default files that are created by Dropbox, especially the Top Secret.txt that is in your Public folder.</p>
<h3>In Closing</h3>
<p>In closing not extremely devastating on the surface for Dropbox, but definitely food for thought for anyone working on the design of cloud based applications. Issues like this are definitely not isolated to Dropbox. I wrote a tool about a year and a half ago (that I had forgotten about by the way) for pulling valid users and data out of Apple&#8217;s <a href="http://www.me.com">MobileMe</a> service. An issue that still exists to this day. Cloud providers need to be thinking about this stuff in the design phase because it is hard to make changes after deployment.</p>
<p style="text-align: left;">
<p style="text-align: left;">
]]></content:encoded>
			<wfw:commentRss>http://www.neohaxor.org/2009/12/11/enumerating-dropbox-resources/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Social Media Strategy and Implementation</title>
		<link>http://www.neohaxor.org/2009/09/17/social-media-strategy-and-implementation/</link>
		<comments>http://www.neohaxor.org/2009/09/17/social-media-strategy-and-implementation/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 14:38:58 +0000</pubDate>
		<dc:creator>Nathan Hamiel</dc:creator>
				<category><![CDATA[Social Networking]]></category>
		<category><![CDATA[attack platforms]]></category>
		<category><![CDATA[Attacking]]></category>
		<category><![CDATA[Social Network Applications]]></category>
		<category><![CDATA[social networking]]></category>

		<guid isPermaLink="false">http://www.neohaxor.org/?p=216</guid>
		<description><![CDATA[
I will be speaking at MITRE&#8217;s Social Media Strategy and Implementation Workshop in the Washington, DC area on September 28th. My topic is Attacking Social Networks. The goal of the talk is to show some of the darker aspects of social networking. These will be items and attack vectors that people may not be thinking [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img class="aligncenter" src="http://farm4.static.flickr.com/3457/3929130756_46a668a69c_o.png" alt="SocmedStrategy" width="300" height="86" /></p>
<p style="text-align: left;">I will be speaking at MITRE&#8217;s <a href="http://socmedstrategy.eventbrite.com/">Social Media Strategy and Implementation Workshop</a> in the Washington, DC area on September 28th. My topic is Attacking Social Networks. The goal of the talk is to show some of the darker aspects of social networking. These will be items and attack vectors that people may not be thinking about. Believe it or not some people are still oblivious to common social network attacks <img src='http://www.neohaxor.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  If you are in the DC area stop on by.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.neohaxor.org/2009/09/17/social-media-strategy-and-implementation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Removing Duplicates with Python</title>
		<link>http://www.neohaxor.org/2009/08/20/removing-duplicates-with-python/</link>
		<comments>http://www.neohaxor.org/2009/08/20/removing-duplicates-with-python/#comments</comments>
		<pubDate>Thu, 20 Aug 2009 16:02:39 +0000</pubDate>
		<dc:creator>Nathan Hamiel</dc:creator>
				<category><![CDATA[Python Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Remove Duplicates]]></category>
		<category><![CDATA[set]]></category>
		<category><![CDATA[type conversion]]></category>

		<guid isPermaLink="false">http://www.neohaxor.org/?p=194</guid>
		<description><![CDATA[
I haven&#8217;t really written much about Python lately. I have a feeling that is about to change   Python is great because it is powerful and allows you to do things very quickly. I figured I would write a short post to show how to remove duplicates by just using the set type. This [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img class="aligncenter" title="Python Logo" src="http://farm4.static.flickr.com/3516/3837063601_d7dbcdba6e_o.png" alt="" width="240" height="85" /></p>
<p style="text-align: left;">I haven&#8217;t really written much about <a href="http://www.python.org">Python</a> lately. I have a feeling that is about to change <img src='http://www.neohaxor.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  Python is great because it is powerful and allows you to do things very quickly. I figured I would write a short post to show how to remove duplicates by just using the set type. This is probably the quickest and easiest way of removing duplicates in Python.</p>
<p style="text-align: left;">I don&#8217;t think I need to get in to how useful it can be to easily remove duplicates. I have used this many times in the past for doing everything from removing duplicate values from a list of SQL Injection checks to just determining how many unique occurrences I have for a given test.</p>
<h3>set</h3>
<p>Python has a type called a <a href="http://docs.python.org/library/stdtypes.html#set-types-set-frozenset">set</a>. A set is basically an unordered collection of unique values. You can create a set by specifying a new empty set and adding values to it or by converting another type. The set conversion can be done over any iterable object.</p>
<p>Create a new empty set called myset:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;">myset = <span style="color: #008000;">set</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></pre></div></div>

<p>You can add values to your set by using add or update:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;">myset.<span style="color: black;">add</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;hello&quot;</span><span style="color: black;">&#41;</span>
myset.<span style="color: black;">update</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;world&quot;</span><span style="color: black;">&#41;</span></pre></div></div>

<p>Convert another type to a set called newset:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;">newset = <span style="color: #008000;">set</span><span style="color: black;">&#40;</span>another_type<span style="color: black;">&#41;</span></pre></div></div>

<p>Sets in Python are nice for a couple of reasons. The first being they only keep unique values. This means that any type you convert to a set or anything you add to a set is unique. It will discard duplicate values. Secondly, you can test for membership in the set. Testing for membership will give you a True / False response based on whether a value exists in the set.</p>
<p>Here are some examples</p>
<p>Converting a list to a set.</p>
<p style="text-align: center;"><img class="aligncenter" title="Conversion from list to set" src="http://farm3.static.flickr.com/2611/3840174182_cb7434d80c_o.png" alt="Conversion from list to set" width="610" height="118" /></p>
<p>Even strings are iterable objects in Python. String conversion to set.</p>
<p style="text-align: center;"><a href="http://farm4.static.flickr.com/3504/3840174228_21beaa1de1_o.png"><img class="aligncenter" title="Conversion string to set" src="http://farm4.static.flickr.com/3504/3840174228_21beaa1de1_o.png" alt="" width="275" height="120" /></a></p>
<p>The following shows True / False values for membership tests from the previous string conversion.</p>
<p style="text-align: center;"><a href="http://farm3.static.flickr.com/2517/3840174280_15905c6989_o.png"><img class="aligncenter" title="Membership testing in set" src="http://farm3.static.flickr.com/2517/3840174280_15905c6989_o.png" alt="" width="272" height="176" /></a></p>
<h3>Practical Example</h3>
<p>Let&#8217;s say you wanted to write a small program that took a file, removed the duplicates, and created a new file with only unique values. The file that contains the duplicates has one value per line, which means there is a newline at the end of each item. You want to maintain the newline in the new unique file that you are writing to as well. You will see the newlines in the following specified by &#8220;\n&#8221;.</p>
<p>The following is an example:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">#!/usr/bin/env python</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">sys</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #008000;">len</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">sys</span>.<span style="color: black;">argv</span><span style="color: black;">&#41;</span> <span style="color: #66cc66;">&lt;</span> <span style="color: #ff4500;">3</span>:
    <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;Usage: remove_dups.py original_file.txt unique_file.txt&quot;</span>
    <span style="color: #dc143c;">sys</span>.<span style="color: black;">exit</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span>
&nbsp;
file1 = <span style="color: #008000;">open</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">sys</span>.<span style="color: black;">argv</span><span style="color: black;">&#91;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#93;</span><span style="color: black;">&#41;</span>
file2 = <span style="color: #008000;">open</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">sys</span>.<span style="color: black;">argv</span><span style="color: black;">&#91;</span><span style="color: #ff4500;">2</span><span style="color: black;">&#93;</span>, <span style="color: #483d8b;">&quot;w&quot;</span><span style="color: black;">&#41;</span>
&nbsp;
unique = <span style="color: #008000;">set</span><span style="color: black;">&#40;</span>file1.<span style="color: black;">read</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>.<span style="color: black;">split</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
&nbsp;
file2.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;&quot;</span>.<span style="color: black;">join</span><span style="color: black;">&#40;</span><span style="color: black;">&#91;</span>line + <span style="color: #483d8b;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> <span style="color: #ff7700;font-weight:bold;">for</span> line <span style="color: #ff7700;font-weight:bold;">in</span> unique<span style="color: black;">&#93;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
file2.<span style="color: black;">close</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></pre></div></div>

<p>I will explain a bit of what&#8217;s happening here. Let&#8217;s say we have copied this in to a file called remove_dups.py. This program takes two arguments, your original file and the name of the file you want to create without the duplicates. If it doesn&#8217;t have the two arguments the program exits.</p>
<p>Next both files are opened, with the second file opened for writing. The first file is read in splitting on newlines. The unique variable now contains the unique values. We then write to the second file every line concatenating a newline on the end. This makes the second file contain the unique values one per line.</p>
<p>You now now how to remove duplicates in Python using the set type. Knowing is half the battle <img src='http://www.neohaxor.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>Update</strong></p>
<p>I wrote this post very quickly and didn&#8217;t explain about my use of read() vs using readlines(). Marcin pointed out yesterday that it wasn&#8217;t clear. I wanted to show how you could use read() and split on newline characters. My hope was that you would see how you could split on any character when reading a file like commas, semicolons, asterisks, or anything really.</p>
<p>In the code example above, if you wanted to read in a file per line instead of splitting on the &#8220;\n&#8221; character you could just use readlines() instead.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.neohaxor.org/2009/08/20/removing-duplicates-with-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MonkeyFist Fu: The Intro</title>
		<link>http://www.neohaxor.org/2009/08/12/monkeyfist-fu-the-intro/</link>
		<comments>http://www.neohaxor.org/2009/08/12/monkeyfist-fu-the-intro/#comments</comments>
		<pubDate>Wed, 12 Aug 2009 18:14:27 +0000</pubDate>
		<dc:creator>Nathan Hamiel</dc:creator>
				<category><![CDATA[Application Security]]></category>
		<category><![CDATA[Bypassing CSRF Protections]]></category>
		<category><![CDATA[Cross Site Request Forgery]]></category>
		<category><![CDATA[Dynamic CSRF]]></category>
		<category><![CDATA[MonkeyFist]]></category>

		<guid isPermaLink="false">http://www.neohaxor.org/?p=184</guid>
		<description><![CDATA[
MonkeyFist is a dynamic request attack tool. It allows you to do some interesting things with various forms of cross-site requests and play them back to the user’s browser. These requests may contain session information bypassing Cross-Site Request Forgery protection mechanisms. It’s really a lot more simple than it seems.
MonkeyFist is basically a small web [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img class="aligncenter" src="http://farm3.static.flickr.com/2607/3814323619_7a1f60ee5e_o.png" alt="MonkeyFist Image" /></p>
<p>MonkeyFist is a dynamic request attack tool. It allows you to do some interesting things with various forms of cross-site requests and play them back to the user’s browser. These requests may contain session information bypassing Cross-Site Request Forgery protection mechanisms. It’s really a lot more simple than it seems.</p>
<p>MonkeyFist is basically a small web server that performs some attacks on the data it receives based on information you provide in the payloads.xml file. To do a deeper dive in to the issues that MonkeyFist exploits you can refer to the white paper we wrote prior to Black Hat on Dynamic CSRF located on the docs page of Hexsec <a href="http://hexsec.com/docs">http://hexsec.com/docs</a></p>
<p>The best way to get familiar with MonkeyFist is just to dive right in. If you haven’t done so, you can go here to download it from the Hexsec Labs page <a href="http://hexsec.com/labs">http://hexsec.com/labs</a></p>
<p>MonkeyFist requires you be intimately familiar with the request you want to forge. This should be painfully obvious because you need to tell the tool how to construct the request in order for it to be successful.</p>
<h3>The Files</h3>
<p>There isn’t much to MonkeyFist, all of the files are pretty small. There are a few items in the zip file, but you really only need to worry about MonkeyFist.py and payloads.xml. All of the configuration for payloads in MonkeyFist is done through payloads.xml. We will get in to syntax in another post. In case you didn’t notice the .py extension, MonkeyFist is written in Python. So if your operating system doesn’t have Python installed (Probably just Windows systems) you are going to need it. I suggest version 2.5 or greater. The version that comes with most Linux distributions and OSX is fine. As a final note about the files, ensure that you run MonkeyFist from the same directory as the other files that come with it. Otherwise, it won’t know where they are located <img src='http://www.neohaxor.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<h3>Dependencies</h3>
<p>In the beginning there were no further dependencies but I a saw it was necessary to potentially need to do some more complex parsing for the fixation payload. For that reason I decided to add <a href="http://codespeak.net/lxml">lxml</a>. I could have gotten away with a more simple parser, but was trying to think ahead a bit. To use the Fixation payload you are going to need to install a 2.x version of lxml. This would be different depending on your operating system. If you are using Ubuntu / Debian don&#8217;t just to to apt install lxml, it will give you an old version. Python setuptools helps a lot, it&#8217;s just a good idea to use that anyway.</p>
<p>For OSX Leopard (Make sure you have the development tools installed) I just ran:</p>
<pre><span style="color: #3366ff;">sudo easy_install lxml</span></pre>
<p>For Ubuntu you have to take a few other steps because you need a few dependencies and the development headers for Python.</p>
<p>If you don’t have setuptools installed:</p>
<pre><span style="color: #3366ff;">sudo apt-get install python-setuptools</span></pre>
<p>Then you need to apt-get install the following if you do not have them installed:<br />
libxml2-dev<br />
libxslt1-dev<br />
python2.5-dev</p>
<p>After that you can go ahead and:</p>
<pre><span style="color: #3366ff;">sudo easy_install lxml</span></pre>
<p>If you have build problems you probably don’t have the build tools installed:</p>
<pre><span style="color: #3366ff;">sudo apt-get install build-essential</span></pre>
<p>Then run easy_install again.</p>
<p>If you decide not to run lxml or do not have the ability to install it, the tool will still run you just won’t be able to use the Fixation handler without a nice failure and error message <img src='http://www.neohaxor.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h3>Payload Types</h3>
<p>There are several types of payloads you can construct with MonkeyFist. Each of these would depend on what the goal of the attack would be or the type of content on a site you would have control over. The basic payload types are dynamic redirect, POST construct, dynamic page, and fixation.</p>
<h3>Dynamic Redirect</h3>
<p>The dynamic redirect payload simply parses any cross-domain information looking for session data to dynamically construct in to a GET based payload to send back to the user’s browser. Basically, the user would request something and the tool would respond with a 302 redirect to a location. The location value would be the constructed payload. The user’s browser would just request content like normal and follow the redirect and execute the payload.</p>
<p>This payload type is best used in instances where you have the ability to add images tags or other HTML to a site. This way it could be relatively hidden from a user’s browser.</p>
<h3>Dynamic Page</h3>
<p>This payload constructs a page that performs several functions depending on what type of attack you are performing. You can either have the page perform a GET or a POST for an attack. Both the GET and POST types will be submitted by the user’s browser. So what does the page do? The attack that you construct gets embedded in the page and after the attack happens the user is immediately redirected to a location of your choice. So you could perform an attack and immediately send someone to the Benny Lava video <img src='http://www.neohaxor.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  This could be combined with an URL shortener for further obfuscation.</p>
<p>This payload is best used in instances where you have the ability to embed hyperlinks to pages. Another thing to note about the dynamic page payload is that it makes POST based CSRF a whole lot easier to pull off. If you thought submitted data as a POST was a protection mechanism for CSRF you might want to rethink you point of view <img src='http://www.neohaxor.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<h3>POST Construct</h3>
<p>This payload is a bit different because the POST request is made by the tool and not the user’s browser. This needs to be kept in mind when using it. You will not have the advantage of the browser being helpful and submitting header information. If the cross-domain leakage is enough that you can perform an entire POST request without the user’s browser then this payload can be used. Otherwise, it will be pretty useless to you <img src='http://www.neohaxor.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h3>Fixation</h3>
<p>The fixation payload allows you to make a request for data that you fixate on to the attack you send to the user. This is still experimental and only works in some narrow situations. This will be expanded later. This works as a modified page payload that performs and extra request and parses the response and gains the necessary information to perform the attack. This would be commonly used to make a request for tokens that you can fixate on to a request forged by the user&#8217;s browser.</p>
<h3>Default Payload</h3>
<p>The default payload gets matched when there is no cross-domain information for the tool to match with your entries in the payloads.xml file. It’s best to not perform an attack with this <img src='http://www.neohaxor.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  The best thing to do is to make this a link to some real content like an image. This can make the tool a bit more stealthy.</p>
<p>You need to specify a default payload. Not doing so would be like crossing the streams. Well maybe not that bad, but it wouldn’t be good.</p>
<h3>MonkeyFist Running Options</h3>
<p>There are only a couple of running options with MF and well, all of them do not work as of yet. So, the main one you need to be familiar with is -s. This is the standard attack mode. The -p option specifies the port you would like MF to run on. You won’t need privileged access unless you are trying to run on a low order port. The following would run MonkeyFist on port 8080 using standard attack mode:</p>
<pre><span style="color: #3366ff;">./MonkeyFist -p 8080 -s</span></pre>
<p>You can get the about information by running -a, just in case you were curious about what version you are running.</p>
<pre><span style="color: #3366ff;">./MonkeyFist -a</span></pre>
<p>Of course, if you need some reference there is always the ole’ help with -h</p>
<pre><span style="color: #3366ff;">./MonkeyFist -h</span></pre>
<p>There are a couple of other options that are planned for the future. A testing mode and a random mode will be added as well, but currently, they are not implemented.</p>
<h3>Payloads</h3>
<p>The payloads.xml file is where you define your attacks. This is where all of your work will be done. The exact options that are specified in this file are still being worked out. This is because as content goes, there needs to be flexibility when identifying these issues. There is a basic set of options that allow you to pull of some attacks even as MonkeyFist sits at version 0.4. Expect some changes in these options. The payloads.xml file will be covered in more detail in a future post.</p>
<h3>The Others</h3>
<p>You will notice a few other files in the MonkeyFist zip file. You might not want to delete them or you may have some unintended consequences. The page2.html file is blank, but it won’t be if you pull off any Page attacks. Contents are put in to this file dynamically and change per attack. Markup.py is something I didn’t write, it just allowed me to quickly generate some HTML. This was before I made the decision to use lxml. For now I am going to leave it in there, even though it is not the best option. FistLib.py is the most important. This is the workhorse that takes care of all the work.</p>
<h3>In Closing</h3>
<p>I think that’s it for a small intro on MonkeyFist. In future posts I will explain more about the payloads and how they are constructed. If you notice any problems while running MF please let me know. You can send an email to monkeyfist {at} hexsec {dot} com. This is still a work in progress so please don’t beat me up too bad. I do welcome your feedback though. Thanks.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.neohaxor.org/2009/08/12/monkeyfist-fu-the-intro/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Dynamic Cross-Site Request Forgery (CSRF)</title>
		<link>http://www.neohaxor.org/2009/08/11/dynamic-cross-site-request-forgery/</link>
		<comments>http://www.neohaxor.org/2009/08/11/dynamic-cross-site-request-forgery/#comments</comments>
		<pubDate>Tue, 11 Aug 2009 20:57:49 +0000</pubDate>
		<dc:creator>Nathan Hamiel</dc:creator>
				<category><![CDATA[Application Security]]></category>
		<category><![CDATA[Bypassing CSRF Protections]]></category>
		<category><![CDATA[Cross Site Request Forgery]]></category>
		<category><![CDATA[CSRF]]></category>
		<category><![CDATA[Dynamic CSRF]]></category>
		<category><![CDATA[Token Fixation]]></category>
		<category><![CDATA[Weaponizing the Web]]></category>

		<guid isPermaLink="false">http://www.neohaxor.org/?p=154</guid>
		<description><![CDATA[Bypassing CSRF Protections With Dynamic CSRF
At our presentation at Black Hat and Defcon this year, Shawn Moyer and I gave a talk called Weaponizing the Web: More Attacks on User Generated Content. During the talk we discussed something we are calling Dynamic Cross-Site Request Forgery (CSRF). Dynamic CSRF methods can be used to create new [...]]]></description>
			<content:encoded><![CDATA[<h3 style="font-size: 1.17em;">Bypassing CSRF Protections With Dynamic CSRF</h3>
<p>At our presentation at <a href="http://www.blackhat.com">Black Hat</a> and <a href="http://defcon.org">Defcon</a> this year, Shawn Moyer and I gave a talk called <a href="http://hexsec.com/docs/WeaponizingTheWeb_BHUS09.pdf/view">Weaponizing the Web: More Attacks on User Generated Content</a>. During the talk we discussed something we are calling Dynamic Cross-Site Request Forgery (CSRF). Dynamic CSRF methods can be used to create new attack vectors and compromise CSRF protection mechanisms. CSRF is often difficult to explain in the first place, so I just wanted to do a post about it and link our <a href="http://hexsec.com/docs/Dynamic_CSRF_rev1.pdf/view">Dynamic CSRF White Paper</a>.</p>
<h3>Static CSRF Attacks</h3>
<p>The current way people are exploiting CSRF issues is pretty static. A link may be crafted and people are tricked in to clicking on it or viewing a page with this link embedded. They may even do something such as create an auto-submitting POST that the user executes when visiting certain content. The moral is that someone crafts this attack for a specific location and chooses a vector for delivering it to users. On it&#8217;s own, this static CSRF attack method can be pretty devastating or perhaps totally innocuous. That&#8217;s just the nature of CSRF. There aren’t too many vulnerabilities that fall in to this category, which may be why it can sometimes be hard to understand.</p>
<p>Let&#8217;s just think about some things that would make CSRF even more dangerous. What if we had visibility in to CSRF tokens or even session identifiers? What if we knew for sure a user was on the site that we wanted to attack? What if we could use a central point to dynamically attack multiple sites? What if we could create a custom payload on the fly to include tokens and session data? What if we could request data in another process and fixate it on to a request that the user executes? CSRF would become much more dangerous. Well, it just did&#8230;.</p>
<h3>Dynamic CSRF Attacks</h3>
<p>With Dynamic CSRF attacks the game changes a bit. Attacks can be adapted based on where requests are originating from. Sensitive information sent in a cross-domain fashion can be packaged in to a customized payload and sent to a location. Disjoined or bolted on components can be queried and fixated on to a user&#8217;s request. This opens up new opportunities for attacks. Dynamic CSRF allows you to run one central system and run attacks for multiple sites and applications with the ability to remove and repackage any leaked session information.</p>
<p><img src="http://farm3.static.flickr.com/2460/3767576054_4cbb0efecb_o.png" alt="Dynamic CSRF" /></p>
<p>Using dynamic methods may allow for the bypass of CSRF protections. Whether these protections are leaked in the referer or if they can be requested by other means and fixated on to the request, bypassing may be possible. This makes requests that were previously not vulnerable to CSRF vulnerable again.</p>
<p>When not limited by static requests a few new attack vectors open up. I just wanted to highlight a couple here.</p>
<h3>Getting Dynamic</h3>
<p>In the next couple of sections I am going to point out some dynamic methods for bypassing CSRF protection mechanisms.</p>
<h4><strong>HTTP Redirect</strong></h4>
<p>A simple redirect attack can be made more devastating with the addition of session related data added to the request. So a user hits a piece of HTML on a web page that sends a GET request containing session data (Session IDs, CSRF Tokens, etc) in the referer. This session data can be taken from the referer and repackaged in to a payload that is sent to the users browser as a location for a 302 redirect.</p>
<p><img src="http://farm4.static.flickr.com/3439/3767576354_0b2e519456_o.png" alt="HTTP Redirect" /></p>
<p>A scenario for this type of attack might be embedding a hidden image tag that links to a location offsite. This image tag may leak session data through referer allowing a tool to repackage that session data and get the user&#8217;s browser to execute it as a payload. This could be used to bypass CSRF protections by using the CSRF tokens from the referer.</p>
<h4><strong>HTML-based Redirect</strong></h4>
<p>For this scenario a hyperlink could point to a page that is created dynamically per-each request. This page contains a hidden GET or POST that could contain session data taken from referer as mentioned previously in the HTTP Redirect. The page would then refresh to a legitimate destination. To a user there would only appear to be a short pause prior to their landing on the legitimate destination, but in the background an attack has happened.</p>
<p>This attack could be made more interesting with URL shortening services. People have become accustomed to URL shorteners due to their use of Twitter and other social networks. Using a URL shortener would mask the location of the dynamic page and may not raise further suspicion.</p>
<p><img src="http://farm4.static.flickr.com/3535/3766778455_4458f654f6_o.png" alt="HTML-based Redirect" /></p>
<p>A scenario for this would be posting a link that is shortened with a URL shortener on a web site that supposedly links to a video on YouTube. When the user clicks the link a hidden action (GET or POST) is executed. After the hidden action takes place, the browser does a refresh to the expected destination (the YouTube video). The victim may get little or no indication that the hidden attack has happened.</p>
<h4><strong>Fixation Based Attacks</strong></h4>
<p>Here is where things get a bit interesting. This attack hinges on the ability to have a valid CSRF token and a valid session identifier, but those two values aren’t associated together from a session perspective. Say you are posting on a message board. This message board issues you a Session ID in a cookie and also issues you a token for use when posting. If these two values aren’t linked from a session perspective, it would allow for any valid token to be added to the request. Since the Session ID is in the cookie value, if a forged request had a valid token appended this would bypass CSRF protections.</p>
<p><img src="http://farm4.static.flickr.com/3430/3832924543_a4e2db504f_o.png" alt="Fixation Attack" /></p>
<p>What makes this fixation attack an interesting scenario is it requires no leaking of any session data in a cross domain fashion. As long as you have some visibility to the token, it can be requested and fixated to the request.</p>
<h3>Other Scenarios</h3>
<p>There are other scenarios as well. It really depends on how much session data gets leaked in a cross-domain fashion. For example, if the full session ID is leaked, there could be some real problems. It could allow for a tool to construct any GET or any POST to the target application.</p>
<h3>MonkeyFist</h3>
<p><a href="http://hexsec.com/misc/monkeyfist">MonkeyFist</a> is a tool I wrote to PoC Dynamic CSRF attacks. The tool runs as a small service on a system listening for all incoming input. When it receives a request it looks in the referer to determine where the request is coming from. It then uses this information to parse a payloads file and look for the specific attack to construct for that domain. You can have multiple entries in the payloads file performing multiple types of attacks. Redirect, POST, Page (GET and POST) and an Experimental Fixation handler are all included in the application. You can learn more about MonkeyFist on the the <a href="http://hexsec.com/labs">Hexsec Labs</a> page. It is not exactly where I would like it to be, but it works. More streamlining and modifications will come soon. I am still recovering from Black Hat and Defcon <img src='http://www.neohaxor.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I have some posts on MonkeyFist that are coming soon as well.</p>
<h3>More Info</h3>
<p>That&#8217;s it for a quick intro to Dynamic CSRF. If you would like more information you can read our white paper which is available <a href="http://hexsec.com/docs/Dynamic_CSRF_rev1.pdf/view">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.neohaxor.org/2009/08/11/dynamic-cross-site-request-forgery/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Black Hat 2009 Sneak Peek</title>
		<link>http://www.neohaxor.org/2009/06/16/black-hat-2009-sneak-peek/</link>
		<comments>http://www.neohaxor.org/2009/06/16/black-hat-2009-sneak-peek/#comments</comments>
		<pubDate>Tue, 16 Jun 2009 13:35:09 +0000</pubDate>
		<dc:creator>Nathan Hamiel</dc:creator>
				<category><![CDATA[Information Security]]></category>
		<category><![CDATA[Black Hat]]></category>
		<category><![CDATA[sneak peek]]></category>
		<category><![CDATA[Weaponizing the Web]]></category>

		<guid isPermaLink="false">http://www.neohaxor.org/?p=150</guid>
		<description><![CDATA[The Black Hat 2009 Sneak Peek is this Thursday. Black Hat is going to be giving a sneak peek of talks that they feel are interesting from their 2009 lineup. We are glad, once again, they have found one of our talks interesting enough to include in their sneak peek, especially given the lineup. Not [...]]]></description>
			<content:encoded><![CDATA[<p>The Black Hat 2009 Sneak Peek is this Thursday. Black Hat is going to be giving a sneak peek of talks that they feel are interesting from their 2009 lineup. We are glad, once again, they have found one of our talks interesting enough to include in their sneak peek, especially given the lineup. Not sure why they picked our talk, but we will do our best not to let them down <img src='http://www.neohaxor.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  We will be discussing our talk called Weaponizing the Web: More Attacks on User-Generated Content. If you would like more information or would like to register for the webcast you can do so <a href="https://event.on24.com/eventRegistration/EventLobbyServlet?target=registration.jsp&amp;eventid=146342&amp;sessionid=1&amp;key=26D2D65AF392088EFA6C0021825D3E05&amp;sourcepage=register">here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neohaxor.org/2009/06/16/black-hat-2009-sneak-peek/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Speaking at Black Hat 2009</title>
		<link>http://www.neohaxor.org/2009/05/22/speaking-at-black-hat-2009/</link>
		<comments>http://www.neohaxor.org/2009/05/22/speaking-at-black-hat-2009/#comments</comments>
		<pubDate>Fri, 22 May 2009 13:30:36 +0000</pubDate>
		<dc:creator>Nathan Hamiel</dc:creator>
				<category><![CDATA[Information Security]]></category>
		<category><![CDATA[Python Programming]]></category>
		<category><![CDATA[Black Hat]]></category>
		<category><![CDATA[Hexagon Security]]></category>
		<category><![CDATA[Hexsec]]></category>
		<category><![CDATA[Weaponizing the Web]]></category>

		<guid isPermaLink="false">http://www.neohaxor.org/?p=139</guid>
		<description><![CDATA[
Hello Everyone. I just thought I would drop a quick note. Shawn Moyer and I are speaking at Black Hat US 2009. Our talk is called Weaponizing the Web: More Attacks on User Generated Content. We are going to be talking about attacking sites with user controlled content. In the modern web environment, that&#8217;s a [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://farm4.static.flickr.com/3572/3553438221_fc74ac47d1_o.jpg" alt="Black Hat Logo" /></p>
<p>Hello Everyone. I just thought I would drop a quick note. Shawn Moyer and I are speaking at <a href="http://www.blackhat.com">Black Hat US 2009</a>. Our talk is called <a href="http://www.blackhat.com/html/bh-usa-09/bh-usa-09-speakers.html#Hamiel">Weaponizing the Web: More Attacks on User Generated Content</a>. We are going to be talking about attacking sites with user controlled content. In the modern web environment, that&#8217;s a whole lot of sites. This content can be turned around and used against the site, the user, or other sites.</p>
<p>If you are going to be out at Black Hat this year also check out Michael Murphy and Aaron LeMasters&#8217; talk <a href="http://www.blackhat.com/html/bh-usa-09/bh-usa-09-speakers.html#LeMasters">Rapid Enterprise Triaging(RETRI)</a>. Mike and Aaron are fellow members of <a href="http://www.hexsec.com">Hexsec</a>. Anyway, that&#8217;s all for now.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.neohaxor.org/2009/05/22/speaking-at-black-hat-2009/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Social Networks and Black Magic</title>
		<link>http://www.neohaxor.org/2009/04/09/social-networks-and-black-magic/</link>
		<comments>http://www.neohaxor.org/2009/04/09/social-networks-and-black-magic/#comments</comments>
		<pubDate>Thu, 09 Apr 2009 17:38:54 +0000</pubDate>
		<dc:creator>Nathan Hamiel</dc:creator>
				<category><![CDATA[Social Networking]]></category>
		<category><![CDATA[attacks]]></category>
		<category><![CDATA[Black Magic]]></category>
		<category><![CDATA[Bruce Schneier]]></category>
		<category><![CDATA[child predators]]></category>
		<category><![CDATA[dumb]]></category>
		<category><![CDATA[ITworld]]></category>
		<category><![CDATA[Social Networks]]></category>

		<guid isPermaLink="false">http://www.neohaxor.org/?p=116</guid>
		<description><![CDATA[
Social networks are shrouded in mystery. Just their very existence defies the laws of physics. If it were the late 40&#8217;s men in strange suits would be trying to dissect them at some top secret facility, but we have come so far since then   Even though this sounds ridiculous, this is what many would have you [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://farm4.static.flickr.com/3545/3426323081_14432a1cae_m.jpg" alt="" /></p>
<p>Social networks are shrouded in mystery. Just their very existence defies the laws of physics. If it were the late 40&#8217;s men in strange suits would be trying to dissect them at some top secret facility, but we have come so far since then <img src='http://www.neohaxor.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Even though this sounds ridiculous, this is what many would have you believe about social networks. Why you ask? Because many of the people that talk about attacks and the dangers of social networks don&#8217;t even use them. They make all kinds of assumptions about soc nets that are completely false. The funny thing about assumptions when you are theorizing attacks is if your assumptions are faulty then your conclusions are faulty. Let&#8217;s cut the crap and focus on the real threats to social networks and their users.</p>
<p><a href="http://www.schneier.com/">Bruce Schneier</a> just had a post in his blog about <a href="http://www.schneier.com/blog/archives/2009/04/social_networki.html">Social Networking Identity Theft Scams</a>. In this blog post he refers to an article on ITworld titled <a href="http://www.itworld.com/security/58447/why-you-cant-trust-friends-facebook">Why you can&#8217;t trust &#8216;friends&#8217; on Facebook</a> as clever. This isn&#8217;t clever, this is dumb and extremely improbable. This is a perfect example of people talking about social networks that have no idea how they are used. The explanation of the scenario shows a clear lack of understanding of how social network users view and interact with their network.</p>
<p>I will not go in to all the specifics of what they were talking about, but it is based on the premise that you view your social network &#8220;friends&#8221; as you view your friends and family from the non-web world. Now, it&#8217;s possible and even likely that you may meet someone on a social network and actually become friends with them. This may even be part of the appeal for someone participating in a social network. The problem for an attacker is cultivating a true friendship takes time, effort, and resources. Attackers and scammers are all about effort vs reward. They are not going to take 6 months to a year of effort to try and scam someone out of 100 dollars.</p>
<p>Some other faulty logic they used is blurring the lines between the topic they were talking about and the Nigerian scam where they compromised peoples actual accounts. They then sent messages to their friends saying they were stuck in Nigeria and needed money. Still dumb, but this is a compromise of an already established social network presence. A far greater difference than a friend of a friend that you don&#8217;t know asking for money. You can see more information about that <a href="http://www.networkworld.com/news/2008/111008-facebook-hit-by-nigerian-419.html">here</a>. True they both ask for money, but the scenarios are far different.</p>
<h3>Now This is Nasty</h3>
<p>If you want to talk about dangerous, during the talk Shawn Moyer and I did at Black Hat and Defcon last year and even our ShmooCon talk this year I mention a concept that involved attacking innocuous functions. On certain social networks this would allow you to semi-hijack a person&#8217;s social network identity. The concept deals with blocking communication and creating a denial of service condition for all visitors to someone&#8217;s social network profile. You could then create a new, duplicate identity with the user&#8217;s information and try to re-friend previous friends. In the message you tell them something went wrong with your account and you had to create a new one.</p>
<p>This is far more dangerous than the scenario that the article goes in to. It&#8217;s much easier than trying to compromise someone&#8217;s account, you are able to disrupt normal communications between friends, and you are able to potentially hijack already established trust. An attacker could then run a scam under this identity giving them a higher percentage of success.</p>
<h3>Social Networks and Safety</h3>
<p>I am the last one to say that social networks are safe, for example see <a href="http://blackhat.com/html/bh-usa-08/bh-usa-08-speakers.html#Moyer">here</a> and <a href="http://www.shmoocon.org/presentations-all.html#fail2">here</a>. I just can&#8217;t stand bad information and fear mongering. Yes, fear mongering. &#8220;The child molesters are going to get your kids on the social networks&#8221;. Yuck! In a comment on his own blog post Bruce said,</p>
<blockquote><p>&#8220;I&#8217;ve seen some of my friends on Facebook put their address and phone number on their information page. Anyone they add can see it, and one such person I know has well over 1,000 friends. Not a good combination with videos of his two small children posted.&#8221;</p></blockquote>
<blockquote><p>Why is that not a good combination. You can&#8217;t possibly believe that 0.1% of the Facebook population are child predators?</p></blockquote>
<p>Now it&#8217;s true that some people do put far too much information on their pages. This is due to the fact that it is not clear to them what is really sensitive.</p>
<h3>A Note To Parents</h3>
<p>Child predators are not trolling social networks (with any significance) trying to molest your kids. Child predators are opportunistic just like other types of attackers. They are not going to see an address on a social network and pay the house a visit. There are just too many variables for the predator to deal with. Parents, guns, neighbors, witnesses, geographic locations, and many other factors make this a prohibitive method for them to use.</p>
<p>Now as far as them using social networks to try and contact your kids there are many factors there as well. Social networks do monitor their network. Some networks are better at it than others, but there is the monitoring factor. Not to mention the person would have to spend quite a bit of time creating a relationship with your kids, which leaves them at risk for being found out by parents. I mean hopefully your kids don&#8217;t just go off to meet with strangers. If that is the case then you have much larger problems.</p>
<p>As parents you have control over the internet connection and your kids usage of the Internet. Know who they are talking to and what their activities online are. Remember your being curious not paranoid. You get paranoid over things you have no control over, these are your kids <img src='http://www.neohaxor.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Know who they talk to and who their friends are. After all, a predator is going to try to get them alone and away from parents.</p>
<p>There is always the rare case that is the exception to the rule. Things happen and there are people who are just nuts and don&#8217;t think logically. People have been watching too much To Catch A Predator and think that the world is crawling with child molesters. Common sense should be your guide not a television show that is trying to get ratings. Besides in that show they had people posing as teens in an adult chat rooms, not social networks. Which just goes more to the point that I made about these individuals being opportunistic.</p>
<p>If you want more proof about the social network threats to kids being overblown you can read more about it from the New York Times <a href="http://www.nytimes.com/2009/01/14/technology/internet/14cyberweb.html">here</a>.</p>
<h3>The Thief Scenario</h3>
<p>Having your address on your soc net page and then a message saying, &#8220;On vacation out of the country&#8221; seems like (and really is) a stupid thing to do. Let&#8217;s look at it closer from the viewpoint of a thief. There are many variables here as well that still wouldn&#8217;t make this feasible. What about alarms, house sitters, family, neighbors, etc. This is on top of the information gathering activities that a thief would have to do prior to targeting someone anyway.</p>
<p>Now what is much more likely that attacker would target someone and augment their activities with information they find on social networks. These sort of targeted, personal information gathering activities can be pretty dangerous, but still not very realistic from a thief&#8217;s perspective. Thieves are opportunistic as well. What would change the scale is if you had known assets that someone REALLY wanted. This would warrant the time put in to the information gathering activities. Even in these scenarios the information from social networks only helps, the person would most likely be targeted anyway. There are rare exceptions, but just trying to put this in to perspective.</p>
<h3>Social Landscape</h3>
<p>There are aspects that make social network ripe targets for attack. They are a large collecting point for users. They are made up of mostly user generated content, many allow extensions and 3rd party applications. Any large collecting point of users is going to be looked at by an attacker. These are just the facts, but when discussing dangers and threats we need to look at them in terms of real risk. When we raise the danger flag for things that aren&#8217;t necessarily a risk we may draw attention away from things that really are a danger.</p>
<p>I particularly enjoy the individuals who say that they would never join a social network or communicate with people who do. As if people that use social networks somehow don&#8217;t know something that they do. I turn that around, why not use social networks? Are you socially inept and not able to communicate with your fellow man? Do you even know what social networks are used for? Of course, using social networks is a personal preference. It doesn&#8217;t have any bearing on the user&#8217;s awareness or intelligence level. However there are millions of the ugliest <a href="http://www.myspace.com">MySpace</a> pages in history just waiting for you to view them <img src='http://www.neohaxor.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Now there are some social impacts when professionals use social networks that I may cover in another post, because these have impacts as well.</p>
<h3>In Closing</h3>
<p>The low level of probability of these attacks is no excuse to be careless with your information. I just wanted to put some things in perspective and curb potential fear mongering. When you participate in a social network you are responsible for the information you post about yourself.</p>
<p>I think ultimately if you read articles or hear people theorizing about attacks on social networks and they don&#8217;t have a social network presence, be skeptical. This is especially true when they are discussing social attacks. While it&#8217;s true that social networks are just web applications sometimes the vulnerabilities come from how users interact with them. This often requires participation for understanding.</p>
<p>Lastly, I want to make it clear once again, I am not vouching for the safety of social networks by any means. There are many dangers on social networks. I just want to make sure that we focus on the true dangers of social networks so we can raise awareness for those issues.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.neohaxor.org/2009/04/09/social-networks-and-black-magic/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>LinkedIn Profiles Are Not &#8220;Serving&#8221; Malware</title>
		<link>http://www.neohaxor.org/2009/01/07/linkedin-profiles-are-not-serving-malware/</link>
		<comments>http://www.neohaxor.org/2009/01/07/linkedin-profiles-are-not-serving-malware/#comments</comments>
		<pubDate>Wed, 07 Jan 2009 16:08:18 +0000</pubDate>
		<dc:creator>Nathan Hamiel</dc:creator>
				<category><![CDATA[Social Networking]]></category>
		<category><![CDATA[Beyoncé Knowles nude]]></category>
		<category><![CDATA[doubt]]></category>
		<category><![CDATA[fear]]></category>
		<category><![CDATA[FUD]]></category>
		<category><![CDATA[LinkedIn]]></category>
		<category><![CDATA[Malware]]></category>
		<category><![CDATA[misconception]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[press]]></category>
		<category><![CDATA[Social Networks]]></category>
		<category><![CDATA[uncertainty]]></category>

		<guid isPermaLink="false">http://www.neohaxor.org/?p=104</guid>
		<description><![CDATA[
The past few days there has been a bit of a stink about some bogus LinkedIn profiles. There have been plenty of news sources reporting that LinkedIn profiles are serving malware or making it seem like profiles are infected somehow. A few examples of that can be found here and here and here. At least [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://farm4.static.flickr.com/3170/3006181865_3d112d7440_m.jpg" alt="LinkedIn_logo" /></p>
<p>The past few days there has been a bit of a stink about some bogus <a href="http://www.linkedin.com">LinkedIn</a> profiles. There have been plenty of news sources reporting that LinkedIn profiles are <em>serving</em> malware or making it seem like profiles are infected somehow. A few examples of that can be found <a href="http://blogs.zdnet.com/security/?p=2358">here</a> and <a href="http://www.theregister.co.uk/2009/01/06/bogus_linkedin_profile_scam">here</a> and <a href="http://blog.trendmicro.com/bogus-linkedin-profiles-harbor-malicious-content">here</a>. At least The Register called these people falling for this fools. What the titles of these reports imply are dead wrong. LinkedIn profiles are not actively attacking users.</p>
<p>The issue is very simple, it is a hyperlink to another site that infects idiots with Malware. A hyperlink to another site, not getting attacked from viewing a profile. When you allow users to link to off-site content, you lose control of the request, however, this isn&#8217;t like allowing users to pull content in from other sites to display on their profiles. This typically has very little impact. This is no different than any other site, message board, or social network.</p>
<p>Give me a break, like Beyoncé Knowles has a LinkedIn page and is going to have a hyperlink on there to a place to view her nude pictures. That&#8217;s the issue these sites are referring to, dumb isn&#8217;t it? How does that get turned in to words like <em>serving, harboring, or redirecting</em>? These words imply some sort of active action on LinkedIn&#8217;s part, which doesn&#8217;t describe the situation here AT ALL. If you ran a message board and someone had a hyperlink to <a href="http://tinyurl.com/f43dx">Goatse</a>, does that mean you are serving, harboring, or redirecting to Goatse? Of course it doesn&#8217;t. This would just be an indication of your user base. I wonder how many people were brave enough to click the Goatse link above <img src='http://www.neohaxor.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  It&#8217;s not Goatse, promise.</p>
<p>Is there really no end of the Internet news stories this week to scare people with so people decided we should be scared of LinkedIn? This is basically spreading FUD. I personally don&#8217;t see why LinkedIn should take any heat from this. The feature of LinkedIn that allows you to link to your Company, personal site, or some other site should remain a part of LinkedIn&#8217;s features. I really hope they don&#8217;t go with something like MySpace did with the msplinks stuff. This would basically put a big obnoxious splash page up that states you are about to visit content off of the site. Yeah, well no crap I just clicked on the link so of course I want to visit the page. I personally don&#8217;t think that is a very effective control for these types of attacks anyway. The only time that control is effective is if it isn&#8217;t clear to the user that they are visiting content off the particular site they are on. I have seen in the past MySpace profiles that were compromised and the whole profile links to a bogus MySpace login page. In that case the user seeing the warning would be alerted that something is wrong, however, you are still going to have a large amount of people just cough up their credentials anyway. Sometimes all the controls in the world just can&#8217;t fix stupid. The same people that would fall for this are the same ones that click on spam emails claiming the same thing. It&#8217;s a mentality not a technical security issue.</p>
<p>Let me state this, if you are not a complete idiot then this issue will not affect you in the least bit. These profiles are not performing any active attacks on users of LinkedIn. There are much more scary things out there than this, trust me. Don&#8217;t fear using LinkedIn because of issues like this. LinkedIn really has a very limited feature set which lowers their attack surface. They have much less functionality that other social network such as <a href="http://www.myspace.com">MySpace</a>, <a href="http://www.facebook.com">Facebook</a>, <a href="http://www.hi5.com">Hi5</a>, etc. Would you really care to see Beyoncé Knowles&#8217; LinkedIn profile anyway? I bet she is boring and fake. Her LinkedIn profile would state, &#8220;I have never had to work for anything in my life and everything has been handed to me because dummies think I have talent. I love screwing over my friends and taking money out of their pockets&#8221;. She should apologize to the world for creating that DirecTV Upgrade song. Yuck! Wait a minute, she doesn&#8217;t write her own music&#8230;  Anywhoo&#8230;.</p>
<p>I can&#8217;t believe I had to write this blog post, but the sheer number of people talking about this and linking to these stories was too much. Just practice smart Internet browsing habits mixed with common sense and you will be fine. As always, I recommend using the <a href="http://www.getfirefox.com">Firefox</a> web browser with the extensions <a href="http://noscript.net">NoScript</a> and <a href="https://addons.mozilla.org/en-US/firefox/addon/1865">Adblock Plus</a>. Have a good week, the end of the Internet is next week <img src='http://www.neohaxor.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.neohaxor.org/2009/01/07/linkedin-profiles-are-not-serving-malware/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Speaking at ShmooCon 2009</title>
		<link>http://www.neohaxor.org/2008/12/29/speaking-at-shmoocon-2009/</link>
		<comments>http://www.neohaxor.org/2008/12/29/speaking-at-shmoocon-2009/#comments</comments>
		<pubDate>Mon, 29 Dec 2008 20:56:01 +0000</pubDate>
		<dc:creator>Nathan Hamiel</dc:creator>
				<category><![CDATA[Social Networking]]></category>
		<category><![CDATA[2009]]></category>
		<category><![CDATA[Attacking]]></category>
		<category><![CDATA[explorisploiting]]></category>
		<category><![CDATA[Fail 2.0]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[Shmoocon]]></category>
		<category><![CDATA[Social Networks]]></category>

		<guid isPermaLink="false">http://www.neohaxor.org/?p=100</guid>
		<description><![CDATA[Hello Everyone. I just wanted everyone to know that I will be speaking at ShmooCon 2009 with Shawn Moyer. Our Topic is Fail 2.0: Further Musings of Attacking Social Networks. This will be an update to our Black Hat / Defcon 16 presentation. Update as in, we will have some new material and updates to [...]]]></description>
			<content:encoded><![CDATA[<p>Hello Everyone. I just wanted everyone to know that I will be speaking at <a href="http://www.shmoocon.org">ShmooCon 2009</a> with <a href="http://www.agurasec.com">Shawn Moyer</a>. Our Topic is <span style="color: #3366ff;">Fail 2.0: Further Musings of Attacking Social Networks</span>. This will be an update to our Black Hat / Defcon 16 presentation. Update as in, we will have some new material and updates to what we have previously talked about. We won&#8217;t be consistently beating an already dead horse. We felt that the topic still contains quite a bit of relevance. As companies continue to shift their focus toward social networks and social networking platforms in general, they are encountering the same security problems. Even though social networks are web applications, they do offer some unique challenges over other common web applications. We will be explorisploiting these differences <img src='http://www.neohaxor.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.neohaxor.org/2008/12/29/speaking-at-shmoocon-2009/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
